SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
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…
• 推し松は十四松です。
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).”
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.”
• 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
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
ご清聴ありがとうございました。

Contenu connexe

Tendances

Less\sass done right in .NET
Less\sass done right in .NETLess\sass done right in .NET
Less\sass done right in .NETPawelPabich
 
Using VIM for PHP/Symfony development
Using VIM for PHP/Symfony developmentUsing VIM for PHP/Symfony development
Using VIM for PHP/Symfony developmentCarlos Mafla
 
PHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolPHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolAlessandro Cinelli (cirpo)
 
Intro to TDD Using PHPUnit: A FizzBuzz Kata
Intro to TDD Using PHPUnit: A FizzBuzz KataIntro to TDD Using PHPUnit: A FizzBuzz Kata
Intro to TDD Using PHPUnit: A FizzBuzz KataEric Poe
 
pacproxy - Ruby hiroba 2014
pacproxy - Ruby hiroba 2014pacproxy - Ruby hiroba 2014
pacproxy - Ruby hiroba 2014Hiroshi Ota
 
2019 PHP Serbia - Boosting your performance with Blackfire
2019 PHP Serbia - Boosting your performance with Blackfire2019 PHP Serbia - Boosting your performance with Blackfire
2019 PHP Serbia - Boosting your performance with BlackfireMarko Mitranić
 
PSR-7 - Middleware - Zend Expressive
PSR-7 - Middleware - Zend ExpressivePSR-7 - Middleware - Zend Expressive
PSR-7 - Middleware - Zend ExpressiveMilad Arabi
 
Asynchronous web-development with Python
Asynchronous web-development with PythonAsynchronous web-development with Python
Asynchronous web-development with PythonAnton Caceres
 
Anton Cherednikov "Modules and Artifacts in NPM"
Anton Cherednikov "Modules and Artifacts in NPM"Anton Cherednikov "Modules and Artifacts in NPM"
Anton Cherednikov "Modules and Artifacts in NPM"LogeekNightUkraine
 
Making Symfony Services async with RabbitMq (and more Symfony)
Making Symfony Services async with RabbitMq (and more Symfony)Making Symfony Services async with RabbitMq (and more Symfony)
Making Symfony Services async with RabbitMq (and more Symfony)Gaetano Giunta
 
MongoDB backup service overview Boston MUG
MongoDB backup service overview Boston MUGMongoDB backup service overview Boston MUG
MongoDB backup service overview Boston MUGMongoDB
 
Calling java from a bash script 5
Calling java from a bash script 5Calling java from a bash script 5
Calling java from a bash script 5idrsolutions
 
Rabbits, indians and... Symfony meets queueing brokers
Rabbits, indians and...  Symfony meets queueing brokersRabbits, indians and...  Symfony meets queueing brokers
Rabbits, indians and... Symfony meets queueing brokersGaetano Giunta
 
Proxying DBI with DBD::Gofer and App::Staticperl
Proxying DBI with DBD::Gofer and App::StaticperlProxying DBI with DBD::Gofer and App::Staticperl
Proxying DBI with DBD::Gofer and App::Staticperlnohuhu
 
Developing Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScriptDeveloping Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScriptnohuhu
 
Як РНР розробник пише код на Kotlin
Як РНР розробник пише код на KotlinЯк РНР розробник пише код на Kotlin
Як РНР розробник пише код на Kotlinphpfriendsclub
 
Jruby a Pi and a database
Jruby a Pi and a databaseJruby a Pi and a database
Jruby a Pi and a databasePhilipp Fehre
 

Tendances (20)

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

En vedette

Writing php extensions in golang
Writing php extensions in golangWriting php extensions in golang
Writing php extensions in golangdo_aki
 
php-buildがいかに便利かを力説する
php-buildがいかに便利かを力説するphp-buildがいかに便利かを力説する
php-buildがいかに便利かを力説するYoshio Hanawa
 
Dependency Injection and Pimple
Dependency Injection and PimpleDependency Injection and Pimple
Dependency Injection and PimpleDQNEO
 
Phpでアプリケーションサーバー
PhpでアプリケーションサーバーPhpでアプリケーションサーバー
Phpでアプリケーションサーバーk-motoyan
 
たのしい独自フレームワーク
たのしい独自フレームワークたのしい独自フレームワーク
たのしい独自フレームワークKenta USAMI
 
Big Master Data PHP BLT #1
Big Master Data PHP BLT #1Big Master Data PHP BLT #1
Big Master Data PHP BLT #1Masahiro Nagano
 

En vedette (6)

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

Similaire à Current status of PSR - Phpblt1

Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...ScyllaDB
 
Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UKRicard Clau
 
TAKING PHP SERIOUSLY - Keith Adams
TAKING PHP SERIOUSLY - Keith AdamsTAKING PHP SERIOUSLY - Keith Adams
TAKING PHP SERIOUSLY - Keith AdamsHermes Alves
 
