Closed lukepass closed 5 years ago
@core23 please help, what are all these things deprecated in favor of?
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
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?
Symfony will load them automatically
Ok, so I should just ignore them or I can help fixing in the Sonata code?
I think some of them can be fixed, e.g. number 6. should really not happen IMO
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 👍
Getting a stack trace for each deprecation would help.
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?
You should use the services of the doctrine extension
I think a lot of issues come from this:
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 ?
They are almost all fixed, I am just left with these:
Any hints on how to fix them?
Thanks!
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)"} []
I am still seeing these as well
Environment
Symfony 3.4 application with web services.
Sonata packages
Symfony packages
PHP version
Subject
Hello, after a fresh install I have a lot of deprecations in the profiler toolbar:
This is my composer.json:
What can I do to get rid of them?
Thanks!