Skip to content

name-collision-detector#294

Merged
staabm merged 2 commits intophpstan:2.0.xfrom
staabm:clean
May 10, 2026
Merged

name-collision-detector#294
staabm merged 2 commits intophpstan:2.0.xfrom
staabm:clean

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented May 10, 2026

to prevent duplicate symbols like in phpstan/phpstan-doctrine#743 (comment)

inspired by phpstan/phpstan-src@95cdbe5#diff-107e910e9f2ebfb9a741fa10b2aa7100cc1fc4f5f3aca2dfe78b905cbd73c0d2


fixes

➜  phpstan-phpunit git:(clean) make name-collision
php vendor/bin/detect-collisions --configuration collision-detector.json
Using config '/Users/staabm/workspace/phpstan-phpunit/collision-detector.json'

AssertFunction\Foo is defined 2 times:
 > /tests/Type/PHPUnit/data/assert-function-9.6.11.php:8
 > /tests/Type/PHPUnit/data/assert-function.php:15

ExampleTestCase\FooTestCase is defined 2 times:
 > /tests/Rules/PHPUnit/data/assert-same.php:5
 > /tests/Rules/PHPUnit/data/data-provider-declaration.php:7


make: *** [name-collision] Error 1


steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
Comment on lines +333 to +334
- name: "Checkout"
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: "Install PHP"
uses: "shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1" # v2
coverage: "none"
php-version: "8.5"

- uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3
@staabm staabm requested a review from VincentLanglet May 10, 2026 05:27
@staabm staabm merged commit 21ea2e9 into phpstan:2.0.x May 10, 2026
96 checks passed
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.

3 participants