sonata-project / SonataCoreBundle

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

Lot of deprecations after a fresh install #664

Closed lukepass closed 5 years ago

lukepass commented 5 years ago

Environment

Symfony 3.4 application with web services.

Sonata packages

$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle              3.45.1 3.45.1 The missing Symfony Admin Generator
sonata-project/block-bundle              3.14.0 3.14.0 Symfony SonataBlockBundle
sonata-project/cache                     2.0.1  2.0.1  Cache library
sonata-project/core-bundle               3.15.1 3.15.1 Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.4.0  2.4.0  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.1.5  1.1.5  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.8.1  3.8.1  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.0.1  2.0.1  Lightweight Exporter library
sonata-project/media-bundle              3.18.1 3.18.1 Symfony SonataMediaBundle
sonata-project/translation-bundle        2.4.0  2.4.0  SonataTranslationBundle
sonata-project/user-bundle               4.2.3  4.2.3  Symfony SonataUserBundle

Symfony packages

$ composer show --latest 'symfony/*'
symfony/monolog-bundle     v3.3.1  v3.3.1  Symfony MonologBundle
symfony/phpunit-bridge     v4.2.2  v4.2.2  Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.10.0 v1.10.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-ctype     v1.10.0 v1.10.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-icu  v1.10.0 v1.10.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring  v1.10.0 v1.10.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php56     v1.10.0 v1.10.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70     v1.10.0 v1.10.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util      v1.10.0 v1.10.0 Symfony utilities for portability of PHP codes
symfony/security-acl       v3.0.1  v3.0.1  Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.6.7  v3.2.5  Symfony SwiftmailerBundle
symfony/symfony            v3.4.21 v4.2.2  The Symfony PHP framework

PHP version

$ php -v
PHP 7.2.14-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jan 13 2019 10:05:18) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.14-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    with blackfire v1.24.2~linux-x64-non_zts72, https://blackfire.io, by Blackfire

Subject

Hello, after a fresh install I have a lot of deprecations in the profiler toolbar:

  1. User Deprecated: The Sonata\CoreBundle\Twig\Extension\FlashMessageExtension class is deprecated since version 3.x and will be removed in 4.0. Use Sonata\Twig\Extension\FlashMessageExtension instead.
  2. User Deprecated: The "sonata.core.model.adapter.chain" service is deprecated since 3.x and will be removed in 4.0.
  3. User Deprecated: The Sonata\CoreBundle\Model\Adapter\AdapterChain class is deprecated since version 3.x and will be removed in 4.0. Use Sonata\Doctrine\Adapter\AdapterChain instead.
  4. User Deprecated: The "sonata.core.model.adapter.doctrine_orm" service is deprecated since 3.x and will be removed in 4.0.
  5. User Deprecated: The Sonata\CoreBundle\Model\Adapter\DoctrineORMAdapter class is deprecated since version 3.x and will be removed in 4.0. Use Sonata\Doctrine\Adapter\ORM\DoctrineORMAdapter instead.
  6. The Sonata\CoreBundle\Serializer\BaseSerializerHandler class is deprecated since version 3.x and will be removed in 4.0. Use Sonata\Serializer\BaseSerializerHandler instead.
  7. The Sonata\AdminBundle\Command\CreateClassCacheCommand class is deprecated since version 3.39.0 and will be removed in 4.0.

This is my composer.json:

"require": {
    "php": ">=5.5.9",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/orm": "^2.5",
    "friendsofsymfony/rest-bundle": "^2.3",
    "incenteev/composer-parameter-handler": "^2.0",
    "jms/serializer-bundle": "^2.4",
    "leafo/scssphp": "^0.7.7",
    "patchwork/jsqueeze": "^2.0",
    "php-translation/symfony-bundle": "^0.8.1",
    "sensio/distribution-bundle": "^5.0.19",
    "sensio/framework-extra-bundle": "^5.0.0",
    "sonata-project/admin-bundle": "^3.35",
    "sonata-project/doctrine-orm-admin-bundle": "^3.6",
    "sonata-project/easy-extends-bundle": "^2.5",
    "sonata-project/media-bundle": "^3.13",
    "sonata-project/translation-bundle": "^2.3",
    "sonata-project/user-bundle": "^4.1",
    "stof/doctrine-extensions-bundle": "^1.3",
    "symfony/monolog-bundle": "^3.1.0",
    "symfony/polyfill-apcu": "^1.0",
    "symfony/swiftmailer-bundle": "^2.6.4",
    "symfony/symfony": "3.4.*",
    "twig/twig": "^1.0||^2.0"
},

