Skip to content

[DoctrineBridge] try to fix deprecations from doctrine/persistence#34949

Merged
nicolas-grekas merged 1 commit intosymfony:3.4from
nicolas-grekas:doctrine-persistence
Dec 12, 2019
Merged

[DoctrineBridge] try to fix deprecations from doctrine/persistence#34949
nicolas-grekas merged 1 commit intosymfony:3.4from
nicolas-grekas:doctrine-persistence

Conversation

@nicolas-grekas
Copy link
Copy Markdown
Member

@nicolas-grekas nicolas-grekas commented Dec 12, 2019

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. already the case.

/cc @greg0ire @alcaeus FYI

* @return ORMQueryBuilderLoader
*/
public function getLoader(ObjectManager $manager, $queryBuilder, $class)
public function getLoader(LegacyObjectManager $manager, $queryBuilder, $class)
Copy link
Copy Markdown
Member Author

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

* @author Lukas Kahwe Smith <smith@pooteeweet.org>
*/
abstract class ManagerRegistry extends AbstractManagerRegistry implements ContainerAwareInterface
abstract class ManagerRegistry extends LegacyAbstractManagerRegistry implements ContainerAwareInterface
Copy link
Copy Markdown
Member Author

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

* @author Fabien Potencier <fabien@symfony.com>
*/
interface RegistryInterface extends ManagerRegistryInterface
interface RegistryInterface extends LegacyManagerRegistry
Copy link
Copy Markdown
Member Author

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

}

public function setRepository(EntityManagerInterface $entityManager, $entityName, ObjectRepository $repository)
public function setRepository(EntityManagerInterface $entityManager, $entityName, LegacyObjectRepository $repository)
Copy link
Copy Markdown
Member Author

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

}

public function load(ObjectManager $manager)
public function load(LegacyObjectManager $manager)
Copy link
Copy Markdown
Member Author

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

* @return EntityLoaderInterface
*/
abstract public function getLoader(ObjectManager $manager, $queryBuilder, $class);
abstract public function getLoader(LegacyObjectManager $manager, $queryBuilder, $class);
Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Member Author

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

nicolas-grekas added a commit that referenced this pull request Dec 12, 2019
…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
@nicolas-grekas nicolas-grekas merged commit 53a4711 into symfony:3.4 Dec 12, 2019
@nicolas-grekas nicolas-grekas deleted the doctrine-persistence branch December 12, 2019 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants