Skip to content

Commit

Permalink
fix: use now phpcsstandards instead of squizlabs (#27)
Browse files Browse the repository at this point in the history
* fix: use now phpcsstandards instead of squizlabs

* fix: use Github Actions instead of CircleCI

* fix: allow dealerdirect/phpcodesniffer-composer-installer

* fix: add strategy for lint
  • Loading branch information
babeuloula authored Dec 2, 2023
1 parent 4eea8d8 commit 01e3561
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 139 deletions.
138 changes: 0 additions & 138 deletions .circleci/config.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Code quality

on:
push:
branches:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
composer:
runs-on: ubuntu-latest

strategy:
matrix:
version: [ 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3 ]


steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache composer dependencies
uses: actions/cache@v3
with:
key: composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}-${{ matrix.version }}
restore-keys: composer-
path: vendor

- name: Install composer dependencies
uses: php-actions/composer@v6
with:
interaction: no
dev: yes
php_version: ${{ matrix.version }}
version: 2
args: --optimize-autoloader --no-scripts --ignore-platform-reqs

lint:
runs-on: ubuntu-latest

strategy:
matrix:
version: [ 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3 ]

needs: composer

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache composer dependencies
uses: actions/cache@v3
with:
key: composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}-${{ matrix.version }}
restore-keys: composer-
path: vendor

- name: Install PHP with extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}

- name: PHP Code Sniffer
run: make phpcs
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
},
"require": {
"php": "^7.2 || ^8.0",
"squizlabs/php_codesniffer": "^3.7.1",
"phpcsstandards/php_codesniffer": "^3.0",
"slevomat/coding-standard": "^8.0"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

1 comment on commit 01e3561

@jrfnl
Copy link

@jrfnl jrfnl commented on 01e3561 Dec 7, 2023

Choose a reason for hiding this comment

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

Thank you for your support and your enthousiasm embracing the take-over of the PHP_CodeSniffer package.

In contrast to earlier information, arrangements are now being made to allow the package to continue under its original name on Packagist. The commit (in the new repo) to rename the package has been reverted.

I'd recommend reverting the Composer reference changes and keeping the changes which refer to the repo URL on GitHub.

Sorry for the confusion and thank you for understanding. I hope you'll enjoy the 3.8.0 release, which I expect to release this Friday.

Please sign in to comment.