Propel3
Propel3 copied to clipboard
[Feature] Generated code should be PSR-2 compatible
I would like to see the generated code PSR-2 compatible. We could use something like templates and define PSR-2 as default but make it adjustable for other people if they prefer another code style.
What do you think?
Propel3 builders use the great php-code-generator library, that doesn't support PSR-2 until the issue https://github.com/gossi/php-code-generator/issues/23 is resolved. By now, I've forked php-code-generator and refactored it to generate psr-2 code https://github.com/cristianoc72/psr2-code-generator . When Propel3 will be finished, if https://github.com/gossi/php-code-generator/issues/23 not solved yet, we could think to temporarly switch to my fork.
Anyway, imho Propel should generate psr-2 classes.
I saw this too but as far as I could see there is not much progress to finish the issue https://github.com/gossi/php-code-generator/issues/23 .
For our issue #4 I extended the classes of the code generator but didn't liked the way I had to do this. Maybe we should use your Fork to fix issue #4 and this one until the gossi code generator supports PSR2. Would be a much cleaner way.
you might also think about forking the code-generator libraries so I can merge your code and all can benefit from that.
See gossi/php-code-generator#54 where I started an implementation towards psr-2. Please read, run experiments, gain experience, send PRs 😉
Use this one, It generates PSR-2 compliant code, and supports all PHP 7.x features https://packagist.org/packages/nette/php-generator