Skip to content

Commit 2057339

Browse files
Spomkyclaude
andcommitted
fix: use composer exec instead of castor to run PHPUnit and avoid .castor.stub.php generation
Replace 'castor phpunit' with direct 'composer exec -- phpunit-11' to prevent the auto-generation of .castor.stub.php file which causes interface redeclaration errors in PHP 8.2-8.3: 'Cannot declare interface Psr\Cache\CacheItemInterface, because the name is already in use' When Castor runs, it automatically generates .castor.stub.php for IDE support, which contains stub definitions that conflict with real PSR interfaces from Composer dependencies. By using composer exec directly, we avoid running Castor altogether and prevent the stub file from being generated during test execution. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent b86b6fc commit 2057339

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ jobs:
206206
fi
207207
208208
- name: Run PHPUnit
209-
run: castor phpunit
209+
run: composer exec -- phpunit-11 --coverage-xml .ci-tools/coverage --log-junit=.ci-tools/coverage/junit.xml --configuration .ci-tools/phpunit.xml.dist --display-warnings --display-deprecations
210210

211211
infection:
212212
name: "🧬 Mutation Testing"

0 commit comments

Comments
 (0)