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

Enforce PSR-12 and organise imports on Winter CMS core files #1188

Draft
wants to merge 12 commits into
base: develop
Choose a base branch
from

Commits on Aug 23, 2024

  1. Enforce PSR-12 on Winter CMS core files

    This commit changes the PHP code sniffer to use PSR-12 rules, as that ruleset will pick up a lot of the code style issues being flagged in PRs recently.
    
    In order to set the baseline, all current core files have been reformatted to fit the ruleset.
    bennothommo committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    e7ebbb2 View commit details
    Browse the repository at this point in the history
  2. Additional code style fixes to improve future diffs and IDE support

    - Convert all aliases to qualified class names (mainly facades)
    - Reorder imports alphabetically
    - Ensure last item in array has a trailing comma
    - Strip out unused imports
    bennothommo committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    66bd3f3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dbf6019 View commit details
    Browse the repository at this point in the history
  4. Update GitHub Actions

    bennothommo committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    ce14395 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    87171ca View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e23c0b2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b2ffbe9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7b72f82 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2024

  1. Configuration menu
    Copy the full SHA
    2643609 View commit details
    Browse the repository at this point in the history
  2. Split off Winter CMS code style ruleset to its own XML

    This will allow us to use the ruleset in plugins as well
    bennothommo committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    52a824f View commit details
    Browse the repository at this point in the history
  3. Remove partial from exclusion list

    With new ruleset, it now passes
    bennothommo committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    a6b814b View commit details
    Browse the repository at this point in the history
  4. Add "winter:sniff" command

    This command will allow developers to check code style against the Winter CMS code style rules in both the core and installed plugins.
    bennothommo committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    236c459 View commit details
    Browse the repository at this point in the history