Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
補完したい話
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
chiroruxx
June 27, 2018
Programming
1
250
補完したい話
第127回PHP勉強会
PHPカンファレンス福岡2018 AfterHack
で発表した資料です。
chiroruxx
June 27, 2018
Tweet
Share
More Decks by chiroruxx
See All by chiroruxx
初心者エンジニアから中級者エンジニアになるためにオススメの1冊
chiroruxx
0
110
Laravelのパッケージ全部紹介する
chiroruxx
2
99
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
29
PHPをGoで動かす
chiroruxx
0
82
Goを使ってTDDを体験しよう!
chiroruxx
1
910
今ならできる!PhpStormプラグイン開発
chiroruxx
0
82
Go Connectへの想い
chiroruxx
0
210
eBPF with PHPをさわる
chiroruxx
0
160
sl完全に理解したつもり
chiroruxx
0
150
Other Decks in Programming
See All in Programming
How to stabilize UI tests using XCTest
akkeylab
0
130
モダンOBSプラグイン開発
umireon
0
160
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
500
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
190
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
260
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
580
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
350
AI活用のコスパを最大化する方法
ochtum
0
190
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
190
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.9k
[SF Ruby Feb'26] The Silicon Heel
palkan
0
110
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
150
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
200
Navigating Team Friction
lara
192
16k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
150
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
160
sira's awesome portfolio website redesign presentation
elsirapls
0
190
Marketing to machines
jonoalderson
1
5k
4 Signs Your Business is Dying
shpigford
187
22k
Ethics towards AI in product and experience design
skipperchong
2
230
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Transcript
補完したい話 6/27 PHP勉強会@東京 前田 和人
PHP Conference スポンサー募集中
自己紹介 ▪ 前田 和人 ▪ @chiroruxxxx ▪ 弁護士ドットコム株式会社 ▪ 補完機能依存
補完機能依存 ▪ もはや補完がないと生きていけない – すべてPhpStormのせい ▪ シェルも補完がないとつらい – fish最高! ▪
今日はPhpStormの話をするよ(fishはまた今度)
補完が効かないやつら ▪ factory ▪ サービスコンテナ ▪ 「引数によって返す型が違う」メソッドから生成されたインスタンスが補完で きない $user =
factory(User::class)->create(); $api = resolve(API::class);
つらい
頑張れば補完できるけど・・・ ▪ PHPDocで型を明示してあげれば補完できるけど・・・ ▪ 毎回これ書くのはちょっとしんどい ▪ 補完のためにコード長くするのも・・・ /** @var ¥App¥User
$user */ $user = factory(User::class)->create();
.phpstorm.meta.php ▪ .phpstorm.meta.phpというファイルを作成することで対応できる! ▪ WI-6027により実装された機能 ▪ factory design patternを補完する
.phpstorm.meta.php <?php namespace PHPSTORM_META { override(¥ServiceLocatorInterface::get(0), map([ "special" => ¥Exception::class,
¥ExampleFactory::EXAMPLE_B => ExampleB::class, ¥EXAMPLE_B => ¥ExampleB::class, ])); }
.phpstorm.meta.php <?php namespace PHPSTORM_META { override(¥ServiceLocatorInterface::getByPattern(0), map([ '' => '@Iterator|¥Iterator',
])); }
まとめ ▪ 「.phpstorm.meta.php」というファイルを書けば補完ができる! ▪ 引数の型も補完してくれる! ▪ 書くの大変だから自動化できるといいね