Skip to content

[PropertyInfo] Skip extractors that do not implement getType #57363

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

Closed
wants to merge 1 commit into from
Closed

[PropertyInfo] Skip extractors that do not implement getType #57363

wants to merge 1 commit into from

Conversation

llupa
Copy link
Contributor

@llupa llupa commented Jun 10, 2024

Q A
Branch? 7.1
Bug fix? yes
New feature? no
Deprecations? yes
Issues Fix #57360
License MIT

@llupa
Copy link
Contributor Author

llupa commented Jun 10, 2024

I did not put any update on .md files because I will wait for a feedback from the team first. Thanks! 👍

if (!method_exists($extractor, $method)) {
trigger_deprecation('symfony/property-info', '7.1', 'Not implementing the "%s()" method in class "%s" is deprecated."', $method, $extractor::class);

continue;
Copy link
Member

Choose a reason for hiding this comment

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

This does not look like the right solution to me as it means that a formerly used extractor will now no longer be used leading to a (potentially) different result.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I completely agree. I tried to put a message somewhere several times, but I was undecided and thought to have the PR rolling to have more feedback / ideas.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, I thought about strictly checking for getType and have it default to getTypes and it would work for return values that have only 1 Type in the return array of getTypes. I think this change was done before: #54694. Most of the code in property-info thinks BIGINT is string and not this dual type scenario.

Copy link
Member

@xabbuh xabbuh Jun 19, 2024

Choose a reason for hiding this comment

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

see #57459 for another attempt

@nicolas-grekas
Copy link
Member

Closing in favor of #57459
Thanks for submitting.

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