-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7d5782
commit 270c2ee
Showing
3 changed files
with
24 additions
and
0 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
8 changes: 8 additions & 0 deletions
8
stubs/Symfony/Component/Process/Exception/LogicException.stub
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\Process\Exception; | ||
|
||
class LogicException extends \Exception | ||
{ | ||
|
||
} |
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
270c2ee
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.
@ondrejmirtes Please be aware that the function
getIterator
does NOT throw the exceptions you annotated. It is thrown once iterated, which is NOT detected by PHPStan: https://phpstan.org/r/d07ac0f0-a49d-4f82-b1dd-1939058bbeedRelated: https://github.com/shipmonk-rnd/phpstan-rules?tab=readme-ov-file#forbidcheckedexceptioninyieldingmethod
270c2ee
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.
I know it's not exactly precise, but I don't know what to do about this. If someone does
foreach ($process as $v)
, then PHPStan could correctly use these@throws
abovegetIterator
. (But it currently does not.)270c2ee
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.
Anyway, I didn't make anything worse with this commit, this was copied from Symfony sources.