-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DoctrineBridge] try to fix deprecations from doctrine/persistence #34949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DoctrineBridge] try to fix deprecations from doctrine/persistence #34949
Conversation
0221a63
to
ef83802
Compare
ef83802
to
8070aa7
Compare
8070aa7
to
53a4711
Compare
@@ -51,7 +51,7 @@ public function configureOptions(OptionsResolver $resolver) | |||
* | |||
8000 * @return ORMQueryBuilderLoader | |||
*/ | |||
public function getLoader(ObjectManager $manager, $queryBuilder, $class) | |||
public function getLoader(LegacyObjectManager $manager, $queryBuilder, $class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing the type would be a BC break
@@ -22,7 +22,7 @@ | |||
* | |||
* @author Lukas Kahwe Smith <smith@pooteeweet.org> | |||
*/ | |||
abstract class ManagerRegistry extends AbstractManagerRegistry implements ContainerAwareInterface | |||
abstract class ManagerRegistry extends LegacyAbstractManagerRegistry implements ContainerAwareInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing the type would be a BC break
use Doctrine\ORM\EntityManager; | ||
|
||
/** | ||
* References Doctrine connections and entity managers. | ||
* | ||
* @author Fabien Potencier <fabien@symfony.com> | ||
*/ | ||
interface RegistryInterface extends ManagerRegistryInterface | ||
interface RegistryInterface extends LegacyManagerRegistry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing the type would be a BC break
@@ -40,15 +41,15 @@ public function getRepository(EntityManagerInterface $entityManager, $entityName | |||
return $this->repositoryList[$repositoryHash] = $this->createRepository($entityManager, $entityName); | |||
} | |||
|
|||
public function setRepository(EntityManagerInterface $entityManager, $entityName, ObjectRepository $repository) | |||
public function setRepository(EntityManagerInterface $entityManager, $entityName, LegacyObjectRepository $repository) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing the type would be a BC break
@@ -25,7 +25,7 @@ public function setContainer(ContainerInterface $container = null) | |||
$this->container = $container; | |||
} | |||
|
|||
public function load(ObjectManager $manager) | |||
public function load(LegacyObjectManager $manager) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing the type would be a BC break
@@ -273,7 +277,7 @@ public function configureOptions(OptionsResolver $resolver) | |||
* | |||
* @return EntityLoaderInterface | |||
*/ | |||
abstract public function getLoader(ObjectManager $manager, $queryBuilder, $class); | |||
abstract public function getLoader(LegacyObjectManager $manager, $queryBuilder, $class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing the type would be a BC break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it really? It's a class alias, so they are the same thing, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not when v1.2 is checked out
…ersistence (nicolas-grekas) This PR was merged into the 3.4 branch. Discussion ---------- [DoctrineBridge] try to fix deprecations from doctrine/persistence | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Follows doctrine/persistence#71 But the BC layer is not working yet, as highlighted by the `XXX` in the attached patch. At least for the corresponding interfaces, doctrine/persistence should always alias the legacy name to the new one. /cc @greg0ire @alcaeus FYI Commits ------- 53a4711 [DoctrineBridge] try to fix deprecations from doctrine/persistence
Follows doctrine/persistence#71
But the BC layer is not working yet, as highlighted by the
XXX
in the attached patch.At least for the corresponding interfaces, doctrine/persistence should always alias the legacy name to the new one.already the case./cc @greg0ire @alcaeus FYI