Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

De-duplicate PHP version list and error comparison in handler.ts#14779

Open
iliaal wants to merge 1 commit into
phpstan:2.2.xphpstan/phpstan:2.2.xfrom
iliaal:refactor/playground-api-dedupiliaal/phpstan:refactor/playground-api-dedupCopy head branch name to clipboard
Open

De-duplicate PHP version list and error comparison in handler.ts#14779
iliaal wants to merge 1 commit into
phpstan:2.2.xphpstan/phpstan:2.2.xfrom
iliaal:refactor/playground-api-dedupiliaal/phpstan:refactor/playground-api-dedupCopy head branch name to clipboard

Conversation

@iliaal

@iliaal iliaal commented Jun 5, 2026

Copy link
Copy Markdown

The nine-version PHP list was a literal in analyseResult and retrieveLegacyResult, and the five-field PHPStanError comparison was copied verbatim into createTabs and retrieveResult. Extracted an ALL_PHP_VERSIONS constant and an errorsEqual() helper. Behaviour unchanged: errorsEqual matches the original field-by-field comparison across 49 test pairs, tsc is clean. The per-version "ensure present" block in retrieveResult is left as-is on purpose, since it controls which versions get re-analysed for older snapshots.

Overlaps the request-typing PR (branch refactor/playground-api-request-typing) in handler.ts; rebase whichever merges second.

The full nine-version list was repeated as a literal in analyseResult and
retrieveLegacyResult, and the five-field PHPStanError comparison was copied
verbatim into createTabs and retrieveResult. Extract an ALL_PHP_VERSIONS
constant and an errorsEqual() helper. Behaviour is unchanged. The per-version
"ensure present" block in retrieveResult is left as-is on purpose, since it
governs which versions get re-analysed for older snapshots.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.