Require doctrine/persistence 2

This allows us to remove autoload calls that are necessary for the
persistence 1 backwards-compatibility layer to work.
The require-dev constraints on doctrine/orm are bumped to ^2.7.3 because
lower versions are not compatible with doctrine/persistence 2.
This commit is contained in:
Grégoire Paris 2020-11-19 19:43:29 +01:00
parent c13d5b5053
commit 574a184b9a
No known key found for this signature in database
GPG Key ID: 24D48B8012B116BF
5 changed files with 4 additions and 11 deletions

View File

@ -19,7 +19,7 @@
"php": ">=7.2.5",
"ext-xml": "*",
"doctrine/event-manager": "~1.0",
"doctrine/persistence": "^1.3|^2",
"doctrine/persistence": "^2",
"twig/twig": "^2.10|^3.0",
"psr/cache": "~1.0",
"psr/container": "^1.0",
@ -116,7 +116,7 @@
"doctrine/collections": "~1.0",
"doctrine/data-fixtures": "^1.1",
"doctrine/dbal": "^2.10|^3.0",
"doctrine/orm": "~2.4,>=2.4.5",
"doctrine/orm": "^2.7.3",
"doctrine/doctrine-bundle": "^2.0",
"guzzlehttp/promises": "^1.3.1",
"masterminds/html5": "^2.6",

View File

@ -269,5 +269,3 @@ abstract class DoctrineType extends AbstractType implements ResetInterface
return $this->entityLoaders[$hash] ?? ($this->entityLoaders[$hash] = $this->getLoader($manager, $queryBuilder, $class));
}
}
interface_exists(ObjectManager::class);

View File

@ -96,5 +96,3 @@ class EntityType extends DoctrineType
return [$parameter->getName(), $parameter->getType(), $parameter->getValue()];
}
}
interface_exists(ObjectManager::class);

View File

@ -153,6 +153,3 @@ class EntityUserProvider implements UserProviderInterface, PasswordUpgraderInter
return $this->getObjectManager()->getClassMetadata($this->classOrAlias);
}
}
interface_exists(ObjectManager::class);
interface_exists(ObjectRepository::class);

View File

@ -18,7 +18,7 @@
"require": {
"php": ">=7.2.5",
"doctrine/event-manager": "~1.0",
"doctrine/persistence": "^1.3|^2",
"doctrine/persistence": "^2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.15",
@ -48,7 +48,7 @@
"doctrine/collections": "~1.0",
"doctrine/data-fixtures": "^1.1",
"doctrine/dbal": "^2.10|^3.0",
"doctrine/orm": "^2.6.3"
"doctrine/orm": "^2.7.3"
},
"conflict": {
"doctrine/dbal": "<2.10",