sonata-project / SonataAdminBundle

The missing Symfony Admin Generator
https://docs.sonata-project.org/projects/SonataAdminBundle
MIT License
2.11k stars 1.26k forks source link

Class 'Sonata\CoreBundle\Command\SonataDumpDoctrineMetaCommand' not found on fresh composer update #6452

Closed tonyellow closed 3 years ago

tonyellow commented 3 years ago

Environment

Sonata packages

$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle              3.76.0 3.76.0 The missing Symfony Admin Generator
sonata-project/block-bundle              3.21.0 4.3.0  Symfony SonataBlockBundle
sonata-project/cache                     1.1.1  2.0.1  Cache library
sonata-project/cache-bundle              2.4.2  3.2.1  This bundle provides caching services
sonata-project/datagrid-bundle           2.5.0  3.2.0  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.9.1  1.9.1  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.23.0 3.23.0 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle       2.5.0  2.5.0  Symfony SonataEasyExtendsBundle
sonata-project/exporter                  2.3.0  2.3.0  Lightweight Exporter library
sonata-project/form-extensions           1.6.0  1.6.0  Symfony form extensions
sonata-project/formatter-bundle          4.3.0  4.3.0  Symfony SonataFormatterBundle
sonata-project/google-authenticator      2.2.0  2.2.0  Library to integrate Google Authenticator into a PHP project
sonata-project/intl-bundle               2.9.0  2.9.0  Symfony SonataIntlBundle
sonata-project/notification-bundle       3.9.0  3.10.0 Symfony SonataNotificationBundle
sonata-project/notification-orm-pack     1.0.0  1.0.0  A pack for SonataNotificationBundle with ORM support
sonata-project/page-bundle               3.19.0 3.19.0 This bundle provides a Site and Page management through container and block services
sonata-project/seo-bundle                2.12.0 2.12.0 Symfony SonataSeoBundle
sonata-project/translation-bundle        2.6.0  2.6.0  SonataTranslationBundle
sonata-project/twig-extensions           1.4.1  1.4.1  Sonata twig extensions
sonata-project/user-bundle               4.8.0  4.8.0  Symfony SonataUserBundle

Symfony packages

$ composer show --latest 'symfony/*'
symfony/http-client                v4.4.14 v4.4.14 Symfony HttpClient component
symfony/http-client-contracts      v2.2.0  v2.2.0  Generic abstractions related to HTTP clients
symfony/http-foundation            v4.4.14 v4.4.14 Symfony HttpFoundation Component
symfony/http-kernel                v4.4.14 v4.4.14 Symfony HttpKernel Component
symfony/inflector                  v4.4.14 v4.4.14 Symfony Inflector Component
symfony/intl                       v4.4.14 v4.4.14 A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/maker-bundle               v1.21.1 v1.21.1 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.
symfony/mercure                    v0.4.0  v0.4.0  Symfony Mercure Component
symfony/mercure-bundle             v0.2.5  v0.2.5  Symfony MercureBundle
symfony/mime                       v4.4.14 v4.4.14 A library to manipulate MIME messages
symfony/options-resolver           v4.4.14 v4.4.14 Symfony OptionsResolver Component
symfony/orm-pack                   v2.0.0  v2.0.0  A pack for the Doctrine ORM
symfony/polyfill-intl-grapheme     v1.18.1 v1.18.1 Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-icu          v1.18.1 v1.18.1 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn          v1.18.1 v1.18.1 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer   v1.18.1 v1.18.1 Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring          v1.18.1 v1.18.1 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72             v1.18.1 v1.18.1 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73             v1.18.1 v1.18.1 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80             v1.18.1 v1.18.1 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/process                    v4.4.14 v4.4.14 Symfony Process Component
symfony/profiler-pack              v1.0.5  v1.0.5  A pack for the Symfony web profiler
symfony/property-access            v4.4.14 v4.4.14 Symfony PropertyAccess Component
symfony/property-info              v4.4.14 v4.4.14 Symfony Property Info Component
symfony/routing                    v4.4.14 v4.4.14 Symfony Routing Component
symfony/security-acl               v3.1.0  v3.1.0  Symfony Security Component - ACL (Access Control List)
symfony/security-bundle            v4.4.14 v4.4.14 Symfony SecurityBundle
symfony/security-core              v4.4.14 v4.4.14 Symfony Security Component - Core Library
symfony/security-csrf              v4.4.14 v4.4.14 Symfony Security Component - CSRF Library
symfony/security-guard             v4.4.14 v4.4.14 Symfony Security Component - Guard
symfony/security-http              v4.4.14 v4.4.14 Symfony Security Component - HTTP Integration
symfony/serializer                 v4.4.14 v4.4.14 Symfony Serializer Component
symfony/serializer-pack            v1.0.3  v1.0.3  A pack for the Symfony serializer
symfony/service-contracts          v2.2.0  v2.2.0  Generic abstractions related to writing services
symfony/stopwatch                  v4.4.14 v4.4.14 Symfony Stopwatch Component
symfony/string                     v5.1.6  v5.1.6  Symfony String component
symfony/swiftmailer-bundle         v3.5.0  v3.5.0  Symfony SwiftmailerBundle
symfony/templating                 v4.4.14 v4.4.14 Symfony Templating Component
symfony/translation                v4.4.14 v4.4.14 Symfony Translation Component
symfony/translation-contracts      v2.2.0  v2.2.0  Generic abstractions related to translation
symfony/twig-bridge                v4.4.14 v4.4.14 Symfony Twig Bridge
symfony/twig-bundle                v4.4.14 v4.4.14 Symfony TwigBundle
symfony/validator                  v4.4.14 v4.4.14 Symfony Validator Component
symfony/var-dumper                 v4.4.14 v4.4.14 Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter               v4.4.14 v4.4.14 A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code
symfony/web-link                   v4.4.14 v4.4.14 Symfony WebLink Component
symfony/web-profiler-bundle        v4.4.14 v4.4.14 Symfony WebProfilerBundle
symfony/workflow                   v4.4.14 v4.4.14 Symfony Workflow Component
symfony/yaml                       v4.4.14 v4.4.14 Symfony Yaml Component

