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), [