Replies: 5 comments 3 replies
-
you should configure your |
Beta Was this translation helpful? Give feedback.
-
I've added it everywhere to all the handlers (and also to just deprecation). Is "null" correct for the handler? Does console need special handling for deprecation? I've played around with several combinations and haven't found the right one yet, but didn't even know about "bubble". when@dev:
monolog:
channels:
- deprecation
- scrape
handlers:
deprecation:
bubble: false
type: "null"
channels: [ deprecation ]
main:
bubble: false
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
console:
bubble: false
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"] bin/console c:c
// Clearing the cache for the dev environment with debug true
[OK] Cache for the "dev" environment (debug=true) was successfully cleared.
2023-10-24T09:03:25-04:00 [info] User Deprecated: Since symfony/dependency-injection 6.4: "Symfony\Component\DependencyInjection\ContainerAwareTrait" is deprecated, use dependency injection instead.
2023-10-24T09:03:25-04:00 [info] User Deprecated: Since symfony/monolog-bridge 6.4: The "Symfony\Bridge\Monolog\Logger" class is deprecated, use HttpKernel's DebugLoggerConfigurator instead.
2023-10-24T09:03:25-04:00 [info] User Deprecated: Since symfony/framework-bundle 6.4: The "annotations.cached_reader" service is deprecated without replacement.
2023-10-24T09:03:25-04:00 [info] User Deprecated: Since symfony/framework-bundle 6.4: The "annotations.reader" service is deprecated without replacement.
2023-10-24T09:03:25-04:00 [info] User Deprecated: Since symfony/framework-bundle 6.4: The "annotations.cache_adapter" service is deprecated without replacement.
2023-10-24T09:03:25-04:00 [info] User Deprecated: Since symfony/validator 6.4: Method "Symfony\Component\Validator\ValidatorBuilder::setDoctrineAnnotationReader()" is deprecated without replacement.
2023-10-24T09:03:25-04:00 [info] User Deprecated: Since symfony/serializer 6.4: Passing a "Doctrine\Common\Annotations\PsrCachedReader" instance as argument 1 to "Symfony\Component\Serializer\Mapping\Loader\AttributeLoader::__construct()" is deprecated, pass null or omit the parameter instead.
2023-10-24T09:03:25-04:00 [info] User Deprecated: In ORM 3.0, the AttributeDriver will report fields for the classes where they are declared. This may uncover invalid mapping configurations. To opt into the new mode today, set the "reportFieldsWhereDeclared" constructor parameter to true. (AttributeDriver.php:82 called by App_KernelDevDebugContainer.php:1157, https://github.com/doctrine/orm/pull/10455, package doctrine/orm)
2023-10-24T09:03:25-04:00 [info] User Deprecated: Using XML mapping driver with XSD validation disabled is deprecated and will not be supported in Doctrine ORM 3.0. (XmlDriver.php:64 called by SimplifiedXmlDriver.php:23, https://github.com/doctrine/orm/pull/6728, package doctrine/orm)
2023-10-24T09:03:25-04:00 [info] User Deprecated: Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without setting second argument $numberAware=true is deprecated and will be removed in Doctrine ORM 3.0. (UnderscoreNamingStrategy.php:51 called by App_KernelDevDebugContainer.php:1180, https://github.com/doctrine/orm/pull/7908, package doctrine/orm)
2023-10-24T09:03:25-04:00 [info] User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Gedmo\Timestampable\TimestampableListener" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute.
2023-10-24T09:03:25-04:00 [info] User Deprecated: Doctrine\DBAL\Platforms\PostgreSQLPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (PostgreSQLPlatform.php:219 called by ClassMetadataFactory.php:627, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)
2023-10-24T09:03:25-04:00 [info] User Deprecated: Context: Loading metadata for class App\Entity\Tag
Problem: Using the IDENTITY generator strategy with platform "Doctrine\DBAL\Platforms\PostgreSQL100Platform" is deprecated and will not be possible in Doctrine ORM 3.0.
Solution: Use the SEQUENCE generator strategy instead. (ClassMetadataFactory.php:638 called by ClassMetadataFactory.php:146, https://github.com/doctrine/orm/issues/8850, package doctrine/orm)
tac@tac-XPS-9320:~/ca/news$ bin/console --version
Symfony 6.4.0-BETA1 (env: dev, debug: true) #StandWithUkraine https://sf.to/ukraine
2023-10-24T13:03:34+00:00 [info] User Deprecated: Since symfony/dependency-injection 6.4: "Symfony\Component\DependencyInjection\ContainerAwareTrait" is deprecated, use dependency injection instead.
2023-10-24T13:03:34+00:00 [info] User Deprecated: Since symfony/monolog-bridge 6.4: The "Symfony\Bridge\Monolog\Logger" class is deprecated, use HttpKernel's DebugLoggerConfigurator instead.
2023-10-24T13:03:34+00:00 [info] User Deprecated: Since symfony/framework-bundle 6.4: The "annotations.cached_reader" service is deprecated without replacement.
2023-10-24T13:03:34+00:00 [info] User Deprecated: Since symfony/framework-bundle 6.4: The "annotations.reader" service is deprecated without replacement.
2023-10-24T13:03:34+00:00 [info] User Deprecated: Since symfony/framework-bundle 6.4: The "annotations.cache_adapter" service is deprecated without replacement.
2023-10-24T13:03:34+00:00 [info] User Deprecated: Since symfony/validator 6.4: Method "Symfony\Component\Validator\ValidatorBuilder::setDoctrineAnnotationReader()" is deprecated without replacement.
2023-10-24T13:03:34+00:00 [info] User Deprecated: Since symfony/serializer 6.4: Passing a "Doctrine\Common\Annotations\PsrCachedReader" instance as argument 1 to "Symfony\Component\Serializer\Mapping\Loader\AttributeLoader::__construct()" is deprecated, pass null or omit the parameter instead.
2023-10-24T13:03:34+00:00 [info] User Deprecated: In ORM 3.0, the AttributeDriver will report fields for the classes where they are declared. This may uncover invalid mapping configurations. To opt into the new mode today, set the "reportFieldsWhereDeclared" constructor parameter to true. (AttributeDriver.php:78 called by App_KernelDevDebugContainer.php:1157, https://github.com/doctrine/orm/pull/10455, package doctrine/orm)
2023-10-24T13:03:34+00:00 [info] User Deprecated: Using XML mapping driver with XSD validation disabled is deprecated and will not be supported in Doctrine ORM 3.0. (XmlDriver.php:60 called by SimplifiedXmlDriver.php:23, https://github.com/doctrine/orm/pull/6728, package doctrine/orm)
2023-10-24T13:03:34+00:00 [info] User Deprecated: Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without setting second argument $numberAware=true is deprecated and will be removed in Doctrine ORM 3.0. (UnderscoreNamingStrategy.php:47 called by App_KernelDevDebugContainer.php:1180, https://github.com/doctrine/orm/pull/7908, package doctrine/orm)
2023-10-24T13:03:34+00:00 [info] User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Gedmo\Timestampable\TimestampableListener" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute.
2023-10-24T13:03:34+00:00 [info] User Deprecated: Doctrine\DBAL\Platforms\PostgreSQLPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (PostgreSQLPlatform.php:215 called by ClassMetadataFactory.php:627, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)
2023-10-24T13:03:34+00:00 [info] User Deprecated: Context: Loading metadata for class App\Entity\Tag
Problem: Using the IDENTITY generator strategy with platform "Doctrine\DBAL\Platforms\PostgreSQL100Platform" is deprecated and will not be possible in Doctrine ORM 3.0.
Solution: Use the SEQUENCE generator strategy instead. (ClassMetadataFactory.php:628 called by ClassMetadataFactory.php:146, https://github.com/doctrine/orm/issues/8850, package doctrine/orm)
2023-10-24T13:03:34+00:00 [info] Deprecated: Using ${var} in strings is deprecated, use {$var} instead
2023-10-24T13:03:34+00:00 [info] Deprecated: Using ${var} in strings is deprecated, use {$var} instead
tac@tac-XPS-9320:~/ca/news$ bin/console --version
Symfony 6.4.0-BETA1 (env: dev, debug: true) #StandWithUkraine https://sf.to/ukraine
2023-10-24T13:03:36+00:00 [info] User Deprecated: Since symfony/dependency-injection 6.4: "Symfony\Component\DependencyInjection\ContainerAwareTrait" is deprecated, use dependency injection instead.
2023-10-24T13:03:36+00:00 [info] User Deprecated: Since symfony/monolog-bridge 6.4: The "Symfony\Bridge\Monolog\Logger" class is deprecated, use HttpKernel's DebugLoggerConfigurator instead.
2023-10-24T13:03:36+00:00 [info] User Deprecated: Since symfony/framework-bundle 6.4: The "annotations.cached_reader" service is deprecated without replacement.
2023-10-24T13:03:36+00:00 [info] User Deprecated: Since symfony/framework-bundle 6.4: The "annotations.reader" service is deprecated without replacement.
2023-10-24T13:03:36+00:00 [info] User Deprecated: Since symfony/framework-bundle 6.4: The "annotations.cache_adapter" service is deprecated without replacement.
2023-10-24T13:03:36+00:00 [info] User Deprecated: Since symfony/validator 6.4: Method "Symfony\Component\Validator\ValidatorBuilder::setDoctrineAnnotationReader()" is deprecated without replacement.
2023-10-24T13:03:36+00:00 [info] User Deprecated: Since symfony/serializer 6.4: Passing a "Doctrine\Common\Annotations\PsrCachedReader" instance as argument 1 to "Symfony\Component\Serializer\Mapping\Loader\AttributeLoader::__construct()" is deprecated, pass null or omit the parameter instead.
2023-10-24T13:03:36+00:00 [info] User Deprecated: In ORM 3.0, the AttributeDriver will report fields for the classes where they are declared. This may uncover invalid mapping configurations. To opt into the new mode today, set the "reportFieldsWhereDeclared" constructor parameter to true. (AttributeDriver.php:78 called by App_KernelDevDebugContainer.php:1157, https://github.com/doctrine/orm/pull/10455, package doctrine/orm)
2023-10-24T13:03:36+00:00 [info] User Deprecated: Using XML mapping driver with XSD validation disabled is deprecated and will not be supported in Doctrine ORM 3.0. (XmlDriver.php:60 called by SimplifiedXmlDriver.php:23, https://github.com/doctrine/orm/pull/6728, package doctrine/orm)
2023-10-24T13:03:36+00:00 [info] User Deprecated: Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without setting second argument $numberAware=true is deprecated and will be removed in Doctrine ORM 3.0. (UnderscoreNamingStrategy.php:47 called by App_KernelDevDebugContainer.php:1180, https://github.com/doctrine/orm/pull/7908, package doctrine/orm)
2023-10-24T13:03:36+00:00 [info] User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Gedmo\Timestampable\TimestampableListener" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute.
2023-10-24T13:03:36+00:00 [info] User Deprecated: Doctrine\DBAL\Platforms\PostgreSQLPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (PostgreSQLPlatform.php:215 called by ClassMetadataFactory.php:627, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)
2023-10-24T13:03:36+00:00 [info] User Deprecated: Context: Loading metadata for class App\Entity\Tag
Problem: Using the IDENTITY generator strategy with platform "Doctrine\DBAL\Platforms\PostgreSQL100Platform" is deprecated and will not be possible in Doctrine ORM 3.0.
Solution: Use the SEQUENCE generator strategy instead. (ClassMetadataFactory.php:628 called by ClassMetadataFactory.php:146, https://github.com/doctrine/orm/issues/8850, package doctrine/orm)
2023-10-24T13:03:36+00:00 [info] Deprecated: Using ${var} in strings is deprecated, use {$var} instead
2023-10-24T13:03:36+00:00 [info] Deprecated: Using ${var} in strings is deprecated, use {$var} instead |
Beta Was this translation helpful? Give feedback.
-
It's really, really difficult to run console scripts with so many deprecation warnings. Any other suggestions? After every command I have to scroll back in my terminal to find the output. Many of these are Symfony deprecations, so I'm sure they'll be fixed eventually, but in the meantime, I'd love to fix all my own code and bundles. |
Beta Was this translation helpful? Give feedback.
-
I've generally noticed that in 6.4 where you see these deprecations it's because the recipes are out of date ( |
Beta Was this translation helpful? Give feedback.
-
This monolog config seems to be working on Symfony 7:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I know this is not the first time this question has been asked, and I've read many of the discussions and attempts to silence deprecations, specifically deprecations outside of one's own code.
I'm testing 6.4 now, and the console is so full of deprecations I can't do anything about that I want to stop testing.
symfony/symfony-docs#17592
#35575 (filed with Symfony 4.4 and still open!)
https://www.reddit.com/r/symfony/comments/pdcjf1/how_do_i_shut_up_deprecations/
I've added
SYMFONY_DEPRECATIONS_HELPER=weak
to .env.local
I've hacked at monolog.yaml, based on some of the comments above.
In particular, I don't want to see the Symfony deprecations, as I'm sure the team is aware of them and may even be okay and will go away when bumping from 6.4 to 7. But mine I certainly want to see.
Many 3rd party bundles depend on doctrine/annotations, but seeing these messages when I'm trying to debug my own code is maddening.
I think this is so important that it should be documented when asking people to test 6.4.
Beta Was this translation helpful? Give feedback.
All reactions