Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.2', '8.3', '8.4', '8.5']
phpcs-versions: ['3', '4']

steps:
- name: Checkout code
Expand All @@ -46,6 +47,13 @@ jobs:
if [ "${{ matrix.php-versions }}" == "8.2" ]; then
composer require --dev phpunit/phpunit:^11 --no-update
fi
if [ "${{ matrix.phpcs-versions }}" == "3" ]; then
composer require squizlabs/php_codesniffer:^3.10 --no-update --with-all-dependencies
composer require --dev drupal/coder:^8.3 --no-update --with-all-dependencies
elif [ "${{ matrix.phpcs-versions }}" == "4" ]; then
composer require squizlabs/php_codesniffer:^4 --no-update --with-all-dependencies
composer require --dev drupal/coder:^9@alpha --no-update --with-all-dependencies
fi
composer install ${{ matrix.php-versions == '8.5' && '--ignore-platform-reqs' || '' }}

- name: Validate composer.json
Expand All @@ -70,7 +78,7 @@ jobs:
uses: actions/upload-artifact@v5
if: ${{ matrix.php-versions != '8.2' }}
with:
name: ${{github.job}}-code-coverage-report-${{ matrix.php-versions }}
name: ${{github.job}}-code-coverage-report-php${{ matrix.php-versions }}-phpcs${{ matrix.phpcs-versions }}
path: .logs
include-hidden-files: true
if-no-files-found: error
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"require": {
"php": ">=8.2",
"dealerdirect/phpcodesniffer-composer-installer": "^1",
"squizlabs/php_codesniffer": "^3.10"
"squizlabs/php_codesniffer": "^3.10 || ^4"
},
"require-dev": {
"alexskrypnyk/phpunit-helpers": "^0.13.0",
"drupal/coder": "^8.3",
"drupal/coder": "^8.3 || ^9@alpha",
"ergebnis/composer-normalize": "^2.42",
"phpstan/phpstan": "^2",
"phpunit/phpunit": "^12",
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/FunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function runPhpcs(string $file_path, array $expected_violations = []):
// Run phpcs using ProcessTrait.
$this->processRun(
$phpcs_bin,
['--standard=DrevOps', '--report=json', $file_path],
['--standard=DrevOps', '--report=json', '-q', $file_path],
timeout: 120
);

Expand Down