Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/analyzers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.2', '8.3' ]
php-versions: [ '8.3', '8.4', '8.5' ]
composer-options: [ '--ignore-platform-req=php+' ]
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
Expand All @@ -23,4 +23,5 @@ jobs:
- name: Install dependencies
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
- name: Run the tests
run: ./vendor/bin/psalm
run: ./vendor/bin/psalm --no-cache
continue-on-error: ${{ matrix.php-versions == '8.5' }}
4 changes: 2 additions & 2 deletions .github/workflows/code-style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.2', '8.3', '8.4' ]
php-versions: [ '8.3', '8.4', '8.5' ]
composer-options: [ '--ignore-platform-req=php+' ]
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
Expand All @@ -23,4 +23,4 @@ jobs:
- name: Install dependencies
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
- name: Run the tests
run: PHP_CS_FIXER_IGNORE_ENV=1 ./tools/php-cs-fixer.phar fix --dry-run
run: PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --dry-run
3 changes: 1 addition & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.2', '8.3', '8.4' ]
php-versions: [ '8.3', '8.4', '8.5' ]
composer-options: [ '--ignore-platform-req=php+' ]
dependency-preference: ['current', 'lowest', 'stable']
fail-fast: false
Expand All @@ -25,4 +25,3 @@ jobs:
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.dependency-preference == 'lowest' && '--prefer-lowest' || '' }} ${{ matrix.dependency-preference == 'stable' && '--prefer-stable' || '' }} ${{ matrix.composer-options }}
- name: Run the tests
run: ./vendor/bin/phpunit
continue-on-error: ${{ matrix.php-versions == '8.4'}}
4 changes: 0 additions & 4 deletions .phive/phars.xml

This file was deleted.

