我嘗試安裝JSMSerializerBundle,但在元數據庫1.1版安裝事件。 當我想清楚了我的緩存,它失敗,出現錯誤:JMSSerializerBundle安裝:可捕獲的致命錯誤:參數1傳遞給JMSSerializerBundle Twig SerializerExtension :: __構造()
[ErrorException]
Catchable Fatal Error:
Argument 1 passed toJMS\SerializerBundle\Twig\SerializerExtension::__construct()
must be an instance ofJMS\SerializerBundle\Serializer\SerializerInterface
, instance ofSymfony\Component\Serializer\Serializer
given,called in
/opt/lampp/htdocs/Korum/app/cache/dev_new/appDevDebugProjectContainer__5033ecec2dcbc__.php
on line 2397 and defined in/opt/lampp/htdocs/K/vendor/bundles/JMS/SerializerBundle/Twig/SerializerExtension.php
line 37
其實AppKernel
代碼覺得奇怪,我與$this
:
// in AppKernel::registerBundles()
$bundles = array(
// ...
new JMS\SerializerBundle\JMSSerializerBundle($this),
// ...
);
你有這個錯誤呢?