Skip to content
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

Declare type configs #184

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Declare type configs #184

wants to merge 17 commits into from

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
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.

None yet

2 participants