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

Use phpcs phar instead of the full distro #272

Merged
merged 6 commits into from
Feb 1, 2024
Merged

Use phpcs phar instead of the full distro #272

merged 6 commits into from
Feb 1, 2024

Conversation

spaze
Copy link
Owner

@spaze spaze commented Feb 1, 2024

Because it's less files and the 9P filesystem as used by WSL2 doesn't like many small files performance-wise. I also wanted to learn a bit more GitHub Actions to see if such thing would be possible, and it turns out it is.

Maybe one day PHPCS will see an official phar release, see PHPCSStandards/PHP_CodeSniffer#318 for some more info.

This required an update of my coding standard to omit setting installed_paths config in the ruleset file.

Also, the dealerdirect/phpcodesniffer-composer-installer plugin is removed because the custom phar distribution doesn't work with it now, reasons mentioned in the README. I had to install the slevomat/coding-standard manually and update the config file to use an absolute path, as documented.

spaze added 6 commits January 28, 2024 04:41
 - squizlabs/php_codesniffer removed (installed version was 3.8.1)

 - dealerdirect/phpcodesniffer-composer-installer removed (installed version was v1.0.0)

 - spaze/phpcs-phar installed in version 3.8.1
   Release notes: https://github.com/spaze/phpcs-phar/releases/tag/3.8.1
Not using the dealerdirect plugin because it doesn't work with the phar release, see why here https://github.com/spaze/phpcs-phar#installing-coding-standards

I've first installed the standard with
```
vendor/bin/phpcs --config-set installed_paths ../../slevomat/coding-standard
```
and then edited the file to add `__DIR__` and more as described here https://github.com/spaze/phpcs-phar#modify-the-config-file
@spaze spaze self-assigned this Feb 1, 2024
@spaze spaze merged commit 73b82f2 into main Feb 1, 2024
32 checks passed
@spaze spaze deleted the spaze/phpcs-phar branch February 1, 2024 16:07
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.

1 participant