--- /dev/null
+#!/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;
+ }
+}
<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>
</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="/">
<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"/>
<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"/>
<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>