-
Notifications
You must be signed in to change notification settings - Fork 50
Declare strict types #375
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
Declare strict types #375
Conversation
Ah!.. you use pretty ci... ok.. so shall I add it? if I do I will need to enable risky rules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, this looks good! yeah please enable the style-ci rules for it. it won't automatically change code, so i am not too worried about "risky" rules.
@@ -1,3 +1,4 @@ | |||
/.phpunit.result.cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this also on this PR.
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
What are the benefits of having declare(strict_types=1)
?
I guess today none.. but why not having it? |
Because if we made one small mistake, everything will break horribly. =) |
Ah.. I got to admit that you have a point and better safe than sorry.. then may I suggest in order not to get all the work lost.. to leave it for tests and interfaces? or you want to disable except if you want to have a php-cs rule for having it removed. |
i would be for having the strict types. if we do have mistakes, people will tell us, and we can fix them. more likely, other people have mistakes and can notice and fix them. non-strictness essentially hides issues. i would see this in a new minor version, not as a patch release. most code in the bundle is not interacted with by the user, but is about the collector and factories and such. |
@Nyholm are you ok if we merge this? afaik it should only cause BC breaks if we have programming errors in our code, and if we do we rather know and fix them than ignoring the problem. |
Fair. @gmponos, can you make sure the ci is green |
also needs a rebase on master again, to solve conflicts :-/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
I could also add it as a php-cs rule but checking travis I saw that you don't check the code against php-cs