Configuring caching options to use services backed by doctrine/cache is no
longer supported. Migrate to PSR-6 services instead.
The minimum required PHP version is now 8.4.
Support for the following major versions of the following packages has been dropped:
doctrine/dbal3doctrine/persistence3doctrine/orm2psr/log1 and 2twig/twig2
More details below
This makes DisconnectedMetadataFactory redundant, as it relies on code
available only in doctrine/orm 2. It has been removed, as well as
ClassMetadataConnection.
Support for the YML and annotation metadata drivers has been dropped.
Doctrine\Bundle\DoctrineBundle\Repository\LazyServiceEntityRepository has
been removed without replacement.
All command classes in the Doctrine\Bundle\DoctrineBundle\Command\Proxy
namespace have been removed. Use the original commands provided by Doctrine
DBAL and ORM directly.
doctrine:query:sql has been removed. Use dbal:run-sql instead. All other
commands use the original command classes directly.
doctrine:mapping:convert and doctrine:ensure-production-settings have been
removed and do not have replacements.
Doctrine\Bundle\DoctrineBundle\Command\ImportMappingCommand has been removed
and does not have a replacement.
The following configuration options are no-ops when using doctrine/orm 3 and
have been removed:
doctrine.orm.entity_managers.some_em.report_fields_where_declareddoctrine.orm.enable_lazy_ghost_objects
Also, the 3 following options were no-ops when enabling native lazy objects and have been removed as well:
doctrine.orm.auto_generate_proxy_classesdoctrine.orm.proxy_dirdoctrine.orm.proxy_namespace
Use doctrine.dbal.default_table_options.collation instead.
There is no replacement for this option.
The commented option for custom types is no longer supported and has been
removed.
The disable_type_comments option for connections is no longer supported and has
been removed.
The platform_service option for connections is no longer supported and has
been removed.
The doctrine.dbal.connection.some_connection.keep_slave and doctrine.dbal.connection.some_connection.slaves option is removed
doctrine.dbal.connection.some_connection.slaves becomes
doctrine.dbal.connection.some_connection.replicas.
The use_savepoints option for connections is no longer supported and
has been removed.
The doctrine.orm.controller_resolver.auto_mapping option now only accepts false as value, to disallow the usage of the controller resolver auto mapping feature by default. The configuration option will be fully removed in 4.0.
Auto mapping used any route parameter that matches with a field name of the Entity to resolve as criteria in a find by query. This method has been deprecated in Symfony 7.1 and is replaced with mapped route parameters.
If you were relying on this functionality, you will need to update your code to use explicit mapped route parameters instead.
When using the doctrine.dbal.url configuration option, you can no longer
specify other configuration options that would conflict with it, such as
dbname, host, etc.
The following service class parameters have been removed:
doctrine.classdoctrine.data_collector.classdoctrine.dbal.configuration.classdoctrine.dbal.connection.event_manager.classdoctrine.dbal.connection_factory.classdoctrine.orm.configuration.classdoctrine.orm.entity_listener_resolver.classdoctrine.orm.entity_manager.classdoctrine.orm.listeners.attach_entity_listeners.classdoctrine.orm.listeners.resolve_target_entity.classdoctrine.orm.manager_configurator.classdoctrine.orm.metadata.attribute.classdoctrine.orm.metadata.driver_chain.classdoctrine.orm.metadata.php.classdoctrine.orm.metadata.staticphp.classdoctrine.orm.metadata.xml.classdoctrine.orm.naming_strategy.default.classdoctrine.orm.naming_strategy.underscore.classdoctrine.orm.quote_strategy.ansi.classdoctrine.orm.quote_strategy.default.classdoctrine.orm.second_level_cache.cache_configuration.classdoctrine.orm.second_level_cache.default_cache_factory.classdoctrine.orm.second_level_cache.default_region.classdoctrine.orm.second_level_cache.filelock_region.classdoctrine.orm.second_level_cache.logger_chain.classdoctrine.orm.second_level_cache.logger_statistics.classdoctrine.orm.second_level_cache.regions_configuration.classdoctrine.orm.security.user.provider.classdoctrine.orm.typed_field_mapper.default.classdoctrine.orm.validator.unique.classdoctrine.orm.validator_initializer.classform.type_guesser.doctrine.class
If your application was relying on these parameters, you should update your service definitions to use the class names directly instead of parameter references.
The signature of ConnectionFactory::createConnection() changed.
You should use stop passing an event manager argument.
- $connectionFactory->createConnection($params, $config, $eventManager, $mappingTypes)
+ $connectionFactory->createConnection($params, $config, $mappingTypes)The Doctrine\Bundle\DoctrineBundle\DependencyInjection namespace is now
considered internal, and all classes inside it are marked as final, except for
Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineORMMappingsPass.
Don't reference any classes from this namespace directly, except the one
mentioned earlier.
Use the #[Doctrine\Bundle\DoctrineBundle\Attribute\AsDoctrineListener]
attribute instead.
Implement your own include/exclude mechanism instead.
Native type declarations have been added to all constants, properties, and methods.
The Twig filter doctrine_pretty_query has been removed.