What do you think of the PHP-FIG?

PSRs are “PHP Standards Recommendations” put forth by the PHP-FIG, the “Framework Interoperability Group”. It’s a group of representatives from the most popular PHP projects currently out there, debating and voting on common rules and regulations each member project should follow. Every such change or recommendation affects the PHP environment dramatically, because every user of these projects implicitly inherits these rules.

The group produced home runs such as the now deprecated PSR-0 autoloading standard, the always awesome PSR-1 and PSR-2 code style guides, the PSR-3 logging interface, and the new PSR-4 autoloader. But something happened in the past year or so - the immutability fad took full swing, and PSR-7 (the HTTP Message interface specification, allowing for interchangeable middleware between PSR-7 friendly frameworks) was produced despite some constructive criticism. PSR-6 was then debated further, somewhat ironed out over four grueling years, and recently passed the voting stage. PSR-6 is a caching interface recommendation - a guideline on how caching software should look. However, according to the opinion of many, it’s been overengineered Symfony-style in order to be a 99% solution which doesn’t solve all the use cases, but is too bloated and complex for simple ones.

Phil tried to argue for this and justify the FIG’s decision but Anthony was quick to set that discussion straight and tell it how it is. To some, it’s starting to look like the FIG, high on power it doesn’t acknowledge, just wants to exert as much influence over the ecosystem as possible without being mindful of the consequences. To others, it’s all just very shrugworthy and not something to pay much attention to.

For me, PSR-6 is the first PSR for which I can reliably say I won’t be using in my projects without being forced to do it by the packages I pull in. I believe it solves a specific problem badly, and the caching implementations that are out there are different for a reason - a non-abstractable reason.

Due to this rift in the perception of the FIG, a new discussion / poll was put forward by Paul M. Jones who wonders - what do you think of the FIG? Be sure to voice your opinion there, if you have it!

Oh and, if you’re confused by the naming order of PSRs, don’t be.

How do you feel about the newest PSR and the work of the FIG in general?

1 Like

I wrote about the problems with PSR-0 a while back https://r.je/php-psr-0-pretty-shortsighted-really.html and although it’s a good problem to solve, the way they solved it seems to be incredibly short-sighted. The idealogical problems with PSR-0 (it’s defines how things should work, rather than how things can be extended) seem to continue through the rest of the “standards”.

Honestly, here’s how the PSR caching standard should look:

Your class must implement \ArrayAccess and save data by the end of the script either via __destruct or from the offsetSet method as it’s called

It seems to be an idealogical flaw inherent in the group to want to describe how things should work, rather than aiming to introduce flexibility and giving developers complete control over their own codebase. The PSR on coding guidelines is particularly guilty of this as the layout of the code has absolutely zero impact on interoperability.

I stopped paying them any attention some time ago.

I really like PSRs 1,2,3,4 and 7 (was a bit skeptical about the immutability imposed on the Request and Response objects but I’ve gotten used to it now after using SlimPHP 3 for a little while).

In my opinion, I believe the PHP FIG’s number one goal should be to facilitate interoperability between php projects (not only projects of FIG members) via the creation of architecturally sound (and not over-engineered) interfaces. I know they initially set out to work on commonalities between member projects, but like Anthony said the rest of the PHP community is watching what they do. I think it’s high time they redefine their purpose to include the PHP community as their primary audience and not just the member projects.

They should be the go to body for the best (or high quality) solution to the common problems they aim to solve (eg. Logging, Caching, etc.).

PSR 1 and 2, serve as a really good set of principles to adhere to as far as coding standards go.

I hope FIG folks and the PHP community at large will find an amicable way to resolve existing differences / complaints and find a way to work together moving forward.

See https://groups.google.com/forum/#!topic/php-fig/oqO1ZH5tJKU for more on this discussion.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.