Skip to content

Commit a4cb1fd

Browse files
dereuromarkclaude
andcommitted
Add conflict for nikic/php-parser v5+ to fix autoloader collision
rector/rector bundles its own vendored copy of nikic/php-parser v5. When phpunit/php-code-coverage pulls in nikic/php-parser v5 directly, the classes get loaded twice causing: Cannot declare class PhpParser\Node\Scalar\InterpolatedString, because the name is already in use The InterpolatedString class only exists in php-parser v5 (it was called Encapsed in v4). By conflicting with v5+, composer will install php-parser v4.x which php-code-coverage also accepts and which doesn't have the conflicting class names. Fixes CI failure: https://github.com/cakephp/upgrade/actions/runs/19643729518 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 63199da commit a4cb1fd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"rector/rector": "~2.2.3",
1212
"symfony/string": "^6.0 || ^7.0"
1313
},
14+
"conflict": {
15+
"nikic/php-parser": ">=5.0"
16+
},
1417
"autoload": {
1518
"psr-4": {
1619
"Cake\\Upgrade\\": "src/"

0 commit comments

Comments
 (0)