Я обновляю приложение с Symfony 2.8 до 3.4 и получаю следующую ошибку:
Cannot dump definitions which have method calls.
Вот подробная версия:
[Symfony\Component\DependencyInjection\Exception\RuntimeException]
Cannot dump definitions which have method calls.
Exception trace:
Symfony\Component\DependencyInjection\Dumper\PhpDumper->dumpValue() at /project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:642
Symfony\Component\DependencyInjection\Dumper\PhpDumper->addServiceMethodCalls() at /project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:521
Symfony\Component\DependencyInjection\Dumper\PhpDumper->addServiceInlinedDefinitions() at /project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:834
Symfony\Component\DependencyInjection\Dumper\PhpDumper->addService() at /project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:876
Symfony\Component\DependencyInjection\Dumper\PhpDumper->addServices() at /project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:193
Symfony\Component\DependencyInjection\Dumper\PhpDumper->dump() at /project/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:859
Symfony\Component\HttpKernel\Kernel->dumpContainer() at /project/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:663
Symfony\Component\HttpKernel\Kernel->initializeContainer() at /project/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:135
Symfony\Component\HttpKernel\Kernel->boot() at /project/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:64
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /project/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:148
Symfony\Component\Console\Application->run() at /project/bin/console:27
ЕслиЯ сбрасываю $value
до того, как исключение выдается в PhpDumper.php:1761
Я получаю:
/project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:1761:
class Symfony\Component\DependencyInjection\Definition#278 (24) {
private $class =>
string(32) "Doctrine\Common\Cache\ArrayCache"
private $file =>
NULL
private $factory =>
NULL
private $shared =>
bool(true)
private $deprecated =>
bool(false)
private $deprecationTemplate =>
NULL
private $properties =>
array(0) {
}
private $calls =>
array(1) {
[0] =>
array(2) {
[0] =>
string(12) "setNamespace"
[1] =>
array(1) {
...
}
}
}
private $instanceof =>
array(0) {
}
private $autoconfigured =>
bool(false)
private $configurator =>
NULL
private $tags =>
array(0) {
}
private $public =>
bool(false)
private $private =>
bool(false)
private $synthetic =>
bool(false)
private $abstract =>
bool(false)
private $lazy =>
bool(false)
private $decoratedService =>
NULL
private $autowired =>
bool(false)
private $autowiringTypes =>
array(0) {
}
private $changes =>
array(2) {
'class' =>
bool(true)
'public' =>
bool(true)
}
private $bindings =>
array(0) {
}
private $errors =>
array(0) {
}
protected $arguments =>
array(0) {
}
}
In PhpDumper.php line 1762:
Cannot dump definitions which have method calls.
Так что PhpDumper.php
не может сбросить Symfony\Component\DependencyInjection\Definition
?
Мой текущий обходной путь -измените PhpDumper.php
, чтобы не выдавать это исключение.
Благодарен за любые предложения:)
ОБНОВЛЕНИЕ
это может быть связано с doctrine_phpcr.Я создал тестовый проект Symfony, в котором это можно воспроизвести:
https://github.com/wuestkamp/my_project_name
И я создал выпуск .
Ким