From 785eda091a207711d15acfe61c5f820f5f84cd90 Mon Sep 17 00:00:00 2001 From: Gavin Staniforth Date: Fri, 10 Jul 2020 17:18:26 +0100 Subject: [PATCH 1/4] feat: symfony 4 --- .travis.yml | 10 ++++------ composer.json | 14 +++++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index c50dd6f7..5ec8e88c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,14 @@ language: php php: - - 5.6 - - 7.0 - 7.1 + - 7.3 + - 7.4 - nightly env: - - SYMFONY_VERSION=2.8.* - - SYMFONY_VERSION=3.0.* - - SYMFONY_VERSION=3.3.* - - SYMFONY_VERSION=dev-master + - SYMFONY_VERSION=3.4.* + - SYMFONY_VERSION=4.4.* before_script: - composer self-update diff --git a/composer.json b/composer.json index c7fc8966..982ae5e7 100644 --- a/composer.json +++ b/composer.json @@ -20,13 +20,13 @@ } ], "require": { - "php": ">=5.5.0", + "php": ">=7.1", "ext-soap": "*", "ext-curl": "*", "ass/xmlsecurity": "~1.0", - "symfony/framework-bundle": "^2.8|^3", - "symfony/twig-bundle": "^2.8|^3", - "zendframework/zend-mime": "2.2.*" + "symfony/framework-bundle": "^3|^4", + "symfony/twig-bundle": "^3|^4", + "laminas/laminas-mime": "2.2.*" }, "replace": { "besimple/soap-bundle": "self.version", @@ -37,9 +37,9 @@ }, "require-dev": { "ext-mcrypt": "*", - "mikey179/vfsStream": "^1.6.5", - "symfony/filesystem": "^2.8|^3", - "symfony/process": "^2.8|^3" + "mikey179/vfsstream": "^1.6.5", + "symfony/filesystem": "^3|^4", + "symfony/process": "^3|^4" }, "autoload": { "psr-0": { "BeSimple\\": "src/" } From 9c43ca4db7c03ac199692bf9da9589f22131a5f1 Mon Sep 17 00:00:00 2001 From: Gavin Staniforth Date: Fri, 10 Jul 2020 17:45:39 +0100 Subject: [PATCH 2/4] build: install phpunit 5 and use it --- .travis.yml | 2 +- composer.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5ec8e88c..29a56ceb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ before_script: - ./src/BeSimple/SoapClient/Tests/bin/axis.sh script: - - phpunit --coverage-text + - vendor/bin/phpunit --coverage-text diff --git a/composer.json b/composer.json index 982ae5e7..801029da 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,8 @@ "ext-mcrypt": "*", "mikey179/vfsstream": "^1.6.5", "symfony/filesystem": "^3|^4", - "symfony/process": "^3|^4" + "symfony/process": "^3|^4", + "phpunit/phpunit": "^5" }, "autoload": { "psr-0": { "BeSimple\\": "src/" } From c567e10fc65ae8122678eaa37fd9966b4777949e Mon Sep 17 00:00:00 2001 From: Gavin Staniforth Date: Fri, 10 Jul 2020 17:50:39 +0100 Subject: [PATCH 3/4] build: correct psr0 namespaces --- .../{AbstractWebserverTest.php => AbstractWebServerTest.php} | 0 src/BeSimple/SoapCommon/Tests/CacheTest.php | 2 +- src/BeSimple/SoapCommon/Tests/Mime/MultiPartTest.php | 2 +- src/BeSimple/SoapCommon/Tests/Mime/ParserTest.php | 2 +- src/BeSimple/SoapCommon/Tests/Mime/PartHeaderTest.php | 2 +- src/BeSimple/SoapCommon/Tests/Mime/PartTest.php | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename src/BeSimple/SoapClient/Tests/{AbstractWebserverTest.php => AbstractWebServerTest.php} (100%) diff --git a/src/BeSimple/SoapClient/Tests/AbstractWebserverTest.php b/src/BeSimple/SoapClient/Tests/AbstractWebServerTest.php similarity index 100% rename from src/BeSimple/SoapClient/Tests/AbstractWebserverTest.php rename to src/BeSimple/SoapClient/Tests/AbstractWebServerTest.php diff --git a/src/BeSimple/SoapCommon/Tests/CacheTest.php b/src/BeSimple/SoapCommon/Tests/CacheTest.php index 291ff42e..307f2d90 100644 --- a/src/BeSimple/SoapCommon/Tests/CacheTest.php +++ b/src/BeSimple/SoapCommon/Tests/CacheTest.php @@ -16,7 +16,7 @@ use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStreamWrapper; -class SoapRequestTest extends \PHPUnit_Framework_TestCase +class CacheTest extends \PHPUnit_Framework_TestCase { public function testSetEnabled() { diff --git a/src/BeSimple/SoapCommon/Tests/Mime/MultiPartTest.php b/src/BeSimple/SoapCommon/Tests/Mime/MultiPartTest.php index fe511904..ba2e1666 100644 --- a/src/BeSimple/SoapCommon/Tests/Mime/MultiPartTest.php +++ b/src/BeSimple/SoapCommon/Tests/Mime/MultiPartTest.php @@ -10,7 +10,7 @@ * with this source code in the file LICENSE. */ -namespace BeSimple\SoapCommon\Tests; +namespace BeSimple\SoapCommon\Tests\Mime; use BeSimple\SoapCommon\Mime\MultiPart; use BeSimple\SoapCommon\Mime\Part; diff --git a/src/BeSimple/SoapCommon/Tests/Mime/ParserTest.php b/src/BeSimple/SoapCommon/Tests/Mime/ParserTest.php index 8ce3a99c..e348c256 100644 --- a/src/BeSimple/SoapCommon/Tests/Mime/ParserTest.php +++ b/src/BeSimple/SoapCommon/Tests/Mime/ParserTest.php @@ -10,7 +10,7 @@ * with this source code in the file LICENSE. */ -namespace BeSimple\SoapCommon\Tests; +namespace BeSimple\SoapCommon\Tests\Mime; use BeSimple\SoapCommon\Mime\MultiPart; use BeSimple\SoapCommon\Mime\Parser; diff --git a/src/BeSimple/SoapCommon/Tests/Mime/PartHeaderTest.php b/src/BeSimple/SoapCommon/Tests/Mime/PartHeaderTest.php index 00e9406f..b9aa3ac2 100644 --- a/src/BeSimple/SoapCommon/Tests/Mime/PartHeaderTest.php +++ b/src/BeSimple/SoapCommon/Tests/Mime/PartHeaderTest.php @@ -10,7 +10,7 @@ * with this source code in the file LICENSE. */ -namespace BeSimple\SoapCommon\Tests; +namespace BeSimple\SoapCommon\Tests\Mime; use BeSimple\SoapCommon\Mime\PartHeader; use BeSimple\SoapCommon\Tests\Fixtures\MimePartHeader; diff --git a/src/BeSimple/SoapCommon/Tests/Mime/PartTest.php b/src/BeSimple/SoapCommon/Tests/Mime/PartTest.php index 21a3d314..2f3a4ac8 100644 --- a/src/BeSimple/SoapCommon/Tests/Mime/PartTest.php +++ b/src/BeSimple/SoapCommon/Tests/Mime/PartTest.php @@ -10,7 +10,7 @@ * with this source code in the file LICENSE. */ -namespace BeSimple\SoapCommon\Tests; +namespace BeSimple\SoapCommon\Tests\Mime; use BeSimple\SoapCommon\Mime\Part; use BeSimple\SoapCommon\Mime\PartHeader; From 0374456cdd5749b551a755f91a5dbd5df70d2fa0 Mon Sep 17 00:00:00 2001 From: Gavin Staniforth Date: Fri, 10 Jul 2020 17:53:31 +0100 Subject: [PATCH 4/4] build: stop using process builder (sf4) --- .../Tests/AbstractWebServerTest.php | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/BeSimple/SoapClient/Tests/AbstractWebServerTest.php b/src/BeSimple/SoapClient/Tests/AbstractWebServerTest.php index a7bc6d48..46414f99 100644 --- a/src/BeSimple/SoapClient/Tests/AbstractWebServerTest.php +++ b/src/BeSimple/SoapClient/Tests/AbstractWebServerTest.php @@ -13,7 +13,7 @@ namespace BeSimple\SoapClient\Tests; use Symfony\Component\Process\PhpExecutableFinder; -use Symfony\Component\Process\ProcessBuilder; +use Symfony\Component\Process\Process; /** * @author francis.besset@gmail.com @@ -21,7 +21,7 @@ abstract class AbstractWebServerTest extends \PHPUnit_Framework_TestCase { /** - * @var ProcessBuilder + * @var Process */ static protected $webserver; static protected $websererPortLength; @@ -33,14 +33,16 @@ public static function setUpBeforeClass() } $phpFinder = new PhpExecutableFinder(); - self::$webserver = ProcessBuilder::create(array( - 'exec', // used exec binary (https://github.com/symfony/symfony/issues/5759) - $phpFinder->find(), - '-S', - sprintf('localhost:%d', WEBSERVER_PORT), - '-t', - __DIR__.DIRECTORY_SEPARATOR.'Fixtures', - ))->getProcess(); + + self::$webserver = new Process( + [ + $phpFinder->find(), + '-S', + sprintf('localhost:%d', WEBSERVER_PORT), + '-t', + __DIR__.DIRECTORY_SEPARATOR.'Fixtures', + ] + ); self::$webserver->start(); usleep(100000);