From: Michael Wallner Date: Thu, 6 Jun 2019 13:55:56 +0000 (+0200) Subject: prepare v3.2.1 X-Git-Tag: RELEASE_3_2_1~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=a4e55a4662dd65108437a74c22066260dd7d7732;p=m6w6%2Fext-http prepare v3.2.1 * Fixed gh-issue #88: Unable to run test suite (Remi Collet) * Fixed gh-issue #86: test failure with curl 7.64 * Fixed gh-issue #85: [-Wformat-extra-args] build warnings * Fixed gh-issue #84: segfault and build failure since curl 7.62 * Fixed gh-issue #82: Test harness improvements (Chris Wright) * Fixed gh-issue #64: compress and connecttimeout interfere with low_speed_limit (@rcanavan) * Fixed http\QueryString::getGlobalInstance() * Fixed missing 2nd reflection argument info of http\Client::notify() * Fixed PHP-7.4 compatibility --- diff --git a/package.xml b/package.xml index 046c82b..ec1c787 100644 --- a/package.xml +++ b/package.xml @@ -31,9 +31,9 @@ https://mdref.m6w6.name/http mike@php.net yes - 2018-07-19 + 2019-06-06 - 3.2.1dev + 3.2.1 3.2.0 @@ -42,7 +42,14 @@ https://mdref.m6w6.name/http BSD-2-Clause @@ -154,7 +161,10 @@ https://mdref.m6w6.name/http + + + diff --git a/php_http.h b/php_http.h index f698f64..388cc08 100644 --- a/php_http.h +++ b/php_http.h @@ -13,7 +13,7 @@ #ifndef PHP_EXT_HTTP_H #define PHP_EXT_HTTP_H -#define PHP_PECL_HTTP_VERSION "3.2.1dev" +#define PHP_PECL_HTTP_VERSION "3.2.1" extern zend_module_entry http_module_entry; #define phpext_http_ptr &http_module_entry diff --git a/scripts/gen_stubs.php b/scripts/gen_stubs.php index 5f28545..c3343fc 100755 --- a/scripts/gen_stubs.php +++ b/scripts/gen_stubs.php @@ -11,9 +11,12 @@ function m($m, $c = null) { } return $n; } -function t($p) { - if ($c = $p->getClass()) return "\\" . $c->getName() . " "; - if ($p->isArray()) return "array "; +function t(ReflectionParameter $p) { + if ($c = $p->getClass()) return ($p->allowsNull()?"?":"") . "\\" . $c->getName() . " "; + if ($p->isArray()) return ($p->allowsNull() ? "?":"") . "array "; + if ($p->hasType()) { + return ($p->allowsNull() ? "?" : "") . ($p->getType()->isBuiltin() ? "" : "\\") . $p->getType()->getName() . " "; + } } function c($n, $c) { $_=$c; @@ -115,7 +118,11 @@ foreach ($namespaces as $ns) { } $ps[] = $p1; } - fprintf($out, "%s) {\n\t}\n", implode(", ", $ps)); + fprintf($out, "%s)", implode(", ", $ps)); + if ($f->hasReturnType()) { + fprintf($out, " : %s%s", $f->getReturnType()->allowsNull() ? "?":"", $f->getReturnType()->getName()); + } + fprintf($out, " {\n\t}\n"); } } // @@ -146,8 +153,14 @@ foreach ($namespaces as $ns) { fprintf($out, "extends \\%s ", $p->getName()); } if ($i = $c->getInterfaceNames()) { - fprintf($out, "implements \\%s ", - implode(", \\", array_filter($i, function($v) { + fprintf($out, "%s \\%s ", + $c->isInterface() ? "extends" : "implements", + implode(", \\", array_filter($i, function($v) use($c, $i) { + foreach ($i as $ii) { + if ($v != $ii && (new ReflectionClass($ii))->implementsInterface("\\".$v)) { + return false; + } + } return $v != "Traversable"; })) @@ -191,6 +204,11 @@ foreach ($namespaces as $ns) { $ps[] = $p1; } fprintf($out, "%s)", implode(", ", $ps)); + if ($m->hasReturnType()) { + fprintf($out, " : %s%s%s", $m->getReturnType()->allowsNull() ? "?":"", + $m->getReturnType()->isBuiltin() ? "" : "\\", //0 === strpos($m->getReturnType()->getName(), $c->getNamespaceName()) ? "\\":"", + $m->getReturnType()->getName()); + } if ($m->isAbstract()) { fprintf($out, ";\n\n"); } else { diff --git a/travis/pecl b/travis/pecl index 309d295..dd0a2e6 160000 --- a/travis/pecl +++ b/travis/pecl @@ -1 +1 @@ -Subproject commit 309d295271f95d9267c64535de8c2e638f6614cc +Subproject commit dd0a2e61211836ac7b24a271a5bd68af99dee3d6