From ee5afc7a557b61a1ad89abafc9bfd856936b8501 Mon Sep 17 00:00:00 2001 From: Javier Spagnoletti Date: Sun, 21 Sep 2014 16:31:05 -0300 Subject: [PATCH] Updated autoload standard to PSR-4. | Q | A | ------------- | --- | Doc fix? | no | New feature? | no | Applies to | 2.0+ | Tests pass? | yes | Fixed tickets | #3616 --- contributing/code/standards.rst | 5 +++-- cookbook/bundles/best_practices.rst | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index a2720e991df..64bc3f91c27 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -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 @@ -99,7 +99,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; @@ -176,3 +176,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/ diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 51465b9d15a..4004901a84f 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -326,4 +326,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/