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
270
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
補完したい話
第127回PHP勉強会
PHPカンファレンス福岡2018 AfterHack
で発表した資料です。
chiroruxx
June 27, 2018
Transcript
11 slides
補完したい話 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」というファイルを書けば補完ができる! ▪ 引数の型も補完してくれる! ▪ 書くの大変だから自動化できるといいね
More Decks by chiroruxx
See All by chiroruxx
Contextとはなにか
chiroruxx
1
530
初心者エンジニアから中級者エンジニアになるためにオススメの1冊
chiroruxx
0
180
Laravelのパッケージ全部紹介する
chiroruxx
2
230
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
66
PHPをGoで動かす
chiroruxx
0
130
Goを使ってTDDを体験しよう!
chiroruxx
1
1.5k
今ならできる!PhpStormプラグイン開発
chiroruxx
0
140
Go Connectへの想い
chiroruxx
0
250
eBPF with PHPをさわる
chiroruxx
0
230
Other Decks in Programming
See All in Programming
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
眠らない開発チームの作り方
biwakonbu
0
110
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
680
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
430
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.3k
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
390
Stage 3でも仕様は変わる。アプリケーション開発者のためのTC39プロセスの読み方
bicstone
1
100
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
17
9.5k
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
660
はじめてのKubernetesコントリビューション
nasa9084
0
320
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
130
Math.sumPreciseから学ぶ、ECMAScript仕様の数値の種類
syumai
0
130
Featured
See All Featured
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
550
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
500
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
610
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
330
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
GitHub's CSS Performance
jonrohan
1033
470k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.7k
Statistics for Hackers
jakevdp
799
230k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k