You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($class->implementsInterface(ExtensionInterface::class)) {
41
+
if ($class->isSubclassOf(AbstractExtension::class)) {
42
+
thrownewLogicException(\sprintf('The class "%s" cannot both extend "%s" and use the "#[%s]" attribute on method "%s()", choose one or the other.', $class->name, AbstractExtension::class, $attribute::class, $reflector->name));
43
+
}
44
+
thrownewLogicException(\sprintf('The class "%s" cannot both implement "%s" and use the "#[%s]" attribute on method "%s()", choose one or the other.', $class->name, ExtensionInterface::class, $attribute::class, $reflector->name));
45
+
}
46
+
36
47
$definition->addTag(self::TAG);
37
48
38
49
// The service must be tagged as a runtime to call non-static methods
$this->expectExceptionMessage('The class "Symfony\Bundle\TwigBundle\Tests\Functional\InvalidExtensionWithAttributes" cannot both extend "Twig\Extension\AbstractExtension" and use the "#[Twig\Attribute\AsTwigFilter]" attribute on method "funFilter()", choose one or the other.');
85
+
86
+
$kernel->boot();
87
+
}
88
+
89
+
76
90
/**
77
91
* @before
78
92
* @after
@@ -85,6 +99,24 @@ protected function deleteTempDir()
0 commit comments