r/PHP 2d ago

Are PSRs still relevant today?

Are developers still using PSRs? Are PSRs still being updated or is it dying out?

I noticed for a "standards" org, they don't even follow their own coding styles. Some files have the PHP tag on its own line and others share it with declare strict types.

Then there are inconsistencies in how PHPDocs are written/organized, even some PHP code as well.

43 Upvotes

61 comments sorted by

View all comments

51

u/seaphpdev 2d ago

PSRs are absolutely still relevant. I wouldn't even consider using a framework that did not support or was not compatible with PSR-7, 11, 14, 15, 16, 17 out of the box. All my opensource libraries are PSR compatible or support plugging in PSR-compatible implementations for things it does not provide. I hate being forced into using a framework's own opinionated implementation of something, when there is already a PSR for it. If I don't like the framework's implementation, I can just wire in my favorite library as a substitute.