Skip to content

[DependencyInjection] Fix linting factories implemented via __callStatic #58618

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

Conversation

KevinVanSonsbeek
Copy link
Contributor

@KevinVanSonsbeek KevinVanSonsbeek commented Oct 21, 2024

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

This PR is an extension of an old fix made back in #44710.
Factory calls to static methods handled by the __callStatic method currently throw the "Invalid service DYZ: method Class::method() does not exist".

@carsonbot

This comment was marked as resolved.

@KevinVanSonsbeek KevinVanSonsbeek changed the title Bugfix/#58614 method does not exist for call static factory [DependencyInjection] Bugfix/#58614 method does not exist for call static factory Oct 21, 2024
Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

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

The patch looks sensible although defining enums as services sounds like a bad idea.

@carsonbot carsonbot changed the title [DependencyInjection] Bugfix/#58614 method does not exist for call static factory Bugfix/#58614 method does not exist for call static factory Oct 22, 2024
@carsonbot carsonbot changed the title Bugfix/#58614 method does not exist for call static factory [DependencyInjection] Bugfix/#58614 method does not exist for call static factory Oct 22, 2024
@nicolas-grekas nicolas-grekas changed the title [DependencyInjection] Bugfix/#58614 method does not exist for call static factory [DependencyInjection] Fix linting factories implemented via __callStatic Oct 22, 2024
@nicolas-grekas nicolas-grekas force-pushed the bugfix/#58614-method-does-not-exist-for-callStatic-factory branch from ce67b78 to e2f69af Compare October 22, 2024 18:49
@nicolas-grekas nicolas-grekas merged commit 7f548a3 into symfony:5.4 Oct 22, 2024
11 of 12 checks passed
This was referenced Oct 27, 2024
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