I am using Symfony7 and PHP 8.2.
I have installed fixtures via composer
using composer req orm-fixtures
command.I have created my fixture as well.
When I try to execute this command : symfony console doctrine:fixtures:load
, I get this error :
In BroadcastListener.php line 138:
Attempted to load class "ClassUtils" from namespace "DoctrineCommonUtil".
Did you forget a "use" statement for another namespace?
I have tried reverting doctrine/doctrine-fixtures-bundle
to older version, but I still get the error.
2
Answers
Check composer.json do You have
symfony/ux-turbo
if yes, remove it and docomposer update
orcomposer remove symfony/ux-turbo
I had the same issue, it seems there is a missing dependency in
symfony/ux-turbo
onBroadcastListener
class.You can remove ux-turbo, if you don’t need it :
composer remove symfony/ux-turbo
Or add the missing dependency :
composer require doctrine/common