Add @template on RuntimeLoaderinterface (Twig 4)

Do php-stan annotation have an impact on BC promise? 

The interface uses the term "class" already.. i'm guessing it's ok ?
This commit is contained in:
Simon André
2025-01-02 05:07:35 +01:00
committed by GitHub
parent 63b86e3057
commit c24c71a3ca
+5 -1
View File
@@ -21,7 +21,11 @@ interface RuntimeLoaderInterface
/**
* Creates the runtime implementation of a Twig element (filter/function/test).
*
* @return object|null The runtime instance or null if the loader does not know how to create the runtime for this class
* @template TRuntime of object
*
* @param class-string<TRuntime> $class A runtime class name
*
* @return TRuntime|null The runtime instance or null if the loader does not know how to create the runtime for this class
*/
public function load(string $class): ?object;
}