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: ./tools/psalm.phar
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
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
5 changes: 0 additions & 5 deletions .phive/phars.xml

This file was deleted.

16 changes: 9 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@
}
],
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
"php": "~8.3.0 || ~8.4.0 || ~8.5.0",
"ext-soap": "*",
"ext-dom": "*",
"azjezz/psl": "^3.0",
"php-soap/engine": "^2.13",
"php-soap/wsdl": "^1.12",
"azjezz/psl": "^3.0 || ^4.0",
"php-soap/engine": "^2.16",
"php-soap/wsdl": "^1.14",
"symfony/options-resolver": "^5.4 || ^6.0 || ^7.0"
},
"require-dev": {
"php-soap/engine-integration-tests": "^1.9",
"php-soap/xml": "^1.8",
"phpunit/phpunit": "^10.0.19 || ^11.0.0"
"php-soap/engine-integration-tests": "^1.10",
"php-soap/xml": "^1.9",
"phpunit/phpunit": "~12.3",
"vimeo/psalm": "~6.13",
"php-cs-fixer/shim": "~3.88"
}
}
9 changes: 8 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<phpunit bootstrap="./tests/bootstrap.php" colors="true">
<phpunit
bootstrap="./tests/bootstrap.php"
colors="true"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
displayDetailsOnTestsThatTriggerWarnings="true"
failOnWarning="true"
failOnPhpunitWarning="true">
<testsuites>
<testsuite name="Functional">
<directory>./tests/Functional</directory>
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
allowStringToStandInForClass="true"
rememberPropertyAssignmentsAfterCall="false"
skipChecksOnUnresolvableIncludes="false"
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/AbusedClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public function __doRequest(
string $location,
string $action,
int $version,
bool $one_way = false
bool $one_way = false,
?string $uriParserClass = null,
): string {
$this->storedRequest = new SoapRequest($request, $location, $action, $version, $one_way);

Expand Down
4 changes: 2 additions & 2 deletions src/Metadata/MethodsParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private function parseMethodFromString(string $methodString): Method

private function transformListResponseToArray(string $methodString): string
{
return preg_replace('/^list\(([^\)]*)\)(.*)/i', 'array$2', $methodString);
return (string) preg_replace('/^list\(([^\)]*)\)(.*)/i', 'array$2', $methodString);
}

private function parseParameters(string $methodString): ParameterCollection
Expand All @@ -51,7 +51,7 @@ private function parseParameters(string $methodString): ParameterCollection
return new ParameterCollection();
}

$parameters = preg_split('/,\s?/', $properties[1]);
$parameters = preg_split('/,\s?/', $properties[1]) ?: [];

return new ParameterCollection(...array_map(
function (string $parameter): Parameter {
Expand Down
2 changes: 1 addition & 1 deletion src/Transport/ExtSoapServerTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function request(SoapRequest $request): SoapResponse
{
ob_start();
$this->server->handle($request->getRequest());
$responseBody = ob_get_contents();
$responseBody = (string) ob_get_contents();
ob_end_clean();

return new SoapResponse($responseBody);
Expand Down
16 changes: 4 additions & 12 deletions tests/Functional/ExtSoap/Encoding/DuplicateTypenamesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace SoapTest\ExtSoapEngine\Functional\ExtSoap\Encoding;

use DOMDocument;
use PHPUnit\Framework\Attributes\RunInSeparateProcess;
use Soap\Engine\SimpleEngine;
use Soap\ExtSoapEngine\Configuration\ClassMap\ClassMap;
use Soap\ExtSoapEngine\Configuration\ClassMap\ClassMapCollection;
Expand Down Expand Up @@ -52,10 +53,7 @@ public function test_it_registers_both_types()
static::assertEquals([...$store2->getProperties()][0]->getName(), 'Attribute2');
}

/**
*
* @runInSeparateProcess
*/
#[RunInSeparateProcess]
public function test_it_knows_how_to_encode_both_types()
{
$engine = new SimpleEngine($this->driver, $this->transport);
Expand All @@ -74,10 +72,7 @@ public function test_it_knows_how_to_encode_both_types()
static::assertStringContainsString('<output2 xsi:type="ns3:Store"><Attribute2 xsi:type="xsd:string">ok</Attribute2></output2>', $lastRequestInfo->getLastResponse());
}

/**
*
* @runInSeparateProcess
*/
#[RunInSeparateProcess]
public function test_it_uses_same_model_for_both_objects()
{
$this->driver = $this->configureSoapDriver($this->wsdl, [
Expand Down Expand Up @@ -116,10 +111,7 @@ public function validate($store1, $store2)
static::assertStringContainsString('<output2 xsi:type="ns3:Store"><Attribute2 xsi:type="xsd:string">attr2</Attribute2></output2>', $lastRequestInfo->getLastResponse());
}

/**
*
* @runInSeparateProcess
*/
#[RunInSeparateProcess]
public function test_it_is_possible_to_override_a_single_instance_with_typemap()
{
$this->driver = $this->configureSoapDriver($this->wsdl, [
Expand Down
21 changes: 5 additions & 16 deletions tests/Functional/ExtSoap/Encoding/EnumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use DOMDocument;
use Exception;
use PHPUnit\Framework\Attributes\RunInSeparateProcess;
use Soap\Engine\SimpleEngine;
use Soap\ExtSoapEngine\ExtSoapDriver;
use Soap\ExtSoapEngine\Transport\TraceableTransport;
Expand Down Expand Up @@ -43,10 +44,7 @@ public function test_it_does_not_register_a_type()
static::assertCount(0, $types);
}

/**
*
* @runInSeparateProcess
*/
#[RunInSeparateProcess]
public function test_it_knows_how_to_add_enums()
{
$input = 'Home';
Expand All @@ -59,10 +57,7 @@ public function test_it_knows_how_to_add_enums()
static::assertStringContainsString('<output xsi:type="ns2:PhoneTypeEnum">Home</output>', $lastRequestInfo->getLastResponse());
}

/**
*
* @runInSeparateProcess
*/
#[RunInSeparateProcess]
public function test_it_does_not_validate_enums()
{
$input = 'INVALID';
Expand All @@ -74,10 +69,7 @@ public function test_it_does_not_validate_enums()
static::assertStringContainsString('<output xsi:type="ns2:PhoneTypeEnum">INVALID</output>', $lastRequestInfo->getLastResponse());
}

/**
*
* @runInSeparateProcess
*/
#[RunInSeparateProcess]
public function test_it_does_not_validate_enum_types()
{
$input = 123;
Expand All @@ -89,10 +81,7 @@ public function test_it_does_not_validate_enum_types()
static::assertStringContainsString('<output xsi:type="ns2:PhoneTypeEnum">123</output>', $lastRequestInfo->getLastResponse());
}

/**
*
* @runInSeparateProcess
*/
#[RunInSeparateProcess]
public function test_it_can_be_transformed_with_type_map()
{
$this->driver = $this->configureSoapDriver($this->wsdl, [
Expand Down
Binary file removed tools/php-cs-fixer.phar
Binary file not shown.
Binary file removed tools/psalm.phar
Binary file not shown.
Loading