diff --git a/config/sets/twig/twig30.php b/config/sets/twig/twig30.php new file mode 100644 index 000000000..57140315a --- /dev/null +++ b/config/sets/twig/twig30.php @@ -0,0 +1,19 @@ +ruleWithConfiguration(AddReturnTypeDeclarationRector::class, [ + new AddReturnTypeDeclaration('Twig\Extension\ExtensionInterface', 'getFilters', new ArrayType(new MixedType(), new MixedType())), + new AddReturnTypeDeclaration('Twig\Extension\ExtensionInterface', 'getTests', new ArrayType(new MixedType(), new MixedType())), + new AddReturnTypeDeclaration('Twig\Extension\ExtensionInterface', 'getFunctions', new ArrayType(new MixedType(), new MixedType())), + ]); +}; + diff --git a/src/Set/SetProvider/TwigSetProvider.php b/src/Set/SetProvider/TwigSetProvider.php index ed83a9ad1..c6aca75d8 100644 --- a/src/Set/SetProvider/TwigSetProvider.php +++ b/src/Set/SetProvider/TwigSetProvider.php @@ -53,6 +53,12 @@ public function provide(): array '2.4', __DIR__ . '/../../../config/sets/twig/twig24.php' ), + new ComposerTriggeredSet( + SetGroup::TWIG, + 'twig/twig', + '3.0', + __DIR__ . '/../../../config/sets/twig/twig30.php' + ), ]; } } diff --git a/src/Set/TwigSetList.php b/src/Set/TwigSetList.php index 5e6844216..6b9369c3b 100644 --- a/src/Set/TwigSetList.php +++ b/src/Set/TwigSetList.php @@ -21,5 +21,7 @@ final class TwigSetList public const string TWIG_24 = __DIR__ . '/../../config/sets/twig/twig24.php'; + public const string TWIG_30 = __DIR__ . '/../../config/sets/twig/twig30.php'; + public const string TWIG_UNDERSCORE_TO_NAMESPACE = __DIR__ . '/../../config/sets/twig/twig-underscore-to-namespace.php'; }