Open joostdebruijn opened 17 hours ago
oh, I'm actually working on this. If someone else does not beat me to it, I'll create a PR.
@canvural if you mean you're working on a PR on this repository, it's always welcome. 😄
@canvural if you mean you're working on a PR on this repository, it's always welcome. 😄
Yeah exactly. But we'll need to convert it to configurable rule because we need to support both <Laravel11.15 and up.
In both Laravel (https://github.com/laravel/framework/pull/51851) as Larastan (https://github.com/larastan/larastan/pull/1990), the relation generics have been updated. Running the AddGenericReturnTypeToRelationsRector doesn't add the generic return types correctly anymore and even suggests to remove the correct ones. For example:
I had a look at the implementation of the Rector rule but as of now I'm not confident enough how to fix the rule in the right way.