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
* Avoid bug when the lint:command changes the Environment Loader.
24
-
*
25
-
* @internal
26
-
*/
27
-
privateLoaderInterface$loader;
22
+
privatereadonlyLoaderInterface$loader;
28
23
29
24
publicfunction__construct(
30
-
privateEnvironment$environment,
25
+
Environment|LoaderInterface$loader,
31
26
privatereadonly ?string$directory = null,
32
27
) {
28
+
if ($loaderinstanceof Environment) {
29
+
trigger_deprecation('symfony/ux-twig-component', '2.13', 'The "%s()" method will require "%s $loader" as first argument in 3.0. Passing an "Environment" instance is deprecated.', __METHOD__, LoaderInterface::class);
30
+
$loader = $loader->getLoader();
31
+
}
32
+
$this->loader = $loader;
33
33
if (null === $this->directory) {
34
34
trigger_deprecation('symfony/ux-twig-component', '2.13', 'The "%s()" method will require "string $directory" argument in 3.0. Not defining it or passing null is deprecated.', __METHOD__);
$this->expectDeprecation('Since symfony/ux-twig-component 2.13: The "Symfony\UX\TwigComponent\ComponentTemplateFinder::__construct()" method will require "Twig\Loader\LoaderInterface $loader" as first argument in 3.0. Passing an "Environment" instance is deprecated.');
0 commit comments