-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use PHPUnitPHAR as prefix instead of PHPUnit as we may want to prefix…
… some symbols where their name begins with PHPUnit\ in the future
- Loading branch information
1 parent
01b6e09
commit 4d829e0
Showing
3 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
*/ | ||
|
||
return [ | ||
'prefix' => 'PHPUnit', | ||
'prefix' => 'PHPUnitPHAR', | ||
|
||
'exclude-namespaces' => [ | ||
'PHPUnit', | ||
|
4d829e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi, since we now have a unique prefix for prefixed classes vs. public api PHPStan can detect mistakenly used class-references to classes within the phpunit phar with phpstan/phpstan-src#3002
4d829e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@staabm Can you explain why PHPStan cares about the prefix for PHP-Scoper that is used in the build process for PHPUnit's PHAR?
4d829e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to detect e.g. accidental/wrong use statements which sometimes are added via IDE Autocomplete
initial feature request was phpstan/phpstan#10587 (comment)