diff --git a/DataCollector/DoctrineDataCollector.php b/DataCollector/DoctrineDataCollector.php index f1589d42..d2249707 100644 --- a/DataCollector/DoctrineDataCollector.php +++ b/DataCollector/DoctrineDataCollector.php @@ -66,11 +66,7 @@ public function __construct(ManagerRegistry $registry, bool $shouldValidateSchem $this->registry = $registry; $this->shouldValidateSchema = $shouldValidateSchema; - if ($debugDataHolder === null) { - parent::__construct($registry); - } else { - parent::__construct($registry, $debugDataHolder); - } + parent::__construct($registry, $debugDataHolder); } public function collect(Request $request, Response $response, ?Throwable $exception = null): void diff --git a/DependencyInjection/DoctrineExtension.php b/DependencyInjection/DoctrineExtension.php index 1640b365..d78ef5af 100644 --- a/DependencyInjection/DoctrineExtension.php +++ b/DependencyInjection/DoctrineExtension.php @@ -844,7 +844,6 @@ protected function loadOrmEntityManagerMappingInformation(array $entityManager, $mappingService = $this->getObjectManagerElementName($entityManager['name'] . '_' . $driverType . '_metadata_driver'); $mappingDriverDef = $container->getDefinition($mappingService); $args = $mappingDriverDef->getArguments(); - /** @psalm-suppress TypeDoesNotContainType $this->drivers is set by $this->loadMappingInformation() call */ if ($driverType === 'annotation') { $args[2] = $entityManager['report_fields_where_declared']; } elseif ($driverType === 'attribute') { diff --git a/Mapping/DisconnectedMetadataFactory.php b/Mapping/DisconnectedMetadataFactory.php index a9604821..e5fcc73a 100644 --- a/Mapping/DisconnectedMetadataFactory.php +++ b/Mapping/DisconnectedMetadataFactory.php @@ -117,12 +117,10 @@ public function findNamespaceAndPathForMetadata(ClassMetadataCollection $metadat $ns = $r->getNamespaceName(); } elseif ($path) { // Get namespace by removing the last component of the FQCN - /** @psalm-suppress NoValue */ $nsParts = explode('\\', $all[0]->name); array_pop($nsParts); $ns = implode('\\', $nsParts); } else { - /** @psalm-suppress NoValue */ throw new RuntimeException(sprintf('Unable to determine where to save the "%s" class (use the --path option).', $all[0]->name)); } diff --git a/Tests/ProfilerTest.php b/Tests/ProfilerTest.php index ac035024..d2d586fd 100644 --- a/Tests/ProfilerTest.php +++ b/Tests/ProfilerTest.php @@ -66,7 +66,7 @@ public function setUp(): void if (class_exists(CodeExtension::class)) { $this->twig->addExtension(new CodeExtension('', '', '')); - } else { + } elseif (class_exists(CodeExtensionLegacy::class)) { $this->twig->addExtension(new CodeExtensionLegacy('', '', '')); }