-
-
Notifications
You must be signed in to change notification settings - Fork 841
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
fix: return type should be iterable #5443
Conversation
... to match for example CollectionProvideres return type on pagination
@@ -29,5 +29,5 @@ interface ProviderInterface | |||
* | |||
* @return T|Pagination\PartialPaginatorInterface<T>|iterable<T>|null | |||
*/ | |||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null; | |||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|iterable|null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is breaking compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But regarding this it's not compatible
public function provide(Operation $operation, array $uriVariables = [], array $context = []): iterable |
we found our reasoning: #5024 |
Ok, thought that on the otherview Thx for information. |
Mhh actually it looks like a PHP issue php/php-src@bb79ef7
reopening this |
We need to find out what PHP's choice is for 8.3 if we should revert or not . but basically |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still an issue. |
why @nesl247 ? |
@soyuka I didn't see any changes made for this. Were there? |
why is this a problem? |
|
I don't get the issue as array and iterables should be compatible. Also not sure what PHP's decision is for 8.3. I'm afraid that the fix is wrong regarding the types, when using |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
... to match for example CollectionProvideres return type on pagination