SlideShare a Scribd company logo
Current status of PSR
PHP BLT #1
@yui_tang / Yui Sakamoto
• Software Engineer @ Mercari, Inc.
• I was server-side engineer…
• But, I m writing JavaScript…
Current status of PSR - Phpblt1
• 推し松は十四松です。
What’s PSR
PHP Standards Recommendations
• 直訳するとPHP標準勧告
• どうにでも自由に書けちゃうテンプレートエンジ
ンに、秩序を与える。
• 当然、言語側には何の強制力も無い
• 本当に大事なことはプロダクト。その他の瑣末な
ことに気を使う時間を極力減らす為に存在。
PHP-FIG
• “PHP Framework In Group”
• フレームワークの相互運用性
について議論するグループ
• その為にPSRを策定・発表
Accepted
• PSR-0 Autoloading Standard
• PSR-1 Basic Coding Standard
• PSR-2 Coding Style Guide
• PSR-3 Logger Interface
• PSR-4 Autoloading Standard
• PSR-7 HTTP Message Interface
Review
• PSR-6 Caching Interface
https://github.com/php-fig/fig-standards/blob/master/
proposed/cache.md
Draft
• PSR-5 PHPDoc Standard
• PSR-8 Huggable Interface
• PSR-9 Security Disclosure
• PSR-10 Security Advisories
• PSR-11 Container Interface
• PSR-12 Extended Coding Style Guide
Review flow
Stages
1. Pre-Draft 提案段階、当然まだ番号は振られない。
2. Draft PSR-XXの番号が振られる。
3. Review PHP-FIGメンバーの投票段階
4. Accepted 正式なPSRとして認められる
Introducing Drafts
PSR-9 Security Disclosure
“The main goal of the PSR-9 standard is to provide
structure around the documentation a project
provides to the wider community around security
vulnerabilities that have been found (and fixed) and
those that are still pending.”
Introducing Drafts
PSR-10 Security Advisories
“The goal of this PSR is to give researchers,
project leads, upstream project leads and end
users a defined and structured process for
disclosing security vulnerabilities.”
• PSR-9 セキュリティ勧告の報告基準
• PSR-10 レポートの発見を容易にするために、セキュリティの開示ワークフ
ロー
• 要約、公開された日付、より多くの情報とユニークな参照IDへのリンクが含まれ、それぞれの
脆弱性のエントリ
• CWEおよび/またはCVE情報、可能であれば(すべてではない脆弱性のCVEとして報告されま
す)
• どのバージョンの問題が影響
• 問題の現状
• 解決した場合、修復の説明
• プロジェクトのユーザーへの影響に基づいて、低/中/高深刻度
“http://blog.phpdeveloper.org/2015/05/22/php-security-psr-9psr-10/“
Introducing Drafts
PSR-11 Container Interface
“The goal set by ContainerInterface is to
standardize how frameworks and libraries make
use of a container to obtain objects and
parameters
(called entries in the rest of this document).”
Current status of PSR - Phpblt1
The following projects already implement the container-interop version of the interface and therefore would be willing to
switch to a Container PSR as soon as it is available.
Projects implementing ContainerInterface
• Acclimate: Adapters for Aura.Di, Laravel, Nette DI, Pimple, Symfony DI, ZF2 Service manager, ZF2 Dependency injection and any
container using ArrayAccess
• Aura.DI (v3+)
• dcp-di
• Mouf
• Njasm Container
• PHP-DI
• PimpleInterop
• XStatic
Projects implementing the delegate lookup feature
• Aura.DI
• Mouf
• PHP-DI
• PimpleInterop
• Middlewares implementing ContainerInterface
Introducing Drafts
PSR-12 Extended Coding
Style Guide
“This guide extends and expands on PSR-2, the
coding style guide and PSR-1, the basic coding
standard.”
Current status of PSR - Phpblt1
• Keywords and True/False/Null
“PHP keywords MUST be in lower case.
The PHP reserved words int, true, object, float, false, mixed, bool, null, numeric,
string and resource MUST be in lower case”
• Strict Types, Namespace, and Use Declarations
• When present, there MUST be one blank line after the declare declaration.
• When present, there MUST be one blank line after the namespace
declaration.
• When present, the namespace declaration MUST go after the declare
declaration.
• When present, all use declarations MUST go after the namespace declaration.
• There MUST be one use keyword per declaration.
• Using traits
• abstract, final, and static
• Method and Function Calls
• Closures
• try, catch, finally
• Anonymous Classes
Current status of PSR - Phpblt1
How to commit
PHP Framework
Interoperability Group
https://groups.google.com/forum/?fromgroups#!forum/
php-fig
参考
• PHP-FIG
http://www.php-fig.org/
• PHP FIG mailing list
https://groups.google.com/forum/#!forum/php-fig
• PHP - 憂鬱な希望としての PSR-7
http://sasezaki.hatenablog.com/entry/2015/03/07/195908
• PSR-3 Logger Interfaceのご紹介
http://www.slideshare.net/hinakano/psr-3loggerinterface
ご清聴ありがとうございました。

