-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Value generator enum support #143
Value generator enum support #143
Conversation
a1a9a61
to
bd480f6
Compare
Signed-off-by: Rastusik <mfris@pixelfederation.com>
bd480f6
to
0252edf
Compare
ok, I have no idea why the static analysis check doesn't work, but it seems like an error in psalm |
Beware that static analysis runs on PHP 7.4. |
BTW, dropping PHP 7.4 support is also pretty much OK. |
@Ocramius what are you suggesting for me to do? I'm not sure what exactly you mean. should I do the 7.4 support drop? I know that the check runs on 7.4, but the code works even on 7.4 so I'm not sure what to do right now. |
Yeah, try removing 7.4 from |
Signed-off-by: Rastusik <mfris@pixelfederation.com>
Signed-off-by: Rastusik <mfris@pixelfederation.com>
355b1ac
to
f069ead
Compare
Signed-off-by: Rastusik <mfris@pixelfederation.com>
ok so I did what I could but psalm doesn't seem to work correctly |
|
||
namespace LaminasTest\Code\Generator\TestAsset; | ||
|
||
enum TestEnum |
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.
Ah, enums were introduced in 8.1, hence the parser failure 🤔
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.
Ok, yeah, I'm gonna pull PHP 8.0 support, but gonna work on the other issues in the milestone first.
I think the patch is sound, but in order to raise us to enum support, we'd have to drop PHP 8.1 too. Psalm correctly infers that the codebase should be verified with PHP 8.0 (compatible):
Unsure what to do here, will need to think about it. |
yes, that is why I didn't want to do anything more proactively. I'll be waiting for feedback. |
hey @Ocramius , how about this patch? Is there any ETA? |
No ETA - haven't worked on this yet. |
Couldn't push to your fork, so I created #166 instead. Note how I fixed a bad bug (TM) where the generated value wasn't considering the current namespace :D |
Thanks @Rastusik! |
nice :D thanks for merging @Ocramius |
Description
This patch enables support for enumerations in ValueGenerator, which is currently missing. It is needed to properly generate proxy classes which have enums as default values in method arguments.