Why is Sage 9 PSR-2 Compliant if WordPress Core has Alternative (and Contrary) Standards?

I’m wondering if anyone can explain why Sage 9 decided to go with PSR-2 compliance if official WordPress Core Team (as long as 4 years ago) stated WordPress will not adopt PSR-Anything and is actually contradictory to many of it’s standards?

If Sage is exclusive to WordPress is seems that this decision is contradictory to the nature of Sage?

Thank you for your time!

While it is a starter theme for WordPress, that doesn’t mean it is required to follow it’s coding standards. It’s been a conscious decision for quite a few years on Roots projects to follow more standard web development standards rather than WordPress standards, wherever possible.

The rest of the PHP world is following PSR standards, and as we advocate best practices not just for WP but web dev as a whole, that’s what we decided to follow.

3 Likes

Thanks for the reply!

I’m a little embarrassed I didn’t know that these are the members of PSR. Which, obviously, lends great credibility to the decision making process on the standards and foreshadows that these will become increasingly standard.

I was closely involved in suggesting and advocating for various standards proposed for WordPress so I’m just very surprised PSR wasn’t more hotly debated and quiet frustrated that WordPress is completely refusing to abide by their standards at all. I feel torn between WordPress and Sage now when the two could be harmonious.

Makes me long for a better CMS platform!

2 Likes

Well, not using PSR does not make it a lesser good CMS.

I advocate the use of PSR as much as possible but it does not “shock” me that WP does nto follow them.

However that highlights a much deeper problem within the Automatic vision for WP.