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

Upgrade to php-cs-fixer 3.14.4, adjust phpcs rules/code to match. #2729

Merged
merged 2 commits into from Feb 28, 2023

Conversation

demiankatz
Copy link
Member

@demiankatz demiankatz commented Feb 24, 2023

The latest release of php-cs-fixer indents case statements according to PSR-12, which differs from the PEAR expectations of PHP_CodeSniffer. Since PSR-12 is a more current standard, it seems sensible to comply with it, so this PR adjust the code according to the new php-cs-fixer behavior and turns off the PHP_CodeSniffer rules that are triggered by the changes. It appears that PHP_CodeSniffer does include PSR-12 support, so a future project to investigate the consequences of changing PHP_CodeSniffer settings more comprehensively might be worthwhile.

Note that beyond the case changes, there are a few other minor adjustments -- php-cs-fixer also now de-indents "implements" in multi-line class declarations and removes more empty lines from functions.

Copy link
Contributor

@EreMaijala EreMaijala left a comment

Choose a reason for hiding this comment

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

First I found the de-indentation of implements odd, but it makes total sense with the multi-line implementsin PSR-12. So, looks good to me after digesting a bit. :)

@demiankatz demiankatz merged commit 5f5e3d7 into vufind-org:dev Feb 28, 2023
EreMaijala pushed a commit to EreMaijala/vufind that referenced this pull request Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants