PHP コーディング規約(PSR)その1:概要

PHP Coding Standards (PSR) Part 1: Overview

PSR (PHP Standard Recommendations) are the PHP coding conventions agreed upon by PHP-FIG (PHP-Framework Interoperability Group).

PHP-FIG (PHP Frameworks Interoperability Group) is an organization founded in 2009 by the developers of several open source frameworks. Later, other members also joined. mainly Laravel , Joomla , Drupal , Composer , Phalcon , Slim , Symfony , Zend Framework There are developers such as Not an official PHP organization, but represents the opinion of more than half of the PHP community.

The purpose of PSR is to decide the minimum standard for cooperation through communication between the developers of each framework, and for each framework to quit its own coding style and follow the unified coding standard to contribute to the development of PHP. is.

So far, six statutes have been passed by ballot. And more than half of PHP frameworks support it.

Terms passed
number title Author coordinator proponent
1 basic coding conventions Paul M. Jones N/A N/A
2 Coding style conventions Paul M. Jones N/A N/A
3 Log interface convention Jordi Boggiano N/A N/A
Four Autoload Terms Paul M. Jones Phil Sturgeon --Larry Garfield
6 Caching interface contract --Larry Garfield Paul Dragoonis Robert Hafner
7 HTTP message interface convention Matthew Weier O'Phinney Beau Simensen Paul M. Jones
13 Hypermedia Link Terms --Larry Garfield Matthew Weier O'Phinney Marc Alexander
16 Simple Cache convention Paul Dragoonis Jordi Boggiano Fabien Potencier
under review
number title Author coordinator proponent
11 Container interface convention Matthieu Napoli, David Négrier Matthew Weier O'Phinney Korvin Szanto
draft
number title Author coordinator proponent
Five PHPDoc standard Mike van Riel Vacant Vacant
8 Huggable interface convention --Larry Garfield Vacant Vacant
9 security advisory Michael Hess Korvin Szanto --Larry Garfield
Ten Security reporting process Michael Hess --Larry Garfield Korvin Szanto
12 Extended Coding Style Guide Korvin Szanto Alexander Makarov Robert Deutz
14 event manager --Chuck Reeves Brian Letterer Roman Tsiupa
15 HTTP middleware Woody Gilk Paul M Jones Jason Coward
17 HTTP factory Woody Gilk Roman Tsiupa Paul M Jones

*This article is based on the " Japanese document creation style standard rules "

*This article was written by our employee Wu Jie Lindelin.org This article was reprinted and published as a contribution article for .