17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,26 @@
}
},
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
"php": "~8.3.0 || ~8.4.0 || ~8.5.0",
"ext-dom": "*",
"goetas-webservices/xsd-reader": "^0.4.11",
"php-soap/engine": "^2.13",
"php-soap/wsdl": "^1.10",
"php-soap/xml": "^1.8.0",
"php-soap/engine": "^2.16",
"php-soap/wsdl": "^1.14",
"php-soap/xml": "^1.9.0",
"veewee/xml": "^3.0",
"azjezz/psl": "^3.0",
"azjezz/psl": "^3.0 || ^4.0",
"symfony/console": "^5.4 || ^6.0 || ^7.0",
"webmozart/assert": "^1.11",
"php-tui/php-tui": "^0.2.1"
},
"require-dev": {
"symfony/var-dumper": "^6.1 || ^7.0",
"php-soap/engine-integration-tests": "^1.5.0",
"php-soap/engine-integration-tests": "^1.10.0",
"psalm/plugin-symfony": "^5.0",
"php-standard-library/psalm-plugin": "^2.2",
"vimeo/psalm": "^5.26",
"phpunit/phpunit": "^10.1"
"vimeo/psalm": "~6.13.0",
"phpunit/phpunit": "~12.4.0",
"php-cs-fixer/shim": "~3.88.0"
},
"license": "MIT",
"authors": [
Expand Down
5 changes: 3 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" bootstrap="tests/bootstrap.php"
executionOrder="random" beStrictAboutOutputDuringTests="false" failOnRisky="true" failOnWarning="true"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="tests/bootstrap.php"
executionOrder="random" beStrictAboutOutputDuringTests="true" failOnRisky="true" failOnWarning="true"
displayDetailsOnTestsThatTriggerWarnings="true" failOnPhpunitWarning="true"
cacheDirectory=".phpunit.cache" requireCoverageMetadata="false" beStrictAboutCoverageMetadata="false">
<testsuites>
<testsuite name="unit">
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<psalm
errorLevel="1"
resolveFromConfigFile="true"
findUnusedCode="false"
ensureOverrideAttribute="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
Expand Down
3 changes: 2 additions & 1 deletion src/Console/UI/Components/MetaTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use ReflectionProperty;
use Throwable;
use function Psl\Dict\filter_nulls;
use function Psl\Json\encode;
use function Psl\Vec\map;

final readonly class MetaTable
Expand Down Expand Up @@ -71,7 +72,7 @@ private static function tryStringifyValue(mixed $value): ?string
{
try {
return match (true) {
is_array($value) => json_encode($value, JSON_UNESCAPED_SLASHES),
is_array($value) => encode($value, pretty: false, flags: JSON_UNESCAPED_SLASHES),
is_bool($value) => $value ? 'true' : 'false',
is_scalar($value) => (string)$value,
$value instanceof Option => $value->map(self::tryStringifyValue(...))->unwrapOr(null),
Expand Down
4 changes: 2 additions & 2 deletions src/Console/UI/Components/ScrollableTextAreaState.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use PhpTui\Term\MouseEventKind;
use Soap\WsdlReader\Console\UI\EventHandler;

use function json_encode;
use function Psl\Json\encode;
use function Psl\Math\max;
use function Psl\Math\min;

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

Expand Down
3 changes: 2 additions & 1 deletion src/Formatter/MetaTableFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;
use function Psl\Json\encode;
use function Psl\Vec\filter_nulls;
use function Psl\Vec\map;

Expand Down Expand Up @@ -56,7 +57,7 @@ private function tryStringifyValue(mixed $value): ?string
{
try {
return match (true) {
is_array($value) => json_encode($value, JSON_PRETTY_PRINT),
is_array($value) => encode($value, pretty: true),
is_bool($value) => $value ? 'true' : 'false',
is_scalar($value) => (string)$value,
$value instanceof Option => $value->map($this->tryStringifyValue(...))->unwrapOr(null),
Expand Down
4 changes: 4 additions & 0 deletions tests/PhpCompatibility/test_schema.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ use Soap\WsdlReader\Formatter\ShortMethodFormatter;
use Soap\WsdlReader\Metadata\Wsdl1MetadataProvider;
use Soap\WsdlReader\Wsdl1Reader;

// Avoid deprecated warnings to be displayed during the test output for the loaded dependencies.
// This is causing issues on lower dependencies.
$previousReporting = error_reporting(E_ALL ^ E_DEPRECATED);
require_once __DIR__.'/../bootstrap.php';
error_reporting($previousReporting);

function test_schema($schema, $type, $style="rpc",$use="encoded", $attributeFormDefault='')
{
Expand Down
9 changes: 3 additions & 6 deletions tests/Unit/Locator/Wsdl1SelectedServiceLocatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Soap\WsdlReader\Test\Unit\Locator;

use Closure;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Wsdl\Loader\StreamWrapperLoader;
use Soap\WsdlReader\Exception\ServiceException;
Expand All @@ -14,9 +15,7 @@

final class Wsdl1SelectedServiceLocatorTest extends TestCase
{
/**
* @dataProvider provideServiceLocations
*/
#[DataProvider('provideServiceLocations')]
public function test_it_can_locate_service(
string $wsdl,
ServiceSelectionCriteria $criteria,
Expand All @@ -30,9 +29,7 @@ public function test_it_can_locate_service(
$assert($service);
}

/**
* @dataProvider provideNotLocatableServices
*/
#[DataProvider('provideNotLocatableServices')]
public function test_it_can_not_locate_service(
string $wsdl,
ServiceSelectionCriteria $criteria,
Expand Down
11 changes: 3 additions & 8 deletions tests/Unit/Metadata/Coverter/Types/SoapEnc/ArrayTypeInfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
namespace Soap\WsdlReader\Test\Unit\Metadata\Coverter\Types\SoapEnc;

use InvalidArgumentException;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\WsdlReader\Metadata\Converter\Types\SoapEnc\ArrayTypeInfo;

final class ArrayTypeInfoTest extends TestCase
{
/**
*
* @dataProvider provideSoap11ArrayTypes
*/
#[DataProvider('provideSoap11ArrayTypes')]
public function test_it_can_parse_array_type_information_from_soap_11_information(
string $raw,
string $expectedPrefix,
Expand All @@ -33,10 +31,7 @@ public function test_it_can_parse_array_type_information_from_soap_11_informatio
static::assertSame($raw, $info->toString());
}

/**
*
* @dataProvider provideSoap12ArrayTypes
*/
#[DataProvider('provideSoap12ArrayTypes')]
public function test_it_can_parse_array_type_information_from_soap_12_information(
string $itemType,
string $arraySize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@

namespace Soap\WsdlReader\Test\Unit\Metadata\Predicate;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Engine\Metadata\Model\TypeMeta;
use Soap\WsdlReader\Metadata\Predicate\IsConsideredNullableType;

final class IsConsideredNullableTypeTest extends TestCase
{
/**
* @dataProvider provideTests
*
*/
#[DataProvider('provideTests')]
public function test_it_knows_if_a_type_is_considered_nullable(TypeMeta $meta, bool $expected): void
{
static::assertSame($expected, (new IsConsideredNullableType())($meta));
Expand Down
6 changes: 2 additions & 4 deletions tests/Unit/Metadata/Predicate/IsConsideredScalarTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@

namespace Soap\WsdlReader\Test\Unit\Metadata\Predicate;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Engine\Metadata\Model\TypeMeta;
use Soap\WsdlReader\Metadata\Predicate\IsConsideredScalarType;

final class IsConsideredScalarTypeTest extends TestCase
{
/**
* @dataProvider provideTests
*
*/
#[DataProvider('provideTests')]
public function test_it_knows_if_a_type_is_considered_scalar(TypeMeta $meta, bool $expected): void
{
static::assertSame($expected, (new IsConsideredScalarType())($meta));
Expand Down
6 changes: 2 additions & 4 deletions tests/Unit/Metadata/Predicate/IsOfTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace Soap\WsdlReader\Test\Unit\Metadata\Predicate;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Engine\Metadata\Model\TypeMeta;
use Soap\Engine\Metadata\Model\XsdType;
Expand All @@ -11,10 +12,7 @@
final class IsOfTypeTest extends TestCase
{

/**
* @dataProvider provideTests
*
*/
#[DataProvider('provideTests')]
public function test_it_knows_if_a_type_is_considered_nullable(
string $namespace,
string $name,
Expand Down
Binary file removed tools/php-cs-fixer.phar
Binary file not shown.
Loading