Skip to content

Upgrading doctrine/orm 2 to 3

Breaking2.20.14 → 3.7.6Breaking215Security1Platform3Deprecated29New32Changed76Fixed89Other199

BreakingUpgrade verdict

211 breaking changes and 3 platform requirement changes and a security fix.

  • XML mapping files are still checked for validity by default, but you can now turn that check off.
  • DQL queries can no longer use the partial object syntax.
  • The Notify change tracking policy is gone, so entities using it must switch to another policy.
  • The concrete table inheritance strategy is no longer supported.
Top 5 of 244 that need code or config changes

doctrine/orm publishes an official migration guide for version 3. It covers more than the release notes do.

An upgrade guide ↗

PHP requirement changed in 3.0.0-beta1: ^7.1 || ^8.0 → ^8.1.

Adds symfony/polyfill-php86 ^1.37, symfony/var-exporter ^6.3.9 || ^7.0 || ^8.0.

Drops doctrine/cache, doctrine/common, symfony/polyfill-php72, symfony/polyfill-php80.

Moves doctrine/collections ^1.5 || ^2.1 → ^2.2 || ^3.1, doctrine/dbal ^2.13.1 || ^3.2 → ^3.8.2 || ^4, doctrine/event-manager ^1.2 || ^2 → ^2.1.1, doctrine/lexer ^2 || ^3 → ^3, doctrine/persistence ^2.4 || ^3 → ^3.3.1 || ^4, symfony/console ^4.2 || ^5.0 || ^6.0 || ^7.0 || ^8.0 → ^5.4 || ^6.0 || ^7.0 || ^8.0. Your build may pick other versions.

