Skip to content

Commit

Permalink
PHP 8.3 + Update deps (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis authored Jan 27, 2024
1 parent d287cac commit 50c3261
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
30 changes: 15 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,34 @@
"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"
},

"require-dev" : {
"jbzoo/phpunit" : "^7.0",
"jbzoo/utils" : "^7.1.1",
"symfony/var-dumper" : ">=4.4.16"
"symfony/var-dumper" : ">=6.4"
},

"autoload" : {
Expand Down
2 changes: 1 addition & 1 deletion src/Makefiles/01_defines.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 18 additions & 16 deletions src/PHPUnit/TraitGithubActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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';

Expand All @@ -41,11 +45,6 @@ public function testGithubActionsWorkflow(): void
'schedule' => [['cron' => $this->getScheduleMinute()]],
],

'env' => [
'COLUMNS' => 120,
'TERM_PROGRAM' => 'Hyper',
],

'jobs' => [
'phpunit' => [
'name' => 'PHPUnit',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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];
}

/**
Expand Down

0 comments on commit 50c3261

Please sign in to comment.