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
3 changes: 2 additions & 1 deletion .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', '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 @@ -24,3 +24,4 @@ jobs:
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
- name: Run the tests
run: ./vendor/bin/psalm
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
2 changes: 1 addition & 1 deletion .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+']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
Expand Down
4 changes: 0 additions & 4 deletions .phive/phars.xml

This file was deleted.

11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@
"sort-packages": true
},
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
"php": "~8.3.0 || ~8.4.0 || ~8.5.0",
"ext-dom": "*",
"azjezz/psl": "^3.0",
"azjezz/psl": "^3.0 || ^4.0",
"league/uri": "^7.0",
"league/uri-components": "^7.0",
"php-soap/xml": "^1.8",
"php-soap/xml": "^1.9",
"symfony/console": "^5.4 || ^6.0 || ^7.0",
"veewee/xml": "~3.0"
},
"require-dev": {
"phpunit/phpunit": "^10.5",
"php-cs-fixer/shim": "^3.88",
"phpunit/phpunit": "^12.3",
"psalm/plugin-symfony": "^5.0",
"vimeo/psalm": "^5.26.0"
"vimeo/psalm": "^6.13"
}
}
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
displayDetailsOnPhpunitDeprecations="true"
displayDetailsOnTestsThatTriggerWarnings="true"
failOnWarning="true"
failOnPhpunitWarning="true"
bootstrap="./tests/bootstrap.php"
colors="true"
>
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
skipChecksOnUnresolvableIncludes="false"
checkForThrowsDocblock="true"
checkForThrowsInGlobalScope="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
6 changes: 2 additions & 4 deletions tests/Unit/Loader/FlatteningLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace Soap\Wsdl\Test\Unit\Loader;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Wsdl\Loader\FlatteningLoader;
use Soap\Wsdl\Loader\StreamWrapperLoader;
Expand All @@ -18,10 +19,7 @@ protected function setUp(): void
$this->loader = new FlatteningLoader(new StreamWrapperLoader());
}

/**
*
* @dataProvider provideTestCases
*/
#[DataProvider('provideTestCases')]
public function test_it_can_load_flattened_imports(string $wsdl, Document $expected): void
{
$result = ($this->loader)($wsdl);
Expand Down
6 changes: 2 additions & 4 deletions tests/Unit/Uri/IncludePathBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

namespace Soap\Wsdl\Test\Unit\Uri;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Wsdl\Uri\IncludePathBuilder;

final class IncludePathBuilderTest extends TestCase
{
/**
*
* @dataProvider provideBuildPaths
*/
#[DataProvider('provideBuildPaths')]
public function test_it_can_build_include_paths(string $relativePath, string $fromFile, string $expected): void
{
static::assertSame($expected, IncludePathBuilder::build($relativePath, $fromFile));
Expand Down
6 changes: 2 additions & 4 deletions tests/Unit/Xml/Configurator/FlattenTypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@

namespace Soap\Wsdl\Test\Unit\Xml\Configurator;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Wsdl\Xml\Configurator\FlattenTypes;
use VeeWee\Xml\Dom\Document;
use function VeeWee\Xml\Dom\Configurator\comparable;

final class FlattenTypesTest extends TestCase
{
/**
*
* @dataProvider provideTestCases
*/
#[DataProvider('provideTestCases')]
public function test_it_can_flatten_types(string $wsdl, Document $expected): void
{
$wsdlDoc = Document::fromXmlFile($wsdl, new FlattenTypes(), comparable());
Expand Down
6 changes: 2 additions & 4 deletions tests/Unit/Xml/Configurator/FlattenWsdlImportsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace Soap\Wsdl\Test\Unit\Xml\Configurator;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Wsdl\Loader\Context\FlatteningContext;
use Soap\Wsdl\Loader\StreamWrapperLoader;
Expand All @@ -12,10 +13,7 @@

final class FlattenWsdlImportsTest extends TestCase
{
/**
*
* @dataProvider provideTestCases
*/
#[DataProvider('provideTestCases')]
public function test_it_can_flatten_wsdl_imports(string $wsdl, Document $expected): void
{
$wsdlDoc = Document::fromXmlFile($wsdl);
Expand Down
26 changes: 12 additions & 14 deletions tests/Unit/Xml/Configurator/FlattenXsdImportsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace Soap\Wsdl\Test\Unit\Xml\Configurator;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Wsdl\Loader\Context\FlatteningContext;
use Soap\Wsdl\Loader\StreamWrapperLoader;
Expand All @@ -13,10 +14,7 @@

final class FlattenXsdImportsTest extends TestCase
{
/**
*
* @dataProvider provideTestCases
*/
#[DataProvider('provideTestCases')]
public function test_it_can_flatten_xsd_imports(string $wsdl, Document $expected, callable $xmlConfigurator): void
{
$wsdlDoc = Document::fromXmlFile($wsdl);
Expand All @@ -34,52 +32,52 @@ public static function provideTestCases()
yield 'single-xsd' => [
'wsdl' => FIXTURE_DIR.'/flattening/single-xsd.wsdl',
'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/single-xsd-result.wsdl'),
comparable(),
"xmlConfigurator" => comparable(),
];
yield 'once-xsd' => [
'wsdl' => FIXTURE_DIR.'/flattening/once-xsd.wsdl',
'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/once-xsd-result.wsdl'),
comparable(),
"xmlConfigurator" => comparable(),
];
yield 'multi-xsd' => [
'wsdl' => FIXTURE_DIR.'/flattening/multi-xsd.wsdl',
'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/multi-xsd-result.wsdl'),
comparable(),
"xmlConfigurator" => comparable(),
];
yield 'circular-xsd' => [
'wsdl' => FIXTURE_DIR.'/flattening/circular-xsd.wsdl',
'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/circular-xsd-result.wsdl'),
comparable(),
"xmlConfigurator" => comparable(),
];
yield 'redefine-xsd' => [
'wsdl' => FIXTURE_DIR.'/flattening/redefine-xsd.wsdl',
'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/redefine-xsd-result.wsdl'),
comparable(),
"xmlConfigurator" => comparable(),
];
yield 'tnsless-xsd' => [
'wsdl' => FIXTURE_DIR.'/flattening/tnsless-xsd.wsdl',
'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/tnsless-xsd-result.wsdl'),
comparable(),
"xmlConfigurator" => comparable(),
];
yield 'grouped-xsd' => [
'wsdl' => FIXTURE_DIR.'/flattening/grouped-xsd.wsdl',
'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/grouped-xsd-result.wsdl'),
comparable(),
"xmlConfigurator" => comparable(),
];
yield 'root-xmlns-import-issue' => [
'wsdl' => FIXTURE_DIR.'/flattening/root-xmlns-import-issue.wsdl',
'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/root-xmlns-import-issue-result.wsdl'),
canonicalize(),
"xmlConfigurator" => canonicalize(),
];
yield 'rearranged-imports' => [
'wsdl' => FIXTURE_DIR.'/flattening/rearranged-imports.wsdl',
'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/rearranged-imports.wsdl'),
comparable(),
"xmlConfigurator" => comparable(),
];
yield 'import-xmlns-issue' => [
'wsdl' => FIXTURE_DIR.'/flattening/conflicting-imports.wsdl',
'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/conflicting-imports.wsdl'),
canonicalize(),
"xmlConfigurator" => canonicalize(),
];
}
}
6 changes: 2 additions & 4 deletions tests/Unit/Xml/Validator/SchemaSyntaxValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@

