You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug symfony#49207 [PropertyInfo] Add meaningful message when phpstan/phpdoc-parser is not installed when using PhpStanExtractor (alexandre-daubois)
This PR was merged into the 5.4 branch.
Discussion
----------
[PropertyInfo] Add meaningful message when `phpstan/phpdoc-parser` is not installed when using `PhpStanExtractor`
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | _NA_
| License | MIT
| Doc PR | _NA_
Folow-up of symfony#49146, as `phpstan/phpdoc-parser` is only defined in `require-dev` of PropertyInfo.
Also, I took this opportunity to convert a few data providers to static ones cc `@OskarStark` 👍
Commits
-------
404d6cc [PropertyInfo] Add meaningful message when `phpstan/phpdoc-parser` is not installed when using `PhpStanExtractor`
Copy file name to clipboardExpand all lines: src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,10 @@ public function __construct(array $mutatorPrefixes = null, array $accessorPrefix
64
64
thrownew \LogicException(sprintf('Unable to use the "%s" class as the "phpdocumentor/type-resolver" package is not installed. Try running composer require "phpdocumentor/type-resolver".', __CLASS__));
65
65
}
66
66
67
+
if (!class_exists(PhpDocParser::class)) {
68
+
thrownew \LogicException(sprintf('Unable to use the "%s" class as the "phpstan/phpdoc-parser" package is not installed. Try running composer require "phpstan/phpdoc-parser".', __CLASS__));
0 commit comments