-
Notifications
You must be signed in to change notification settings - Fork 102
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
3.x: adjust annotations #954
Conversation
564dab6
to
283856a
Compare
283856a
to
d3cf7d6
Compare
39012ad
to
24e79f4
Compare
Had to ignore that stan issue because as you can see in https://github.com/cakephp/bake/actions/runs/6530648862/job/17730339754?pr=954#step:7:67 this will get generated with the lowest chronos version due to the fact, that it doesn't extend Datetime in that specific version |
$annotations[] = "@method \Cake\Datasource\ResultSetInterface<\\{$namespace}\\Model\\Entity\\{$entity}>|false saveMany(iterable \$entities, array \$options = [])"; | ||
$annotations[] = "@method \Cake\Datasource\ResultSetInterface<\\{$namespace}\\Model\\Entity\\{$entity}> saveManyOrFail(iterable \$entities, array \$options = [])"; | ||
$annotations[] = "@method \Cake\Datasource\ResultSetInterface<\\{$namespace}\\Model\\Entity\\{$entity}>|false deleteMany(iterable \$entities, array \$options = [])"; | ||
$annotations[] = "@method \Cake\Datasource\ResultSetInterface<\\{$namespace}\\Model\\Entity\\{$entity}> deleteManyOrFail(iterable \$entities, array \$options = [])"; |
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.
That doesn't look right to me. While those methods could return \Cake\Datasource\ResultSetInterface
, they generally return what they were fed with in the $entities
argument, which would be iterable<\Cake\Datasource\EntityInterface>
.
I think the point of additionally having \Cake\Datasource\ResultSetInterface
, was to account for the use-case of passing (modified) query results into these methods.
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.
Indeed, we could use iterable<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface
here
closes #946