diff --git a/src/Form/TypeExtension/ForwardCompatTypeExtensionTrait.php b/src/Form/TypeExtension/ForwardCompatTypeExtensionTrait.php index 4f1f1eeb..4e0707d9 100644 --- a/src/Form/TypeExtension/ForwardCompatTypeExtensionTrait.php +++ b/src/Form/TypeExtension/ForwardCompatTypeExtensionTrait.php @@ -5,24 +5,7 @@ use Symfony\Component\Form\FormTypeExtensionInterface; if (method_exists(FormTypeExtensionInterface::class, 'getExtendedTypes')) { - eval(' - namespace Exercise\HTMLPurifierBundle\Form\TypeExtension; - - /** - * @internal - */ - trait ForwardCompatTypeExtensionTrait - { - private static function doGetExtendedTypes(): iterable - { - } - - public static function getExtendedTypes(): iterable - { - return self::doGetExtendedTypes(); - } - } -'); + require_once __DIR__.'/forward_compat_trait.inc.php'; } else { /** * @internal diff --git a/src/Form/TypeExtension/forward_compat_trait.inc.php b/src/Form/TypeExtension/forward_compat_trait.inc.php new file mode 100644 index 00000000..326b0070 --- /dev/null +++ b/src/Form/TypeExtension/forward_compat_trait.inc.php @@ -0,0 +1,18 @@ +