Skip to content
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

Emit deprecation for LifecycleEventArgs::getEntity #281

Merged
merged 1 commit into from
Apr 14, 2022
Merged

Conversation

malarzm
Copy link
Member

@malarzm malarzm commented Apr 14, 2022

The method itself had @deprecated on it for a long time

@malarzm malarzm added this to the 2.5.1 milestone Apr 14, 2022
@@ -41,6 +42,13 @@ public function __construct($object, ObjectManager $objectManager)
*/
public function getEntity()
{
Deprecation::trigger(
'doctrine/persistence',
'https://github.com/doctrine/persistence/pull/281',
Copy link
Member

@greg0ire greg0ire Apr 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's refer to the original PR or issue instead? It was before PRs were used, but we still could use the link to the commit I suppose: aca6f03 It does not explain much, so I let you judge what is best.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to, but simple annotation led me to code migration 🙈 I'll dig further

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeaaah, deprecated for 10 years now! aca6f03

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, there was a split!

greg0ire
greg0ire previously approved these changes Apr 14, 2022
The method itself had `@deprecated` on it for a long time
@greg0ire greg0ire enabled auto-merge April 14, 2022 21:47
@greg0ire greg0ire merged commit 4473480 into 2.5.x Apr 14, 2022
@greg0ire greg0ire deleted the malarzm-patch-2 branch April 14, 2022 21:47
@greg0ire
Copy link
Member

Thanks @malarzm !

@Ocramius
Copy link
Member

This really didn't need runtime behaviour additions: it was fully statically verifiable.

@malarzm
Copy link
Member Author

malarzm commented Apr 18, 2022

It'd be weird that we emit deprecations for everything but this one tho :)

@Ocramius
Copy link
Member

Yikes, it's gone awfully sideways then 😱

@greg0ire
Copy link
Member

@Ocramius what's so wrong about having the deprecation reported through both mechanisms? https://www.doctrine-project.org/policies/deprecation.html clearly needs a refresh, so now would be a good time to have a discussion about this.

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.

4 participants