|
1 | 1 | # Upgrade to 3.0
|
2 | 2 |
|
3 |
| -## BC BREAK: Repository classes have to extend `EntityRepository` |
| 3 | +## BC Break: `Exception\ORMException` is no longer a class, but an interface |
| 4 | + |
| 5 | +All methods in `Doctrine\ORM\ORMException` have been extracted to dedicated exceptions. |
| 6 | + |
| 7 | + * `missingMappingDriverImpl()` => `Exception\MissingMappingDriverImplementation::create()` |
| 8 | + * `unrecognizedField()` => `Persisters\Exception\UnrecognizedField::byName()` |
| 9 | + * `unexpectedAssociationValue()` => `Exception\UnexpectedAssociationValue::create()` |
| 10 | + * `invalidOrientation()` => `Persisters\Exception\InvalidOrientation::fromClassNameAndField()` |
| 11 | + * `entityManagerClosed()` => `Exception\EntityManagerClosed::create()` |
| 12 | + * `invalidHydrationMode()` => `Exception\InvalidHydrationMode::fromMode()` |
| 13 | + * `mismatchedEventManager()` => `Exception\MismatchedEventManager::create()` |
| 14 | + * `findByRequiresParameter()` => `Repository\Exception\InvalidMagicMethodCall::onMissingParameter()` |
| 15 | + * `invalidMagicCall()` => `Repository\Exception\InvalidMagicMethodCall::becauseFieldNotFoundIn()` |
| 16 | + * `invalidFindByInverseAssociation()` => `Repository\Exception\InvalidFindByCall::fromInverseSideUsage()` |
| 17 | + * `invalidResultCacheDriver()` => `Cache\Exception\InvalidResultCacheDriver::create()` |
| 18 | + * `notSupported()` => `Exception\NotSupported::create()` |
| 19 | + * `queryCacheNotConfigured()` => `QueryCacheNotConfigured::create()` |
| 20 | + * `metadataCacheNotConfigured()` => `Cache\Exception\MetadataCacheNotConfigured::create()` |
| 21 | + * `queryCacheUsesNonPersistentCache()` => `Cache\Exception\QueryCacheUsesNonPersistentCache::fromDriver()` |
| 22 | + * `metadataCacheUsesNonPersistentCache()` => `Cache\Exception\MetadataCacheUsesNonPersistentCache::fromDriver()` |
| 23 | + * `proxyClassesAlwaysRegenerating()` => `Exception\ProxyClassesAlwaysRegenerating::create()` |
| 24 | + * `invalidEntityRepository()` => `Exception\InvalidEntityRepository::fromClassName()` |
| 25 | + * `missingIdentifierField()` => `Exception\MissingIdentifierField::fromFieldAndClass()` |
| 26 | + * `unrecognizedIdentifierFields()` => `Exception\UnrecognizedIdentifierFields::fromClassAndFieldNames()` |
| 27 | + * `cantUseInOperatorOnCompositeKeys()` => `Persisters\Exception\CantUseInOperatorOnCompositeKeys::create()` |
| 28 | + |
| 29 | +## BC Break: `CacheException` is no longer a class, but an interface |
| 30 | + |
| 31 | +All methods in `Doctrine\ORM\Cache\CacheException` have been extracted to dedicated exceptions. |
| 32 | + |
| 33 | + * `updateReadOnlyCollection()` => `Cache\Exception\CannotUpdateReadOnlyCollection::fromEntityAndField()` |
| 34 | + * `updateReadOnlyEntity()` => `Cache\Exception\CannotUpdateReadOnlyEntity::fromEntity()` |
| 35 | + * `nonCacheableEntity()` => `Cache\Exception\NonCacheableEntity::fromEntity()` |
| 36 | + * `nonCacheableEntityAssociation()` => `Cache\Exception\NonCacheableEntityAssociation::fromEntityAndField()` |
| 37 | + |
| 38 | + |
| 39 | +## BC Break: Missing type declaration added for identifier generators |
4 | 40 |
|
5 | 41 | Although undocumented, it was possible to configure a custom repository
|
6 | 42 | class that implements `ObjectRepository` but does not extend the
|
|
0 commit comments