我有variadic参数的服务方法:
public function callSP($namespace,$function,...$params) {}
这被编译成容器,如:
public function callSP($namespace,$params = null)
所以它导致:
Strict Standards notice saying that callSP() should be compatible with XXX\XXX\Service::callSP($namespace,…$params)
甚至找不到任何有关此问题的问题.
我想,某种懒惰服务(侦听器或显式懒惰:true)会出现问题
延迟服务使用ocramius / proxy-manager库进行操作.
从2.0版开始,该库引入了对可变参数的支持,至少需要PHP 7.0.
所以我认为这里与5.6无关.
链接:
> https://symfony.com/doc/current/service_container/lazy_services.html
> https://github.com/Ocramius/ProxyManager/releases/tag/2.0.0
> https://github.com/Ocramius/ProxyManager/issues/307