Php internal architecture
Php internal architecturePhp internal architecture
Php internal architectureElizabeth Smith
 
Making the Most of Modern PHP in Drupal 7
Making the Most of Modern PHP in Drupal 7Making the Most of Modern PHP in Drupal 7
Making the Most of Modern PHP in Drupal 7Ryan Szrama
 
Getting Started with PureScript
Getting Started with PureScriptGetting Started with PureScript
Getting Started with PureScriptJohn De Goes
 
Unknown features of PHP
Unknown features of PHPUnknown features of PHP
Unknown features of PHPsquid_zce
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1ADARSH BHATT
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadSoftware Guru
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)goccy
 
An intro to php standards recommendation (psr)
An intro to php standards recommendation (psr)An intro to php standards recommendation (psr)
An intro to php standards recommendation (psr)valuebound
 
Data science online camp using the flipn stack for edge ai (flink, nifi, pu...
Data science online camp   using the flipn stack for edge ai (flink, nifi, pu...Data science online camp   using the flipn stack for edge ai (flink, nifi, pu...
Data science online camp using the flipn stack for edge ai (flink, nifi, pu...Timothy Spann
 
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014Julio Bitencourt
 
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
Symfony CMF: un nuovo paradigma per la gestione dei contenutiSymfony CMF: un nuovo paradigma per la gestione dei contenuti
Symfony CMF: un nuovo paradigma per la gestione dei contenutiMichele Orselli
 
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
Symfony CMF: un nuovo paradigma per la gestione dei contenutiSymfony CMF: un nuovo paradigma per la gestione dei contenuti
Symfony CMF: un nuovo paradigma per la gestione dei contenutiManuel Baldassarri
 
Industrialise PHP ~ ZendCon Europe 2013
Industrialise PHP ~ ZendCon Europe 2013Industrialise PHP ~ ZendCon Europe 2013
Industrialise PHP ~ ZendCon Europe 2013ekino
 

Similaire à Current status of PSR - Phpblt1 (20)

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

Dernier

cse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitycse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitysandeepnani2260
 
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityDon't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityApp Ethena
 
GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE
 
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRRINDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRRsarwankumar4524
 
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptxerickamwana1
 
General Elections Final Press Noteas per M
General Elections Final Press Noteas per MGeneral Elections Final Press Noteas per M
General Elections Final Press Noteas per MVidyaAdsule1
 
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...Sebastiano Panichella
 
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRachelAnnTenibroAmaz
 
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Sebastiano Panichella
 
Understanding Post Production changes (PPC) in Clinical Data Management (CDM)...
Understanding Post Production changes (PPC) in Clinical Data Management (CDM)...Understanding Post Production changes (PPC) in Clinical Data Management (CDM)...
Understanding Post Production changes (PPC) in Clinical Data Management (CDM)...soumyapottola
 
Scootsy Overview Deck - Pan City Delivery
Scootsy Overview Deck - Pan City DeliveryScootsy Overview Deck - Pan City Delivery
Scootsy Overview Deck - Pan City Deliveryrishi338139
 
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxEngaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxAsifArshad8
 
Sunlight Spectacle 2024 Practical Action Launch Event 2024-04-08
Sunlight Spectacle 2024 Practical Action Launch Event 2024-04-08Sunlight Spectacle 2024 Practical Action Launch Event 2024-04-08
Sunlight Spectacle 2024 Practical Action Launch Event 2024-04-08LloydHelferty
 
Application of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxApplication of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxRoquia Salam
 

Dernier (14)

cse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitycse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber security
 
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityDon't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
 
GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024
 
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRRINDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
 
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
 
General Elections Final Press Noteas per M
General Elections Final Press Noteas per MGeneral Elections Final Press Noteas per M
General Elections Final Press Noteas per M
 
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
 
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
 
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
 
Understanding Post Production changes (PPC) in Clinical Data Management (CDM)...
Understanding Post Production changes (PPC) in Clinical Data Management (CDM)...Understanding Post Production changes (PPC) in Clinical Data Management (CDM)...
Understanding Post Production changes (PPC) in Clinical Data Management (CDM)...
 
Scootsy Overview Deck - Pan City Delivery
Scootsy Overview Deck - Pan City DeliveryScootsy Overview Deck - Pan City Delivery
Scootsy Overview Deck - Pan City Delivery
 
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxEngaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
 
Sunlight Spectacle 2024 Practical Action Launch Event 2024-04-08
Sunlight Spectacle 2024 Practical Action Launch Event 2024-04-08Sunlight Spectacle 2024 Practical Action Launch Event 2024-04-08
Sunlight Spectacle 2024 Practical Action Launch Event 2024-04-08
 
Application of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxApplication of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptx
 

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…
  • 3.
  • 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).”
  • 16.
  • 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.”
  • 19.
  • 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
  • 22.
  • 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