From d9a2f61ae29ce6336e1f15ac4eb92f1d6210bd36 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 17f8f72a637..40ca8c4981d 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 @@ -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; @@ -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/ diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 09f5725d392..e39590d7750 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -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/