From 88e43d4d4ce052a2b880bade7f9b62215fccd4c4 Mon Sep 17 00:00:00 2001 From: Matthias Derer Date: Tue, 5 May 2020 17:01:20 +0200 Subject: [PATCH 1/3] [DI][EventDispatcher] added contract for implementation fixes #36708. --- .../Component/EventDispatcher/EventSubscriberInterface.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php b/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php index 824f21599c25..741590b1bf3a 100644 --- a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php +++ b/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php @@ -40,6 +40,9 @@ interface EventSubscriberInterface * * ['eventName' => ['methodName', $priority]] * * ['eventName' => [['methodName1', $priority], ['methodName2']]] * + * The code must not depend on runtime state as it will only be called at compile time. + * All logic depending on runtime state must be put into the individual methods handling the events. + * * @return array The event names to listen to */ public static function getSubscribedEvents(); From 2f305cdc832060205cafeacfb7dae2b8e9789a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Thu, 7 May 2020 19:56:37 +0200 Subject: [PATCH 2/3] Remove patches for Doctrine bugs and deprecations --- composer.json | 2 +- phpunit | 10 ---------- src/Symfony/Bridge/Doctrine/composer.json | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 2c7dc6e89e2c..9ad5e39ad2ca 100644 --- a/composer.json +++ b/composer.json @@ -91,7 +91,7 @@ "doctrine/annotations": "~1.0", "doctrine/cache": "~1.6", "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": "~2.4,<=2.10.2", + "doctrine/dbal": "~2.4", "doctrine/orm": "~2.4,>=2.4.5", "doctrine/doctrine-bundle": "~1.4", "monolog/monolog": "~1.11", diff --git a/phpunit b/phpunit index fbce26d8edcc..713594fc19ed 100755 --- a/phpunit +++ b/phpunit @@ -21,14 +21,4 @@ if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) { putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1'); } putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit'); - -if (!getenv('SYMFONY_DEPRECATIONS_HELPER')) { - foreach ($_SERVER['argv'] as $v) { - if (false !== strpos($v, 'Bridge/Doctrine')) { - putenv('SYMFONY_DEPRECATIONS_HELPER=max[indirect]=7'); - break; - } - } -} - require __DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit'; diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index 67c0bb938a4f..1aa2315c609c 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -35,7 +35,7 @@ "symfony/validator": "^3.2.5|~4.0", "symfony/translation": "~2.8|~3.0|~4.0", "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": "~2.4,<=2.10.2", + "doctrine/dbal": "~2.4", "doctrine/orm": "^2.4.5" }, "conflict": { From f177b3d4885ab000e9ed4b2bab758ee45abcbfd2 Mon Sep 17 00:00:00 2001 From: Matthias Larisch Date: Wed, 6 May 2020 14:08:15 +0200 Subject: [PATCH 3/3] [FrameworkBundle] display actual target for error in AssetsInstallCommand When assets:install fails because the target directory does not exist, it should display the actual directory it wanted to have instead of the configuration directive. In most cases, the target directory is retrieved from the kernel config and thus differs from the argument. --- .../Bundle/FrameworkBundle/Command/AssetsInstallCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php index aee869f8fd93..199e1ad0dacf 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php @@ -121,7 +121,7 @@ protected function execute(InputInterface $input, OutputInterface $output) if (is_dir(\dirname($targetArg).'/web')) { $targetArg = \dirname($targetArg).'/web'; } else { - throw new InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target'))); + throw new InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $targetArg)); } } }