Breaking211
Allows XML validation to be disabled while keeping it enabled by default.
Removes partial syntax in DQL.
Removes the Notify change tracking policy.
Removes concrete table inheritance.
Removes deprecated methods and classes.
Removes $entityAnnotationClasses and getReader().
$entityAnnotationClassesgetReader()
Removes InExpression.
InExpression
Removes the Annotation interface.
Annotation
Removes DriverChain.
DriverChain
Removes EntityManager::create().
EntityManager::create()
Removes SQL resultset mapping.
Removes last references to ClassMetadataInfo.
ClassMetadataInfo
Removes support for Type::canRequireSQLConversion().
Type::canRequireSQLConversion()
Drops support for persistence 2.
Removes the doctrine binary.
Removes console helper.
Removes support for ObjectManagerAware.
ObjectManagerAware
Removes support for entity namespace aliases.
Removes TreeWalkerChainIterator.
TreeWalkerChainIterator
Removes the Proxy marker interface.
Proxy
Removes quoting methods from ClassMetadata.
ClassMetadata
Removes various deprecated methods and properties.
Removes ability to merge detached entities.
Removes ability to flush the EM partially.
Removes ability to clear the UoW partially.
Removes support for Doctrine Cache.
Removes the deprecated Setup class.
Setup
Removes the deprecated Named and Native Queries in Metadata and EntityRepository.
EntityRepository
Removes MultiGetRegion and adds native types to Region implementations.
MultiGetRegionRegion
Removes old cache accessors and mutators from query classes.
Removes AbstractIdGenerator::generate() and adds native types to ID generators.
AbstractIdGenerator::generate()
Removes Configuration::ensureProductionSettings().
Configuration::ensureProductionSettings()
Removes support for Doctrine Cache in second level cache.
Removes the deprecated PHPDriver.
PHPDriver
Removes EntityManager::transactional().
EntityManager::transactional()
Removes Setup::registerAutoloadDirectory().
Setup::registerAutoloadDirectory()
Removes the Version class.
Version
Removes code generators.
Removes AbstractHydrator::hydrateRow().
AbstractHydrator::hydrateRow()
Removes Query::iterate().
Query::iterate()
Removes TABLE and UUID strategies.
Removes EntityManagerInterface::copy().
EntityManagerInterface::copy()
Removes ClassMetadataInfo.
ClassMetadataInfo
Drops doctrine/lexer 1.
Removes PHP 7 code.
Drops support for unserializing old serialization formats.
Removes last remnants of the YAML driver.
Removes deprecated handling of custom ObjectRepository implementations.
ObjectRepository
AUTO identity generation now defaults to IDENTITY instead of SEQUENCE for PostgreSQL.
Configuration::setIdentityGenerationPreferences()PostgreSQLPlatform::CLASSClassMetadata::GENERATOR_TYPE_SEQUENCE
Removes partial objects, the PARTIAL DQL keyword, related hints and getPartialReference().
PARTIALDoctrine\ORM\Query\AST\PartialObjectExpressionDoctrine\ORM\Query\SqlWalker::HINT_PARTIALDoctrine\ORM\Query::HINT_FORCE_PARTIAL_LOADDoctrine\ORM\EntityManager*::getPartialReference()
ProxyFactory no longer extends doctrine/common's abstract factory and drops two methods.
Doctrine\ORM\Proxy\ProxyFactoryDoctrine\ORM\Proxy\ProxyFactory::createProxyDefinition()Doctrine\ORM\Proxy\ProxyFactory::resetUninitializedProxy()
Removes the NOTIFY change tracking policy; use DEFERRED_EXPLICIT instead.
NOTIFYDEFERRED_EXPLICIT
Query::setDQL() no longer accepts null and Query::setFirstResult() no longer accepts null.
Doctrine\ORM\Query::setDQL()Doctrine\ORM\Query::setFirstResult()
Removes the Doctrine\ORM\Proxy\Proxy interface; use Doctrine\Persistence\Proxy instead.
Doctrine\ORM\Proxy\ProxyDoctrine\Persistence\Proxy
Removes getEntityManager() from OnClearEventArgs and flush event args; use getObjectManager().
Doctrine\ORM\Event\OnClearEventArgsDoctrine\ORM\Event\*FlushEventArgsgetEntityManager()getObjectManager()
Removes the ClassMetadataInfo class; use ClassMetadata instead.
Doctrine\ORM\Mapping\ClassMetadataInfoDoctrine\ORM\Mapping\ClassMetadata
Removes the LifecycleEventArgs class; use the dedicated per-event argument classes instead.
Doctrine\ORM\Event\LifecycleEventArgsDoctrine\ORM\Event\PrePersistEventArgsDoctrine\ORM\Event\PreUpdateEventArgsDoctrine\ORM\Event\PreRemoveEventArgsDoctrine\ORM\Event\PostPersistEventArgsDoctrine\ORM\Event\PostUpdateEventArgsDoctrine\ORM\Event\PostRemoveEventArgsDoctrine\ORM\Event\PostLoadEventArgs
Removes AttributeDriver::$entityAnnotationClasses and AttributeDriver::getReader().
AttributeDriver::$entityAnnotationClassesAttributeDriver::getReader()AttributeDriver::isTransient()
Removes InExpression; the parser now creates InListExpression or InSubselectExpression.
Doctrine\ORM\Query\AST\InExpressionInListExpressionInSubselectExpressionSqlWalker::walkInExpression()SqlWalker::walkInListExpression()SqlWalker::walkInSubselectExpression()
Removes the AnnotationDriver and all annotation-related code; the Annotation maker interface is replaced by MappingAttribute.
AnnotationDriverDoctrine\ORM\Mapping\AnnotationDoctrine\ORM\Mapping\MappingAttribute
Removes EntityManager::create(); the now-public constructor must be used instead and expects a Connection rather than a parameter array.
EntityManager::create()EntityManager::__construct()Doctrine\DBAL\DriverManager::getConnection()Connection
Removes the QueryBuilder constants SELECT, DELETE, UPDATE, STATE_DIRTY and STATE_CLEAN and the methods getState() and getType().
QueryBuilder::SELECTQueryBuilder::DELETEQueryBuilder::UPDATEQueryBuilder::STATE_DIRTYQueryBuilder::STATE_CLEANQueryBuilder::getState()QueryBuilder::getType()
Requires the alias argument when passing a class or type to QueryBuilder::update() and QueryBuilder::delete().
QueryBuilder::update()QueryBuilder::delete()
Splits output and tree walkers: SqlWalker no longer implements TreeWalker, and several walk methods are removed from TreeWalker, TreeWalkerAdapter and TreeWalkerChain.
SqlWalkerTreeWalkerTreeWalkerAdapterTreeWalkerChainsetQueryComponent()walkSelectClause()walkFromClause()walkJoin()
Splits output walkers and tree walkers, changing several TreeWalkerAdapter methods and removing _getQueryComponents().
walkLikeExpression()walkStateFieldPathExpression()walkComparisonExpression()walkInputParameter()walkArithmeticExpression()TreeWalkerAdapter::setQueryComponent()TreeWalkerAdapter::_getQueryComponents()TreeWalkerAdapter::getQueryComponents()
Removes identity column emulation through sequences; platforms without identity columns must use the SEQUENCE strategy.
SEQUENCE
Removes StaticPHPDriver and DriverChain; use the equivalents from doctrine/persistence.
StaticPHPDriverDriverChainDoctrine\Persistence\Mapping\Driver\StaticPHPDriverDoctrine\Persistence\Mapping\Driver\MappingDriverChain
Drops the second argument to UnderscoreNamingStrategy::__construct(); the strategy is now always number aware.
UnderscoreNamingStrategy::__construct()
Removes Doctrine\ORM\Proxy\Autoloader; use Doctrine\Common\Proxy\Autoloader instead.
Doctrine\ORM\Proxy\AutoloaderDoctrine\Common\Proxy\Autoloader
Removes Doctrine\ORM\Tools\DisconnectedClassMetadataFactory with no replacement.
Doctrine\ORM\Tools\DisconnectedClassMetadataFactory
Removes support for Type::canRequireSQLConversion() and MappingException::sqlConversionNotAllowedForIdentifiers(); value conversion now always runs.
Type::canRequireSQLConversion()MappingException::sqlConversionNotAllowedForIdentifiers()
Removes the doctrine binary and ConsoleRunner::printCliConfigTemplate(); bootstrap console tools manually per the docs.
ConsoleRunner::printCliConfigTemplate()
Removes EntityManagerHelper and HelperSetManagerProvider; console commands now require an $entityManagerProvider constructor argument.
Doctrine\ORM\Tools\Console\EntityManagerProvider\HelperSetManagerProviderDoctrine\ORM\Tools\Console\Helper\EntityManagerHelperDoctrine\ORM\Tools\Console\ConsoleRunner
Removes EntityManagerHelper and related logic, changing createHelperSet(), run(), createApplication() and addCommands() signatures.
EntityManagerHelpercreateHelperSet()run()createApplication()addCommands()HelperSetEntityManagerProvider
Removes entity namespace alias support from getRepository() and removes Configuration::addEntityNamespace() and getEntityNamespace().
EntityManager::getRepository()Configuration::addEntityNamespace()Configuration::getEntityNamespace()
Removes the protected evictCollectionCache() and evictElementCache() methods from AbstractCollectionPersister.
Doctrine\ORM\Cache\Persister\Collection\AbstractCollectionPersisterevictCollectionCache()evictElementCache()
Removes the TreeWalkerChainIterator class without replacement.
Doctrine\ORM\Query\TreeWalkerChainIterator
Removes quoting methods from ClassMetadata since quoting is handled by QuoteStrategy implementations.
ClassMetadataDoctrine\ORM\Mapping\QuoteStrategygetQuotedIdentifierColumnNames()getQuotedColumnName()getQuotedTableName()getQuotedJoinTableName()
Removes the ability to merge detached entities; UnitOfWork::merge() is removed and EntityManager::merge() throws.
UnitOfWork::merge()EntityManager::merge()
Removes partial flush/commit; flush() and commit() no longer accept entities and ignore the argument.
Doctrine\ORM\EntityManager::flush()Doctrine\ORM\Decorator\EntityManagerDecorator::flush()Doctrine\ORM\UnitOfWork::commit()
Removes partial clearing; EntityManager::clear() throws on non-null arguments and UnitOfWork::clear() always clears fully.
EntityManager::clear()UnitOfWork::clear()EntityRepository::clear()getEntityClass()clearsAllEntities()OnClearEventArgs
Removes Doctrine Cache support and the getQueryCacheImpl() and setQueryCacheImpl() methods from Configuration.
Doctrine\ORM\ConfigurationgetQueryCacheImpl()setQueryCacheImpl()
Removes Doctrine Cache support from Configuration, replacing get/setHydrationCacheImpl() and get/setMetadataCacheImpl() with PSR-6 counterparts.
getHydrationCacheImpl()setHydrationCacheImpl()getMetadataCacheImpl()setMetadataCacheImpl()
Removes Configuration::newDefaultAnnotationDriver(); use DoctrineSetup::createDefaultAnnotationDriver() instead.
Doctrine\ORM\Configuration::newDefaultAnnotationDriverDoctrine\ORM\Tools\DoctrineSetup::createDefaultAnnotationDriver()
Removes Doctrine\ORM\Tools\Setup; use Doctrine\ORM\Tools\DoctrineSetup, which accepts a PSR-6 cache.
Doctrine\ORM\Tools\SetupDoctrine\ORM\Tools\DoctrineSetup
Removes all APIs related to named queries.
Removes old cache accessors and mutators from AbstractQuery and Query.
AbstractQuery::setResultCacheDriver()AbstractQuery::getResultCacheDriver()AbstractQuery::useResultCache()AbstractQuery::getResultCacheLifetime()AbstractQuery::getResultCacheId()Query::setQueryCacheDriver()Query::getQueryCacheDriver()
Removes Doctrine\ORM\Cache\MultiGetRegion, merging the interface into Doctrine\ORM\Cache\Region.
Doctrine\ORM\Cache\MultiGetRegionDoctrine\ORM\Cache\Region
Renames AbstractIdGenerator::generate() to generateId() and removes generate().
AbstractIdGenerator::generate()AbstractIdGenerator::generateId()
Removes cache settings inspection: Configuration::ensureProductionSettings() and the orm:ensure-production-settings command.
Configuration::ensureProductionSettings()orm:ensure-production-settings
Reworks the second level cache to use PSR-6, changing DefaultCacheFactory and DefaultRegion and removing DefaultMultiGetRegion.
DefaultCacheFactoryDefaultMultiGetRegionDefaultRegionREGION_KEY_SEPARATORgetCacheEntryKey()getCache()
Removes Doctrine\ORM\Mapping\Driver\PHPDriver; use StaticPHPDriver for programmatic metadata configuration.
Doctrine\ORM\Mapping\Driver\PHPDriverStaticPHPDriver
Removes EntityManagerInterface::transactional(), replaced by wrapInTransaction().
Doctrine\ORM\EntityManagerInterface::transactional()Doctrine\ORM\EntityManagerInterface::wrapInTransaction()
Removes Setup::registerAutoloadDirectory(); use Composer's autoloader instead.
Setup::registerAutoloadDirectory()
Removes YAML mapping drivers; migrate YamlDriver or SimpleYamlDriver to attribute or XML drivers.
YamlDriverSimpleYamlDriverorm:convert-mapping
Removes the orm:generate:entities and orm:generate-repositories console commands and the Doctrine\ORM\Tools\Export namespace.
orm:generate:entitiesorm:generate-repositoriesDoctrine\ORM\Tools\ConvertDoctrine1SchemaDoctrine\ORM\Tools\EntityGeneratorDoctrine\ORM\Tools\EntityRepositoryGeneratorDoctrine\ORM\Tools\Export
Removes Doctrine\ORM\Version; use Composer's runtime API to check the ORM package version at runtime.
Doctrine\ORM\Version
Removes Doctrine\ORM\ORMException and turns Doctrine\ORM\Exception\ORMException into an interface.
Doctrine\ORM\ORMExceptionDoctrine\ORM\Exception\ORMException
Removes Doctrine\ORM\EntityManagerInterface#copy(), which never had an implementation.
Doctrine\ORM\EntityManagerInterface#copy()
Removes Doctrine\ORM\Id\TableGenerator and other classes related to UUID and TABLE generator strategies.
Doctrine\ORM\Id\TableGenerator
Removes Doctrine\ORM\Id\UuidGenerator and the UUID identifier generation strategy.
Doctrine\ORM\Id\UuidGeneratorUUID
Removes deprecated Query::iterate() along with AbstractHydrator::iterate(), AbstractHydrator::hydrateRow() and IterableResult.
Query::iterate()AbstractHydrator::iterate()AbstractHydrator::hydrateRow()IterableResulttoIterable()
Reverts the capability to use the allfields SQL notation.
Allows (Array)ParameterType in QueryBuilder, a backward compatibility break.
QueryBuilderArrayParameterTypeParameterType
Enforces native type declarations across the codebase.
Severs ties to the doctrine/common package.
Changes the EntityPersister return type.
EntityPersister
Uses lazy ghosts unconditionally.
Rejects ID collisions in the identity map unconditionally.
Updates the order of mapping attribute parameters.
Disallows lifecycle callbacks on embedded classes.
Turns a deprecation into an exception.
Enables XML validation unconditionally.
Cleans up backward compatibility layers.
Narrows down parameter types for quote strategies.
Throws on invalid one to one mappings.
Turns the deprecation from #10470 into an exception in 3.0.x.
Migrates the rest of the source code to PHP 8 syntax.
Migrates ClassMetadata to PHP 8 syntax.
ClassMetadata
Stops relying on underscores to indicate property visibility.
Migrates more classes to PHP 8 syntax.
Migrates the database driver to PHP 8 syntax.
Makes a missing inheritance declaration a failure.
Migrates ParserResult to PHP 8 syntax.
ParserResult
Migrates remaining exceptions to PHP 8 syntax.
Allows Lexer 3.
Modernizes QueryExpressionVisitor.
QueryExpressionVisitor
Adds a $lockMode parameter to EntityManager::refresh().
EntityManager::refresh()$lockMode
Adds native types to annotation classes.
Migrates collections to PHP 8 syntax.
Adds types to PersisterHelper.
PersisterHelper
Adds types to mapping builders.
Adds types to EntityListenerResolver.
EntityListenerResolver
Adds types to ProxyFactory.
ProxyFactory
Resolves QueryBuilder deprecations.
QueryBuilder
Shows Expr::countDistinct() and Expr::concat() use variable-length argument lists.
Expr::countDistinct()Expr::concat()
Migrates part of the tools namespace to PHP 8 syntax.
Migrates more code to PHP 8.
Stops allowing identity columns emulation.
Makes setter parameters mandatory.
Requires a new argument to joinColumnName().
joinColumnName()
Makes UnderscoreNamingStrategy number-aware only.
UnderscoreNamingStrategy
Adds native types to reflection property classes.
Splits TreeWalker and SqlWalker.
TreeWalkerSqlWalker
Adds native types to SQLFilter.
SQLFilter
Adds native types to EntityRepository.
EntityRepository
Adds native types to caches.
Adds native types to QueryBuilder.
QueryBuilder
Adds native types to persisters.
Adds more native types to entity manager implementations.
Adds native types to CacheLogger implementations.
CacheLogger
Adds native types to EntityHydrator.
EntityHydrator
Adds native types to console classes.
Adds native types to AbstractHydrator and child classes.
AbstractHydrator
Adds types to entity manager.
Stops using AbstractPlatform::canEmulateSchemas().
AbstractPlatform::canEmulateSchemas()
Fixes variadic args in Expr.
Expr
Inherits from homonym exception in parent package.
Removes schema visitors.
Extracts embedded class mapping into its own DTO.
Extracts discriminator column mapping into its own DTO.
Introduces a field mapping DTO.
Adds types to UnitOfWork.
UnitOfWork
Migrates persisters to PHP 8 syntax.
Migrates function nodes to PHP 8 syntax.
Adds types to Node::dispatch().
Node::dispatch()
Adds native types to QuoteStrategy classes.
Adds native types to ResultSetMapping.
ResultSetMapping
Fixes DBAL 4 compatibility.
Migrates classes with the fewest changes.
Migrates classes with the fewest changes to PHP 8.
Migrates Expr and Lexer to PHP 8 syntax.
ExprLexer
Migrates AST namespace to PHP 8 syntax.
Purges annotations.
Migrates to attributes.
Migrates Configuration to PHP 8 syntax.
Configuration
Migrates AbstractQuery and child classes to PHP 8.
AbstractQuery
Refactors ORMException into an interface.
ORMException
Uses native type declarations for naming strategies.
Migrates to the object API of JoinColumnMapping and JoinTableMapping.
JoinColumnMappingJoinTableMapping
Makes the join table name and join column name mandatory.
Migrates to the object API of AssociationMapping.
AssociationMapping
Reworks the association mapping hierarchy.
Migrates to the embedded class mapping object API.
Migrates to DiscriminatorColumnMapping's object API.
DiscriminatorColumnMapping
Uses Rector to migrate to the object API of FieldMapping.
FieldMapping
Extracts AssociationMapping into its own DTO.
AssociationMapping
Illegal attributes on embeddables now throw an exception instead of being ignored.
#[Column]#[Embedded]
EntityPersister::executeInserts() now returns void instead of an array of insert IDs.
Doctrine\ORM\Persister\Entity\EntityPersister::executeInserts()UnitOfWork::assignPostInsertId()
Lazy ghosts are always enabled; setLazyGhostObjectEnabled() and isLazyGhostObjectEnabled() are no-ops.
Doctrine\ORM\Configuration::setLazyGhostObjectEnabled()Doctrine\ORM\Configuration::isLazyGhostObjectEnabled()
Identity map collisions are always rejected; the related configuration methods are no-ops.
Doctrine\ORM\Configuration::setRejectIdCollisionInIdentityMap()Doctrine\ORM\Configuration::isRejectIdCollisionInIdentityMapEnabled()
Lifecycle callback mapping on embedded classes is now explicitly forbidden.
XmlDriver constructor's third argument is now a no-op because XML validation is always enabled.
Doctrine\ORM\Mapping\Driver\XmlDriver::__construct()Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriverDoctrine\ORM\ORMSetup::createXMLMetadataConfiguration()
AttributeDriver constructor's second argument is now a no-op because the new behavior is always enforced.
Doctrine\ORM\Mapping\Driver\AttributeDriver::__construct()
Overriding fields or associations inherited from parent entity classes now throws a MappingException.
MappingException
Undeclared entity inheritance now throws a MappingException.
MappingException
Changes the refresh() signatures on EntityManagerInterface, EntityManagerDecorator and UnitOfWork to add an optional LockMode|int|null $lockMode parameter defaulting to null.
EntityManagerInterface::refresh()EntityManagerDecorator::refresh()UnitOfWork::refresh()LockMode
Splits output walkers and tree walkers, changing the walker method set.
walkSimpleSelectExpression()walkAggregateExpression()walkGroupByClause()walkGroupByItem()walkDeleteClause()walkUpdateClause()walkUpdateItem()walkWhereClause()
Adds walker methods for conditional expressions, exists, collection, null, in, instanceof, literal and between nodes.
walkConditionalExpression()walkConditionalTerm()walkConditionalFactor()walkConditionalPrimary()walkExistsExpression()walkCollectionMemberExpression()walkEmptyCollectionComparisonExpression()walkNullComparisonExpression()
Makes setter parameters mandatory in OnClassMetadataNotFoundEventArgs and AbstractQuery cache setters; pass null instead of omitting.
Doctrine\ORM\Event\OnClassMetadataNotFoundEventArgs::setFoundMetadata()Doctrine\ORM\AbstractQuery::setHydrationCacheProfile()Doctrine\ORM\AbstractQuery::setResultCache()Doctrine\ORM\AbstractQuery::setResultCacheProfile()
Adds a $className argument to NamingStrategy::joinColumnName().
NamingStrategy::joinColumnName()
Turns Exception\ORMException into an interface and moves all its factory methods to dedicated exception classes.
Doctrine\ORM\ORMExceptionMissingMappingDriverImplementation::create()UnrecognizedField::byName()UnexpectedAssociationValue::create()InvalidOrientation::fromClassNameAndField()EntityManagerClosed::create()InvalidHydrationMode::fromMode()MismatchedEventManager::create()
Turns Cache\CacheException into an interface and moves its factory methods to dedicated cache exception classes.
Doctrine\ORM\Cache\CacheExceptionCannotUpdateReadOnlyCollection::fromEntityAndField()CannotUpdateReadOnlyEntity::fromEntity()NonCacheableEntity::fromEntity()NonCacheableEntityAssociation::fromEntityAndField()
Requires custom repository classes to extend EntityRepository, adding a missing type declaration for identifier generators.
ObjectRepositoryEntityRepository
Removes support for schema emulation; the ORM no longer emulates schemas on SQLite.
Removes code generators and the orm:convert-d1-schema and orm:convert-mapping console commands.
orm:convert-d1-schemaorm:convert-mapping
Makes the $criteria argument of Doctrine\ORM\EntityRepository::count() optional; child class overrides must be made compatible.
Doctrine\ORM\EntityRepository::count()$criteria
Replaces func_get_args() simulation with native variadics in Expr and QueryBuilder methods; overridden signatures must change.
Doctrine\ORM\Query\Expr#andX()Doctrine\ORM\Query\Expr#orX()Doctrine\ORM\QueryBuilder#select()Doctrine\ORM\QueryBuilder#addSelect()Doctrine\ORM\QueryBuilder#where()Doctrine\ORM\QueryBuilder#andWhere()Doctrine\ORM\QueryBuilder#orWhere()Doctrine\ORM\QueryBuilder#groupBy()
Migrates Internal namespace to PHP 8.
Migrates Tools/Schema* to PHP 8.0.
The orm:schema-tool:update --complete option is now a no-op since complete mode is always used.
orm:schema-tool:update--complete
Security1
Hardens CursorPaginator against security concerns.
CursorPaginator
Platform3
Requires PHP 8.1.
Drops support for PHP 7.4.
Bumps the required PHP version to 7.4.
Deprecated29
Introduces PaginatorInterface::HINT_ENABLE_DISTINCT and uses OffsetPaginator in tests.
PaginatorInterface::HINT_ENABLE_DISTINCTOffsetPaginator
Deprecates JoinColumns.
JoinColumns
Makes LockMode::NONE a no-op.
LockMode::NONE
Deprecates TypedExpression in favor of ExpressionWithReturnType.
TypedExpressionExpressionWithReturnType
Allows usage of SortDirection with attribute and PHP drivers.
SortDirection
Allows SortDirection usage inside OrderBy and QueryBuilder.
SortDirectionOrderByQueryBuilder
Leverages event manager interfaces.
Deprecates string default expressions.
Deprecates FieldMapping::$default.
FieldMapping::$default
Deprecates specifying nullable on primary key columns.
Stops using QueryBuilder::getRootAlias().
QueryBuilder::getRootAlias()
Adds deprecation messages for methods that were only annotated as being @deprecated.
Addresses the deprecation of default expressions.
Deprecates ClassMetadata::$reflFields.
ClassMetadata::$reflFields
Deprecates the proxy autoloader and class name resolver.
Provides an upgrade path to the new ORMSetup::create* signature.
ORMSetup::create*
Deprecates more proxies-related methods or calls.
Deprecates not using native lazy objects on PHP 8.4+.
Deprecates methods for configuring no longer configurable features.
Deprecates passing the same class with different discriminator values.
Deprecates DatabaseDriver.
DatabaseDriver
Deprecates the NotSupported exception.
NotSupported
Deprecates SequenceGenerator implementing Serializable.
SequenceGeneratorSerializable
Deprecates obsolete and unnecessary properties from the Table attribute.
Table
Deprecates the --complete option of orm:schema-tool:update.
orm:schema-tool:update--complete
Uses EnumReflectionProperty class from the persistence package.
EnumReflectionProperty
Translates a comment into code and annotations.
Deprecates array access.
Deprecates annotation classes for named queries.