More Related Content

PDF
Scaling php - Intercon php
PPTX
Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...
PDF
PHP vs Node.js
PPTX
PHP and node.js Together
PDF
Integrating Node.js with PHP
PPT
easyM2R
KEY
Zero mq logs
ODP
Ruby as a glue language
Scaling php - Intercon php
Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...
PHP vs Node.js
PHP and node.js Together
Integrating Node.js with PHP
easyM2R
Zero mq logs
Ruby as a glue language

What's hot (20)

PPTX
Less\sass done right in .NET
PDF
Using VIM for PHP/Symfony development
PDF
PHP is the King, nodejs is the Prince and Lua is the fool
PPTX
Intro to TDD Using PHPUnit: A FizzBuzz Kata
PDF
pacproxy - Ruby hiroba 2014
PDF
Nginx, PHP and Node.js
PDF
2019 PHP Serbia - Boosting your performance with Blackfire
PPTX
PSR-7 - Middleware - Zend Expressive
PDF
Asynchronous web-development with Python
PPTX
Anton Cherednikov "Modules and Artifacts in NPM"
PPTX
Making Symfony Services async with RabbitMq (and more Symfony)
PPTX
MongoDB backup service overview Boston MUG
PDF
Calling java from a bash script 5
PDF
Scraping the Web
PPTX
Rabbits, indians and... Symfony meets queueing brokers
PPTX
Proxying DBI with DBD::Gofer and App::Staticperl
PPTX
Developing Rich Internet Applications with Perl and JavaScript
PDF
Як РНР розробник пише код на Kotlin
PDF
Jruby a Pi and a database
PDF
Crystal
Less\sass done right in .NET
Using VIM for PHP/Symfony development
PHP is the King, nodejs is the Prince and Lua is the fool
Intro to TDD Using PHPUnit: A FizzBuzz Kata
pacproxy - Ruby hiroba 2014
Nginx, PHP and Node.js
2019 PHP Serbia - Boosting your performance with Blackfire
PSR-7 - Middleware - Zend Expressive
Asynchronous web-development with Python
Anton Cherednikov "Modules and Artifacts in NPM"
Making Symfony Services async with RabbitMq (and more Symfony)
MongoDB backup service overview Boston MUG
Calling java from a bash script 5
Scraping the Web
Rabbits, indians and... Symfony meets queueing brokers
Proxying DBI with DBD::Gofer and App::Staticperl
Developing Rich Internet Applications with Perl and JavaScript
Як РНР розробник пише код на Kotlin
Jruby a Pi and a database
Crystal
Ad

Viewers also liked (6)

PPTX
Writing php extensions in golang
PDF
php-buildがいかに便利かを力説する
PDF
Dependency Injection and Pimple
PDF
Phpでアプリケーションサーバー
PDF
たのしい独自フレームワーク
PDF
Big Master Data PHP BLT #1
Writing php extensions in golang
php-buildがいかに便利かを力説する
Dependency Injection and Pimple
Phpでアプリケーションサーバー
たのしい独自フレームワーク
Big Master Data PHP BLT #1
Ad

Similar to Current status of PSR - Phpblt1 (20)

