What are PSR Standards ?

PSR Standards

Hi Guys,

The PHP Standard Recommendation (PSR) is a PHP specification published by the PHP Framework Interop Group.The aim is to enable interoperability of components and to provide a common technical basis for an implementation of proven concepts for optimal programming and testing practices. The PHP-FIG is formed by several PHP frameworks founders.

NumberNameDescriptionStatus
PSR-0Basic Coding StandardIt describes the mandatory requirements that must be adhered to for autoloader interoperabilityDeprecated and substituted
PSR-1Autoloading StandardIt comprises what should be considered the standard coding elements that are required to ensure a high level of technical interoperability between shared PHP codeAccepted
PSR-2Coding Style GuideIt considers PSR-1 and it is intended to reduce cognitive friction when scanning code from different authors. It does so by enumerating a shared set of rules and expectations about how to format PHP code.Accepted
PSR-3Logger InterfaceIt describes a common interface for logging libraries.Accepted
PSR-4Autoloading StandardIt describes a specification for autoloading classes from file paths. It is fully interoperable, and can be used in addition to any other autoloading specification, including PSR-0. This PSR also describes where to place files that will be auto loaded according to the specificationAccepted
PSR-5PHPDoc StandardThe main purpose of this PSR is to provide a complete and formal definition of the PHPDoc standard. This PSR deviates from its predecessor, the de facto PHPDoc Standard associated with phpDocumentor 1.x, to provide support for newer features in the PHP language and to address some of the shortcomings of its predecessor.Accepted
PSR-6Caching InterfaceThe goal of this PSR is to allow developers to create cache-aware libraries that can be integrated into existing frameworks and systems without the need for custom development.Accepted
PSR-7HTTP Message InterfaceIt describes common interfaces for representing HTTP messages as described in RFC 7230 and RFC 7231, and URIs for use with HTTP messages as described in RFC 3986.Accepted
PSR-8Huggable InterfaceIt establishes a common way for objects to express mutual appreciation and support by hugging. This allows objects to support each other in a constructive fashion, furthering cooperation between different PHP projects.Draft
PSR-9Security DisclosureIt gives project leads a clearly defined approach to enabling end users to discover security disclosures using a clearly defined structured format for these disclosures.Draft
PSR-10Security AdvisoriesIt gives researchers, project leads, upstream project leads and end users a defined and structured process for disclosing security vulnerabilities.Draft
PSR-11Container InterfaceIt describes a common interface for dependency injection containers. The goal is to standardize how frameworks and libraries make use of a container to obtain objects and parameters (called entries in the rest of this document).Draft
PSR-12Extended Coding Style GuideIt extends, expands and replaces PSR-2, the coding style guide and requires adherence to PSR-1, the basic coding standard.Draft

 

 
All the above content is referenced from https://en.wikipedia.org/wiki/PHP_Standard_Recommendation.

Leave a Comment

Your email address will not be published. Required fields are marked *

Optimization WordPress Plugins & Solutions by W3 EDGE