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
momochanにも分かるPSR講座
Search
ゆうきゃん
April 08, 2021
Programming
64
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
momochanにも分かるPSR講座
ゆうきゃん
April 08, 2021
More Decks by ゆうきゃん
See All by ゆうきゃん
Svelte Todo アプリハンズオン資料
ucan_lab
0
100
開発体験を爆上げするLaravel Dacapo マイグレーションサポートツールのススメ
ucan_lab
0
1.7k
モテるコードの書き方
ucan_lab
0
280
ターミナルtips
ucan_lab
0
110
ゆうきゃんどっかー のススメ In #TechCafe
ucan_lab
2
280
Laravel Dacapo 2019-09-06 YYPHP 99
ucan_lab
0
310
Laravel + Docker 環境構築ハンズオン
ucan_lab
2
520
Laravel+GraphQL 良かったこと 困ったこと 悲しかったこと
ucan_lab
2
830
バージョン管理ツールについて振り返り
ucan_lab
0
100
Other Decks in Programming
See All in Programming
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
340
iOSDC2026登壇資料.pdf
riofujimon
0
170
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
700
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
210
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
1.6k
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
340
FreeBSDでZabbixを動かす
kenkino
0
300
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
290
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
360
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
240
速習iPhone Duo対応
yuukiw00w
1
570
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
A better future with KSS
kneath
240
18k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Marketing to machines
jonoalderson
1
5.8k
Navigating Team Friction
lara
192
16k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
500
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
From π to Pie charts
rasagy
1
370
Transcript
momochan ʹ͔ΔPSRߨ࠲ 2021.04.08 ucan-lab in גࣜձࣾϛϥΠτσβΠϯ
None
͓͠ͳ͕͖ • PSRͱ • PHP-FIGͱ • PSRͷࡦఆϓϩηε • PSRҰཡ •
PSRΧςΰϦ • PSRൈਮհ
PSRͱ
PSRͱ • https://www.php- fi g.org/psr • PHP Standards Recommendations •
PHPඪ४ίʔσΟϯάקࠂ • ४ڌ(ڧ੍Ͱͳ͍)
PHP-FIGͱ
PHP-FIGͱ • https://www.php- fi g.org/personnel • PSRͷ࡞Λߦ͍ͬͯΔ • PHPͷϑϨʔϜϫʔΫπʔϧͳͲͷϓϩδΣΫτ։ൃ ऀʹΑͬͯߏ͞Ε͍ͯΔ৫
• CakePHP, Composer, Magento, PEAR, Phalcon, Slim… • SymfonyͱLaravelҙݟ͕߹Θͳ͘ͳͬͯ
ࡦఆϓϩηε
ࡦఆϓϩηε • Pre-Draft (ఏҊ) • Draft (Ҋ) • Review (ධՁ)
• Accepted (ঝೝ) • Deprecated (ඇਪ) • Abandoned (์غ)
PSRҰཡ
PSRҰཡ Accepted (ঝೝ) • PSR-1 Basic Coding StandardʢجຊతͳίʔσΟϯάඪ४ʣ • PSR-3
Logger InterfaceʢϩΨʔΠϯλϑΣʔεʣ • PSR-4 AutoloaderʢΦʔτϩʔμʔʣ • PSR-6 Caching InterfaceʢΩϟογϯάΠϯλʔϑΣΠεʣ • PSR-7 HTTP Message InterfaceʢHTTPϝοηʔδΠϯλʔϑΣΠεʣ • PSR-11 Container InterfaceʢίϯςφΠϯλϑΣʔεʣ • PSR-12 Extended Coding Styleʢ֦ுίʔσΟϯάελΠϧʣ • PSR-13 Hypermedia LinksʢϋΠύʔϝσΟΞϦϯΫʣ • PSR-14 Event DispatcherʢΠϕϯτσΟεύονϟʔʣ • PSR-15 HTTP HandlersʢHTTPϋϯυϥʣ
PSRҰཡ Draft (Ҋ) • PSR-5 PHPDoc Standard (PHPDocඪ४) • PSR-19
PHPDoc tags (PHPDocλά) • PSR-20 Clock (ΫϩοΫ)
PSRҰཡ Deprecated (ඇਪ) • PSR-0ɹAutoloaderʢΦʔτϩʔμʔʣ • PSR-2ɹCoding Style GuideʢίʔσΟϯάε λΠϧΨΠυʣ
PSRҰཡ Abandoned (์غ) • PSR-8 Huggable Interface (ϋάΞϒϧΠϯλʔϑΣ Πε) •
PSR-9 Security Advisories (ηΩϡϦςΟΞυόΠβ Ϧ) • PSR-10 Security Reporting Process (ηΩϡϦςΟϨ ϙʔτϓϩηε)
PSRΧςΰϦ
PSRΧςΰϦ • ΦʔτϩʔσΟϯά(PSR-0, 4) • ΠϯλʔϑΣΠε(PSR-3, 6, 11,13, 14, 16)
• HTTP(PSR-7, 15, 17, 18) • ίʔσΟϯάελΠϧ(PSR-1, 2, 12)
PSRൈਮհ
PSRൈਮհ(PSR-1) • Basic Coding Standard • ϑΝΠϧͰλά <?php ͘͠<?= ͷΈΛ༻͢Δ
• PHPίʔυͷϑΝΠϧͰBOMͳ͠ͷUTF-8ͷΈΛ༻͢Δ • Ϋϥε໊ύεΧϧέʔεͰએݴ͢Δ • ΫϥεఆɺશͯେจࣈͰΞϯμʔείΞ۠ΓΛར༻ͯ͠એ ݴ͢Δ • ϝιου໊ΩϟϝϧέʔεͰએݴ͢Δ
PSRൈਮհ(PSR-12, PSR-2) • Extended Coding Style Guide • PSR-2 ͷίʔσΟϯάελΠϧΨΠυͷ֦ுͱͳΔ
• શͯͷ PHP ϑΝΠϧɺUnix LFʢϥΠϯϑΟʔυʣͷߦͷΈΛ༻ ͢Δ • શͯͷ PHP ϑΝΠϧɺۭനҎ֎ͷߦͰऴΘΓɺ୯Ұͷ LF Ͱऴྃ͢Δ • PHP ͷΈΛؚΉϑΝΠϧͰɺऴྃλάΛলུ͢Δ • ΠϯσϯτϨϕϧ͝ͱʹ̐ͭͷεϖʔεͷΠϯσϯτΛ༻͢Δ
PSRൈਮհ(PSR-20) • ClockInterface • ࣌ؒૢ࡞ܥͷΠϯλʔϑΣʔεʢݱࡏDraftதʣ • ݱࡏͷ࣌ؒʹґଘ͢ΔίʔυΛςετ͢Δͱ͖ʹ૬ޓ ӡ༻ੑΛՄೳʹ͢Δ • ݱࡏͷ࣌ࠁΛऔಘ͢ΔͨΊͷҰ؏ͨ͠ΠϯλʔϑΣΠε
• ࠶ݱੑͷͨΊʹ࣮࣌ؒΛ؆୯ʹෳͰ͖·͢ɻ
͓͠·͍
143શʹཧղͨ͠ʂ