From f9e230400d92f4e35f684bdbc0d8d179272a0a18 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Sun, 8 Dec 2013 00:27:33 +0100 Subject: [PATCH 01/12] [SoapBundle] Fixed RpcLiteralRequestMessageBinderTest --- .../RpcLiteralRequestMessageBinderTest.php | 183 ++++++++++-------- 1 file changed, 102 insertions(+), 81 deletions(-) diff --git a/src/BeSimple/SoapBundle/Tests/ServiceBinding/RpcLiteralRequestMessageBinderTest.php b/src/BeSimple/SoapBundle/Tests/ServiceBinding/RpcLiteralRequestMessageBinderTest.php index e706fd9..1bfa446 100644 --- a/src/BeSimple/SoapBundle/Tests/ServiceBinding/RpcLiteralRequestMessageBinderTest.php +++ b/src/BeSimple/SoapBundle/Tests/ServiceBinding/RpcLiteralRequestMessageBinderTest.php @@ -16,66 +16,70 @@ use BeSimple\SoapBundle\ServiceBinding\RpcLiteralRequestMessageBinder; use BeSimple\SoapBundle\ServiceDefinition as Definition; use BeSimple\SoapBundle\Tests\fixtures\ServiceBinding as Fixtures; use BeSimple\SoapBundle\Util\Collection; +use BeSimple\SoapCommon\Definition\Type\ComplexType; +use BeSimple\SoapCommon\Definition\Type\TypeRepository; class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider messageProvider */ - public function testProcessMessage(Definition\Method $method, $message, $assert) + public function testProcessMessage(Definition\Method $method, array $message, array $assert) { $messageBinder = new RpcLiteralRequestMessageBinder(); - $result = $messageBinder->processMessage($method, $message); + $result = $messageBinder->processMessage($method, $message, $this->getTypeRepository()); $this->assertSame($assert, $result); } public function testProcessMessageWithComplexType() { + $typeRepository = $this->addComplexTypes($this->getTypeRepository()); $messageBinder = new RpcLiteralRequestMessageBinder(); + $method = new Definition\Method('complextype_argument', null); + $method->addInput('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo'); + $foo = new Fixtures\Foo('foobar', 19395); $result = $messageBinder->processMessage( - new Definition\Method('complextype_argument', null, array(), array( - new Definition\Argument('foo', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo')), - )), + $method, array($foo), - $this->getDefinitionComplexTypes() + $typeRepository ); $this->assertEquals(array('foo' => $foo), $result); - $foo1 = new Fixtures\Foo('foobar', 29291); $foo2 = new Fixtures\Foo('barfoo', 39392); $foos = new \stdClass(); $foos->item = array($foo1, $foo2); + $method = new Definition\Method('complextype_argument', null); + $method->addInput('foos', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]'); + $result = $messageBinder->processMessage( - new Definition\Method('complextype_argument', null, array(), array( - new Definition\Argument('foos', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]')), - )), + $method, array($foos), - $this->getDefinitionComplexTypes() + $typeRepository ); $this->assertEquals(array('foos' => array($foo1, $foo2)), $result); } - /** - * @expectedException SoapFault - */ public function testProcessMessageSoapFault() { $messageBinder = new RpcLiteralRequestMessageBinder(); + $method = new Definition\Method('complextype_argument', null); + $method->addInput('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo'); + $foo = new Fixtures\Foo('foo', null); - $result = $messageBinder->processMessage( - new Definition\Method('complextype_argument', null, array(), array( - new Definition\Argument('foo', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo')), - )), + + $this->setExpectedException('SoapFault'); + $messageBinder->processMessage( + $method, array($foo), - $this->getDefinitionComplexTypes() + $this->addComplexTypes($this->getTypeRepository()) ); } @@ -83,16 +87,17 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase { $messageBinder = new RpcLiteralRequestMessageBinder(); + $method = new Definition\Method('complextype_argument', null); + $method->addInput('foos', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]'); + $foo = new Fixtures\Foo('foo', 2499104); $foos = new \stdClass(); $foos->item = array($foo, $foo); $result = $messageBinder->processMessage( - new Definition\Method('complextype_argument', null, array(), array( - new Definition\Argument('foos', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]')), - )), + $method, array($foos), - $this->getDefinitionComplexTypes() + $this->addComplexTypes($this->getTypeRepository()) ); $this->assertEquals(array('foos' => array($foo, $foo)), $result); @@ -102,16 +107,17 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase { $messageBinder = new RpcLiteralRequestMessageBinder(); + $method = new Definition\Method('complextype_argument', null); + $method->addInput('fooBar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooBar'); + $foo = new Fixtures\Foo('foo', 38845); $bar = new Fixtures\Bar('bar', null); $fooBar = new Fixtures\FooBar($foo, $bar); $result = $messageBinder->processMessage( - new Definition\Method('complextype_argument', null, array(), array( - new Definition\Argument('fooBar', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooBar')), - )), + $method, array($fooBar), - $this->getDefinitionComplexTypes() + $this->addComplexTypes($this->getTypeRepository()) ); $this->assertEquals(array('fooBar' => $fooBar), $result); @@ -121,17 +127,18 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase { $messageBinder = new RpcLiteralRequestMessageBinder(); + $method = new Definition\Method('complextype_with_array', null); + $method->addInput('simple_arrays', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\SimpleArrays'); + $array = array(1, 2, 3, 4); $stdClass = new \stdClass(); $stdClass->item = $array; $simpleArrays = new Fixtures\SimpleArrays(null, new \stdClass(), $stdClass); $result = $messageBinder->processMessage( - new Definition\Method('complextype_with_array', null, array(), array( - new Definition\Argument('simple_arrays', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\SimpleArrays')), - )), + $method, array($simpleArrays), - $this->getDefinitionComplexTypes() + $this->addComplexTypes($this->getTypeRepository()) ); $result = $result['simple_arrays']; @@ -144,12 +151,13 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase { $messageBinder = new RpcLiteralRequestMessageBinder(); + $method = new Definition\Method('empty_array_complex_type', null); + $method->addInput('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]'); + $result = $messageBinder->processMessage( - new Definition\Method('empty_array_complex_type', null, array(), array( - new Definition\Argument('foo', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]')), - )), + $method, array(new \stdClass()), - $this->getDefinitionComplexTypes() + $this->addComplexTypes($this->getTypeRepository()) ); $this->assertEquals(array('foo' => array()), $result); @@ -159,16 +167,17 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase { $messageBinder = new RpcLiteralRequestMessageBinder(); + $method = new Definition\Method('prevent_infinite_recursion', null); + $method->addInput('foo_recursive', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive'); + $foo = new Fixtures\FooRecursive('foo', ''); $bar = new Fixtures\BarRecursive($foo, 10394); $foo->bar = $bar; $result = $messageBinder->processMessage( - new Definition\Method('prevent_infinite_recursion', null, array(), array( - new Definition\Argument('foo_recursive', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive')), - )), + $method, array($foo), - $this->getDefinitionComplexTypes() + $this->addComplexTypes($this->getTypeRepository()) ); $this->assertEquals(array('foo_recursive' => $foo), $result); @@ -179,43 +188,43 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase $messages = array(); $messages[] = array( - new Definition\Method('no_argument'), + new Definition\Method('no_argument', null), array(), array(), ); + $method = new Definition\Method('string_argument', null); + $method->addInput('foo', 'string'); $messages[] = array( - new Definition\Method('string_argument', null, array(), array( - new Definition\Argument('foo', new Definition\Type('string')), - )), + $method, array('bar'), array('foo' => 'bar'), ); + $method = new Definition\Method('string_int_arguments', null); + $method->addInput('foo', 'string'); + $method->addInput('bar', 'int'); $messages[] = array( - new Definition\Method('string_int_arguments', null, array(), array( - new Definition\Argument('foo', new Definition\Type('string')), - new Definition\Argument('bar', new Definition\Type('int')), - )), + $method, array('test', 20), array('foo' => 'test', 'bar' => 20), ); + $method = new Definition\Method('array_string_arguments', null); + $method->addInput('foo', 'string[]'); + $method->addInput('bar', 'int'); $strings = new \stdClass(); $strings->item = array('foo', 'bar', 'barfoo'); $messages[] = array( - new Definition\Method('array_string_arguments', null, array(), array( - new Definition\Argument('foo', new Definition\Type('string[]')), - new Definition\Argument('bar', new Definition\Type('int')), - )), + $method, array($strings, 4), array('foo' => array('foo', 'bar', 'barfoo'), 'bar' => 4), ); + $method = new Definition\Method('empty_array', null); + $method->addInput('foo', 'string[]'); $messages[] = array( - new Definition\Method('empty_array', null, array(), array( - new Definition\Argument('foo', new Definition\Type('string[]')), - )), + $method, array(new \stdClass()), array('foo' => array()), ); @@ -223,40 +232,38 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase return $messages; } - private function getDefinitionComplexTypes() + private function addComplexTypes(TypeRepository $typeRepository) { - $definitionComplexTypes = array(); + $foo = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo', 'Foo'); + $foo->add('foo', 'string'); + $foo->add('bar', 'int'); + $typeRepository->addComplexType($foo); - $definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo'] = $this->createComplexTypeCollection(array( - array('foo', 'string'), - array('bar', 'int'), - )); + $bar = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Bar', 'Bar'); + $bar->add('foo', 'string'); + $bar->add('bar', 'int', true); + $typeRepository->addComplexType($bar); - $definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Bar'] = $this->createComplexTypeCollection(array( - array('foo', 'string'), - array('bar', 'int', true), - )); + $fooBar = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooBar', 'FooBar'); + $fooBar->add('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo'); + $fooBar->add('bar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Bar'); + $typeRepository->addComplexType($fooBar); - $definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooBar'] = $this->createComplexTypeCollection(array( - array('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo'), - array('bar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Bar'), - )); + $simpleArrays = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\SimpleArrays', 'SimpleArrays'); + $simpleArrays->add('array1', 'string[]', true); + $simpleArrays->add('array2', 'string[]'); + $simpleArrays->add('array3', 'string[]'); + $typeRepository->addComplexType($simpleArrays); - $definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\SimpleArrays'] = $this->createComplexTypeCollection(array( - array('array1', 'string[]', true), - array('array2', 'string[]'), - array('array3', 'string[]'), - )); + $fooRecursive = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive', 'FooRecursive'); + $fooRecursive->add('bar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\BarRecursive'); + $typeRepository->addComplexType($fooRecursive); - $definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive'] = $this->createComplexTypeCollection(array( - array('bar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\BarRecursive'), - )); + $barRecursive = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\BarRecursive', 'BarRecursive'); + $barRecursive->add('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive'); + $typeRepository->addComplexType($barRecursive); - $definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\BarRecursive'] = $this->createComplexTypeCollection(array( - array('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive'), - )); - - return $definitionComplexTypes; + return $typeRepository; } private function createComplexTypeCollection(array $properties) @@ -277,4 +284,18 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase return array('properties' => $collection); } + + private function getTypeRepository() + { + $typeRepository = new TypeRepository(); + $typeRepository->addXmlNamespace('xsd', 'http://www.w3.org/2001/XMLSchema'); + $typeRepository->addType('string', 'xsd:string'); + $typeRepository->addType('boolean', 'xsd:boolean'); + $typeRepository->addType('int', 'xsd:int'); + $typeRepository->addType('float', 'xsd:float'); + $typeRepository->addType('date', 'xsd:date'); + $typeRepository->addType('dateTime', 'xsd:dateTime'); + + return $typeRepository; + } } From a122f2a0f6e7ad2d4044fc22d902c8f488ecbe6d Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Wed, 13 Aug 2014 22:02:41 +0200 Subject: [PATCH 02/12] [SoapBundle] Skipped test for SoapRequest --- src/BeSimple/SoapBundle/Tests/Soap/SoapRequestTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/BeSimple/SoapBundle/Tests/Soap/SoapRequestTest.php b/src/BeSimple/SoapBundle/Tests/Soap/SoapRequestTest.php index 58f3404..479809a 100644 --- a/src/BeSimple/SoapBundle/Tests/Soap/SoapRequestTest.php +++ b/src/BeSimple/SoapBundle/Tests/Soap/SoapRequestTest.php @@ -23,6 +23,8 @@ class SoapRequestTest extends \PHPUnit_Framework_TestCase { public function testMtomMessage() { + $this->markTestSkipped('Skip because I\'m not sure that SoapRequest is used in a HTTP Request process.'); + $content = $this->loadRequestContentFixture('mtom/simple.txt'); $request = new SoapRequest(array(), array(), array(), array(), array(), array(), $content); From 10bba6a3bd816ebc251e457d04aad92155260a39 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Wed, 13 Aug 2014 22:08:17 +0200 Subject: [PATCH 03/12] [Test] Force replace unziped file for axis server --- src/BeSimple/SoapClient/Tests/bin/axis.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BeSimple/SoapClient/Tests/bin/axis.sh b/src/BeSimple/SoapClient/Tests/bin/axis.sh index d143ebd..7c9c59d 100755 --- a/src/BeSimple/SoapClient/Tests/bin/axis.sh +++ b/src/BeSimple/SoapClient/Tests/bin/axis.sh @@ -23,12 +23,12 @@ if [ ! -f "$DIR/$ZIP_RAMPART" ]; then curl -O -s $PATH_RAMPART fi -unzip -qq "$DIR/$ZIP_AXIS" +unzip -o -qq "$DIR/$ZIP_AXIS" AXIS_DIR=$DIR/axis2-$VERSION_AXIS -unzip -qq -j "$DIR/$ZIP_RAMPART" '*/lib/*.jar' -d $AXIS_DIR/lib -unzip -qq -j "$DIR/$ZIP_RAMPART" '*/modules/*.mar' -d $AXIS_DIR/repository/modules +unzip -o -qq -j "$DIR/$ZIP_RAMPART" '*/lib/*.jar' -d $AXIS_DIR/lib +unzip -o -qq -j "$DIR/$ZIP_RAMPART" '*/modules/*.mar' -d $AXIS_DIR/repository/modules cp -r $DIR/../AxisInterop/axis_services/* $AXIS_DIR/repository/services From b3c6353af82fb4e752bab15725a735fa6ebff09f Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Thu, 14 Aug 2014 11:10:24 +0200 Subject: [PATCH 04/12] [composer] Removed dev minimum-stability --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index cf535dc..4dd31e4 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,6 @@ "autoload": { "psr-0": { "BeSimple\\": "src/" } }, - "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "0.2-dev" From c24e8775bf9ff4f303e3e37cb8db1356558927ab Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Thu, 14 Aug 2014 11:18:46 +0200 Subject: [PATCH 05/12] [SoapClient] Add possiblity to disable proxy if present in environment variable --- src/BeSimple/SoapClient/Curl.php | 11 ++++++++--- src/BeSimple/SoapClient/Tests/CurlTest.php | 16 ++++++++++++---- .../SoapClient/Tests/WsdlDownloaderTest.php | 4 +++- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/BeSimple/SoapClient/Curl.php b/src/BeSimple/SoapClient/Curl.php index 699e56c..7fad7a9 100644 --- a/src/BeSimple/SoapClient/Curl.php +++ b/src/BeSimple/SoapClient/Curl.php @@ -81,8 +81,13 @@ class Curl curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, $options['connection_timeout']); } if (isset($options['proxy_host'])) { - $port = isset($options['proxy_port']) ? $options['proxy_port'] : 8080; - curl_setopt($this->ch, CURLOPT_PROXY, $options['proxy_host'] . ':' . $port); + if (false !== $options['proxy_host']) { + $proxyHost = $options['proxy_host'].(isset($options['proxy_port']) ? $options['proxy_port'] : 8080); + } else { + $proxyHost = false; + } + + curl_setopt($this->ch, CURLOPT_PROXY, $proxyHost); } if (isset($options['proxy_user'])) { curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, $options['proxy_user'] . ':' . $options['proxy_password']); @@ -310,4 +315,4 @@ class Curl return trim(array_pop($matches)); } -} \ No newline at end of file +} diff --git a/src/BeSimple/SoapClient/Tests/CurlTest.php b/src/BeSimple/SoapClient/Tests/CurlTest.php index a7e8541..c80b992 100644 --- a/src/BeSimple/SoapClient/Tests/CurlTest.php +++ b/src/BeSimple/SoapClient/Tests/CurlTest.php @@ -21,7 +21,9 @@ class CurlTest extends AbstractWebserverTest { public function testExec() { - $curl = new Curl(); + $curl = new Curl(array( + 'proxy_host' => false, + )); $this->assertTrue($curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT))); $this->assertTrue($curl->exec(sprintf('http://localhost:%d/404.txt', WEBSERVER_PORT))); @@ -29,7 +31,9 @@ class CurlTest extends AbstractWebserverTest public function testGetErrorMessage() { - $curl = new Curl(); + $curl = new Curl(array( + 'proxy_host' => false, + )); $curl->exec('http://unknown/curl.txt'); $this->assertEquals('Could not connect to host', $curl->getErrorMessage()); @@ -43,7 +47,9 @@ class CurlTest extends AbstractWebserverTest public function testGetRequestHeaders() { - $curl = new Curl(); + $curl = new Curl(array( + 'proxy_host' => false, + )); $curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT)); $this->assertEquals(132 + self::$websererPortLength, strlen($curl->getRequestHeaders())); @@ -54,7 +60,9 @@ class CurlTest extends AbstractWebserverTest public function testGetResponse() { - $curl = new Curl(); + $curl = new Curl(array( + 'proxy_host' => false, + )); $curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT)); $this->assertSame('OK', $curl->getResponseStatusMessage()); diff --git a/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php b/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php index 27f419e..9597ca6 100644 --- a/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php +++ b/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php @@ -41,7 +41,9 @@ class WsdlDownloaderTest extends AbstractWebserverTest Cache::setDirectory($wsdlCacheUrl); $cacheDirForRegExp = preg_quote($wsdlCacheUrl, '#'); - $wsdlDownloader = new WsdlDownloader(new Curl()); + $wsdlDownloader = new WsdlDownloader(new Curl(array( + 'proxy_host' => false, + ))); $this->assertCount(0, $wsdlCacheDir->getChildren()); $cacheFileName = $wsdlDownloader->download($source); From 3cfeea8371f8639465696382a9fda6439ee6b963 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Thu, 14 Aug 2014 11:21:26 +0200 Subject: [PATCH 06/12] [SoapClient] [Tests] Fixed typo --- src/BeSimple/SoapClient/Tests/ServerInterop/MTOMServer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BeSimple/SoapClient/Tests/ServerInterop/MTOMServer.php b/src/BeSimple/SoapClient/Tests/ServerInterop/MTOMServer.php index f86bda5..72e8e19 100644 --- a/src/BeSimple/SoapClient/Tests/ServerInterop/MTOMServer.php +++ b/src/BeSimple/SoapClient/Tests/ServerInterop/MTOMServer.php @@ -14,13 +14,13 @@ $options = array( 'cache_wsdl' => WSDL_CACHE_NONE, 'classmap' => array( 'base64Binary' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\base64Binary', - 'AttachmentRequest' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\AttachmentRequest', + 'AttachmentType' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\AttachmentRequest', ), ); class Mtom { - public function attachment(AttachmentRequest $attachment) + public function attachment(Fixtures\AttachmentRequest $attachment) { $b64 = $attachment->binaryData; From e2de214ea58a0a451cda98eb1718f6e3badc509b Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Thu, 14 Aug 2014 11:22:20 +0200 Subject: [PATCH 07/12] [SoapClient] [Tests] Removed uploaded file --- .../SoapClient/Tests/ServerInterop/SwaServerInteropTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/BeSimple/SoapClient/Tests/ServerInterop/SwaServerInteropTest.php b/src/BeSimple/SoapClient/Tests/ServerInterop/SwaServerInteropTest.php index 90f7fa0..73dc2aa 100644 --- a/src/BeSimple/SoapClient/Tests/ServerInterop/SwaServerInteropTest.php +++ b/src/BeSimple/SoapClient/Tests/ServerInterop/SwaServerInteropTest.php @@ -42,6 +42,8 @@ class SwaServerInteropTest extends TestCase $result = $sc->downloadFile($download); $this->assertEquals($upload->data, $result->data); + + unlink(__DIR__.'/../ServerInterop/'.$download->name); } public function testUploadDownloadImage() @@ -60,5 +62,7 @@ class SwaServerInteropTest extends TestCase $result = $sc->downloadFile($download); $this->assertEquals($upload->data, $result->data); + + unlink(__DIR__.'/../ServerInterop/'.$download->name); } -} \ No newline at end of file +} From 36a368e6957c72290c884e48e2bb67a6796f9036 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Thu, 14 Aug 2014 11:30:07 +0200 Subject: [PATCH 08/12] [composer] Removed dev minimum-stability --- src/BeSimple/SoapBundle/composer.json | 1 - src/BeSimple/SoapClient/composer.json | 1 - src/BeSimple/SoapCommon/composer.json | 1 - src/BeSimple/SoapServer/composer.json | 1 - src/BeSimple/SoapWsdl/composer.json | 1 - 5 files changed, 5 deletions(-) diff --git a/src/BeSimple/SoapBundle/composer.json b/src/BeSimple/SoapBundle/composer.json index 0b0e41f..7140b4f 100644 --- a/src/BeSimple/SoapBundle/composer.json +++ b/src/BeSimple/SoapBundle/composer.json @@ -37,7 +37,6 @@ "psr-0": { "BeSimple\\SoapBundle": "" } }, "target-dir": "BeSimple/SoapBundle", - "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "0.2-dev" diff --git a/src/BeSimple/SoapClient/composer.json b/src/BeSimple/SoapClient/composer.json index c66b73f..dc2c633 100644 --- a/src/BeSimple/SoapClient/composer.json +++ b/src/BeSimple/SoapClient/composer.json @@ -35,7 +35,6 @@ "psr-0": { "BeSimple\\SoapClient": "" } }, "target-dir": "BeSimple/SoapClient", - "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "0.2-dev" diff --git a/src/BeSimple/SoapCommon/composer.json b/src/BeSimple/SoapCommon/composer.json index e219f9b..17386ae 100644 --- a/src/BeSimple/SoapCommon/composer.json +++ b/src/BeSimple/SoapCommon/composer.json @@ -32,7 +32,6 @@ "psr-0": { "BeSimple\\SoapCommon": "" } }, "target-dir": "BeSimple/SoapCommon", - "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "0.2-dev" diff --git a/src/BeSimple/SoapServer/composer.json b/src/BeSimple/SoapServer/composer.json index 942c3bd..8e7c862 100644 --- a/src/BeSimple/SoapServer/composer.json +++ b/src/BeSimple/SoapServer/composer.json @@ -29,7 +29,6 @@ "psr-0": { "BeSimple\\SoapServer": "" } }, "target-dir": "BeSimple/SoapServer", - "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "0.2-dev" diff --git a/src/BeSimple/SoapWsdl/composer.json b/src/BeSimple/SoapWsdl/composer.json index 24fbbcc..9f9f61c 100644 --- a/src/BeSimple/SoapWsdl/composer.json +++ b/src/BeSimple/SoapWsdl/composer.json @@ -22,7 +22,6 @@ "psr-0": { "BeSimple\\SoapWsdl": "" } }, "target-dir": "BeSimple/SoapWsdl", - "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "0.2-dev" From 726ee89936aa92c27b09589c8c4355930a414665 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Thu, 14 Aug 2014 13:03:09 +0200 Subject: [PATCH 09/12] [SoapClient] [Tests] Down required version of symfony/filesystem vendor --- composer.json | 2 +- src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php | 2 +- src/BeSimple/SoapClient/composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 4dd31e4..061b310 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "require-dev": { "ext-mcrypt": "*", "mikey179/vfsStream": "dev-master", - "symfony/filesystem": "~2.3", + "symfony/filesystem": "~2.0", "symfony/process": "~2.3" }, "autoload": { diff --git a/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php b/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php index 9597ca6..2027b2d 100644 --- a/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php +++ b/src/BeSimple/SoapClient/Tests/WsdlDownloaderTest.php @@ -274,7 +274,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 dc2c633..9b1b7ab 100644 --- a/src/BeSimple/SoapClient/composer.json +++ b/src/BeSimple/SoapClient/composer.json @@ -28,7 +28,7 @@ }, "require-dev": { "mikey179/vfsStream": "dev-master", - "symfony/filesystem": "~2.3", + "symfony/filesystem": "~2.0", "symfony/process": "~2.3" }, "autoload": { From f5d6f5e759701a2e9c83835e580713dc8c56e32e Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Thu, 14 Aug 2014 13:03:47 +0200 Subject: [PATCH 10/12] Updated travis --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5150a12..8887d2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,10 +10,14 @@ env: - SYMFONY_VERSION=2.1.* - SYMFONY_VERSION=2.2.* - SYMFONY_VERSION=2.3.* - - SYMFONY_VERSION=dev-master + - SYMFONY_VERSION=2.4.* + - SYMFONY_VERSION=2.5.* + - SYMFONY_VERSION=dev-master symfony/debug:~2.6@dev symfony/http-kernel:~2.6@dev before_script: - - composer require symfony/http-foundation:${SYMFONY_VERSION} --no-interaction --prefer-source + - composer self-update + - composer require symfony/framework-bundle:${SYMFONY_VERSION} --no-update + - composer update --no-interaction --prefer-source - ./src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh - ./src/BeSimple/SoapClient/Tests/bin/axis.sh From fd402731af4c249e6b8f055057b440f2041d0ef4 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Thu, 14 Aug 2014 13:10:32 +0200 Subject: [PATCH 11/12] Fixed travis configuration --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8887d2f..b258356 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ env: - SYMFONY_VERSION=2.3.* - SYMFONY_VERSION=2.4.* - SYMFONY_VERSION=2.5.* - - SYMFONY_VERSION=dev-master symfony/debug:~2.6@dev symfony/http-kernel:~2.6@dev + - SYMFONY_VERSION="dev-master symfony/debug:~2.6@dev symfony/http-kernel:~2.6@dev" before_script: - composer self-update @@ -26,4 +26,4 @@ script: matrix: allow_failures: - - env: SYMFONY_VERSION=dev-master + - env: SYMFONY_VERSION="dev-master symfony/debug:~2.6@dev symfony/http-kernel:~2.6@dev" From e676eb04325e5061c7212d06a10de413325620ad Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Thu, 14 Aug 2014 13:33:32 +0200 Subject: [PATCH 12/12] [composer] Used a stable version of vfsStream --- composer.json | 2 +- src/BeSimple/SoapClient/composer.json | 2 +- src/BeSimple/SoapCommon/composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 061b310..d3a33d8 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ }, "require-dev": { "ext-mcrypt": "*", - "mikey179/vfsStream": "dev-master", + "mikey179/vfsStream": "~1.0", "symfony/filesystem": "~2.0", "symfony/process": "~2.3" }, diff --git a/src/BeSimple/SoapClient/composer.json b/src/BeSimple/SoapClient/composer.json index 9b1b7ab..8687ce5 100644 --- a/src/BeSimple/SoapClient/composer.json +++ b/src/BeSimple/SoapClient/composer.json @@ -27,7 +27,7 @@ "ass/xmlsecurity": "~1.0" }, "require-dev": { - "mikey179/vfsStream": "dev-master", + "mikey179/vfsStream": "~1.0", "symfony/filesystem": "~2.0", "symfony/process": "~2.3" }, diff --git a/src/BeSimple/SoapCommon/composer.json b/src/BeSimple/SoapCommon/composer.json index 17386ae..bf1ec6d 100644 --- a/src/BeSimple/SoapCommon/composer.json +++ b/src/BeSimple/SoapCommon/composer.json @@ -26,7 +26,7 @@ }, "require-dev": { "ext-mcrypt": "*", - "mikey179/vfsStream": "dev-master" + "mikey179/vfsStream": "~1.0" }, "autoload": { "psr-0": { "BeSimple\\SoapCommon": "" }