Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
OSS Gateに参加したら Larastanに コントリビュートできた - Kobe Lar...
Search
Akinori Takigawa
April 09, 2024
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OSS Gateに参加したら Larastanに コントリビュートできた - Kobe Laravel
Akinori Takigawa
April 09, 2024
More Decks by Akinori Takigawa
See All by Akinori Takigawa
PHPの脆弱性修正リリースで私たちがすべきこと
akinoriakatsuka
2
980
Nginxになりきって、FCGIでPHPと喋ろう
akinoriakatsuka
0
120
PHPUnitのテストイベントを使ってテストにかかる時間の計測をしよう
akinoriakatsuka
0
250
パイプ演算子の実装を 覗いてみよう
akinoriakatsuka
0
340
PHPでCQRS+ES入門
akinoriakatsuka
0
250
手軽に作れる電卓を作って イベントソーシングに親しもう CQRS+ESカンファレンス2026
akinoriakatsuka
0
1.2k
Rubyで作る物理エンジン - 叡電LT
akinoriakatsuka
0
60
パイプ演算子の実装を覗いてみよう - 【非公式】PHPカンファレンス福岡2025・前日Meetup
akinoriakatsuka
0
65
技術的負債の会計学 - PHPカンファレンス広島2025
akinoriakatsuka
8
1.7k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
RailsConf 2023
tenderlove
30
1.6k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Code Review Best Practice
trishagee
74
20k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
KATA
mclloyd
PRO
35
16k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Docker and Python
trallard
47
4.2k
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
OSS Gate に参加したら Larastan に コントリビュートできた あかつか 2024/04/11 Kobe Laravel
自己紹介
自己紹介 あかつか 神戸の会社でバックエンドエンジニアをしています PHP とLaravel が好きです 最近はGo も好き new Larastan
コントリビューター https:/ /github.com/larastan/larastan/releases/tag/v2.9.1 (とはいえ、一個しかPR やってない)
Larastan とは
Larastan とは PHPStan のLaravel 向けラッパー PHPStan PHP の静的解析ツール 定義されていない変数を使おうとした時に警告し てくれる
関数の戻り値の方が間違っている時に警告してく れる Larastan はLaravel の特有の機能にも対応している
OSS Gate とは
OSS Gate とは 「OSS Gate 」は、OSS 開発に参加する「入り口」を提供 する取り組みです。 OSS 開発に未参加の人を参加する
人へ、少し参加したことがある人を継続的に参加する 人へ。そうやってOSS 開発に参加する人を継続的に増や していく。それが「OSS Gate 」の目的です。 https:/ /oss-gate.github.io/
今回追加したもの
追加したもの サポートされているEloquent Builder メソッドに withWhereHas を追加 https:/ /github.com/larastan/larastan/issues/1523 https:/ /github.com/larastan/larastan/pull/1853
withWhereHas use App\Models\User; $users = User::withWhereHas('posts', function ($query) { $query->where('featured',
true); })->get();
実際に動きを見てみよう 私の変更が入ったのは2.9.1 から 2.9.0 と2.9.2 で違いを見てみよう $ composer show -i
| grep larastan $ ./vendor/bin/phpstan analyse
実際に動きを見てみよう before(2.9.0) after(2.9.2)
参加した時の私 OSS の経験はほぼなし ドキュメント修正のプルリクを送った程度 それでもコントリビュートできた🎉
どうやって追加した 1. Laravel とLarastan をインストールして 再現用のコードを書く 2. 手元のLarastan でissue の再現を確認
3. Larastan のリポジトリをフォーク 4. 修正を追加 5. テストを追加 + 通ることを確認 6. ドキュメントの修正 7. PR を送る
大変だったところ テストの書き方が最初わからなかった PHPUnit のTestCase を継承しているPHPStan の テストクラスを使っていた コミュニケーションが英語 CI がうまく通らないことがあって不安になった
OSS コントリビュートの始め方 OSS Gate に参加してみる 次回はオンラインで4/27 に開催される いろんなOSS を使ってみる PHP
やLaravel もOSS 使うことも貢献の一つの形 使っていてバグを見つけたり、うまく動かなかった りしたら報告しよう https:/ /github.com/laravel/framework/issues/50862
宣伝 PHP カンファレンス福岡で登壇します よかったらきてください!
Thank you!