-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
| Q | A |
|---|---|
| Bug report? | yes |
| Feature request? | no |
| BC Break report? | no |
| RFC? | no |
| Symfony version | 3.4 and 4.0 |
The PropertyInfo component lists the phpdocumentor/reflection-docblock package as a developer dependency in require-dev:
symfony/src/Symfony/Component/PropertyInfo/composer.json
Lines 29 to 35 in 6651087
| "require-dev": { | |
| "symfony/serializer": "~3.4|~4.0", | |
| "symfony/cache": "~3.4|~4.0", | |
| "symfony/dependency-injection": "~3.4|~4.0", | |
| "phpdocumentor/reflection-docblock": "^3.0|^4.0", | |
| "doctrine/annotations": "~1.0" | |
| }, |
However, the PhpDocExtractor class depends on an interface and a class from that package without you using it directly.
| public function __construct(DocBlockFactoryInterface $docBlockFactory = null, array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null) | |
| { | |
| $this->docBlockFactory = $docBlockFactory ?: DocBlockFactory::createInstance(); |
The PropertyInfo component documentation states:
PhpDocExtractor
This extractor depends on the
phpdocumentor/reflection-docblocklibrary.
https://symfony.com/doc/current/components/property_info.html#phpdocextractor
I believe when the non-tests related code of the component has a dependency on a package, it should be in require instead of require-dev.
This caused a problem for us in production when we had the documentor package installed in development, but not listed in neither our own require nor require-dev dependencies as we do not use it anywhere in our code.