mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-06 14:06:34 +02:00
Hi PSR-0, this is PSR-4. I'm coming for you.
This commit is contained in:
@@ -5,10 +5,10 @@ PHP developers to choose several of these and combine them into a single project
|
||||
(as close as possible) to a common code style to make it easy for developers to mix and match various libraries for
|
||||
their projects.
|
||||
|
||||
The [Framework Interop Group][fig] has proposed and approved a series of style recommendations, known as [PSR-0][psr0],
|
||||
[PSR-1][psr1] and [PSR-2][psr2]. Don't let the funny names confuse you, these recommendations are merely
|
||||
a set of rules that some projects like Drupal, Zend, Symfony, CakePHP, phpBB, AWS SDK, FuelPHP, Lithium, etc are starting
|
||||
to adopt. You can use them for your own projects, or continue to use your own personal style.
|
||||
The [Framework Interop Group][fig] has proposed and approved a series of style recommendations. Not all of them related
|
||||
to code-style, but those that do are [PSR-0][psr0], [PSR-1][psr1], [PSR-2][psr2] and [PSR-4][psr4]. These recommendations
|
||||
are merely a set of rules that some projects like Drupal, Zend, Symfony, CakePHP, phpBB, AWS SDK, FuelPHP, Lithium,
|
||||
etc are starting to adopt. You can use them for your own projects, or continue to use your own personal style.
|
||||
|
||||
Ideally you should write PHP code that adheres to a known standard. This could be any combination of PSR's, or one
|
||||
of the coding standards made by PEAR or Zend. This means other developers can easily read and work with your code,
|
||||
@@ -17,6 +17,7 @@ and applications that implement the components can have consistency even when wo
|
||||
* [Read about PSR-0][psr0]
|
||||
* [Read about PSR-1][psr1]
|
||||
* [Read about PSR-2][psr2]
|
||||
* [Read about PSR-4][psr4]
|
||||
* [Read about PEAR Coding Standards][pear-cs]
|
||||
* [Read about Zend Coding Standards][zend-cs]
|
||||
* [Read about Symfony Coding Standards][symfony-cs]
|
||||
@@ -34,6 +35,7 @@ by all current and future parties who may be working on the codebase.
|
||||
[psr0]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
|
||||
[psr1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
|
||||
[psr2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
|
||||
[psr4]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md
|
||||
[pear-cs]: http://pear.php.net/manual/en/standards.php
|
||||
[zend-cs]: http://framework.zend.com/wiki/display/ZFDEV2/Coding+Standards
|
||||
[symfony-cs]: http://symfony.com/doc/current/contributing/code/standards.html
|
||||
|
Reference in New Issue
Block a user