Skip to content

Conversation

rincler
Copy link

@rincler rincler commented May 15, 2025

Closes #520

@rincler
Copy link
Author

rincler commented May 16, 2025

@template TEntity of object

doesn't work for \Cycle\ORM\Iterator :(

Psalm emits the issues:

<file name="src/Iterator.php">
 <error line="123" column="16" severity="error" message="MixedReturnStatement: Could not infer a return type"/>
</file>
<file name="src/Relation/ManyToMany.php">
 <error line="148" column="24" severity="error" message="InvalidArgument: Argument 1 of SplObjectStorage::offsetSet expects never, but array-key|object provided"/>
</file>
<file name="src/Relation/ManyToMany.php">
 <error line="148" column="24" severity="error" message="InvalidArgument: Argument 1 of SplObjectStorage::offsetGet expects never, but array-key|object provided"/>
</file>
<file name="src/Relation/ManyToMany.php">
 <error line="[31](https://github.com/rincler/orm/actions/runs/15075752236/job/42382664586#step:11:32)9" column="24" severity="error" message="InvalidArgument: Argument 1 of SplObjectStorage::offsetSet expects never, but array-key|object provided"/>
</file>
<file name="src/Relation/ManyToMany.php">
 <error line="319" column="24" severity="error" message="InvalidArgument: Argument 1 of SplObjectStorage::offsetGet expects never, but array-key|object provided"/>
</file>
<file name="src/Select.php">
 <error line="395" column="16" severity="error" message="InvalidReturnType: The declared return type &apos;Cycle\ORM\Iterator&lt;TEntity:Cycle\ORM\Select as object&gt;&apos; for Cycle\ORM\Select::getIterator is incorrect, got &apos;Cycle\ORM\Iterator&apos;"/>
</file>
<file name="src/Select.php">
 <error line="[40](https://github.com/rincler/orm/actions/runs/15075752236/job/42382664586#step:11:41)2" column="16" severity="error" message="InvalidReturnStatement: The inferred type &apos;Cycle\ORM\Iterator&apos; does not match the declared return type &apos;Cycle\ORM\Iterator&lt;TEntity:Cycle\ORM\Select as object&gt;&apos; for Cycle\ORM\Select::getIterator"/>
</file>

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.

Minor: RepositoryInterface generic
1 participant