namespace SoapTest\Wsdl\Xml\Validator;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Wsdl\Xml\Validator\SchemaSyntaxValidator;
use VeeWee\Xml\Dom\Document;

final class SchemaSyntaxValidatorTest extends TestCase
{
/**
*
* @dataProvider provideTestCases
*/
#[DataProvider('provideTestCases')]
public function test_it_can_validate_errors(string $wsdl, array $errorMessages): void
{
$validator = new SchemaSyntaxValidator();
Expand Down
6 changes: 2 additions & 4 deletions tests/Unit/Xml/Validator/WsdlSyntaxValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@

namespace SoapTest\Wsdl\Xml\Validator;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Wsdl\Xml\Validator\WsdlSyntaxValidator;
use VeeWee\Xml\Dom\Document;

final class WsdlSyntaxValidatorTest extends TestCase
{
/**
*
* @dataProvider provideTestCases
*/
#[DataProvider('provideTestCases')]
public function test_it_can_validate_errors(string $wsdl, array $errorMessages): void
{
$validator = new WsdlSyntaxValidator();
Expand Down
6 changes: 2 additions & 4 deletions tests/Unit/Xml/Visitor/ReprefixTypeQnameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

namespace SoapTest\Wsdl\Unit\Xml\Visitor;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Wsdl\Xml\Visitor\ReprefixTypeQname;
use VeeWee\Xml\Dom\Document;

final class ReprefixTypeQnameTest extends TestCase
{
/**
*
* @dataProvider provideCases
*/
#[DataProvider('provideCases')]
public function test_it_can_reprefix_qname_types(string $input, string $expected): void
{
$doc = Document::fromXmlString($input);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

namespace SoapTest\Wsdl\Unit\Xml\Xmlns;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Soap\Wsdl\Xml\Xmlns\RegisterNonConflictingXmlnsNamespaces;
use VeeWee\Xml\Dom\Document;

final class RegisterNonConflictingXmlnsNamespacesTest extends TestCase
{
/**
*
* @dataProvider provideCases
*/
#[DataProvider('provideCases')]
public function test_it_registers_non_conflicting_namespaces(
string $existingSchemaXml,
string $importedSchemaXml,
Expand Down
Binary file removed tools/php-cs-fixer.phar
Binary file not shown.
Loading