|
16 | 16 | use Doctrine\Common\Annotations\Reader;
|
17 | 17 | use Http\Client\HttpClient;
|
18 | 18 | use phpDocumentor\Reflection\DocBlockFactoryInterface;
|
| 19 | +use PHPStan\PhpDocParser\Parser\PhpDocParser; |
19 | 20 | use Psr\Cache\CacheItemPoolInterface;
|
20 | 21 | use Psr\Container\ContainerInterface as PsrContainerInterface;
|
21 | 22 | use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface;
|
|
160 | 161 | use Symfony\Component\Notifier\Recipient\Recipient;
|
161 | 162 | use Symfony\Component\Notifier\Transport\TransportFactoryInterface as NotifierTransportFactoryInterface;
|
162 | 163 | use Symfony\Component\PropertyAccess\PropertyAccessor;
|
| 164 | +use Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor; |
163 | 165 | use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface;
|
164 | 166 | use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface;
|
165 | 167 | use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
|
@@ -1833,6 +1835,14 @@ private function registerPropertyInfoConfiguration(ContainerBuilder $container,
|
1833 | 1835 |
|
1834 | 1836 | $loader->load('property_info.php');
|
1835 | 1837 |
|
| 1838 | + if ( |
| 1839 | + ContainerBuilder::willBeAvailable('phpstan/phpdoc-parser', PhpDocParser::class, ['symfony/framework-bundle', 'symfony/property-info'], true) |
| 1840 | + && ContainerBuilder::willBeAvailable('phpdocumentor/type-resolver', PhpDocParser::class, ['symfony/framework-bundle', 'symfony/property-info'], true) |
| 1841 | + ) { |
| 1842 | + $definition = $container->register('property_info.phpstan_extractor', PhpStanExtractor::class); |
| 1843 | + $definition->addTag('property_info.type_extractor', ['priority' => -1000]); |
| 1844 | + } |
| 1845 | + |
1836 | 1846 | if (ContainerBuilder::willBeAvailable('phpdocumentor/reflection-docblock', DocBlockFactoryInterface::class, ['symfony/framework-bundle', 'symfony/property-info'], true)) {
|
1837 | 1847 | $definition = $container->register('property_info.php_doc_extractor', 'Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor');
|
1838 | 1848 | $definition->addTag('property_info.description_extractor', ['priority' => -1000]);
|
|
0 commit comments