What can I do to get rid of them?

Thanks!

greg0ire commented 5 years ago

@core23 please help, what are all these things deprecated in favor of?

core23 commented 5 years ago

I think it's an autoloader problem. We throw these exception, when the classes are loaded.

The mentioned classes will always be loaded, e.g. here: https://github.com/sonata-project/SonataCoreBundle/blob/3.x/src/CoreBundle/Resources/config/model_adapter.xml#L4-L14

lukepass commented 5 years ago

Thanks @core23, are those classes loaded automatically? I don't think I am using them in my own code. Do I need to remove specific includes or configs?

core23 commented 5 years ago

Symfony will load them automatically

lukepass commented 5 years ago

Ok, so I should just ignore them or I can help fixing in the Sonata code?

greg0ire commented 5 years ago

I think some of them can be fixed, e.g. number 6. should really not happen IMO

core23 commented 5 years ago

Ok, so I should just ignore them or I can help fixing in the Sonata code?

I'm just ignoring it, but you can try to find a better way 👍

greg0ire commented 5 years ago

Getting a stack trace for each deprecation would help.

ossinkine commented 5 years ago
1. The Sonata\CoreBundle\Twig\Extension\FlashMessageExtension class is deprecated since version 3.x and will be removed in 4.0. Use Sonata\Twig\Extension\FlashMessageExtension instead. ``` #0 require() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:156] #1 Symfony\Component\Debug\DebugClassLoader->loadClass() #2 spl_autoload_call() #3 class_exists() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php:78] #4 Symfony\Component\Config\Resource\ClassExistenceResource->isFresh() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:369] #5 Symfony\Component\DependencyInjection\ContainerBuilder->getReflectionClass() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:363] #6 Symfony\Component\DependencyInjection\Compiler\AutowirePass->populateAvailableType() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:336] #7 Symfony\Component\DependencyInjection\Compiler\AutowirePass->populateAvailableTypes() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:503] #8 Symfony\Component\DependencyInjection\Compiler\AutowirePass->createTypeAlternatives() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:459] #9 Symfony\Component\DependencyInjection\Compiler\AutowirePass->createTypeNotFoundMessage() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:249] #10 Symfony\Component\DependencyInjection\Compiler\AutowirePass->autowireMethod() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:187] #11 Symfony\Component\DependencyInjection\Compiler\AutowirePass->autowireCalls() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:153] #12 Symfony\Component\DependencyInjection\Compiler\AutowirePass->doProcessValue() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:109] #13 Symfony\Component\DependencyInjection\Compiler\AutowirePass->processValue() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php:60] #14 Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:130] #15 Symfony\Component\DependencyInjection\Compiler\AutowirePass->doProcessValue() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:109] #16 Symfony\Component\DependencyInjection\Compiler\AutowirePass->processValue() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php:39] #17 Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->process() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:70] #18 Symfony\Component\DependencyInjection\Compiler\AutowirePass->process() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:141] #19 Symfony\Component\DependencyInjection\Compiler\Compiler->compile() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:788] #20 Symfony\Component\DependencyInjection\ContainerBuilder->compile() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:637] #21 Symfony\Component\HttpKernel\Kernel->initializeContainer() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:135] #22 Symfony\Component\HttpKernel\Kernel->boot() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:195] #23 Symfony\Component\HttpKernel\Kernel->handle() called at [/var/www/html/web/app_dev.php:19] ```
2. The "sonata.core.model.adapter.chain" service is deprecated since 3.x and will be removed in 4.0. ``` #0 require() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:2592] #1 ContainerHy1rgjd\appDevDebugProjectContainer->load() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:6073] #2 ContainerHy1rgjd\appDevDebugProjectContainer->getSonata_Core_Twig_TemplateExtensionService() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:4434] #3 ContainerHy1rgjd\appDevDebugProjectContainer->getTwigService() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:306] #4 Symfony\Component\DependencyInjection\Container->get() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:67] #5 Sonata\AdminBundle\Controller\CRUDController->get() called at [/var/www/html/vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php:1563] #6 Sonata\AdminBundle\Controller\CRUDController->setFormTheme() called at [/var/www/html/vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php:171] #7 Sonata\AdminBundle\Controller\CRUDController->listAction() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151] #8 Symfony\Component\HttpKernel\HttpKernel->handleRaw() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68] #9 Symfony\Component\HttpKernel\HttpKernel->handle() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200] #10 Symfony\Component\HttpKernel\Kernel->handle() called at [/var/www/html/web/app_dev.php:19] ```
3. The Sonata\CoreBundle\Model\Adapter\AdapterChain class is deprecated since version 3.x and will be removed in 4.0. Use Sonata\Doctrine\Adapter\AdapterChain instead. ``` #0 require() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:152] #1 Symfony\Component\Debug\DebugClassLoader->loadClass() #2 spl_autoload_call() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/getSonata_Core_Model_Adapter_ChainService.php:10] #3 require(/var/www/html/var/cache/dev/ContainerHy1rgjd/getSonata_Core_Model_Adapter_ChainService.php) called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:2592] #4 ContainerHy1rgjd\appDevDebugProjectContainer->load() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:6073] #5 ContainerHy1rgjd\appDevDebugProjectContainer->getSonata_Core_Twig_TemplateExtensionService() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:4434] #6 ContainerHy1rgjd\appDevDebugProjectContainer->getTwigService() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:306] #7 Symfony\Component\DependencyInjection\Container->get() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:67] #8 Sonata\AdminBundle\Controller\CRUDController->get() called at [/var/www/html/vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php:1563] #9 Sonata\AdminBundle\Controller\CRUDController->setFormTheme() called at [/var/www/html/vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php:171] #10 Sonata\AdminBundle\Controller\CRUDController->listAction() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151] #11 Symfony\Component\HttpKernel\HttpKernel->handleRaw() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68] #12 Symfony\Component\HttpKernel\HttpKernel->handle() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200] #13 Symfony\Component\HttpKernel\Kernel->handle() called at [/var/www/html/web/app_dev.php:19] ```
4. The "sonata.core.model.adapter.doctrine_orm" service is deprecated since 3.x and will be removed in 4.0. ``` #0 require() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:2592] #1 ContainerHy1rgjd\appDevDebugProjectContainer->load() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/getSonata_Core_Model_Adapter_ChainService.php:12] #2 require(/var/www/html/var/cache/dev/ContainerHy1rgjd/getSonata_Core_Model_Adapter_ChainService.php) called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:2592] #3 ContainerHy1rgjd\appDevDebugProjectContainer->load() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:6073] #4 ContainerHy1rgjd\appDevDebugProjectContainer->getSonata_Core_Twig_TemplateExtensionService() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:4434] #5 ContainerHy1rgjd\appDevDebugProjectContainer->getTwigService() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:306] #6 Symfony\Component\DependencyInjection\Container->get() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:67] #7 Sonata\AdminBundle\Controller\CRUDController->get() called at [/var/www/html/vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php:1563] #8 Sonata\AdminBundle\Controller\CRUDController->setFormTheme() called at [/var/www/html/vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php:171] #9 Sonata\AdminBundle\Controller\CRUDController->listAction() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151] #10 Symfony\Component\HttpKernel\HttpKernel->handleRaw() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68] #11 Symfony\Component\HttpKernel\HttpKernel->handle() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200] #12 Symfony\Component\HttpKernel\Kernel->handle() called at [/var/www/html/web/app_dev.php:19] ```
5. The Sonata\CoreBundle\Model\Adapter\DoctrineORMAdapter class is deprecated since version 3.x and will be removed in 4.0. Use Sonata\Doctrine\Adapter\ORM\DoctrineORMAdapter instead. ``` #0 require() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:156] #1 Symfony\Component\Debug\DebugClassLoader->loadClass() #2 spl_autoload_call() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/getSonata_Core_Model_Adapter_DoctrineOrmService.php:10] #3 require(/var/www/html/var/cache/dev/ContainerHy1rgjd/getSonata_Core_Model_Adapter_DoctrineOrmService.php) called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:2592] #4 ContainerHy1rgjd\appDevDebugProjectContainer->load() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/getSonata_Core_Model_Adapter_ChainService.php:12] #5 require(/var/www/html/var/cache/dev/ContainerHy1rgjd/getSonata_Core_Model_Adapter_ChainService.php) called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:2592] #6 ContainerHy1rgjd\appDevDebugProjectContainer->load() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:6073] #7 ContainerHy1rgjd\appDevDebugProjectContainer->getSonata_Core_Twig_TemplateExtensionService() called at [/var/www/html/var/cache/dev/ContainerHy1rgjd/appDevDebugProjectContainer.php:4434] #8 ContainerHy1rgjd\appDevDebugProjectContainer->getTwigService() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:306] #9 Symfony\Component\DependencyInjection\Container->get() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:67] #10 Sonata\AdminBundle\Controller\CRUDController->get() called at [/var/www/html/vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php:1563] #11 Sonata\AdminBundle\Controller\CRUDController->setFormTheme() called at [/var/www/html/vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php:171] #12 Sonata\AdminBundle\Controller\CRUDController->listAction() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151] #13 Symfony\Component\HttpKernel\HttpKernel->handleRaw() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68] #14 Symfony\Component\HttpKernel\HttpKernel->handle() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200] #15 Symfony\Component\HttpKernel\Kernel->handle() called at [/var/www/html/web/app_dev.php:19] ```
6. The Sonata\CoreBundle\Serializer\BaseSerializerHandler class is deprecated since version 3.x and will be removed in 4.0. Use Sonata\Serializer\BaseSerializerHandler instead. I could not reproduce.
7. The Sonata\AdminBundle\Command\CreateClassCacheCommand class is deprecated since version 3.39.0 and will be removed in 4.0. ``` #0 require() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:156] #1 Symfony\Component\Debug\DebugClassLoader->loadClass() #2 spl_autoload_call() #3 class_exists() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php:78] #4 Symfony\Component\Config\Resource\ClassExistenceResource->isFresh() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:369] #5 Symfony\Component\DependencyInjection\ContainerBuilder->getReflectionClass() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:363] #6 Symfony\Component\DependencyInjection\Compiler\AutowirePass->populateAvailableType() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:336] #7 Symfony\Component\DependencyInjection\Compiler\AutowirePass->populateAvailableTypes() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:503] #8 Symfony\Component\DependencyInjection\Compiler\AutowirePass->createTypeAlternatives() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:459] #9 Symfony\Component\DependencyInjection\Compiler\AutowirePass->createTypeNotFoundMessage() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:249] #10 Symfony\Component\DependencyInjection\Compiler\AutowirePass->autowireMethod() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:187] #11 Symfony\Component\DependencyInjection\Compiler\AutowirePass->autowireCalls() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:153] #12 Symfony\Component\DependencyInjection\Compiler\AutowirePass->doProcessValue() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:109] #13 Symfony\Component\DependencyInjection\Compiler\AutowirePass->processValue() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php:60] #14 Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:130] #15 Symfony\Component\DependencyInjection\Compiler\AutowirePass->doProcessValue() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:109] #16 Symfony\Component\DependencyInjection\Compiler\AutowirePass->processValue() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php:39] #17 Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->process() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:70] #18 Symfony\Component\DependencyInjection\Compiler\AutowirePass->process() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:141] #19 Symfony\Component\DependencyInjection\Compiler\Compiler->compile() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:788] #20 Symfony\Component\DependencyInjection\ContainerBuilder->compile() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:637] #21 Symfony\Component\HttpKernel\Kernel->initializeContainer() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:135] #22 Symfony\Component\HttpKernel\Kernel->boot() called at [/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:195] #23 Symfony\Component\HttpKernel\Kernel->handle() called at [/var/www/html/web/app_dev.php:19] ```
greg0ire commented 5 years ago

