From b2cca054021dadffdccd41b7997c7cd32950d053 Mon Sep 17 00:00:00 2001 From: AaronGilMartinez Date: Tue, 24 Sep 2024 15:32:30 +0200 Subject: [PATCH 1/4] OEL-3318: Set broader constraints for composer, and update CI matrix. --- .github/workflows/ci.yml | 9 +++++++-- composer.json | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3ec0e0..65f6206 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,12 +7,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - PHP_VERSION: [ "8.0", "8.1" ] + ROBO_VERSION: [ "4.0", "5.0" ] + PHP_VERSION: [ "8.2", "8.3", "8.0", "8.1" ] + exclude: + - ROBO_VERSION: "5.0" + PHP_VERSION: [ "8.0", "8.1" ] steps: - uses: actions/checkout@v2 - uses: php-actions/composer@v6 with: - php_version: ${{ matrix.php_version }} + command: "require consolidation/robo:~${{ matrix.ROBO_VERSION }}" + php_version: ${{ matrix.PHP_VERSION }} version: 2 - uses: php-actions/phpunit@v3 diff --git a/composer.json b/composer.json index 6467db6..2e4cccf 100644 --- a/composer.json +++ b/composer.json @@ -10,12 +10,12 @@ } ], "require": { - "consolidation/robo": "^4.0" + "consolidation/robo": "^4.0 || ^5.0" }, "require-dev": { "drupal/coder": "^8.3.16", "phpunit/phpunit": "^9.5.5", - "phpro/grumphp": "^1.14" + "phpro/grumphp": "^1.14 || ^2.6" }, "autoload": { "psr-4": { From 2aad61197e7226c1e15355f3d548fbc8a03163a6 Mon Sep 17 00:00:00 2001 From: AaronGilMartinez Date: Tue, 24 Sep 2024 15:54:12 +0200 Subject: [PATCH 2/4] OEL-3318: Set static methods for data providers. --- tests/TaskTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/TaskTest.php b/tests/TaskTest.php index 702a39a..e2c9665 100644 --- a/tests/TaskTest.php +++ b/tests/TaskTest.php @@ -146,7 +146,7 @@ public function testProcess($config_file, $source_file, $processed_file) { * @return array * Test data. */ - public function appendTestProvider() { + public static function appendTestProvider() { return [ ['1-config.yml', '1-input.php', '1-output-append.php'], ['2-config.yml', '2-input.php', '2-output-append.php'], @@ -159,7 +159,7 @@ public function appendTestProvider() { * @return array * Test data. */ - public function prependTestProvider() { + public static function prependTestProvider() { return [ ['1-config.yml', '1-input.php', '1-output-prepend.php'], ['2-config.yml', '2-input.php', '2-output-prepend.php'], @@ -172,7 +172,7 @@ public function prependTestProvider() { * @return array * Test data. */ - public function writeTestProvider() { + public static function writeTestProvider() { return [ ['3-config.yml', '3-output-write.php'], ]; From 3144dccdcaffb2386e55e3bad54ea454e4de7448 Mon Sep 17 00:00:00 2001 From: AaronGilMartinez Date: Tue, 24 Sep 2024 16:13:10 +0200 Subject: [PATCH 3/4] OEL-3318: Remove suffix. --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65f6206..f9c85b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,10 +8,12 @@ jobs: strategy: matrix: ROBO_VERSION: [ "4.0", "5.0" ] - PHP_VERSION: [ "8.2", "8.3", "8.0", "8.1" ] - exclude: - - ROBO_VERSION: "5.0" - PHP_VERSION: [ "8.0", "8.1" ] + PHP_VERSION: [ "8.2", "8.3" ] + include: + - ROBO_VERSION: "4.0" + PHP_VERSION: "8.0" + - ROBO_VERSION: "4.0" + PHP_VERSION: "8.1" steps: - uses: actions/checkout@v2 @@ -21,3 +23,5 @@ jobs: php_version: ${{ matrix.PHP_VERSION }} version: 2 - uses: php-actions/phpunit@v3 + with: + test_suffix: FALSE From d7c5b5b7bc917052378343f7f35ee1cee7392750 Mon Sep 17 00:00:00 2001 From: AaronGilMartinez Date: Thu, 26 Sep 2024 17:34:02 +0200 Subject: [PATCH 4/4] OEL-3318: Set minimum version for grumphp. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2e4cccf..51a0e33 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "require-dev": { "drupal/coder": "^8.3.16", "phpunit/phpunit": "^9.5.5", - "phpro/grumphp": "^1.14 || ^2.6" + "phpro/grumphp": "^1.14 || ^2.3" }, "autoload": { "psr-4": {