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 extend "%s" and use the "#[%s]" attribute on method "%s()".', $class->name, AbstractExtension::class, $attribute::class, $reflector->name));
43
+
}
44
+
thrownewLogicException(sprintf('The class "%s" cannot implement "%s" and use the "#[%s]" attribute on method "%s()".', $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 extend "Twig\Extension\AbstractExtension" and use the "#[Twig\Attribute\AsTwigFilter]" attribute on method "funFilter()".');
87
+
88
+
$kernel->boot();
89
+
}
90
+
91
+
76
92
/**
77
93
* @before
78
94
* @after
@@ -85,6 +101,24 @@ protected function deleteTempDir()
0 commit comments