sonata-project / SonataCoreBundle

[deprecated] SonataCoreBundle
MIT License
318 stars 138 forks source link

ContainerAwareCommand in sonata-project/core-bundle #731

Closed araeuchle closed 3 years ago

araeuchle commented 4 years ago

Environment

Symfony 4.4.2 LTS

Sonata packages

sonata-project/admin-bundle 3.61
sonata-project/doctrine-orm-admin-bundle: 3.14

$ composer show --latest 'sonata-project/*'

sonata-project/admin-bundle              3.62.1 3.62.1 The missing Symfony Admin Generator
sonata-project/block-bundle              3.18.4 3.18.4 Symfony SonataBlockBundle
sonata-project/cache                     2.0.1  2.0.1  Cache library
sonata-project/core-bundle               3.18.0 3.18.0 Symfony SonataCoreBundle (abandoned)
sonata-project/datagrid-bundle           2.5.0  3.1.1  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.5.1  1.5.1  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.15.0 3.15.0 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/exporter                  2.2.0  2.2.0  Lightweight Exporter library

Symfony packages

$ composer show --latest 'symfony/*'
symfony/asset                      v4.4.5  v4.4.5  Symfony Asset Component
symfony/browser-kit                v4.4.5  v4.4.5  Symfony BrowserKit Component
symfony/cache                      v4.4.5  v4.4.5  Symfony Cache component with PSR-6, PSR-16, and tags
symfony/cache-contracts            v2.0.1  v2.0.1  Generic abstractions related to caching
symfony/config                     v4.4.5  v4.4.5  Symfony Config Component
symfony/console                    v4.4.5  v4.4.5  Symfony Console Component
symfony/debug                      v4.4.5  v4.4.5  Symfony Debug Component
symfony/dependency-injection       v4.4.5  v4.4.5  Symfony DependencyInjection Component
symfony/doctrine-bridge            v4.4.5  v4.4.5  Symfony Doctrine Bridge
symfony/dom-crawler                v4.4.5  v4.4.5  Symfony DomCrawler Component
symfony/dotenv                     v4.4.5  v4.4.5  Registers environment variables from a .env file
symfony/error-handler              v4.4.5  v4.4.5  Symfony ErrorHandler Component
symfony/event-dispatcher           v4.4.5  v4.4.5  Symfony EventDispatcher Component
symfony/event-dispatcher-contracts v1.1.7  v2.0.1  Generic abstractions related to dispatching event
symfony/expression-language        v4.4.5  v4.4.5  Symfony ExpressionLanguage Component
symfony/filesystem                 v4.4.5  v4.4.5  Symfony Filesystem Component
symfony/finder                     v4.4.5  v4.4.5  Symfony Finder Component
symfony/flex                       v1.6.2  v1.6.2  Composer plugin for Symfony
symfony/form                       v4.4.5  v4.4.5  Symfony Form Component
symfony/framework-bundle           v4.4.5  v4.4.5  Symfony FrameworkBundle
symfony/http-client                v4.4.5  v4.4.5  Symfony HttpClient component
symfony/http-client-contracts      v2.0.1  v2.0.1  Generic abstractions related to HTTP clients
symfony/http-foundation            v4.4.5  v4.4.5  Symfony HttpFoundation Component
symfony/http-kernel                v4.4.5  v4.4.5  Symfony HttpKernel Component
symfony/inflector                  v4.4.5  v4.4.5  Symfony Inflector Component
symfony/intl                       v4.4.5  v4.4.5  A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/maker-bundle               v1.14.6 v1.14.6 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.
symfony/mime                       v4.4.5  v4.4.5  A library to manipulate MIME messages
symfony/options-resolver           v4.4.5  v4.4.5  Symfony OptionsResolver Component
symfony/phpunit-bridge             v5.0.5  v5.0.5  Symfony PHPUnit Bridge
symfony/polyfill-intl-icu          v1.14.0 v1.14.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn          v1.14.0 v1.14.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-mbstring          v1.14.0 v1.14.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72             v1.14.0 v1.14.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73             v1.14.0 v1.14.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/profiler-pack              v1.0.4  v1.0.4  A pack for the Symfony web profiler
symfony/property-access            v4.4.5  v4.4.5  Symfony PropertyAccess Component
symfony/routing                    v4.4.5  v4.4.5  Symfony Routing Component
symfony/security-acl               v3.0.4  v3.0.4  Symfony Security Component - ACL (Access Control List)
symfony/security-bundle            v4.4.5  v4.4.5  Symfony SecurityBundle
symfony/security-core              v4.4.5  v4.4.5  Symfony Security Component - Core Library
symfony/security-csrf              v4.4.5  v4.4.5  Symfony Security Component - CSRF Library
symfony/security-guard             v4.4.5  v4.4.5  Symfony Security Component - Guard
symfony/security-http              v4.4.5  v4.4.5  Symfony Security Component - HTTP Integration
symfony/service-contracts          v2.0.1  v2.0.1  Generic abstractions related to writing services
symfony/stopwatch                  v4.4.5  v4.4.5  Symfony Stopwatch Component
symfony/swiftmailer-bundle         v3.4.0  v3.4.0  Symfony SwiftmailerBundle
symfony/templating                 v4.4.5  v4.4.5  Symfony Templating Component
symfony/translation                v4.4.5  v4.4.5  Symfony Translation Component
symfony/translation-contracts      v2.0.1  v2.0.1  Generic abstractions related to translation
symfony/twig-bridge                v4.4.5  v4.4.5  Symfony Twig Bridge
symfony/twig-bundle                v4.4.5  v4.4.5  Symfony TwigBundle
symfony/validator                  v4.4.5  v4.4.5  Symfony Validator Component
symfony/var-dumper                 v4.4.5  v4.4.5  Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter               v4.4.5  v4.4.5  A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code
symfony/web-profiler-bundle        v4.4.5  v4.4.5  Symfony WebProfilerBundle
symfony/webpack-encore-bundle      v1.7.3  v1.7.3  Integration with your Symfony app & Webpack Encore!
symfony/yaml                       v4.4.5  v4.4.5  Symfony Yaml Component

PHP version

$ php -v

PHP 7.2.7 (cli) (built: Jul 17 2018 04:57:51) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans
    with Zend OPcache v7.2.7, Copyright (c) 1999-2018, by Zend Technologies

Subject

Hi, in our application we installed sonata admin to be able to provide a backend for our users. Installing this package introduced an E-User-Deprecation to us. What we are getting is:

User Deprecated: The "Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand" class is deprecated since Symfony 4.2, use "Symfony\Component\Console\Command\Command" with dependency injection instead."

› include_once \dirname(DIR, 4).'/vendor/sonata-project/core-bundle/src/CoreBundle/Command/SonataDumpDoctrineMetaCommand.php';

Steps to reproduce

Fresh symfony install Fresh sonata install error will pop up as soon as you run tests or something

Expected results

No errors should pop up

Actual results

User Deprecated: The "Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand" class is deprecated since Symfony 4.2, use "Symfony\Component\Console\Command\Command" with dependency injection instead."

› include_once \dirname(DIR, 4).'/vendor/sonata-project/core-bundle/src/CoreBundle/Command/SonataDumpDoctrineMetaCommand.php';

Could you please take a look at this? Thanks!

jordisala1991 commented 3 years ago

This bundle is deprecated