diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9eb8f0f..22b1a38 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,7 @@ jobs: JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }} strategy: matrix: - php-version: [ 8.1, 8.2 ] + php-version: [ 8.1, 8.2, 8.3 ] coverage: [ xdebug, none ] composer_flags: [ "--prefer-lowest", "" ] steps: @@ -77,7 +77,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: [ 8.1, 8.2 ] + php-version: [ 8.1, 8.2, 8.3 ] steps: - name: Checkout code uses: actions/checkout@v3 @@ -111,7 +111,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: [ 8.1, 8.2 ] + php-version: [ 8.1, 8.2, 8.3 ] steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/composer.json b/composer.json index 912ddb4..b403c30 100644 --- a/composer.json +++ b/composer.json @@ -35,26 +35,26 @@ "require" : { "php" : "^8.1", - "vimeo/psalm" : ">=5.15.0", - "phpmd/phpmd" : ">=2.14.1", - "phan/phan" : ">=5.4.2", - "povils/phpmnd" : ">=3.2.0", + "vimeo/psalm" : ">=5.20.0", + "phpmd/phpmd" : ">=2.15.0", + "phan/phan" : ">=5.4.3", + "povils/phpmnd" : ">=3.4.0", - "phpstan/phpstan" : ">=1.10.38", - "phpstan/phpstan-strict-rules" : ">=1.5.1", + "phpstan/phpstan" : ">=1.10.57", + "phpstan/phpstan-strict-rules" : ">=1.5.2", - "squizlabs/php_codesniffer" : ">=3.7.2", + "squizlabs/php_codesniffer" : ">=3.8.1", "phpmetrics/phpmetrics" : ">=2.8.2", - "pdepend/pdepend" : ">=2.15.1", + "pdepend/pdepend" : ">=2.16.2", - "symfony/yaml" : ">=4.4.16", - "symfony/console" : ">=4.4.16", - "symfony/finder" : ">=4.4.16", - "nikic/php-parser" : ">=4.17.1", + "symfony/yaml" : ">=6.4", + "symfony/console" : ">=6.4", + "symfony/finder" : ">=6.4", + "nikic/php-parser" : ">=4.18.0", - "friendsofphp/php-cs-fixer" : ">=3.35.1", - "kubawerlos/php-cs-fixer-custom-fixers" : ">=3.16.2", + "friendsofphp/php-cs-fixer" : ">=3.48.0", + "kubawerlos/php-cs-fixer-custom-fixers" : ">=3.19.2", "jbzoo/data" : "^7.1" }, @@ -62,7 +62,7 @@ "require-dev" : { "jbzoo/phpunit" : "^7.0", "jbzoo/utils" : "^7.1.1", - "symfony/var-dumper" : ">=4.4.16" + "symfony/var-dumper" : ">=6.4" }, "autoload" : { diff --git a/src/Makefiles/01_defines.Makefile b/src/Makefiles/01_defines.Makefile index 777aa1f..6f8841f 100644 --- a/src/Makefiles/01_defines.Makefile +++ b/src/Makefiles/01_defines.Makefile @@ -54,7 +54,7 @@ endif PHPCPD_PHAR ?= https://phar.phpunit.de/phpcpd.phar PHPLOC_PHAR ?= https://phar.phpunit.de/phploc.phar PHPCOV_PHAR ?= https://phar.phpunit.de/phpcov.phar -BOX_PHAR ?= https://github.com/box-project/box/releases/download/3.16.0/box.phar +BOX_PHAR ?= https://github.com/box-project/box/releases/download/4.5.1/box.phar PHP_COVERALLS_PHAR ?= https://github.com/php-coveralls/php-coveralls/releases/latest/download/php-coveralls.phar CO_DIFF_PHAR ?= https://github.com/JBZoo/Composer-Diff/releases/latest/download/composer-diff.phar CO_GRAPH_PHAR ?= https://github.com/JBZoo/Composer-Graph/releases/latest/download/composer-graph.phar diff --git a/src/PHPUnit/TraitGithubActions.php b/src/PHPUnit/TraitGithubActions.php index ef0adf2..0f322da 100644 --- a/src/PHPUnit/TraitGithubActions.php +++ b/src/PHPUnit/TraitGithubActions.php @@ -17,7 +17,7 @@ namespace JBZoo\Codestyle\PHPUnit; use function JBZoo\Data\yml; -use function JBZoo\PHPUnit\isTrue; +use function JBZoo\PHPUnit\isSame; /** * @phan-file-suppress PhanUndeclaredProperty @@ -29,6 +29,10 @@ public function testGithubActionsWorkflow(): void $mailYmlPath = PROJECT_ROOT . '/.github/workflows/main.yml'; $actual = yml($mailYmlPath)->getArrayCopy(); + isSame(120, $actual['env']['COLUMNS']); + isSame('Hyper', $actual['env']['TERM_PROGRAM']); + unset($actual['env']); + // General Parameters $expectedOs = 'ubuntu-latest'; @@ -41,11 +45,6 @@ public function testGithubActionsWorkflow(): void 'schedule' => [['cron' => $this->getScheduleMinute()]], ], - 'env' => [ - 'COLUMNS' => 120, - 'TERM_PROGRAM' => 'Hyper', - ], - 'jobs' => [ 'phpunit' => [ 'name' => 'PHPUnit', @@ -114,16 +113,19 @@ public function testGithubActionsWorkflow(): void $expectedYaml = self::toYaml($expected); $actualYaml = self::toYaml($actual); - isTrue( - \str_contains($actualYaml, $expectedYaml), - \implode("\n", [ - 'Expected Yaml file:', - "See: {$mailYmlPath}", - '----------------------------------------', + if (!\str_contains($actualYaml, $expectedYaml)) { + isSame( $expectedYaml, - '----------------------------------------', - ]), - ); + $actualYaml, + \implode("\n", [ + 'Expected Yaml file:', + "See: {$mailYmlPath}", + '----------------------------------------', + $expectedYaml, + '----------------------------------------', + ]), + ); + } } protected function getScheduleMinute(): string @@ -156,7 +158,7 @@ protected static function checkoutStep(string $jobName): array protected static function phpVersions(): array { - return [8.1, 8.2]; + return [8.1, 8.2, 8.3]; } /**