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
Transcript
18 slides
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!
More Decks by Akinori Takigawa
See All by Akinori Takigawa
PHPの脆弱性修正リリースで私たちがすべきこと
akinoriakatsuka
2
1.1k
Nginxになりきって、FCGIでPHPと喋ろう
akinoriakatsuka
0
140
PHPUnitのテストイベントを使ってテストにかかる時間の計測をしよう
akinoriakatsuka
0
300
パイプ演算子の実装を 覗いてみよう
akinoriakatsuka
0
360
PHPでCQRS+ES入門
akinoriakatsuka
0
270
手軽に作れる電卓を作って イベントソーシングに親しもう CQRS+ESカンファレンス2026
akinoriakatsuka
0
1.2k
Rubyで作る物理エンジン - 叡電LT
akinoriakatsuka
0
70
パイプ演算子の実装を覗いてみよう - 【非公式】PHPカンファレンス福岡2025・前日Meetup
akinoriakatsuka
0
77
技術的負債の会計学 - PHPカンファレンス広島2025
akinoriakatsuka
8
1.7k
Featured
See All Featured
Scaling GitHub
holman
464
140k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
380
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
600
For a Future-Friendly Web
brad_frost
184
11k
Paper Plane (Part 1)
katiecoart
PRO
3
12k
The Limits of Empathy - UXLibs8
cassininazir
2
790
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k
Fireside Chat
paigeccino
43
4.1k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k