diff --git a/.gitignore b/.gitignore index db0e5ff..38584b4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ vendor/ composer.lock phpunit.xml Tests/Fixtures/build_include/ +.idea/ diff --git a/Curl.php b/Curl.php index e777fc8..23fb5b0 100644 --- a/Curl.php +++ b/Curl.php @@ -80,10 +80,16 @@ public function __construct(array $options = array(), $followLocationMaxRedirect if (isset($options['connection_timeout'])) { curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, $options['connection_timeout']); } + if (isset($options['timeout'])) { + curl_setopt($this->ch, CURLOPT_TIMEOUT, $options['timeout']); + } + if (isset($options['ssl_verifyhost'])) { + curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, $options['ssl_verifyhost']); + } if (isset($options['proxy_host'])) { if (false !== $options['proxy_host']) { - $proxyHost = $options['proxy_host'].(isset($options['proxy_port']) ? $options['proxy_port'] : 8080); + $proxyHost = $options['proxy_host'].':'.(isset($options['proxy_port']) ? $options['proxy_port'] : 8080); } else { $proxyHost = false; } diff --git a/Tests/WsdlDownloaderTest.php b/Tests/WsdlDownloaderTest.php index 38905b5..a5e4595 100644 --- a/Tests/WsdlDownloaderTest.php +++ b/Tests/WsdlDownloaderTest.php @@ -278,7 +278,7 @@ public static function setUpBeforeClass() $content = file_get_contents(self::$fixturesPath.$file); $content = preg_replace('#'.preg_quote('%location%').'#', sprintf('localhost:%d', WEBSERVER_PORT), $content); - file_put_contents(self::$fixturesPath.'build_include'.DIRECTORY_SEPARATOR.pathinfo($file, PATHINFO_BASENAME), $content); + self::$filesystem->dumpFile(self::$fixturesPath.'build_include'.DIRECTORY_SEPARATOR.pathinfo($file, PATHINFO_BASENAME), $content); } } diff --git a/WsdlDownloader.php b/WsdlDownloader.php index 97a7d67..eab69e1 100644 --- a/WsdlDownloader.php +++ b/WsdlDownloader.php @@ -214,7 +214,7 @@ private function resolveRelativePathInUrl($base, $relative) $urlParts = parse_url($base); // combine base path with relative path - if (isset($urlParts['path']) && '/' === $relative{0}) { + if (isset($urlParts['path']) && '/' === $relative[0]) { // $relative is absolute path from domain (starts with /) $path = $relative; } elseif (isset($urlParts['path']) && strrpos($urlParts['path'], '/') === (strlen($urlParts['path']) )) { diff --git a/composer.json b/composer.json index 8687ce5..b76d6a2 100644 --- a/composer.json +++ b/composer.json @@ -20,15 +20,15 @@ } ], "require": { - "php": ">=5.3.0", + "php": ">=7.2", "ext-soap": "*", "ext-curl": "*", - "besimple/soap-common": "0.2.*", + "besimple/soap-common": "@dev", "ass/xmlsecurity": "~1.0" }, "require-dev": { "mikey179/vfsStream": "~1.0", - "symfony/filesystem": "~2.0", + "symfony/filesystem": "~2.3", "symfony/process": "~2.3" }, "autoload": { @@ -37,7 +37,7 @@ "target-dir": "BeSimple/SoapClient", "extra": { "branch-alias": { - "dev-master": "0.2-dev" + "dev-master": "0.3-dev" } } }