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

[RFC] Generate classes with declare(strict_types=1); #80

Closed
enumag opened this issue Dec 2, 2017 · 2 comments
Closed

[RFC] Generate classes with declare(strict_types=1); #80

enumag opened this issue Dec 2, 2017 · 2 comments

Comments

@enumag
Copy link

enumag commented Dec 2, 2017

I tried this bundle today and was quite surprised to find that the generated PHP files do not contain declare(strict_types=1);. I can't see any reason for that since this bundle itself requires PHP 7 anyway. Is there some other reason? Or should I send a PR?

@javiereguiluz
Copy link
Member

We didn't include it because the generated code follows the same rules as Symfony's own code. We don't use declare(strict_types=1); anywhere in our code ... and if I'm right, most of the popular PHP projects don't use it yet either.

@enumag
Copy link
Author

enumag commented Dec 3, 2017

Yeah that's most probably the case. However the projects that are most likely to use this bundle are the brand new symfony-based applications which will most likely use PHP7 and strict types.

Anyway thanks for the explanations.

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

2 participants