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
補完したい話
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
chiroruxx
June 27, 2018
Programming
260
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
補完したい話
第127回PHP勉強会
PHPカンファレンス福岡2018 AfterHack
で発表した資料です。
chiroruxx
June 27, 2018
More Decks by chiroruxx
See All by chiroruxx
Contextとはなにか
chiroruxx
1
460
初心者エンジニアから中級者エンジニアになるためにオススメの1冊
chiroruxx
0
140
Laravelのパッケージ全部紹介する
chiroruxx
2
160
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
56
PHPをGoで動かす
chiroruxx
0
110
Goを使ってTDDを体験しよう!
chiroruxx
1
1.3k
今ならできる!PhpStormプラグイン開発
chiroruxx
0
130
Go Connectへの想い
chiroruxx
0
240
eBPF with PHPをさわる
chiroruxx
0
210
Other Decks in Programming
See All in Programming
FreeBSDでZabbixを動かす.pdf
kenkino
0
160
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
110
Webの地図
yosuke_furukawa
PRO
6
4.4k
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.1k
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
230
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
270
型解析で実現する Go の言語内 DSL / Conference に Go! タイムテーブルの歩き方 for Gophers
mazrean
0
150
自分的「カンファレンスの楽しみ方」
syumai
0
200
業務時間外もAIに働いてもらう話
colorful12
3
10k
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
460
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
190
新卒PdEのリアル
ryu1013
1
490
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Google's AI Overviews - The New Search
badams
0
1.6k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
Agile that works and the tools we love
rasmusluckow
331
22k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
WCS-LA-2024
lcolladotor
0
830
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
Color Theory Basics | Prateek | Gurzu
gurzu
0
460
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
HDC tutorial
michielstock
2
870
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
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」というファイルを書けば補完ができる! ▪ 引数の型も補完してくれる! ▪ 書くの大変だから自動化できるといいね