Skip to content

PHP Standard recommendations

Overview

Rather then reinventing the wheel, we have taken the commonly discussed and adopted PHP standard recommendations (PSR), maintained by the PHP Framework Interoperability Group (PHP-FIG), and customised them for our purposes and toolchains.

As clearly stated by the PHP-FIG, their standardisation efforts target a closed set of PHP projects:

Our main audience is each other, but we’re very aware that the rest of the PHP community is watching. If other folks want to adopt what we’re doing they are welcome to do so, but that is not the aim.

While we adhere to the majority of the commonalities they have standardised, some are considered -- for our purposes, non practical or in violation of our quality assurance and code base, as established, and evolved, over almost four decades, and being used in many different programming languages. Hence the purpose of this repository to amend their works accordingly.

This is made available primarily for our staff, partners, and other contributors on public or private projects we manage. As such it is a reference and not really open to debat. Nonetheless, we are open to discuss some standards which seem to go against so-called industry standards and best practices -- for instance the archaic 80 columns rule. Don't fall in the trap of simply stating your opinion; discussion is about experience, facts, and figures. We will respond to such discussions on a best effort basis.

Recommendations

IDTitleFIG statusISLE status
0Autoloading StandardDeprecatedCf. PSR4
1Basic Coding StandardAcceptedProof reading
2Coding Style GuideDeprecatedn/a
3Logger InterfaceAcceptedProof reading
4Autoloading StandardAcceptedProof reading
5PHPDoc StandardDraftProof reading
6Caching InterfaceAcceptedProof reading
7HTTP Message InterfaceAcceptedProof reading
8Huggable InterfaceAbandonedn/a
9Security AdvisoriesAbandonedn/a
10Security Reporting ProcessAbandonedn/a
11Container InterfaceAcceptedProof reading
12Extended Coding Style GuideAcceptedProof reading
13Hypermedia LinksAcceptedProof reading
14Event DispatcherAcceptedProof reading
15HTTP HandlersAcceptedProof reading
16Simple CacheAcceptedProof reading
17HTTP FactoriesAcceptedProof reading
18HTTP ClientAcceptedProof reading
19PHPDoc tagsDraftProof reading
20ClockDraftProof reading

About

Standards either proposed or approved by the Framework Interop Group

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors