Skip to content

[Task] Warn about upcoming methods in Element Resolver Interfaces#125

Open
kingjia90 wants to merge 2 commits into3.xfrom
warn-inherited-properties
Open

[Task] Warn about upcoming methods in Element Resolver Interfaces#125
kingjia90 wants to merge 2 commits into3.xfrom
warn-inherited-properties

Conversation

@kingjia90
Copy link
Contributor

@kingjia90 kingjia90 commented Feb 17, 2026

Changes in this pull request

Related #124
Part of #118

Additional info

@kingjia90 kingjia90 added this to the 3.5.0 milestone Feb 17, 2026
@codacy-production
Copy link

codacy-production bot commented Feb 17, 2026

Codacy's Analysis Summary

12 new issues (≤ 0 high issue)
0 new security issue (≤ 0 issue)
0 complexity
0 duplications

Review Pull Request in Codacy →

AI Reviewer available: add the codacy-review label to get contextual insights without leaving GitHub.

@sonarqubecloud
Copy link

public function locateDaoClass(string $modelClass): ?string;

// BC-Break: This method will be introduced in v4.0.0
// public function getGetInheritedProperties(): bool;
Copy link
Contributor

@jdreesen jdreesen Feb 17, 2026

Choose a reason for hiding this comment

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

Symfony adds such new methods to the class as PHPDoc via @method bool getGetInheritedProperties().

This way, they are recognized by the IDE, PHPStan, etc.

See, e.g., https://github.com/symfony/symfony/pull/53998/changes#diff-4412ea6a8e82d6b291607b14e89869f152887f0cf57efdf97b5908f82ebc8e21R17

Copy link
Contributor Author

@kingjia90 kingjia90 Feb 17, 2026

Choose a reason for hiding this comment

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

ahh perfect! Thank you for the tip
i was thinking and looking for something like this to be consistent and aligned to Symfony too.

Copy link
Contributor Author

@kingjia90 kingjia90 Feb 17, 2026

Choose a reason for hiding this comment

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

but doesn't it gives a false impression the method already exists (eg. like a magic method)? i was afraid that Phpstan would complain about it

Copy link
Contributor Author

@kingjia90 kingjia90 Feb 17, 2026

Choose a reason for hiding this comment

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

also considered a @deprecation to use interface without the mentioned methods or so, but without a replacement, seems improper to use it

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.

2 participants

Comments