7
3

php.netの「Upcoming conferences」に「PHPカンファレンス福岡2024」も掲載してほしい

Posted at

今年は「月刊PHPカンファレンス」といった感じで、1月を皮切りに6月まで毎月どこかでPHPカンファレンスが開催されることをご存知でしょうか?

そんな「月刊PHPカンファレンス」仲間の「PHPカンファレンス関西2024(2月開催)」と「PHPカンファレンス香川2024(5月開催)」が php.net の「Upcoming conferences」のページに掲載されているではありませんか。

Screenshot from 2024-01-07 22-04-41.png

Screenshot from 2024-01-07 22-05-14.png

ズルい!「PHPカンファレンス福岡2024」も掲載してほしい!!!
ということで、掲載依頼の手順についてまとめていきたいと思います。


Upcoming conferences」のページの右上に「Want to see your conference appear here?」とあるので、こちらにアクセスします。

Screenshot from 2024-01-07 23-05-19.png

掲載する方法は2つあり、1つはGitHubでPull Requestを送る方法(推奨)、もう1つはメーリングリストに送信する方法のようです。

Screenshot from 2024-01-07 23-06-27.png

関西と香川の実行委員長にやり方を聞いてみたところ、Pull Requestを送る方法で実施したとのことだったので、福岡もPull Requestの形式でやってみることにしました。

先ほどのページに以下のように手順が書いてあるので、1つずつやっていきましょう。

  • Fork and clone that repository
    • php.netのwebサイトのリポジトリを fork して git clone する。
  • execute the bin/createNewsEntry script (php bin/createNewsEntry)
    • リポジトリ内の「bin/createNewsEntry」というPHPで書かれたスクリプトを実行する。
  • follow the step-by-step instructions, and commit and push the generated changes, and open a pull request.
    • 対話式のやり取りを終えたら変更点をコミットし、プッシュして、Pull Requestを作る。

まず、php.netのwebサイトのリポジトリにアクセスして、画面右上の「Fork」ボタンをクリックします。

Screenshot from 2024-01-07 23-24-24.png

自分のアカウントの配下に「web-php」のリポジトリが fork されました。

Screenshot from 2024-01-07 23-25-54.png

次に、 fork したリポジトリを git clone します。
clone についてはご自分の環境に合わせて行ってください。
私は /home/akase244/repos/web-phpclone しました。

次は、 bin/createNewsEntry というスクリプトを実行する手順ですが、このファイルの中身を見てみるとPHPで書かれています。

createNewsEntry
#!/usr/bin/env php
<?php
PHP_SAPI == 'cli' or die("Please run this script using the cli sapi");

require_once __DIR__ . '/../src/autoload.php';

use phpweb\News\Entry;



なので、以下のコマンドを実行します。するとニュース記事(今回はカンファレンスの紹介記事)のタイトルの入力を求められます。

$ php bin/createNewsEntry
Please type in the title: 

メッセージに従い、カンファレンスのタイトルを入力し、エンターを押下します。

Please type in the title: PHP Conference Fukuoka 2024

次は、カテゴリーの入力を求められます。

Categories:
	0: PHP.net frontpage news	 [frontpage]
	1: New PHP release	 [releases]
	2: Conference announcement	 [conferences]
	3: Call for Papers	 [cfp]
Please select appropriate categories, seperated with space:

今回はカンファレンスの告知を行いたいので「2」と入力し、エンターを押下します。

Please select appropriate categories, seperated with space: 2

次は、カンファレンスの開始日(もしくはCFPの受付終了日)の入力を求められます。

When does the conference start/cfp end? (strtotime() compatible syntax): 

今回はカンファレンスの開催日を入力します。

When does the conference start/cfp end? (strtotime() compatible syntax): 2024-06-22

次に、この告知記事には画像を添付するのか否かを質問されます。

Will a picture be accompanying this entry?

しかし、これだけでは一体何を入力してよいのやら。。。
ということで、 createNewsEntry のコードを読んでみると、以下の箇所が見つかりました。

createNewsEntry
	fwrite(STDOUT, "Will a picture be accompanying this entry? ");
	$yn = fgets(STDIN);


	if (strtoupper($yn[0]) !== "Y") {
		return NULL;
	}

