Closed s3rgiosan closed 4 years ago
As we are using composer to pull-in tonik/gin
and tonik/cli
packages we naturally tended to PSR-2 and PSR-4 with a standardized autoloader.
WPCS would require refactoring in packages (filenames/directory structure) and implement our own autoloader (this would force us to change a little how the theme is bootstrapped). As far as I remember, WPCS is also a little bit picky about some of the code structures.
However, if a majority of you guys would prefer the WPCS we can think about adopting them. Gonna mark this issue as discussion, so maybe someone will give us his own opinion.
I think many of the WPCS are good; however, I think they can sometimes encourage coding practices that can be hard to read. I definitely prefer the PSR-2 and PSR-4 standards personally.
FWIW, and altho it's not directly referring to WPCS/PSR standards, I do think your pseudo 'disclaimer' on labs site is on point and is the methodology I adopted straightaway with Tonik.
For those who haven't read, you might want to see the section on
Understanding Starter Assumptions
Is there any reason to not be following the WPCS? At least the PHP ones?
Honest question. Not trying to buy any flame war or something like that 😃
If you decide to adopt them, I could help because I'm very keen to adopt your framework on a future project and I could do this in between.