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

Process deprecation of FieldDescriptionInterface::getTargetEntity() #6187

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

jorrit
Copy link
Contributor

@jorrit jorrit commented Jul 8, 2020

Subject

It seems that the change from getTargetEntity() to getTargetModel() in #6108 was not fully implemented in the rest of the code. This changeset fixes some deprecation notices I get on runtime and some notices about test classes not implementing FieldDescriptionInterface.

Changelog

I think this internal change does not need a changelog entry.

@jorrit jorrit force-pushed the gettargetentitydeprecated branch from 0838d51 to d836851 Compare July 8, 2020 11:58
Copy link
Member

@phansys phansys left a comment

Choose a reason for hiding this comment

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

Good catch @jorrit!

tests/Fixtures/Admin/FieldDescription.php Outdated Show resolved Hide resolved
@phansys phansys added the patch label Jul 8, 2020
Copy link
Member

@phansys phansys left a comment

Choose a reason for hiding this comment

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

I guess it's RTM. Please, squash your commits.

@jorrit jorrit force-pushed the gettargetentitydeprecated branch from 95e9fbf to 7212e3d Compare July 8, 2020 12:17
@jordisala1991
Copy link
Member

To fix the build you need to trigger it again. it was a problem with the latest version of prophecy

@jorrit jorrit force-pushed the gettargetentitydeprecated branch from 7212e3d to 86ccd4d Compare July 8, 2020 13:22
@jorrit jorrit force-pushed the gettargetentitydeprecated branch from 86ccd4d to 08d828c Compare July 8, 2020 13:25
@phansys phansys merged commit 933ad7c into sonata-project:3.x Jul 8, 2020
@phansys
Copy link
Member

phansys commented Jul 8, 2020

Thank you @jorrit!

@jorrit jorrit deleted the gettargetentitydeprecated branch July 9, 2020 06:19
@franmomu
Copy link
Member

franmomu commented Jul 17, 2020

Hi, this PR should be reverted since FieldDescriptionInterface::getTargetModel is not yet in the interface, so there is no need to implement it yet, it's a BC break. Should be done in 4.x instead.

@jorrit
Copy link
Contributor Author

jorrit commented Jul 17, 2020

I see. The deprecation notices on runtime are unavoidable then? Perhaps the @deprecated annotation can be removed from FieldDescriptionInterface::getTargetEntity() while keeping NEXT_MAJOR: ... because in practice it is not possible to call getTargetModel().

@VincentLanglet
Copy link
Member

Hi, this PR should be reverted since FieldDescriptionInterface::getTargetModel is not yet in the interface, so there is no need to implement it yet, it's a BC break. Should be done in 4.x instead.

Indeed, @franmomu @jorrit can someone do the PR ?

@jordisala1991
Copy link
Member

Maybe we should check if the class implements the method, if not fallback to the old behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants