diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 484774a..3df4f2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,6 @@ jobs: fail-fast: false matrix: php-version: [ - '8.1', '8.2', '8.3', ] @@ -26,7 +25,7 @@ jobs: uses: shivammathur/setup-php@2.27.0 with: php-version: ${{ matrix.php-version }} - extensions: mbstring, intl, pdo_mysql + extensions: mbstring, intl, pdo_mysql, xdebug - name: Validate composer.json and composer.lock run: composer validate @@ -37,7 +36,7 @@ jobs: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Composer cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} @@ -61,7 +60,6 @@ jobs: fail-fast: false matrix: php-version: [ - '8.1', '8.2', '8.3', ] @@ -91,8 +89,7 @@ jobs: run: composer install --prefer-dist --no-interaction --optimize-autoloader - name: Run tests - run: | - composer test + run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --only-summary-for-coverage-text tests - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 diff --git a/README.md b/README.md index 5125ecd..dd0a7b7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build Status](https://github.com/spryker-sdk/utils/workflows/CI/badge.svg?branch=master)](https://github.com/spryker-sdk/utils/actions?query=workflow%3ACI+branch%3Amaster) [![codecov](https://codecov.io/gh/spryker-sdk/utils/branch/master/graph/badge.svg?token=AVljwSGALQ)](https://codecov.io/gh/spryker-sdk/utils) [![Latest Stable Version](https://poser.pugx.org/spryker-sdk/utils/v/stable.svg)](https://packagist.org/packages/spryker-sdk/utils) -[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/) +[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.2-8892BF.svg)](https://php.net/) [![PHPStan](https://img.shields.io/badge/PHPStan-level%208-brightgreen.svg?style=flat)](https://phpstan.org/) ## Installation diff --git a/composer.json b/composer.json index 8e7b64b..52ce124 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "library", "license": "proprietary", "require": { - "php": ">=8.1", + "php": ">=8.2", "ext-mbstring": "*", "composer/semver": "^3.4", "symfony/filesystem": "^6.0.0", @@ -15,7 +15,7 @@ "require-dev": { "ext-zip": "*", "phpstan/phpstan": "^1.0.0", - "phpunit/phpunit": "^9.5.0", + "phpunit/phpunit": "^11.4.0", "spryker/code-sniffer": "^0.17.20" }, "autoload": { diff --git a/phpunit.xml b/phpunit.xml index c85b91f..0f16ee6 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,14 +1,29 @@ - + - + + + + tests + + + + - src/ + src - + diff --git a/tests/Utils/Infrastructure/Helper/SemanticVersionHelperTest.php b/tests/Utils/Infrastructure/Helper/SemanticVersionHelperTest.php index 09998ca..ed1eefb 100644 --- a/tests/Utils/Infrastructure/Helper/SemanticVersionHelperTest.php +++ b/tests/Utils/Infrastructure/Helper/SemanticVersionHelperTest.php @@ -30,7 +30,7 @@ public function testGetMajorVersion($value, ?int $expectedResult): void /** * @return array */ - public function getMajorVersionProvider(): array + public static function getMajorVersionProvider(): array { $validSemanticVersions = [ ['1.0.0', 1], diff --git a/tests/Utils/Infrastructure/Helper/StrHelperTest.php b/tests/Utils/Infrastructure/Helper/StrHelperTest.php index 3156815..1692f1e 100644 --- a/tests/Utils/Infrastructure/Helper/StrHelperTest.php +++ b/tests/Utils/Infrastructure/Helper/StrHelperTest.php @@ -17,7 +17,7 @@ class StrHelperTest extends TestCase /** * @return array */ - public function camelCaseToDashDataProvider(): array + public static function camelCaseToDashDataProvider(): array { return [ ['test-foo-bar', 'testFooBar', true], @@ -48,7 +48,7 @@ public function testCamelCaseToDash(string $expResult, string $value, bool $sepa /** * @return array */ - public function dashToCamelCaseDataProvider(): array + public static function dashToCamelCaseDataProvider(): array { return [ ['TestFooBar', 'test-foo-bar', true], diff --git a/tests/Utils/Infrastructure/Service/ProcessRunnerServiceTest.php b/tests/Utils/Infrastructure/Service/ProcessRunnerServiceTest.php index 3ad511c..c8dfac9 100644 --- a/tests/Utils/Infrastructure/Service/ProcessRunnerServiceTest.php +++ b/tests/Utils/Infrastructure/Service/ProcessRunnerServiceTest.php @@ -35,7 +35,7 @@ public function testRunReturnsProcessObject(array $command): void /** * @return array */ - public function commandDataProvider(): array + public static function commandDataProvider(): array { return [ [['ls']],