-
-
Notifications
You must be signed in to change notification settings - Fork 69
issue #118 - optional typed php 7.4 properties are raising engine errors #119
Conversation
A few details are questionable:
|
tests/GeneratedHydratorTest/Functional/HydratorFunctionalTest.php
Outdated
Show resolved
Hide resolved
src/GeneratedHydrator/CodeGenerator/Visitor/HydratorMethodsVisitor.php
Outdated
Show resolved
Hide resolved
src/GeneratedHydrator/CodeGenerator/Visitor/HydratorMethodsVisitor.php
Outdated
Show resolved
Hide resolved
src/GeneratedHydrator/CodeGenerator/Visitor/HydratorMethodsVisitor.php
Outdated
Show resolved
Hide resolved
src/GeneratedHydrator/CodeGenerator/Visitor/HydratorMethodsVisitor.php
Outdated
Show resolved
Hide resolved
Psalm is quite aggressive or I am too lazy ? |
It is very aggressive, which is good, since every tiny detail has major implications in OSS packages, even niche ones like this one (which BTW has ~500 installs/day) |
Yes, it was sarcasm. It's actually quite drastic, I'll fix most errors I can. |
Please only fix what's raised by your patch: I can work on the rest myself, while merging |
Yes of course. |
I have to admit that fixing those kind of errors from phpcs:
is quite annoying, are those part of your conventions for this package ? |
Same question for "Variable "$propertyName" not allowed in double quoted string; use sprintf() or concatenation instead", what's your preference between:
I mostly use the |
The first and the last are acceptable, string interpolation is to be avoided. Don't overthink it BTW: if you need to auto-fix things, there's |
Yes, this package relies on |
Is there a technical reason for this ? From a code reader perspective, it seems much more fluent to read. |
OK, I think it's your job then, seeing the commit history :) For the rest, if there's anything more structural or important to change, please tell me. |
Yes, I much prefer to avoid variable interpolation in strings: explicit concatenation is preferable. I'll review again and take over for merge, if there's nothing left 👍 |
Thanks a lot ! |
OK, I see that the technical reason is mostly taste :) If that's auto-fixable using phpcbf I'll leave it to you then ! |
src/GeneratedHydrator/CodeGenerator/Visitor/HydratorMethodsVisitor.php
Outdated
Show resolved
Hide resolved
What's the status of this PR ? Should I fix any other things ? |
Didn't get to look at it, sorry |
Don't worry, I'm just asking, we are actually starting a PHP 7.4 project where I'd like to use this component. We can still patch it locally but I'd very much prefer to use a vanilla stable version :) |
Any news on this ? @Ocramius if you anything bothers you on how I did it I would pleased to fix or do another MR. |
@pounard I'm checking this out locally: sorry, it simply slipped out of my TODOs. Thanks for the ping! |
@pounard I've bumped to PHP 7.4, brought mutation test coverage back to 100% and applied CS fixes on top of your patch. Turns out that verifying Thanks! |
Thank you ! |
Fixes #118.