Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Generated code should be PSR-2 compatible #78

Open
nymo opened this issue Feb 25, 2018 · 5 comments
Open

[Feature] Generated code should be PSR-2 compatible #78

nymo opened this issue Feb 25, 2018 · 5 comments

Comments

@nymo
Copy link
Contributor

nymo commented Feb 25, 2018

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?

@cristianoc72
Copy link
Member

Propel3 builders use the great php-code-generator library, that doesn't support PSR-2 until the issue
phpowermove/php-code-generator#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 phpowermove/php-code-generator#23 not solved yet, we could think to temporarly switch to my fork.

Anyway, imho Propel should generate psr-2 classes.

@nymo
Copy link
Contributor Author

nymo commented Feb 27, 2018

I saw this too but as far as I could see there is not much progress to finish the issue phpowermove/php-code-generator#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.

@gossi
Copy link
Contributor

gossi commented Feb 27, 2018

you might also think about forking the code-generator libraries so I can merge your code and all can benefit from that.

@gossi
Copy link
Contributor

gossi commented Aug 4, 2018

See phpowermove/php-code-generator#54 where I started an implementation towards psr-2. Please read, run experiments, gain experience, send PRs 😉

@delboy1978uk
Copy link

Use this one, It generates PSR-2 compliant code, and supports all PHP 7.x features https://packagist.org/packages/nette/php-generator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants