Skip to content

Conversation

@peterfox
Copy link
Collaborator

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.

@driftingly
Copy link
Owner

Thanks @peterfox 🙌
I like where this is going.

@peterfox peterfox self-assigned this Mar 2, 2024
@peterfox peterfox added the enhancement New feature or request label Mar 2, 2024
@peterfox peterfox force-pushed the feature/declare-type-configs branch from ab3d4c0 to a4b0806 Compare May 7, 2024 20:08
@peterfox peterfox force-pushed the feature/declare-type-configs branch from 1843d4d to c4e286c Compare September 21, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants