Skip to content

Allow value-of to work with backed enums (fixes #7874).#8283

Merged
orklah merged 3 commits intovimeo:masterfrom
AndrolGenhald:feature/value-of-backed-enum
Jul 20, 2022
Merged

Allow value-of to work with backed enums (fixes #7874).#8283
orklah merged 3 commits intovimeo:masterfrom
AndrolGenhald:feature/value-of-backed-enum

Conversation

@AndrolGenhald
Copy link
Copy Markdown
Collaborator

No description provided.

@AndrolGenhald AndrolGenhald added the release:feature The PR will be included in 'Features' section of the release notes label Jul 18, 2022
@AndrolGenhald AndrolGenhald marked this pull request as ready for review July 18, 2022 19:17
Comment thread tests/ValueOfTest.php
Comment on lines +294 to +295
// TODO turn this into an InvalidDocblock with a better error message. This is difficult because it
// has to happen after scanning has finished, otherwise the class might not have been scanned yet.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to get this to work, but unless there's a single point of analysis for docblocks after scanning has finished I'm not sure how, so I figure it can wait.

@AndrolGenhald AndrolGenhald requested a review from orklah July 18, 2022 19:18
@AndrolGenhald
Copy link
Copy Markdown
Collaborator Author

@orklah Do you think we should proactively change TKeyOfArray to TKeyOf even though it only works for arrays atm?

@orklah
Copy link
Copy Markdown
Collaborator

orklah commented Jul 18, 2022

@orklah Do you think we should proactively change TKeyOfArray to TKeyOf even though it only works for arrays atm?

It might be better yeah, in order to let people understand those two are similar

@AndrolGenhald
Copy link
Copy Markdown
Collaborator Author

@orklah Ready for review, the bc error is expected and fine.

@orklah orklah merged commit 85fe7e8 into vimeo:master Jul 20, 2022
@orklah
Copy link
Copy Markdown
Collaborator

orklah commented Jul 20, 2022

Thanks!

@amberovsky
Copy link
Copy Markdown

Hi @orklah @AndrolGenhald ,
I can reproduce this on 4.27.0 - just wondering if this fix slipped off from the release or it is not ready be released yet?

@orklah
Copy link
Copy Markdown
Collaborator

orklah commented Sep 21, 2022

4.27 should contain the fix. Do you have an example snippet?

@amberovsky
Copy link
Copy Markdown

It's the same as above with the same error message.
I can't the see fix in the change log and in the commit diff?
I also checked the code - it's not there e.g. in the 4.27 there are no changes in this file

@AndrolGenhald
Copy link
Copy Markdown
Collaborator Author

Actually this was targeted to the master branch, so the first version it's in is 5.0.

@orklah maybe we should release another beta soon?

@orklah
Copy link
Copy Markdown
Collaborator

orklah commented Sep 21, 2022

oh sorry, didn't check the target indeed.

We can release a beta if we want. I was hoping a final release in september after the immutable refactor but we may have to wait a bit more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:feature The PR will be included in 'Features' section of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants