Skip to content

Commit

Permalink
Updated autoload standard to PSR-4.
Browse files Browse the repository at this point in the history
| Q             | A
| ------------- | ---
| Doc fix?      | no
| New feature?  | no
| Applies to    | 2.0+
| Tests pass?   | yes
| Fixed tickets | #3616
  • Loading branch information
phansys authored and weaverryan committed May 22, 2015
1 parent 4127197 commit d9a2f61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions contributing/code/standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ follow the same guidelines, and you should too.
Remember that the main advantage of standards is that every piece of code
looks and feels familiar, it's not about this or that being more readable.

Symfony follows the standards defined in the `PSR-0`_, `PSR-1`_ and `PSR-2`_
Symfony follows the standards defined in the `PSR-0`_, `PSR-1`_, `PSR-2`_ and `PSR-4`_
documents.

Since a picture - or some code - is worth a thousand words, here's a short
Expand Down Expand Up @@ -111,7 +111,7 @@ Structure

* Define one class per file - this does not apply to private helper classes
that are not intended to be instantiated from the outside and thus are not
concerned by the `PSR-0`_ standard;
concerned by the `PSR-0`_ and `PSR-4`_ autoload standards;

* Declare class properties before methods;

Expand Down Expand Up @@ -185,3 +185,4 @@ License
.. _`PSR-0`: http://www.php-fig.org/psr/psr-0/
.. _`PSR-1`: http://www.php-fig.org/psr/psr-1/
.. _`PSR-2`: http://www.php-fig.org/psr/psr-2/
.. _`PSR-4`: http://www.php-fig.org/psr/psr-4/
2 changes: 1 addition & 1 deletion cookbook/bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,4 @@ Learn more from the Cookbook

* :doc:`/cookbook/bundles/extension`

.. _standards: http://www.php-fig.org/psr/psr-0/
.. _standards: http://www.php-fig.org/psr/psr-4/

0 comments on commit d9a2f61

Please sign in to comment.