PHP version

$ php -v
PHP 7.3.22 (cli) (built: Sep  3 2020 22:03:24) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.22, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.22, Copyright (c) 1999-2018, by Zend Technologies

Subject

Hey guys. I do a clean install of my project. I do composer update. Composer update is installing all the packages but clearing the caches generate the errors below. I can not proceed with the installation.

I hope someone can help me out resolving this issue.

Actual results

` docker-compose -f docker-compose-prod/docker-compose.yml -f docker-compose-prod/docker-compose.letsencrypt.yml exec php bin/console cache:clear PHP Warning: include_once(/srv/api/vendor/sonata-project/core-bundle/src/CoreBundle/Command/SonataDumpDoctrineMetaCommand.php): failed to open stream: No such file or directory in /srv/api/var/cache/prod/ContainerUdmrdqz/getSon ataDumpDoctrineMetaCommandService.php on line 12 PHP Warning: include_once(): Failed opening '/srv/api/vendor/sonata-project/core-bundle/src/CoreBundle/Command/SonataDumpDoctrineMetaCommand.php' for inclusion (include_path='.:/usr/local/lib/php') in /srv/api/var/cache/prod/Co ntainerUdmrdqz/getSonataDumpDoctrineMetaCommandService.php on line 12 PHP Warning: include_once(/srv/api/vendor/sonata-project/core-bundle/src/CoreBundle/Command/SonataListFormMappingCommand.php): failed to open stream: No such file or directory in /srv/api/var/cache/prod/ContainerUdmrdqz/getSona taListFormMappingCommandService.php on line 12 PHP Warning: include_once(): Failed opening '/srv/api/vendor/sonata-project/core-bundle/src/CoreBundle/Command/SonataListFormMappingCommand.php' for inclusion (include_path='.:/usr/local/lib/php') in /srv/api/var/cache/prod/Con tainerUdmrdqz/getSonataListFormMappingCommandService.php on line 12 PHP Warning: include_once(/srv/api/vendor/gedmo/doctrine-extensions/lib/Gedmo/Sortable/SortableListener.php): failed to open stream: No such file or directory in /srv/api/var/cache/prod/ContainerUdmrdqz/getDoctrine_Dbal_Default ConnectionService.php on line 17 PHP Warning: include_once(): Failed opening '/srv/api/vendor/gedmo/doctrine-extensions/lib/Gedmo/Sortable/SortableListener.php' for inclusion (include_path='.:/usr/local/lib/php') in /srv/api/var/cache/prod/ContainerUdmrdqz/get Doctrine_Dbal_DefaultConnectionService.php on line 17 PHP Warning: include_once(/srv/api/vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/TreeListener.php): failed to open stream: No such file or directory in /srv/api/var/cache/prod/ContainerUdmrdqz/getDoctrine_Dbal_DefaultConnecti onService.php on line 18 PHP Warning: include_once(): Failed opening '/srv/api/vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/TreeListener.php' for inclusion (include_path='.:/usr/local/lib/php') in /srv/api/var/cache/prod/ContainerUdmrdqz/getDoctrine _Dbal_DefaultConnectionService.php on line 18 PHP Warning: include_once(/srv/api/vendor/gedmo/doctrine-extensions/lib/Gedmo/Timestampable/TimestampableListener.php): failed to open stream: No such file or directory in /srv/api/var/cache/prod/ContainerUdmrdqz/getDoctrine_Db al_DefaultConnectionService.php on line 19 PHP Warning: include_once(): Failed opening '/srv/api/vendor/gedmo/doctrine-extensions/lib/Gedmo/Timestampable/TimestampableListener.php' for inclusion (include_path='.:/usr/local/lib/php') in /srv/api/var/cache/prod/ContainerU dmrdqz/getDoctrine_Dbal_DefaultConnectionService.php on line 19

[WARNING] Some commands could not be registered:

In getSonataDumpDoctrineMetaCommandService.php line 14:

Class 'Sonata\CoreBundle\Command\SonataDumpDoctrineMetaCommand' not found

In getSonataListFormMappingCommandService.php line 14:

Class 'Sonata\CoreBundle\Command\SonataListFormMappingCommand' not found

// Clearing the cache for the prod environment with debug
// false
In AbstractDoctrineExtension.php line 84:

Bundle "translatable" does not exist or it is not enabled.

`

core23 commented 3 years ago

This is not a problem that is related to the admin bundle. We removed the CoreBundle dependency a few months ago. If you still need this command, you should add it to your composer.json config.