Skip to content

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

Closed
kingjia90 wants to merge 2 commits into
3.xfrom
warn-inherited-properties
Closed

kingjia90 wants to merge 2 commits into
3.xfrom
warn-inherited-properties

Conversation

@kingjia90

@kingjia90 kingjia90 commented Feb 17, 2026 •

Copy link
Copy Markdown
Contributor

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

codacy-production Bot commented Feb 17, 2026 •

Copy link
Copy Markdown

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
Copy Markdown

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

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

@jdreesen jdreesen Feb 17, 2026 •

Copy link
Copy Markdown
Contributor

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

@kingjia90 kingjia90 Feb 17, 2026 •

Copy link
Copy Markdown
Contributor Author

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.

@kingjia90 kingjia90 Feb 17, 2026 •

Copy link
Copy Markdown
Contributor Author

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

@kingjia90 kingjia90 Feb 17, 2026 •

Copy link
Copy Markdown
Contributor Author

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

@kingjia90 kingjia90 removed this from the 3.5.0 milestone Feb 19, 2026
@kingjia90

Copy link
Copy Markdown
Contributor Author

Closing, as there won't be any minor release anymore, just a major without anticipation or warn about the upcoming BC-break

@kingjia90 kingjia90 closed this Feb 19, 2026
@kingjia90
kingjia90 deleted the warn-inherited-properties branch February 19, 2026 10:02
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 19, 2026
@pimcore pimcore unlocked this conversation Feb 19, 2026
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.

3 participants