Skip to content

Fix invalid interface implementation by dynamic return type #178

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

Merged
merged 4 commits into from
Mar 28, 2025

Conversation

sascha-egerer
Copy link
Owner

@sascha-egerer sascha-egerer commented Feb 24, 2025

The object storage offsetGet() is not compatible with the
ArrayAccess interface but does some TYPO3 sepcific stuff.
We can't set the correct return type via a stub as phpstan
will complain that the return type is not compatible with
the interface.
To work around this we have to implement a dynamic return
type extension again.

@sascha-egerer sascha-egerer force-pushed the bugfix/fix-object-storage-template branch from 16f8be9 to efe1351 Compare February 24, 2025 15:23
@oliverklee oliverklee changed the title Fix ObjectStorage and QueryResultItnerface template in stub Fix ObjectStorage and QueryResultInterface template in stub Feb 24, 2025
@sascha-egerer sascha-egerer force-pushed the bugfix/fix-object-storage-template branch 3 times, most recently from 69c8e34 to c829e53 Compare February 24, 2025 20:42
@sascha-egerer sascha-egerer changed the title Fix ObjectStorage and QueryResultInterface template in stub Fix invalid interface implementation by dynamic return type Feb 24, 2025
@sascha-egerer sascha-egerer marked this pull request as draft February 25, 2025 15:42
@sascha-egerer sascha-egerer marked this pull request as ready for review February 26, 2025 20:34
The object storage offsetGet() is not compatible with the
ArrayAccess interface but does some TYPO3 sepcific stuff.
We can't set the correct return type via a stub as phpstan
will complain that the return type is not compatible with
the interface.
To work around this we have to implement a dynamic return
type extension again.
@sascha-egerer sascha-egerer force-pushed the bugfix/fix-object-storage-template branch from 1b27922 to 45f4b20 Compare March 28, 2025 10:50
@sascha-egerer sascha-egerer merged commit b1c8f18 into main Mar 28, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant