我有一个控制器,让我们说 Acme\ShopBundle\Controller\ProductListController
其定义services.yml如下:
services:
Acme\ShopBundle\Controller\ProductListController:
class: Acme\ShopBundle\Controller\ProductListController
arguments: ['@product_service']
这在我的日志文件中抛出:
User Deprecated: The "Acme\ShopBundle\Controller\ProductListController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0.
其次是
User Deprecated: The "Acme\ShopBundle\Controller\ProductListController" service is private, getting it from the container is deprecated since Symfony 3.2 and will fail in 4.0. You should either make the service public, or stop using the container directly and use dependency injection instead.
文件的堆栈跟踪列表完全在里面,vendor/symfony所以我假设某些东西配置错误,但不知道是什么。任何帮助表示赞赏。
回首忆惘然