-1

When I type this command php app/console assetic:dump --env=prod --no-debug or this one php app/console cache:clear --env=prod

I got the following error :

PHP Fatal error:  Declaration of DoctrineORMEntityManager_0000000035a1d9b70000558a7db0d6e7da5c7b8013722216782206eefb5b6fe5::initializeProxy() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::initializeProxy(): bool in /var/www/myproject/app/cache/prod/appProdProjectContainer.php on line 4459

FYI

php --version
PHP 7.2.28 (cli) (built: Feb 18 2020 11:07:04) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

It used to worked when I used php 5.

clement-D
  • 59
  • 7
  • Maybe [this](https://github.com/Ocramius/ProxyManager/issues/378) will be of some help? – El_Vanja Mar 20 '20 at 11:34
  • Actually it did ! but before I had to empty my "cache" directory by hand. So I did : `rm -rf app/cache/prod/ php72 composer.phar dump-autoload php72 composer.phar install --optimize-autoloader` And I get some warning but so far it seems to work... :) – clement-D Mar 20 '20 at 14:00

1 Answers1

3

So has I said in comment I don't have this error anymore : I had to empty my "cache" directory by hand. So I did : rm -rf app/cache/prod/ php72 composer.phar dump-autoload php72 composer.phar install --optimize-autoloader

And I get some warnings but so far it seems to work... :) –

clement-D
  • 59
  • 7