package administrativa
authorMichael Wallner <mike@php.net>
Fri, 11 Jul 2014 12:16:54 +0000 (14:16 +0200)
committerMichael Wallner <mike@php.net>
Fri, 11 Jul 2014 12:16:54 +0000 (14:16 +0200)
.gitignore
check_package-xml.php [new file with mode: 0755]
package.xml
phpunit.php [deleted file]

index 8ffc91c46f3546d790f7ea759d43af7b705dba99..64b23b6c9850843b25b88288a97f0833805da510 100644 (file)
@@ -36,3 +36,4 @@ tests/*.log
 tests/*.out
 tests/*.php
 tests/*.sh
+lcov_data
diff --git a/check_package-xml.php b/check_package-xml.php
new file mode 100755 (executable)
index 0000000..4000054
--- /dev/null
@@ -0,0 +1,92 @@
+#!/usr/bin/env php
+<?php
+
+ini_set("log_errors", false);
+ini_set("display_errors", true);
+
+if ($argc > 1) {
+       if ($argv[1] === "-") {
+               $file = "php://stdin";
+       } else {
+               $file = $argv[1];
+       }
+} elseif (stdin_is_readable()) {
+       $file = "php://stdin";
+} else {
+       $file = "./package.xml";
+}
+
+if (($xml = simplexml_load_file($file))) {
+       $xml_files = xmllist($xml->contents[0]);
+       $dirs = ["."];
+       while ($dir = array_shift($dirs)) {
+               foreach (dirlist($dir) as $file) {
+                       if (is_gitignored($file)) {
+                               continue;
+                       }
+                       if (!is_dir($file)) {
+                               if (!in_array($file, $xml_files)) {
+                                       echo "Missing file $file\n";
+                               }
+                       } else {
+                               $base = basename($file);
+                               if ($base{0} !== ".") {
+                                       array_push($dirs, $file);
+                               }
+                       }
+               }
+       }
+}
+
+###
+
+function error($fmt) {
+       trigger_error(call_user_func_array("sprintf", func_get_args()));
+}
+
+function stdin_is_readable() {
+       $r = [STDIN]; $w = $e = [];
+       return stream_select($r, $w, $e, 0);
+}
+
+function is_gitignored($file) {
+       static $gitignore;
+       
+       if (!isset($gitignore)) {
+               if (is_readable(".gitignore")) {
+                       $gitignore = explode("\n", `find | git check-ignore --stdin`);
+               } else {
+                       $gitignore = false;
+               }
+       }
+       if ($gitignore) {
+               return in_array($file, $gitignore);
+       }
+       return false;
+}
+
+function xmllist(SimpleXmlElement $dir, $p = ".", &$a = null) {
+       settype($a, "array");
+       $p = trim($p, "/") . "/" . trim($dir["name"], "/") . "/";
+       foreach ($dir as $file) {
+               switch ($file->getName()) {
+                       case "dir":
+                               xmllist($file, $p, $a);
+                               break;
+                       case "file":
+                               $a[] = sprintf("%s/%s", trim($p, "/"), trim($file["name"]));
+                               break;
+                       default:
+                               error("Unknown content type: %s", $file->getName());
+                               break;
+               }
+       }
+       return $a;
+}
+
+function dirlist($dir, $p = null) {
+       $p = implode("/", array_filter([trim($p, "/"), trim($dir, "/")]));
+       foreach (scandir($p) as $file) {
+               yield $p."/".$file;
+       }
+}
index 990e99bec7413d7847dd3d75390a185056eb1fa8..44f96177ebd8ad76b8bc56e7b60e14a95d854004 100644 (file)
@@ -37,9 +37,9 @@ v2: http://dev.iworks.at/ext-http/lcov/ext/http/
   <email>mike@php.net</email>
   <active>yes</active>
  </lead>
- <date>2014-04-24</date>
+ <date>2014-07-11</date>
  <version>
-  <release>2.0.6</release>
+  <release>2.0.7</release>
   <api>2.0.0</api>
  </version>
  <stability>
@@ -48,10 +48,13 @@ v2: http://dev.iworks.at/ext-http/lcov/ext/http/
  </stability>
  <license>BSD, revised</license>
  <notes><![CDATA[
-+ Added "uploaded" progress state
-* Fixed bug #67089 (Segmentaion fault with ZTS)
-* Fixed compatibility with PHP-5.6+
-* Fixed re-use of request messages which content length remained untouched when the body was reset
+* General improvements to the test suite
+* Fixed http\Env\Response::send() ignoring some write errors
+* Fixed bug #67528 (RFC compliant default user agent)
+* Fixed a garbage collector issue with JSON POSTs
+* Fixed refcount issue and double free of message bodies
+* Fixed use after free if the http\Client::enqueue() closure returns TRUE
+* Fixed bug #67584 (http\Client\Response not initialized as response on failure)
 ]]></notes>
  <contents>
   <dir name="/">
@@ -159,6 +162,27 @@ v2: http://dev.iworks.at/ext-http/lcov/ext/http/
      <file role="test" name="clientresponse001.phpt"/>
      <file role="test" name="clientresponse002.phpt"/>
      <file role="test" name="clientresponse003.phpt"/>
+     <file role="test" name="cookie001.phpt">
+     <file role="test" name="cookie002.phpt">
+     <file role="test" name="cookie003.phpt">
+     <file role="test" name="cookie004.phpt">
+     <file role="test" name="cookie005.phpt">
+     <file role="test" name="cookie006.phpt">
+     <file role="test" name="cookie007.phpt">
+     <file role="test" name="cookie008.phpt">
+     <file role="test" name="cookie009.phpt">
+     <file role="test" name="cookie010.phpt">
+     <file role="test" name="cookie011.phpt">
+     <file role="test" name="cookie012.phpt">
+     <file role="test" name="encstream001.phpt">
+     <file role="test" name="encstream002.phpt">
+     <file role="test" name="encstream003.phpt">
+     <file role="test" name="encstream004.phpt">
+     <file role="test" name="encstream005.phpt">
+     <file role="test" name="encstream006.phpt">
+     <file role="test" name="encstream007.phpt">
+     <file role="test" name="encstream008.phpt">
+     <file role="test" name="encstream009.phpt">
      <file role="test" name="envrequestbody001.phpt"/>
      <file role="test" name="envrequestbody002.phpt"/>
      <file role="test" name="envrequestbody003.phpt"/>
@@ -184,6 +208,7 @@ v2: http://dev.iworks.at/ext-http/lcov/ext/http/
      <file role="test" name="envresponse013.phpt"/>
      <file role="test" name="envresponse014.phpt"/>
      <file role="test" name="envresponse015.phpt"/>
+     <file role="test" name="envresponse016.phpt">
      <file role="test" name="envresponsebody001.phpt"/>
      <file role="test" name="envresponsebody002.phpt"/>
      <file role="test" name="envresponsecodes.phpt"/>
@@ -218,24 +243,40 @@ v2: http://dev.iworks.at/ext-http/lcov/ext/http/
      <file role="test" name="message013.phpt"/>
      <file role="test" name="message014.phpt"/>
      <file role="test" name="message015.phpt"/>
+     <file role="test" name="messagebody001.phpt">
+     <file role="test" name="messagebody002.phpt">
+     <file role="test" name="messagebody003.phpt">
+     <file role="test" name="messagebody004.phpt">
+     <file role="test" name="messagebody005.phpt">
+     <file role="test" name="messagebody006.phpt">
+     <file role="test" name="messagebody007.phpt">
+     <file role="test" name="messagebody008.phpt">
+     <file role="test" name="messagebody009.phpt">
+     <file role="test" name="messagebody010.phpt">
+     <file role="test" name="querystring001.phpt">
+     <file role="test" name="querystring002.phpt">
      <file role="test" name="negotiate001.phpt"/>
      <file role="test" name="params001.phpt"/>
      <file role="test" name="params002.phpt"/>
-     <file role="test" name="phpunit.phpt"/>
+     <file role="test" name="params003.phpt">
+     <file role="test" name="params004.phpt">
+     <file role="test" name="params005.phpt">
+     <file role="test" name="params006.phpt">
+     <file role="test" name="params007.phpt">
+     <file role="test" name="params008.phpt">
+     <file role="test" name="params009.phpt">
+     <file role="test" name="params010.phpt">
+     <file role="test" name="params011.phpt">
+     <file role="test" name="params012.phpt">
      <file role="test" name="propertyproxy001.phpt"/>
-     <file role="test" name="querystring_001.phpt"/>
      <file role="test" name="serialize001.phpt"/>
      <file role="test" name="url001.phpt"/>
+     <file role="test" name="url002.phpt">
+     <file role="test" name="url003.phpt">
+     <file role="test" name="url004.phpt">
+     <file role="test" name="url005.phpt">
      <file role="test" name="version001.phpt"/>
    </dir>
-   <dir name="phpunit">
-    <file role="test" name="CookieTest.php"/>
-    <file role="test" name="EncodingTest.php"/>
-    <file role="test" name="MessageBodyTest.php"/>
-    <file role="test" name="ParamsTest.php"/>
-    <file role="test" name="QueryStringTest.php"/>
-    <file role="test" name="UrlTest.php"/>
-   </dir>
   </dir>
  </contents>
  <dependencies>
diff --git a/phpunit.php b/phpunit.php
deleted file mode 100644 (file)
index 8a61937..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-require_once "PHPUnit/Autoload.php";
-$c = new PHPUnit_TextUI_Command;
-$c->run(array_merge($argv, array(__DIR__."/phpunit/")));