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
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
490
初心者エンジニアから中級者エンジニアになるためにオススメの1冊
chiroruxx
0
150
Laravelのパッケージ全部紹介する
chiroruxx
2
170
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
58
PHPをGoで動かす
chiroruxx
0
120
Goを使ってTDDを体験しよう!
chiroruxx
1
1.4k
今ならできる!PhpStormプラグイン開発
chiroruxx
0
140
Go Connectへの想い
chiroruxx
0
250
eBPF with PHPをさわる
chiroruxx
0
210
Other Decks in Programming
See All in Programming
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.8k
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
速習iPhone Duo対応
yuukiw00w
2
980
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.7k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
0
410
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.1k
すこし踏み込む CancellationToken
htkym
2
1.7k
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.3k
mrbgem 三角測量 開発
ogom
0
240
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
330
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
Agents on Rails - Rails at Scale 2026
irinanazarova
0
530
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
730
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
530
Everyday Curiosity
cassininazir
0
350
Why Our Code Smells
bkeepers
PRO
340
58k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
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」というファイルを書けば補完ができる! ▪ 引数の型も補完してくれる! ▪ 書くの大変だから自動化できるといいね