From 13f69f2e28f28804813e3babd6f86a1bb06fb7a6 Mon Sep 17 00:00:00 2001 From: Piotr Kugla Date: Fri, 8 Oct 2021 19:16:19 +0200 Subject: [PATCH] [Runtime] Drop class validation of composer "extra.runtime.class" --- src/Symfony/Component/Runtime/Internal/ComposerPlugin.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php b/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php index 77c48b3f0b380..8247b858e66b5 100644 --- a/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php +++ b/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php @@ -18,7 +18,6 @@ use Composer\Plugin\PluginInterface; use Composer\Script\ScriptEvents; use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\Runtime\RuntimeInterface; use Symfony\Component\Runtime\SymfonyRuntime; /** @@ -98,10 +97,6 @@ public function updateAutoloadFile(): void $runtimeClass = $extra['class'] ?? SymfonyRuntime::class; - if (SymfonyRuntime::class !== $runtimeClass && !is_subclass_of($runtimeClass, RuntimeInterface::class)) { - throw new \InvalidArgumentException(sprintf('Class "%s" listed under "extra.runtime.class" in your composer.json file '.(class_exists($runtimeClass) ? 'should implement "%s".' : 'not found.'), $runtimeClass, RuntimeInterface::class)); - } - unset($extra['class'], $extra['autoload_template']); $code = strtr(file_get_contents($autoloadTemplate), [