Still a work in progress but would love some early feedback.
Changes
deprecates two older rules for the new type declaration sets.
sets up a dir for tests for the type declaration sets.
adds new type declaration configs, one for eloquent, one for service container.
Why
One of the powerful things about Rector is being able to add type declarations. Laravel uses a lot of closures that users of the framework often won't type hint due to not knowing the correct types to apply. These configs make use of the rules I created in the base rector repo. This will allow for configs that define what types to apply to closures.
So far documented common eloquent type hints and service container ones.
Notes
Currently pointed at rector dev-main until a new release with the closure type hinting exists.
Still a work in progress but would love some early feedback.
Changes
Why
One of the powerful things about Rector is being able to add type declarations. Laravel uses a lot of closures that users of the framework often won't type hint due to not knowing the correct types to apply. These configs make use of the rules I created in the base rector repo. This will allow for configs that define what types to apply to closures.
So far documented common eloquent type hints and service container ones.
Notes
Currently pointed at rector dev-main until a new release with the closure type hinting exists.