|
| 1 | +************** |
| 2 | +PSR Compliance |
| 3 | +************** |
| 4 | + |
| 5 | +The `PHP-FIG <http://www.php-fig.org/>`_ was created in 2009 to help make code more interoperable between frameworks |
| 6 | +by ratifying Interfaces, style guides, and more that members were free to implement or not. While CodeIgniter is |
| 7 | +not a member of the FIG, we are compatible with a number of their proposals. This guide is meant to list the |
| 8 | +status of our compliance with the various accepted, and some draft, proposals. |
| 9 | + |
| 10 | +**PSR-1: Basic Coding Standard** |
| 11 | + |
| 12 | +This recommendation covers basic class, method, and file-naming standards. Our :doc:`style guide </contributing/styleguide>` |
| 13 | +meets PSR-1 and adds its own requirements on top of it. |
| 14 | + |
| 15 | +**PSR-2: Coding Style Guide** |
| 16 | + |
| 17 | +This PSR was fairly controversial when it first came out. CodeIgniter meets many of the recommendations within, |
| 18 | +but does not, and will not, meet all of them. |
| 19 | + |
| 20 | +**PSR-3: Logger Interface** |
| 21 | + |
| 22 | +CodeIgniter's :doc:`Logger </general/logging>` implements all of the interfaces provided by this PSR. |
| 23 | + |
| 24 | +**PSR-4: Autoloading Standard** |
| 25 | + |
| 26 | +This PSR provides a method for organizing file and namespaces to allow for a standard method of autoloading |
| 27 | +classes. Our :doc:`Autoloader </concepts/autoloader>` meets the PSR-4 recommendations. |
| 28 | + |
| 29 | +**PSR-6: Caching Interface** |
| 30 | + |
| 31 | +CodeIgniter will not be trying to meet this PSR, as we believe it oversteps its needs. The newly proposed |
| 32 | +`SimpleCache Interfaces <https://github.com/dragoonis/fig-standards/blob/psr-simplecache/proposed/simplecache.md>`_ |
| 33 | +do look like something we would consider. |
| 34 | + |
| 35 | +**PSR-7: HTTP Message Interface** |
| 36 | + |
| 37 | +This PSR standardizes a way of representing the HTTP interactions. While many of the concepts became part of our |
| 38 | +HTTP layer, CodeIgniter does not strive for compatibility with this recommendation. |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +If you find any places that we claim to meet a PSR but have failed to execute it correctly, please let us know |
| 43 | +and we will get it fixed, or submit a pull request with the required changes. |
0 commit comments