Skip to content

Conversation

@huangdijia
Copy link
Member

Bump nikic/php-parser dependency to ^5.0 across all relevant composer.json files. Refactor codebase to replace deprecated ParserFactory::ONLY_PHP7 and ParserFactory::PREFER_PHP7 usages with createForNewestSupportedVersion(). Update type handling and test assertions for compatibility with php-parser v5. Adjust code generation and test expectations to match new parser output and syntax formatting.

Bump nikic/php-parser dependency to ^5.0 across all relevant composer.json files. Refactor codebase to replace deprecated ParserFactory::ONLY_PHP7 and ParserFactory::PREFER_PHP7 usages with createForNewestSupportedVersion(). Update type handling and test assertions for compatibility with php-parser v5. Adjust code generation and test expectations to match new parser output and syntax formatting.
Removed direct usage of PhpParser\Lexer and Emulative in favor of using the Parser's getTokens() method. This simplifies the code and reduces dependency on the Lexer, aligning with updated PhpParser usage patterns.
Standardized spacing in type hints and array syntax in test files for consistency. No functional changes were made.
@huangdijia huangdijia added this to the v3.2 milestone Oct 23, 2025
@huangdijia huangdijia marked this pull request as ready for review October 23, 2025 01:17

This comment was marked as outdated.

@limingxinleo limingxinleo merged commit 0ed6856 into hyperf:3.2 Oct 24, 2025
67 checks passed
@huangdijia huangdijia deleted the upgrade/php-parser-5.x branch October 24, 2025 05:59
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.

2 participants