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
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
160
Family mrubyの進捗
kishima
1
130
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
480
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
130
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.3k
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
180
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
140
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
120
アクセシビリティから考える情報設計
high_g_engineer
0
380
Java 27新機能 / Java 27 new features
kishida
2
150
iOSDC2026登壇資料.pdf
riofujimon
0
170
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
180
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
230
The browser strikes back
jonoalderson
0
1.7k
Discover your Explorer Soul
emna__ayadi
2
1.3k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Skip the Path - Find Your Career Trail
mkilby
1
230
Ruling the World: When Life Gets Gamed
codingconduct
0
340
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
530
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
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શʹཧղͨ͠ʂ