DependencyInjection/Compiler/AddTwigPathPass.php
public function process(ContainerBuilder $container): void
    {
        if (!$container->hasDefinition('twig.loader.native_filesystem')) {
            return;
        }

        $path = \dirname((new \ReflectionClass(Paginator::class))->getFileName()).'/Resources/templates';

        $container->getDefinition('twig.loader.native_filesystem')
            ->addMethodCall('addPath', [$path, 'RuworkPaginator']);
    }
public function process(ContainerBuilder $container): void
    {
        if (!$container->hasDefinition('twig.loader.native_filesystem')) {
            return;
        }

        $path = \dirname((new \ReflectionClass(Paginator::class))->getFileName()).'/Resources/templates';

        $container->getDefinition('twig.loader.native_filesystem')
            ->addMethodCall('addPath', [$path, 'RuworkPaginator']);
    }
{@inheritdoc}