prepare v3.2.1
authorMichael Wallner <mike@php.net>
Thu, 6 Jun 2019 13:55:56 +0000 (15:55 +0200)
committerMichael Wallner <mike@php.net>
Thu, 6 Jun 2019 13:55:56 +0000 (15:55 +0200)
* 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

package.xml
php_http.h
scripts/gen_stubs.php
travis/pecl

index 046c82b679eeb7a49c101a94eaf34994a500b1d0..ec1c787da870c3d263736d620f08fa1ba7c0d747 100644 (file)
@@ -31,9 +31,9 @@ https://mdref.m6w6.name/http
   <email>mike@php.net</email>
   <active>yes</active>
  </lead>
   <email>mike@php.net</email>
   <active>yes</active>
  </lead>
- <date>2018-07-19</date>
+ <date>2019-06-06</date>
  <version>
  <version>
-  <release>3.2.1dev</release>
+  <release>3.2.1</release>
   <api>3.2.0</api>
  </version>
  <stability>
   <api>3.2.0</api>
  </version>
  <stability>
@@ -42,7 +42,14 @@ https://mdref.m6w6.name/http
  </stability>
  <license uri="http://copyfree.org/content/standard/licenses/2bsd/license.txt">BSD-2-Clause</license>
  <notes><![CDATA[
  </stability>
  <license uri="http://copyfree.org/content/standard/licenses/2bsd/license.txt">BSD-2-Clause</license>
  <notes><![CDATA[
-*
+* 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 http\QueryString::getGlobalInstance()
+* Fixed missing 2nd reflection argument info of http\Client::notify()
+* Fixed PHP-7.4 compatibility
 ]]></notes>
  <contents>
   <dir name="/">
 ]]></notes>
  <contents>
   <dir name="/">
@@ -154,7 +161,10 @@ https://mdref.m6w6.name/http
      </dir>
      <dir name="helper">
       <file role="test" name="cookie.inc"/>
      </dir>
      <dir name="helper">
       <file role="test" name="cookie.inc"/>
+      <file role="test" name="cookie1.inc"/>
+      <file role="test" name="cookie2.inc"/>
       <file role="test" name="dump.inc"/>
       <file role="test" name="dump.inc"/>
+      <file role="test" name="env.inc"/>
       <file role="test" name="http2.crt"/>
       <file role="test" name="http2.key"/>
       <file role="test" name="pipeline.inc"/>
       <file role="test" name="http2.crt"/>
       <file role="test" name="http2.key"/>
       <file role="test" name="pipeline.inc"/>
index f698f6410457b78a2770cd66d9454707a5b852de..388cc08aaf791bd906195ea15171dd19a3175ab0 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef PHP_EXT_HTTP_H
 #define PHP_EXT_HTTP_H
 
 #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
 
 extern zend_module_entry http_module_entry;
 #define phpext_http_ptr &http_module_entry
index 5f28545aec073d20b2a8668ffe3db95e1967134c..c3343fc8c457e62b8ac0601a976417b0903ef48e 100755 (executable)
@@ -11,9 +11,12 @@ function m($m, $c = null) {
        }
        return $n;
 }
        }
        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;
 }
 function c($n, $c) {
     $_=$c;
@@ -115,7 +118,11 @@ foreach ($namespaces as $ns) {
                 }
                 $ps[] = $p1;
             }
                 }
                 $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, "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";
                             
                         }))
                             return $v != "Traversable";
                             
                         }))
@@ -191,6 +204,11 @@ foreach ($namespaces as $ns) {
                         $ps[] = $p1;
                     }
                     fprintf($out, "%s)", implode(", ", $ps));
                         $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 {
                     if ($m->isAbstract()) {
                         fprintf($out, ";\n\n");
                     } else {
index 309d295271f95d9267c64535de8c2e638f6614cc..dd0a2e61211836ac7b24a271a5bd68af99dee3d6 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 309d295271f95d9267c64535de8c2e638f6614cc
+Subproject commit dd0a2e61211836ac7b24a271a5bd68af99dee3d6