Skip to content

Commit 29d89ad

Browse files
dereuromarkclaude
andcommitted
Add conflict for nikic/php-parser to fix autoloader collision
rector/rector bundles its own vendored copy of nikic/php-parser. When phpunit/php-code-coverage (a transitive dependency) pulls in nikic/php-parser directly, the classes get loaded twice causing: Cannot declare class PhpParser\Node\Scalar\InterpolatedString, because the name is already in use Adding this conflict prevents composer from installing nikic/php-parser directly, avoiding the autoloader collision with rector's bundled version. 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 29d89ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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": "*"
16+
},
1417
"autoload": {
1518
"psr-4": {
1619
"Cake\\Upgrade\\": "src/"

0 commit comments

Comments
 (0)