Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for PHP 7.4 + Updated Curl options #33

Open
wants to merge 8 commits into
base: 0.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ vendor/
composer.lock
phpunit.xml
Tests/Fixtures/build_include/
.idea/
8 changes: 7 additions & 1 deletion Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/WsdlDownloaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion WsdlDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']) )) {
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -37,7 +37,7 @@
"target-dir": "BeSimple/SoapClient",
"extra": {
"branch-alias": {
"dev-master": "0.2-dev"
"dev-master": "0.3-dev"
}
}
}