どうやら、画像を添付する場合は「y」と回答したらよいみたいです。

Will a picture be accompanying this entry? y

次に、画像ファイルの名前の入力を求められます。
ここで、どうやら images/news 配下にファイルを配置しておく必要があったことがわかります。

Enter the image name (note: the image has to exist in './images/news'): 

しかし、推奨されるファイルの形式やサイズがわかりません。
なので、また createNewsEntry のコードを読んでみると、以下の箇所が見つかりました。
どうやら、幅400px、高さ250px以内に収まる形式にする必要がありそうです。

createNewsEntry
$imageRestriction = [
	'width' => 400,
	'height' => 250
];
createNewsEntry
			$imageSizes = getimagesize("./images/news/$path");

			if (($imageSizes[0] > $imageRestriction['width']) || ($imageSizes[1] > $imageRestriction['height'])) {
				fwrite(STDOUT, "Provided image has a higher size than recommended (" . implode(' by ', $imageRestriction) . "). Continue? ");
				$ynImg = fgets(STDIN);
				if (strtoupper($ynImg[0]) !== "Y") {
					$isValidImage = false;
				}
			}

なので、 /home/akase244/repos/web-php/images/news 配下に 250x250の phpconfuk2024.png を配置して、以下のように入力しました。

Enter the image name (note: the image has to exist in './images/news'): phpconfuk2024.png

次に、画像ファイルのタイトルの入力を求められます。

Image title: 

カンファレンスのタイトルを入力し、エンターを押下します。

Image title: PHP Conference Fukuoka 2024

次に、画像ファイルをクリックした際のリンク先の入力を求められます。

Link (when clicked on the image): 

カンファレンスのURLを入力し、エンターを押下します。

Link (when clicked on the image): https://phpcon.fukuoka.jp/2024/

最後にHTMLコンテンツの入力を求められます。

And at last; paste/write your news item here.
To end it, hit <enter>.<enter>

以下のようにカンファレンスの紹介記事のHTMLを入力します。

<p>
    We are delighted to announce the PHP Conference Fukuoka 2024.
</p>
<p>
    We want to boost the IT industry in the Kyushu region and provide a place where PHPers in Kyushu and PHPers from all over Japan can interact.<br/>
    This event has been held continuously since 2015 with this in mind.<br/>
    We hope that through this event, participants will inspire each other and create new ideas and connections. (This conference will be conducted in Japanese)
</p>
<strong>Basic facts</strong><br/>
<ul>
    <li>Date: June 22, 2024 (JST)</li>
    <li>Location: Fukuoka, Japan</li>
</ul>
<p>
    For more information, See the event page: <a href="https://phpcon.fukuoka.jp/2024/">PHP Conference Fukuoka 2024</a>.
</p>
<p>
    Follow us on <a href="https://twitter.com/phpcon_fukuoka">X(formerly Twitter)</a>.
</p>

上記のコンテンツを入力後、エンターを1回、「.」を1回、エンターを1回入力すると、「File saved.」と表示されます。

・
・
・
<p>
    Follow us on <a href="https://twitter.com/phpcon_fukuoka">X(formerly Twitter)</a>.
</p>
.
File saved.
Please git diff archive/archive.xml and sanity-check the changes before committing
NOTE: Remember to git add archive/entries/2024-01-07-1.xml !!

上記の手順により、以下のファイルが作成されます。

  • archive/archive.xml
  • archive/entries/2024-01-07-1.xml

上記の2ファイルと以下のロゴ画像と合わせて、 git commit して git push します。

  • images/news/phpconfuk2024.png

これで準備が整ったので、Pull Requestを作成してしばらく待つと、無事にマージされました。

Screenshot from 2024-01-08 00-08-03.png

マージされると php.net のwebページに反映されますのでトップページにアクセスしてみると、「Upcoming conferences」に「PHP Conference Fukuoka 2024」のリンクが追加されました。

Screenshot from 2024-01-08 00-17-13.png

「PHP Conference Fukuoka 2024」のリンクをクリックすると、このように先ほど入力したHTMLが表示されます。

Screenshot from 2024-01-08 00-18-22.png


7
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
3