Skip to content

Commit

Permalink
EWPP-4991: Patch normalizer and re-run export.
Browse files Browse the repository at this point in the history
  • Loading branch information
ademarco committed Jan 21, 2025
1 parent 46cd17a commit 85a46a9
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 9 deletions.
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,12 @@
},
"bin": ["bin/epoetry"],
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"extra": {
"patches": {
"phpro/soap-client" : {
"add-anyuri-to-normalizer.patch": "./patches/add-anyuri-to-normalizer.patch"
}
}
}
}
7 changes: 7 additions & 0 deletions config/soap-client-authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Phpro\SoapClient\CodeGenerator\Config\Config;
use Soap\ExtSoapEngine\ExtSoapOptions;
use Phpro\SoapClient\Soap\DefaultEngineFactory;
use OpenEuropa\EPoetry\CodeGenerator as OpenEuropa;

// Generate SOAP client library to perform ECAS client certificate login.
// @link https://citnet.tech.ec.europa.eu/CITnet/confluence/display/IAM/ECAS+Certificate+Login
Expand All @@ -24,6 +25,12 @@
->setClassMapDestination('src/Authentication/ClientCertificate')
->setClassMapName('ClientCertificateClassmap')
->setClassMapNamespace('OpenEuropa\EPoetry\Authentication\ClientCertificate')
->addRule(new Rules\AssembleRule(
new OpenEuropa\Assembler\OverridePropertyTypeAssembler(
(new OpenEuropa\Assembler\OverridePropertyTypeAssemblerOptions())
->setPropertyTypeMapping([])
)
))
->addRule(new Rules\AssembleRule(new Assembler\GetterAssembler(new Assembler\GetterAssemblerOptions())))
->addRule(new Rules\AssembleRule(new Assembler\ImmutableSetterAssembler(
new Assembler\ImmutableSetterAssemblerOptions()
Expand Down
12 changes: 12 additions & 0 deletions patches/add-anyuri-to-normalizer.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/Phpro/SoapClient/CodeGenerator/Util/Normalizer.php b/src/Phpro/SoapClient/CodeGenerator/Util/Normalizer.php
index 0f33a7f..76bcea5 100644
--- a/src/Phpro/SoapClient/CodeGenerator/Util/Normalizer.php
+++ b/src/Phpro/SoapClient/CodeGenerator/Util/Normalizer.php
@@ -15,6 +15,7 @@ class Normalizer
'any' => 'mixed',
'anytype' => 'mixed',
'anyxml' => 'string',
+ 'anyuri' => 'string',
'anysimpletype' => 'mixed',
'long' => 'int',
'short' => 'int',
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class
);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ public function getServiceTicket(\OpenEuropa\EPoetry\Authentication\ClientCertif
return $response;
}
}

16 changes: 8 additions & 8 deletions src/Authentication/ClientCertificate/Type/GetServiceTicket.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,33 @@
class GetServiceTicket implements RequestInterface
{
/**
* @var \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI
* @var string
*/
private \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service;
private string $service;

/**
* Constructor
*
* @param \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service
* @param string $service
*/
public function __construct(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service)
public function __construct(string $service)
{
$this->service = $service;
}

/**
* @return \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI
* @return string
*/
public function getService() : \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI
public function getService() : string
{
return $this->service;
}

/**
* @param \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service
* @param string $service
* @return static
*/
public function withService(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service) : static
public function withService(string $service) : static
{
$new = clone $this;
$new->service = $service;
Expand Down
1 change: 1 addition & 0 deletions src/Notification/NotificationClassmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class
);
}
}

1 change: 1 addition & 0 deletions src/Request/RequestClassmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class
);
}
}

1 change: 1 addition & 0 deletions src/Request/RequestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,4 @@ public function createCorrectionRequest(\OpenEuropa\EPoetry\Request\Type\CreateC
return $response;
}
}

0 comments on commit 85a46a9

Please sign in to comment.