I think 2, 3, 4 and 5 could be solved if we knew in favor of what they are deprecated. @core23 , aren't there new services, with new classes that could be used instead of these ones?

core23 commented 5 years ago

You should use the services of the doctrine extension

greg0ire commented 5 years ago

I think a lot of issues come from this:

https://github.com/sonata-project/SonataCoreBundle/blob/ab0a66f0b08ff03bf252ee834ce4842ffa43f009/src/CoreBundle/Resources/config/twig.xml#L21-L25

Would changing the class of this service be a BC-break? Would changing its third argument be a BC-break. If yes, maybe we should make a config switch defaulting to false, telling to load either a new service definition with new classes or this one. WDYT @sonata-project/contributors ?

lukepass commented 5 years ago

They are almost all fixed, I am just left with these:

image

Any hints on how to fix them?

Thanks!

bobemoe commented 5 years ago

So is this meant to be fixed now? I'm using fresh Symfony4.3 with Sonata Core 3.17 and am seeing some (2,3,4,5) of the deprecations of the OP. Looks like fixes were merged already? What am I doing wrong? Can provide more info if needed.

[2019-11-04 15:02:55] php.INFO: User Deprecated: The "sonata.core.model.adapter.chain" service is deprecated in favor of service "sonata.doctrine.model.adapter.chain" since 3.12.0 and will be removed in 4.0. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The \"sonata.core.model.adapter.chain\" service is deprecated in favor of service \"sonata.doctrine.model.adapter.chain\" since 3.12.0 and will be removed in 4.0. at /home/names4sale/symfony/var/cache/prod/ContainerZx2RxQv/getSonata_Core_Model_Adapter_ChainService.php:9)"} []
[2019-11-04 15:02:55] php.INFO: User Deprecated: The Sonata\CoreBundle\Model\Adapter\AdapterChain class is deprecated since version 3.12.0 and will be removed in 4.0. Use Sonata\Doctrine\Adapter\AdapterChain instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The Sonata\\CoreBundle\\Model\\Adapter\\AdapterChain class is deprecated since version 3.12.0 and will be removed in 4.0. Use Sonata\\Doctrine\\Adapter\\AdapterChain instead. at /home/names4sale/symfony/vendor/sonata-project/core-bundle/src/CoreBundle/Model/Adapter/AdapterChain.php:20)"} []
[2019-11-04 15:02:55] php.INFO: User Deprecated: The "sonata.core.model.adapter.doctrine_orm" service is deprecated in favor of service "sonata.doctrine.adapter.doctrine_orm" since 3.12.0 and will be removed in 4.0. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The \"sonata.core.model.adapter.doctrine_orm\" service is deprecated in favor of service \"sonata.doctrine.adapter.doctrine_orm\" since 3.12.0 and will be removed in 4.0. at /home/names4sale/symfony/var/cache/prod/ContainerZx2RxQv/getSonata_Core_Model_Adapter_DoctrineOrmService.php:9)"} []
[2019-11-04 15:02:55] php.INFO: User Deprecated: The Sonata\CoreBundle\Model\Adapter\DoctrineORMAdapter class is deprecated since version 3.12.0 and will be removed in 4.0. Use Sonata\Doctrine\Adapter\ORM\DoctrineORMAdapter instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The Sonata\\CoreBundle\\Model\\Adapter\\DoctrineORMAdapter class is deprecated since version 3.12.0 and will be removed in 4.0. Use Sonata\\Doctrine\\Adapter\\ORM\\DoctrineORMAdapter instead. at /home/names4sale/symfony/vendor/sonata-project/core-bundle/src/CoreBundle/Model/Adapter/DoctrineORMAdapter.php:20)"} []
benrcole commented 4 years ago

I am still seeing these as well