Skip to content

Commit 2f9b313

Browse files
authored
Merge pull request #50 from veewee/php-85-upgrade
Upgrade to PHP 8.5 support
2 parents 409bb6a + bfee215 commit 2f9b313

File tree

17 files changed

+42
-50
lines changed

17 files changed

+42
-50
lines changed

.github/workflows/analyzers.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: [ '8.2', '8.3' ]
10+
php-versions: [ '8.3', '8.4', '8.5' ]
1111
composer-options: [ '--ignore-platform-req=php+' ]
1212
fail-fast: false
1313
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
@@ -23,4 +23,5 @@ jobs:
2323
- name: Install dependencies
2424
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
2525
- name: Run the tests
26-
run: ./vendor/bin/psalm
26+
run: ./vendor/bin/psalm --no-cache
27+
continue-on-error: ${{ matrix.php-versions == '8.5' }}

.github/workflows/code-style.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: [ '8.2', '8.3', '8.4' ]
10+
php-versions: [ '8.3', '8.4', '8.5' ]
1111
composer-options: [ '--ignore-platform-req=php+' ]
1212
fail-fast: false
1313
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
@@ -23,4 +23,4 @@ jobs:
2323
- name: Install dependencies
2424
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
2525
- name: Run the tests
26-
run: PHP_CS_FIXER_IGNORE_ENV=1 ./tools/php-cs-fixer.phar fix --dry-run
26+
run: PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --dry-run

.github/workflows/tests.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: [ '8.2', '8.3', '8.4' ]
10+
php-versions: [ '8.3', '8.4', '8.5' ]
1111
composer-options: [ '--ignore-platform-req=php+' ]
1212
dependency-preference: ['current', 'lowest', 'stable']
1313
fail-fast: false
@@ -25,4 +25,3 @@ jobs:
2525
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.dependency-preference == 'lowest' && '--prefer-lowest' || '' }} ${{ matrix.dependency-preference == 'stable' && '--prefer-stable' || '' }} ${{ matrix.composer-options }}
2626
- name: Run the tests
2727
run: ./vendor/bin/phpunit
28-
continue-on-error: ${{ matrix.php-versions == '8.4'}}

.phive/phars.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

composer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,26 @@
1313
}
1414
},
1515
"require": {
16-
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
16+
"php": "~8.3.0 || ~8.4.0 || ~8.5.0",
1717
"ext-dom": "*",
1818
"goetas-webservices/xsd-reader": "^0.4.11",
19-
"php-soap/engine": "^2.13",
20-
"php-soap/wsdl": "^1.10",
21-
"php-soap/xml": "^1.8.0",
19+
"php-soap/engine": "^2.16",
20+
"php-soap/wsdl": "^1.14",
21+
"php-soap/xml": "^1.9.0",
2222
"veewee/xml": "^3.0",
23-
"azjezz/psl": "^3.0",
23+
"azjezz/psl": "^3.0 || ^4.0",
2424
"symfony/console": "^5.4 || ^6.0 || ^7.0",
2525
"webmozart/assert": "^1.11",
2626
"php-tui/php-tui": "^0.2.1"
2727
},
2828
"require-dev": {
2929
"symfony/var-dumper": "^6.1 || ^7.0",
30-
"php-soap/engine-integration-tests": "^1.5.0",
30+
"php-soap/engine-integration-tests": "^1.10.0",
3131
"psalm/plugin-symfony": "^5.0",
3232
"php-standard-library/psalm-plugin": "^2.2",
33-
"vimeo/psalm": "^5.26",
34-
"phpunit/phpunit": "^10.1"
33+
"vimeo/psalm": "~6.13.0",
34+
"phpunit/phpunit": "~12.4.0",
35+
"php-cs-fixer/shim": "~3.88.0"
3536
},
3637
"license": "MIT",
3738
"authors": [

phpunit.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" bootstrap="tests/bootstrap.php"
4-
executionOrder="random" beStrictAboutOutputDuringTests="false" failOnRisky="true" failOnWarning="true"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="tests/bootstrap.php"
4+
executionOrder="random" beStrictAboutOutputDuringTests="true" failOnRisky="true" failOnWarning="true"
5+
displayDetailsOnTestsThatTriggerWarnings="true" failOnPhpunitWarning="true"
56
cacheDirectory=".phpunit.cache" requireCoverageMetadata="false" beStrictAboutCoverageMetadata="false">
67
<testsuites>
78
<testsuite name="unit">

psalm.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<psalm
33
errorLevel="1"
44
resolveFromConfigFile="true"
5+
findUnusedCode="false"
6+
ensureOverrideAttribute="false"
57
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
68
xmlns="https://getpsalm.org/schema/config"
79
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"

src/Console/UI/Components/MetaTable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use ReflectionProperty;
1616
use Throwable;
1717
use function Psl\Dict\filter_nulls;
18+
use function Psl\Json\encode;
1819
use function Psl\Vec\map;
1920

2021
final readonly class MetaTable
@@ -71,7 +72,7 @@ private static function tryStringifyValue(mixed $value): ?string
7172
{
7273
try {
7374
return match (true) {
74-
is_array($value) => json_encode($value, JSON_UNESCAPED_SLASHES),
75+
is_array($value) => encode($value, pretty: false, flags: JSON_UNESCAPED_SLASHES),
7576
is_bool($value) => $value ? 'true' : 'false',
7677
is_scalar($value) => (string)$value,
7778
$value instanceof Option => $value->map(self::tryStringifyValue(...))->unwrapOr(null),

src/Console/UI/Components/ScrollableTextAreaState.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use PhpTui\Term\MouseEventKind;
77
use Soap\WsdlReader\Console\UI\EventHandler;
88

9-
use function json_encode;
9+
use function Psl\Json\encode;
1010
use function Psl\Math\max;
1111
use function Psl\Math\min;
1212

@@ -21,7 +21,7 @@ public function __construct(
2121
public static function json(mixed $data, string $fallback): self
2222
{
2323
return new self(
24-
$data !== null ? json_encode($data, JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES) : $fallback,
24+
$data !== null ? encode($data, pretty: true, flags: JSON_UNESCAPED_SLASHES) : $fallback,
2525
);
2626
}
2727

src/Formatter/MetaTableFormatter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Symfony\Component\Console\Helper\Table;
1010
use Symfony\Component\Console\Output\OutputInterface;
1111
use Throwable;
12+
use function Psl\Json\encode;
1213
use function Psl\Vec\filter_nulls;
1314
use function Psl\Vec\map;
1415

@@ -56,7 +57,7 @@ private function tryStringifyValue(mixed $value): ?string
5657
{
5758
try {
5859
return match (true) {
59-
is_array($value) => json_encode($value, JSON_PRETTY_PRINT),
60+
is_array($value) => encode($value, pretty: true),
6061
is_bool($value) => $value ? 'true' : 'false',
6162
is_scalar($value) => (string)$value,
6263
$value instanceof Option => $value->map($this->tryStringifyValue(...))->unwrapOr(null),

0 commit comments

Comments
 (0)