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

Apply round of code quality improvements from Rector #4038

Merged
merged 23 commits into from
May 20, 2024
Merged

Conversation

paul-m
Copy link
Contributor

@paul-m paul-m commented Oct 9, 2023

Use Drupal-Rector to do the following:

  • PHP 8.0 set list to add nice things like str_starts_with(), etc.
  • Find ‘dead code’, which means unused variables, easy return short-circuits, etc.
  • The Drupal 10 set list, which does things like ensure the $modules variable is protected in tests, etc.

Currently excludes data_dictionary_widget to avoid merge issues.

@paul-m paul-m marked this pull request as ready for review October 10, 2023 20:43
@paul-m paul-m marked this pull request as draft October 10, 2023 21:01
@paul-m paul-m added the 2.17 label Oct 10, 2023
Copy link
Member

@dafeder dafeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I think we'll hold off on merging till we have a 2.17 release ready, which will include PHP 8.2 support and dropping PHP 7.4

@janette janette added 2.18 and removed 2.17 labels Feb 7, 2024
@paul-m paul-m changed the title Use Rector's dead code fixer Use Rector's for code quality May 16, 2024
@paul-m paul-m changed the title Use Rector's for code quality Use Rector for code quality May 16, 2024
@paul-m paul-m marked this pull request as ready for review May 16, 2024 21:21
Copy link
Member

@dafeder dafeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready I think. Just one thing, I think the title/commit message is a little unclear. Can we make it something like "Apply round of code quality improvements from Rector" or something?

@paul-m paul-m changed the title Use Rector for code quality Apply round of code quality improvements from Rector May 20, 2024
@dafeder dafeder merged commit 30b8923 into 2.x May 20, 2024
10 checks passed
@dafeder dafeder deleted the rector-deadcode branch May 20, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants