diff --git a/core-bundle/src/Controller/InitializeController.php b/core-bundle/src/Controller/InitializeController.php index 9cb15d1d1b9..bfb5f077ca4 100644 --- a/core-bundle/src/Controller/InitializeController.php +++ b/core-bundle/src/Controller/InitializeController.php @@ -127,12 +127,12 @@ private function handleException(\Throwable $e, Request $request, $type): void try { $event = new ResponseEvent($this->get('http_kernel'), $request, $type, $response); - $this->get('event_dispatcher')->dispatch(KernelEvents::RESPONSE, $event); + $this->get('event_dispatcher')->dispatch($event, KernelEvents::RESPONSE); $response = $event->getResponse(); $this->get('event_dispatcher')->dispatch( - KernelEvents::FINISH_REQUEST, - new FinishRequestEvent($this->get('http_kernel'), $request, $type) + new FinishRequestEvent($this->get('http_kernel'), $request, $type), + KernelEvents::FINISH_REQUEST ); $this->get('request_stack')->pop(); diff --git a/core-bundle/src/Exception/ServiceUnavailableException.php b/core-bundle/src/Exception/ServiceUnavailableException.php index 262273c1c8b..bde82237f05 100644 --- a/core-bundle/src/Exception/ServiceUnavailableException.php +++ b/core-bundle/src/Exception/ServiceUnavailableException.php @@ -12,7 +12,7 @@ namespace Contao\CoreBundle\Exception; -@trigger_error('Using the "ServiceUnavailableException" class has been deprecated and will no longer work in Contao 5.0. Use the "Lexik\Bundle\MaintenanceBundle\Exception\ServiceUnavailableException" class instead.', E_USER_DEPRECATED); +@trigger_error('Using the "Contao\CoreBundle\Exception\ServiceUnavailableException" class has been deprecated and will no longer work in Contao 5.0. Use the "Lexik\Bundle\MaintenanceBundle\Exception\ServiceUnavailableException" class instead.', E_USER_DEPRECATED); /** * @deprecated Deprecated since Contao 4.1, to be removed in Contao 5.0; use the diff --git a/core-bundle/tests/DependencyInjection/Compiler/AddAssetsPackagesPassTest.php b/core-bundle/tests/DependencyInjection/Compiler/AddAssetsPackagesPassTest.php index 70ffce306e3..ac29d72200a 100644 --- a/core-bundle/tests/DependencyInjection/Compiler/AddAssetsPackagesPassTest.php +++ b/core-bundle/tests/DependencyInjection/Compiler/AddAssetsPackagesPassTest.php @@ -143,6 +143,7 @@ public function testUsesTheJsonManifestVersionStrategyForBundles(): void $this->assertSame('assets._version_manifest_json', (string) $service->getArgument(1)); $this->assertTrue($container->hasDefinition('assets._version_manifest_json')); + /** @var ChildDefinition $definition */ $definition = $container->getDefinition('assets._version_manifest_json'); $this->assertInstanceOf(ChildDefinition::class, $definition); diff --git a/core-bundle/tests/Migration/MigrationCollectionTest.php b/core-bundle/tests/Migration/MigrationCollectionTest.php index 83013123175..ce5631f47a1 100644 --- a/core-bundle/tests/Migration/MigrationCollectionTest.php +++ b/core-bundle/tests/Migration/MigrationCollectionTest.php @@ -24,7 +24,7 @@ public function testGetPendingNames(): void $migrations = new MigrationCollection($this->getMigrationServices()); $pendingMigrations = $migrations->getPendingNames(); - if (!\is_array($pendingMigrations)) { + if ($pendingMigrations instanceof \Traversable) { $pendingMigrations = iterator_to_array($pendingMigrations); } @@ -36,7 +36,7 @@ public function testRunMigrations(): void $migrations = new MigrationCollection($this->getMigrationServices()); $results = $migrations->run(); - if (!\is_array($results)) { + if ($results instanceof \Traversable) { $results = iterator_to_array($results); } diff --git a/installation-bundle/src/Database/AbstractVersionUpdate.php b/installation-bundle/src/Database/AbstractVersionUpdate.php index 0092a28d1c4..aac15568ee2 100644 --- a/installation-bundle/src/Database/AbstractVersionUpdate.php +++ b/installation-bundle/src/Database/AbstractVersionUpdate.php @@ -12,12 +12,11 @@ namespace Contao\InstallationBundle\Database; -use Contao\CoreBundle\Migration\AbstractMigration; use Doctrine\DBAL\Connection; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerAwareTrait; -@trigger_error(sprintf('Using the "%s" class has been deprecated and will no longer work in Contao 5.0. Use the "%s" class instead.', AbstractVersionUpdate::class, AbstractMigration::class), E_USER_DEPRECATED); +@trigger_error('Using the "Contao\InstallationBundle\Database\AbstractVersionUpdate" class has been deprecated and will no longer work in Contao 5.0. Use the "Contao\CoreBundle\Migration\AbstractMigration" class instead.', E_USER_DEPRECATED); /** * @deprecated Deprecated since Contao 4.9, to be removed in Contao 5.0; use the