PDF
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
PDF
Scaling with Symfony - PHP UK
PDF
TAKING PHP SERIOUSLY - Keith Adams
PPTX
Php internal architecture
PDF
Making the Most of Modern PHP in Drupal 7
PDF
Getting Started with PureScript
PDF
Unknown features of PHP
PPTX
Learn PHP Lacture1
PDF
SGCE 2015 REST APIs
PDF
APIs distribuidos con alta escalabilidad
PPTX
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
PPTX
An intro to php standards recommendation (psr)
PDF
Data science online camp using the flipn stack for edge ai (flink, nifi, pu...
PDF
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
KEY
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
KEY
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
PDF
Industrialise PHP ~ ZendCon Europe 2013
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scaling with Symfony - PHP UK
TAKING PHP SERIOUSLY - Keith Adams
Php internal architecture
Making the Most of Modern PHP in Drupal 7
Getting Started with PureScript
Unknown features of PHP
Learn PHP Lacture1
SGCE 2015 REST APIs
APIs distribuidos con alta escalabilidad
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
An intro to php standards recommendation (psr)
Data science online camp using the flipn stack for edge ai (flink, nifi, pu...
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
Industrialise PHP ~ ZendCon Europe 2013

Recently uploaded (20)

PPTX
ART-APP-REPORT-FINctrwxsg f fuy L-na.pptx
PDF
Swiggy’s Playbook: UX, Logistics & Monetization
PPTX
Human Mind & its character Characteristics
PDF
natwest.pdf company description and business model
PPTX
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
PPTX
Effective_Handling_Information_Presentation.pptx
DOCX
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
PPTX
The Effect of Human Resource Management Practice on Organizational Performanc...
PPTX
Primary and secondary sources, and history
DOC
学位双硕士UTAS毕业证,墨尔本理工学院毕业证留学硕士毕业证
PPTX
Tour Presentation Educational Activity.pptx
PPTX
nose tajweed for the arabic alphabets for the responsive
PDF
Tunisia's Founding Father(s) Pitch-Deck 2022.pdf
PPTX
fundraisepro pitch deck elegant and modern
PPTX
chapter8-180915055454bycuufucdghrwtrt.pptx
PDF
Instagram's Product Secrets Unveiled with this PPT
PDF
oil_refinery_presentation_v1 sllfmfls.pdf
PPTX
Hydrogel Based delivery Cancer Treatment
PPTX
lesson6-211001025531lesson plan ppt.pptx
PPTX
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
ART-APP-REPORT-FINctrwxsg f fuy L-na.pptx
Swiggy’s Playbook: UX, Logistics & Monetization
Human Mind & its character Characteristics
natwest.pdf company description and business model
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
Effective_Handling_Information_Presentation.pptx
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
The Effect of Human Resource Management Practice on Organizational Performanc...
Primary and secondary sources, and history
学位双硕士UTAS毕业证,墨尔本理工学院毕业证留学硕士毕业证
Tour Presentation Educational Activity.pptx
nose tajweed for the arabic alphabets for the responsive
Tunisia's Founding Father(s) Pitch-Deck 2022.pdf
fundraisepro pitch deck elegant and modern
chapter8-180915055454bycuufucdghrwtrt.pptx
Instagram's Product Secrets Unveiled with this PPT
oil_refinery_presentation_v1 sllfmfls.pdf
Hydrogel Based delivery Cancer Treatment
lesson6-211001025531lesson plan ppt.pptx
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges

Current status of PSR - Phpblt1

  • 1. Current status of PSR PHP BLT #1
  • 2. @yui_tang / Yui Sakamoto • Software Engineer @ Mercari, Inc. • I was server-side engineer… • But, I m writing JavaScript…
  • 5. What’s PSR PHP Standards Recommendations • 直訳するとPHP標準勧告 • どうにでも自由に書けちゃうテンプレートエンジ ンに、秩序を与える。 • 当然、言語側には何の強制力も無い • 本当に大事なことはプロダクト。その他の瑣末な ことに気を使う時間を極力減らす為に存在。
  • 6. PHP-FIG • “PHP Framework In Group” • フレームワークの相互運用性 について議論するグループ • その為にPSRを策定・発表
  • 7. Accepted • PSR-0 Autoloading Standard • PSR-1 Basic Coding Standard • PSR-2 Coding Style Guide • PSR-3 Logger Interface • PSR-4 Autoloading Standard • PSR-7 HTTP Message Interface
  • 8. Review • PSR-6 Caching Interface https://github.com/php-fig/fig-standards/blob/master/ proposed/cache.md
  • 9. Draft • PSR-5 PHPDoc Standard • PSR-8 Huggable Interface • PSR-9 Security Disclosure • PSR-10 Security Advisories • PSR-11 Container Interface • PSR-12 Extended Coding Style Guide
  • 11. Stages 1. Pre-Draft 提案段階、当然まだ番号は振られない。 2. Draft PSR-XXの番号が振られる。 3. Review PHP-FIGメンバーの投票段階 4. Accepted 正式なPSRとして認められる
  • 12. Introducing Drafts PSR-9 Security Disclosure “The main goal of the PSR-9 standard is to provide structure around the documentation a project provides to the wider community around security vulnerabilities that have been found (and fixed) and those that are still pending.”
  • 13. Introducing Drafts PSR-10 Security Advisories “The goal of this PSR is to give researchers, project leads, upstream project leads and end users a defined and structured process for disclosing security vulnerabilities.”
  • 14. • PSR-9 セキュリティ勧告の報告基準 • PSR-10 レポートの発見を容易にするために、セキュリティの開示ワークフ ロー • 要約、公開された日付、より多くの情報とユニークな参照IDへのリンクが含まれ、それぞれの 脆弱性のエントリ • CWEおよび/またはCVE情報、可能であれば(すべてではない脆弱性のCVEとして報告されま す) • どのバージョンの問題が影響 • 問題の現状 • 解決した場合、修復の説明 • プロジェクトのユーザーへの影響に基づいて、低/中/高深刻度 “http://blog.phpdeveloper.org/2015/05/22/php-security-psr-9psr-10/“
  • 15. Introducing Drafts PSR-11 Container Interface “The goal set by ContainerInterface is to standardize how frameworks and libraries make use of a container to obtain objects and parameters (called entries in the rest of this document).”
  • 17. The following projects already implement the container-interop version of the interface and therefore would be willing to switch to a Container PSR as soon as it is available. Projects implementing ContainerInterface • Acclimate: Adapters for Aura.Di, Laravel, Nette DI, Pimple, Symfony DI, ZF2 Service manager, ZF2 Dependency injection and any container using ArrayAccess • Aura.DI (v3+) • dcp-di • Mouf • Njasm Container • PHP-DI • PimpleInterop • XStatic Projects implementing the delegate lookup feature • Aura.DI • Mouf • PHP-DI • PimpleInterop • Middlewares implementing ContainerInterface
  • 18. Introducing Drafts PSR-12 Extended Coding Style Guide “This guide extends and expands on PSR-2, the coding style guide and PSR-1, the basic coding standard.”
  • 20. • Keywords and True/False/Null “PHP keywords MUST be in lower case. The PHP reserved words int, true, object, float, false, mixed, bool, null, numeric, string and resource MUST be in lower case” • Strict Types, Namespace, and Use Declarations • When present, there MUST be one blank line after the declare declaration. • When present, there MUST be one blank line after the namespace declaration. • When present, the namespace declaration MUST go after the declare declaration. • When present, all use declarations MUST go after the namespace declaration. • There MUST be one use keyword per declaration.
  • 21. • Using traits • abstract, final, and static • Method and Function Calls • Closures • try, catch, finally • Anonymous Classes
  • 23. How to commit PHP Framework Interoperability Group https://groups.google.com/forum/?fromgroups#!forum/ php-fig
  • 24. 参考 • PHP-FIG http://www.php-fig.org/ • PHP FIG mailing list https://groups.google.com/forum/#!forum/php-fig • PHP - 憂鬱な希望としての PSR-7 http://sasezaki.hatenablog.com/entry/2015/03/07/195908 • PSR-3 Logger Interfaceのご紹介 http://www.slideshare.net/hinakano/psr-3loggerinterface