Fix inconsistent switch case syntax#5
Open
theodorejb wants to merge 1 commit into
Open
Conversation
Author
|
@TysonAndre Can you review this when you get a chance? |
DanielEScherzer
approved these changes
Sep 5, 2025
DanielEScherzer
left a comment
There was a problem hiding this comment.
Just came across this, +1 - needed for Phan to run on 8.5
rlerdorf
added a commit
to phan/phan
that referenced
this pull request
Sep 30, 2025
The var_representation_polyfill package has a deprecated switch case syntax (case 'NULL';) that triggers deprecation warnings in PHP 8.5. The package appears abandoned (last commit 2022), but there is an open PR (#5) that fixes this issue. This commit adds a composer patch to fix the deprecated semicolon syntax: - Added cweagans/composer-patches as dev dependency - Created patch file to change `case 'NULL';` to `case 'NULL':` - Configured composer.json to apply the patch automatically The patch is based on PR #5 from the upstream repository: TysonAndre/var_representation_polyfill#5 Tested on PHP 8.5.0-dev - no deprecation warnings.
|
Hey, phan 6.0.0-beta still crashes because of this |
|
👍 🙏 |
|
I wan't to test in PHP 8.5. Is there any way we can get a patch released? |
|
Can this get some traction any time soon? Had to drop phan from the CI matrix because it's blowing up the suite on 8.5. |
|
@maksimovic As a workaround in GH Actions you can install the |
|
FYI: I created a fork at https://github.com/phan/var_representation_polyfill and am going to make this fix there, then replace the dependency in phan, to fix the issue for phan users (tracked in phan/phan#5420). |
Daimona
added a commit
to phan/var_representation_polyfill
that referenced
this pull request
Jan 28, 2026
Same as TysonAndre#5. This was most certainly a typo, and the fix is now needed for PHP 8.5 support.
This was referenced Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This must have been a typo, since it's the only case statement using the non-standard syntax.