Php Symfony细枝模板未连接到捆绑包中

Php Symfony细枝模板未连接到捆绑包中,php,symfony,twig,Php,Symfony,Twig,请帮我弄清楚。我搜索了数百篇文章,都找不出来。我根据文档连接模板: return $this->render('LoginPassAuthBundle::login.html.twig', [ 'name' => 'auth', ]); 但是我得到了错误 Unable to find template "LoginPassAuthBundle::login.html.twig" (looked into: /var/www/html/templates)

请帮我弄清楚。我搜索了数百篇文章,都找不出来。我根据文档连接模板:

return $this->render('LoginPassAuthBundle::login.html.twig', [
    'name' => 'auth',
]);
但是我得到了错误

Unable to find template "LoginPassAuthBundle::login.html.twig" (looked into: /var/www/html/templates).
我尝试了各种不同的选择,但仍然会出错

// /bundles/LoginPassAuthBundle/src/Resources/views/login.html.twig
========>> Unable to find template "/bundles/LoginPassAuthBundle/src/Resources/views/login.html.twig" (looked into: / var / www / html / templates).

// @ LoginPassAuthBundle / src / Resources / views / login.html.twig
========>> There are no registered paths for namespace "LoginPassAuthBundle".

// @LoginPassAuthBundle :: login.html.twig
========>> Malformed namespaced template name "@LoginPassAuthBundle :: login.html.twig" (expecting "@ namespace / template_name").

// LoginPassAuthBundle :: login.html.twig
========>> Unable to find template "LoginPassAuthBundle :: login.html.twig" (looked into: / var / www / html / templates).

// /src/vendor/lavarich/loginpassauth/src/Resources/views/login.html.twig
========>> Unable to find template "/src/vendor/lavarich/loginpassauth/src/Resources/views/login.html.twig" (looked into: / var / www / html / templates).
我的捆绑包位于/bundles/LoginPassAuthBundle/目录中,并在供应商目录中引用。我将其添加到composer.json并使用flex安装

"repositories": [
    {
        "type": "path",
        "url": "./bundles/UsersBundle"
    },
    {
        "type": "path",
        "url": "./bundles/LoginPassAuthBundle"
    }
]
还将其添加到routes.yaml

loginpassauth:
  resource: 'lavarich\LoginPassAuthBundle\src\Controller\AuthController'
  type: annotation
和服务.yaml

lavarich\LoginPassAuthBundle\src\Controller\AuthController:
    public: true
    tags: ['container.service_subscriber']

几百?那太多了。无论如何,3.4中删除了Bundle::Template符号。哦,天哪,它成功了,非常感谢。我尝试了@LoginPassAuthBundle/login.html.twig,但没有意识到Bundle这个词不能使用。正确选项@LoginPassAuth/login.html.twig。这个文档页面的翻译是最新的,虽然已经过时了。我想我在某处读到Symfony不再生成“官方”翻译。他们依靠浏览器的翻译来完成这项工作。很高兴它成功了,几百?那太多了。无论如何,3.4中删除了Bundle::Template符号。哦,天哪,它成功了,非常感谢。我尝试了@LoginPassAuthBundle/login.html.twig,但没有意识到Bundle这个词不能使用。正确选项@LoginPassAuth/login.html.twig。这个文档页面的翻译是最新的,虽然已经过时了。我想我在某处读到Symfony不再生成“官方”翻译。他们依靠浏览器的翻译来完成这项工作。很高兴它起作用了。