From 63111261e7753fdeeefcc458c0116dd9839e3afb Mon Sep 17 00:00:00 2001 From: Ghislain Loaec Date: Fri, 6 Apr 2018 11:18:36 +0200 Subject: [PATCH] Restart fomr 0.2 --- composer.json | 12 +++----- .../BeSimpleSoapExtension.php | 19 ++++++++---- .../SoapBundle/Resources/config/client.xml | 4 +-- .../SoapBundle/Resources/config/client3.xml | 29 +++++++++++++++++++ src/BeSimple/SoapBundle/composer.json | 14 ++++----- .../SoapClient/Tests/WsdlDownloaderTest.php | 2 +- src/BeSimple/SoapClient/composer.json | 6 ++-- src/BeSimple/SoapCommon/composer.json | 2 +- src/BeSimple/SoapServer/composer.json | 4 +-- src/BeSimple/SoapWsdl/composer.json | 2 +- 10 files changed, 63 insertions(+), 31 deletions(-) create mode 100644 src/BeSimple/SoapBundle/Resources/config/client3.xml diff --git a/composer.json b/composer.json index fee4704..242b9bb 100644 --- a/composer.json +++ b/composer.json @@ -17,10 +17,6 @@ { "name": "Andreas Schamberger", "email": "mail@andreass.net" - }, - { - "name": "Ghislain Loaec", - "email": "gloaec@cadoles.com" } ], "require": { @@ -28,8 +24,8 @@ "ext-soap": "*", "ext-curl": "*", "ass/xmlsecurity": "~1.0", - "symfony/framework-bundle": "~2.6", - "symfony/twig-bundle": "~2.6", + "symfony/framework-bundle": "~2.0|~3.0", + "symfony/twig-bundle": "~2.0|~3.0", "zendframework/zend-mime": "2.1.*" }, "replace": { @@ -42,7 +38,7 @@ "require-dev": { "ext-mcrypt": "*", "mikey179/vfsStream": "~1.0", - "symfony/filesystem": "~2.3", + "symfony/filesystem": "~2.0", "symfony/process": "~2.3" }, "autoload": { @@ -50,7 +46,7 @@ }, "extra": { "branch-alias": { - "dev-master": "0.3-dev" + "dev-master": "0.2-dev" } } } diff --git a/src/BeSimple/SoapBundle/DependencyInjection/BeSimpleSoapExtension.php b/src/BeSimple/SoapBundle/DependencyInjection/BeSimpleSoapExtension.php index 4e2b47a..ebb3623 100644 --- a/src/BeSimple/SoapBundle/DependencyInjection/BeSimpleSoapExtension.php +++ b/src/BeSimple/SoapBundle/DependencyInjection/BeSimpleSoapExtension.php @@ -21,6 +21,7 @@ use Symfony\Component\DependencyInjection\DefinitionDecorator; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\HttpKernel\Kernel; /** * BeSimpleSoapExtension. @@ -80,7 +81,11 @@ class BeSimpleSoapExtension extends Extension private function registerClientConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { - $loader->load('client.xml'); + if (3 === Kernel::MAJOR_VERSION) { + $loader->load('client3.xml'); + } else { + $loader->load('client.xml'); + } foreach ($config as $client => $options) { $definition = new DefinitionDecorator('besimple.soap.client.builder'); @@ -147,10 +152,14 @@ class BeSimpleSoapExtension extends Extension $definition = new DefinitionDecorator('besimple.soap.client'); $container->setDefinition(sprintf('besimple.soap.client.%s', $client), $definition); - $definition->setFactory(array( - new Reference(sprintf('besimple.soap.client.builder.%s', $client)), - 'build' - )); + if (3 === Kernel::MAJOR_VERSION) { + $definition->setFactory(array( + new Reference(sprintf('besimple.soap.client.builder.%s', $client)), + 'build' + )); + } else { + $definition->setFactoryService(sprintf('besimple.soap.client.builder.%s', $client)); + } } private function createWebServiceContext(array $config, ContainerBuilder $container) diff --git a/src/BeSimple/SoapBundle/Resources/config/client.xml b/src/BeSimple/SoapBundle/Resources/config/client.xml index b1e1d3e..0af3c34 100644 --- a/src/BeSimple/SoapBundle/Resources/config/client.xml +++ b/src/BeSimple/SoapBundle/Resources/config/client.xml @@ -19,9 +19,7 @@ - - - + diff --git a/src/BeSimple/SoapBundle/Resources/config/client3.xml b/src/BeSimple/SoapBundle/Resources/config/client3.xml new file mode 100644 index 0000000..2c2465e --- /dev/null +++ b/src/BeSimple/SoapBundle/Resources/config/client3.xml @@ -0,0 +1,29 @@ + + + + + BeSimple\SoapBundle\Soap\SoapClientBuilder + BeSimple\SoapCommon\Classmap + + + + + + + %kernel.debug% + + + + + + + + + + + + + + diff --git a/src/BeSimple/SoapBundle/composer.json b/src/BeSimple/SoapBundle/composer.json index d9eecb2..79751c8 100644 --- a/src/BeSimple/SoapBundle/composer.json +++ b/src/BeSimple/SoapBundle/composer.json @@ -22,16 +22,16 @@ "require": { "php": ">=5.3.0", "ext-soap": "*", - "besimple/soap-common": "0.3.*", - "besimple/soap-wsdl": "0.3.*", + "besimple/soap-common": "0.2.*", + "besimple/soap-wsdl": "0.2.*", "ass/xmlsecurity": "~1.0", - "symfony/framework-bundle": "~2.6", - "symfony/twig-bundle": "~2.6", + "symfony/framework-bundle": "~2.0|~3.0", + "symfony/twig-bundle": "~2.0|~3.0", "zendframework/zend-mime": "2.1.*" }, "suggest": { - "besimple/soap-client": "0.3.*", - "besimple/soap-server": "0.3.*" + "besimple/soap-client": "0.2.*", + "besimple/soap-server": "0.2.*" }, "autoload": { "psr-0": { "BeSimple\\SoapBundle": "" } @@ -39,7 +39,7 @@ "target-dir": "BeSimple/SoapBundle", "extra": { "branch-alias": { - "dev-master": "0.3-dev" + "dev-master": "0.2-dev" } } } diff --git a/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php b/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php index a5e4595..38905b5 100644 --- a/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php +++ b/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php @@ -278,7 +278,7 @@ class WsdlDownloaderTest extends AbstractWebserverTest $content = file_get_contents(self::$fixturesPath.$file); $content = preg_replace('#'.preg_quote('%location%').'#', sprintf('localhost:%d', WEBSERVER_PORT), $content); - self::$filesystem->dumpFile(self::$fixturesPath.'build_include'.DIRECTORY_SEPARATOR.pathinfo($file, PATHINFO_BASENAME), $content); + file_put_contents(self::$fixturesPath.'build_include'.DIRECTORY_SEPARATOR.pathinfo($file, PATHINFO_BASENAME), $content); } } diff --git a/src/BeSimple/SoapClient/composer.json b/src/BeSimple/SoapClient/composer.json index 81696f3..8687ce5 100644 --- a/src/BeSimple/SoapClient/composer.json +++ b/src/BeSimple/SoapClient/composer.json @@ -23,12 +23,12 @@ "php": ">=5.3.0", "ext-soap": "*", "ext-curl": "*", - "besimple/soap-common": "0.3.*", + "besimple/soap-common": "0.2.*", "ass/xmlsecurity": "~1.0" }, "require-dev": { "mikey179/vfsStream": "~1.0", - "symfony/filesystem": "~2.3", + "symfony/filesystem": "~2.0", "symfony/process": "~2.3" }, "autoload": { @@ -37,7 +37,7 @@ "target-dir": "BeSimple/SoapClient", "extra": { "branch-alias": { - "dev-master": "0.3-dev" + "dev-master": "0.2-dev" } } } diff --git a/src/BeSimple/SoapCommon/composer.json b/src/BeSimple/SoapCommon/composer.json index aa0798c..bf1ec6d 100644 --- a/src/BeSimple/SoapCommon/composer.json +++ b/src/BeSimple/SoapCommon/composer.json @@ -34,7 +34,7 @@ "target-dir": "BeSimple/SoapCommon", "extra": { "branch-alias": { - "dev-master": "0.3-dev" + "dev-master": "0.2-dev" } } } diff --git a/src/BeSimple/SoapServer/composer.json b/src/BeSimple/SoapServer/composer.json index df0cacd..8e7c862 100644 --- a/src/BeSimple/SoapServer/composer.json +++ b/src/BeSimple/SoapServer/composer.json @@ -22,7 +22,7 @@ "require": { "php": ">=5.3.0", "ext-soap": "*", - "besimple/soap-common": "0.3.*", + "besimple/soap-common": "0.2.*", "ass/xmlsecurity": "~1.0" }, "autoload": { @@ -31,7 +31,7 @@ "target-dir": "BeSimple/SoapServer", "extra": { "branch-alias": { - "dev-master": "0.3-dev" + "dev-master": "0.2-dev" } } } diff --git a/src/BeSimple/SoapWsdl/composer.json b/src/BeSimple/SoapWsdl/composer.json index 8cb4a4c..9f9f61c 100644 --- a/src/BeSimple/SoapWsdl/composer.json +++ b/src/BeSimple/SoapWsdl/composer.json @@ -24,7 +24,7 @@ "target-dir": "BeSimple/SoapWsdl", "extra": { "branch-alias": { - "dev-master": "0.3-dev" + "dev-master": "0.2-dev" } } }