Upgrading doctrine/doctrine-bundle 1 to 2
Breaking1.12.13 → 2.19.3Breaking11Deprecated19New51Changed62Fixed100Other105
BreakingUpgrade verdict
11 breaking changes.
In plain terms
- The bundle no longer works with Symfony 5; you must upgrade Symfony to use this version.
- Old logging configuration for the database layer is gone; use the current logging setup instead.
- Services that relied on being autowired by common interface names will no longer be injected automatically.
- The old command for generating entities is gone; use the maker tooling instead.
Must act Top 5 of 30 that need code or config changes
PHP requirement changed in 2.14.0: ^7.1 || ^8.0 → ^8.1.
What you must change
Breaking11
Removes support for Symfony 5.
Removes legacy DBAL logging services and parameters.
Removes autowiring aliases for common interfaces.
Removes the deprecated entity generation command.
Removes deprecated features.
Drops support for DoctrineCacheBundle.
DoctrineCacheBundleRemoves deprecated functionality from DoctrineCommand.
DoctrineCommandNo longer implements the deprecated RegistryInterface.
RegistryInterfaceAdds Twig 4 compatibility, which is a backward compatibility break.
Moves the enable_native_lazy_objects config node outside the entity managers configuration.
enable_native_lazy_objectsMakes the container argument in the ContainerRepositoryFactory constructor mandatory.
ContainerRepositoryFactoryDeprecations to plan for
Deprecated19
Conditionally deprecates proxy-related settings.
Deprecates methods related to annotations and yaml.
Deprecates the use_savepoints option when using DBAL 4.
use_savepointsDeprecates the disable_type_comments option.
disable_type_commentsDeprecates passing an event manager to CF::createConnection().
CF::createConnection()Deprecates the report_fields_where_declared option.
report_fields_where_declaredFully deprecates controller resolver auto mapping.
Deprecates not setting doctrine.orm.controller_resolver.auto_mapping.
doctrine.orm.controller_resolver.auto_mappingDeprecates EventSubscriberInterface.
EventSubscriberInterfaceDeprecates all ORM proxy commands.
Deprecates sharding functionality.
Deprecates the "collate" default table option.
collateDeprecates the
override_url configuration option.override_urlDeprecates mixing the
url option with host, dbname and a few others.urlhostdbnameDeprecates the Blacklist and WellKnown schema filters.
BlacklistWellKnownResolves DBAL 2.11 master/slave deprecations.
Deprecates the doctrine:query:sql command.
doctrine:query:sqlDeprecates ImportDoctrineCommand.
ImportDoctrineCommandDeprecates .class parameters.