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

Add "clean" command #53

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add "clean" command #53

wants to merge 6 commits into from

Conversation

patinthehat
Copy link
Collaborator

@patinthehat patinthehat commented Feb 12, 2024

This PR borrows and extends code from spatie/ray to implement a rector/rector rule for removing calls to ray(), rd(), Ray::* and ->ray().

It adds a clean subcommand to the x-ray command:

x-ray clean <path> [--dry-run]

The clean command uses rector to remove references to the functions/methods listed above. In the original spatie/ray code, some of the possible functions/methods weren't accounted for; this PR updates the code to account for all possible ray references.

This PR also bumps several dependency versions, drops support for PHP versions below 8.1 and drops symfony/* support for versions below 6.x. As such, a new major version release is likely best for releasing the functionality in this PR.


The ultimate objective for this PR is to remove the related functionality from spatie/ray to keep concerns separate; I believe that this functionality belongs in the spatie/x-ray package instead of the spatie/ray package. The ray package should only contain functionality related to Ray, in our opinion.

ping @freekmurze - any thoughts on this?

@patinthehat patinthehat marked this pull request as ready for review February 12, 2024 08:14
@freekmurze
Copy link
Member

Looks good to me, but still want to keep it in the ray package as well, so people don't need to install an extra dependency to be able to use this.

@patinthehat
Copy link
Collaborator Author

@freekmurze Thanks! I'll open a PR on spatie/ray with the rector code updates I added.

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.

None yet

2 participants