diff --git a/composer.json b/composer.json index 30ad743..dfdba8d 100644 --- a/composer.json +++ b/composer.json @@ -4,9 +4,12 @@ "type": "project", "description": "Update /etc/hosts to access running containers", "keywords": ["docker", "hosts"], + "repositories": [ + {"type": "vcs", "url": "https://github.com/iamluc/docker-php.git"} + ], "require": { - "stage1/docker-php": "@dev", - "symfony/console": "^3.0" + "symfony/console": "^2.8|^3.0", + "docker-php/docker-php": "dev-compat-docker-1.12" }, "require-dev": { "phpunit/phpunit": "^5.1" diff --git a/composer.lock b/composer.lock index 26cf202..1f1be7b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,48 +4,223 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "3fad2c8540cb4070d41413f6bef000ad", - "content-hash": "cc077c31955d6c25d083852030c94045", + "hash": "8c401ed6988053299341f65052e7b096", + "content-hash": "04863e12883d7a28939107da76385540", "packages": [ { - "name": "guzzlehttp/guzzle", - "version": "4.1.8", + "name": "clue/stream-filter", + "version": "v1.3.0", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "e196b8f44f9492a11261ea8f7b9724613a198daf" + "url": "https://github.com/clue/php-stream-filter.git", + "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/e196b8f44f9492a11261ea8f7b9724613a198daf", - "reference": "e196b8f44f9492a11261ea8f7b9724613a198daf", + "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/e3bf9415da163d9ad6701dccb407ed501ae69785", + "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785", "shasum": "" }, "require": { - "ext-json": "*", - "guzzlehttp/streams": "~1.4", - "php": ">=5.4.0" + "php": ">=5.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\StreamFilter\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@lueck.tv" + } + ], + "description": "A simple and modern approach to stream filtering in PHP", + "homepage": "https://github.com/clue/php-stream-filter", + "keywords": [ + "bucket brigade", + "callback", + "filter", + "php_user_filter", + "stream", + "stream_filter_append", + "stream_filter_register" + ], + "time": "2015-11-08 23:41:30" + }, + { + "name": "docker-php/docker-php", + "version": "dev-compat-docker-1.12", + "source": { + "type": "git", + "url": "https://github.com/iamluc/docker-php.git", + "reference": "da06b1f624212186b1757666fa39889ef66056ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/iamluc/docker-php/zipball/da06b1f624212186b1757666fa39889ef66056ae", + "reference": "da06b1f624212186b1757666fa39889ef66056ae", + "shasum": "" + }, + "require": { + "guzzlehttp/psr7": "^1.2", + "jane/open-api": "^1.0", + "php": ">=5.4", + "php-http/message": "^1.0", + "php-http/plugins": "^1.0.1", + "php-http/socket-client": "^1.0", + "symfony/filesystem": "^2.3 || ^3.0", + "symfony/process": "^2.3 || ^3.0" }, "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0", - "psr/log": "~1.0" + "fabpot/php-cs-fixer": "^2.0@dev", + "phpunit/phpunit": "^4.7" }, - "suggest": { - "ext-curl": "Guzzle will use specific adapters if cURL is present" + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.22-dev" + } + }, + "autoload": { + "psr-4": { + "Docker\\": "src/", + "Docker\\API\\": "generated/" + } + }, + "autoload-dev": { + "psr-4": { + "Docker\\Tests\\": "tests/" + } + }, + "scripts": { + "test": [ + "vendor/bin/phpunit" + ], + "test-ci": [ + "vendor/bin/phpunit --coverage-clover build/coverage.xml" + ] + }, + "license": [ + "MIT" + ], + "description": "A Docker PHP client", + "support": { + "source": "https://github.com/iamluc/docker-php/tree/compat-docker-1.12" + }, + "time": "2016-07-25 12:55:42" + }, + { + "name": "doctrine/inflector", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Inflector\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2015-11-06 14:35:42" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" } }, "autoload": { "psr-4": { - "GuzzleHttp\\": "src/" + "GuzzleHttp\\Psr7\\": "src/" }, "files": [ - "src/functions.php" + "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -59,51 +234,219 @@ "homepage": "https://github.com/mtdowling" } ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", - "homepage": "http://guzzlephp.org/", + "description": "PSR-7 message implementation", "keywords": [ - "client", - "curl", - "framework", "http", - "http client", - "rest", - "web service" + "message", + "stream", + "uri" ], - "time": "2014-08-14 20:29:51" + "time": "2016-06-24 23:00:38" }, { - "name": "guzzlehttp/streams", - "version": "1.5.1", + "name": "jane/jane", + "version": "v1.3.0", "source": { "type": "git", - "url": "https://github.com/guzzle/streams.git", - "reference": "fb0d1ee29987c2bdc59867bffaade6fc88c2675f" + "url": "https://github.com/jolicode/jane.git", + "reference": "af6e0a570443b9c41e9a68ef76b19b10fee84214" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/streams/zipball/fb0d1ee29987c2bdc59867bffaade6fc88c2675f", - "reference": "fb0d1ee29987c2bdc59867bffaade6fc88c2675f", + "url": "https://api.github.com/repos/jolicode/jane/zipball/af6e0a570443b9c41e9a68ef76b19b10fee84214", + "reference": "af6e0a570443b9c41e9a68ef76b19b10fee84214", "shasum": "" }, "require": { - "php": ">=5.4.0" + "doctrine/inflector": "^1.0", + "nikic/php-parser": "^1.4|^2.0", + "symfony/console": "^2.3|^3.0", + "symfony/property-access": "^2.3|^3.0", + "symfony/serializer": "^2.3|^3.0", + "symfony/yaml": "^2.3|^3.0" + }, + "conflict": { + "fabpot/php-cs-fixer": "<2.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "^2.0@dev", + "phpunit/phpunit": "^4.7" + }, + "suggest": { + "fabpot/php-cs-fixer": "Allow to automatically fix cs on generated code for better visualisation" + }, + "bin": [ + "bin/jane" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Joli\\Jane\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joel Wurtz", + "email": "jwurtz@jolicode.com" + } + ], + "description": "Generate a serializable / deserializable object model given a json schema", + "time": "2016-03-06 17:46:56" + }, + { + "name": "jane/open-api", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/jolicode/jane-openapi.git", + "reference": "189aafaec2b2ff1ef1519c8d6a2f09ac4b85d4e9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jolicode/jane-openapi/zipball/189aafaec2b2ff1ef1519c8d6a2f09ac4b85d4e9", + "reference": "189aafaec2b2ff1ef1519c8d6a2f09ac4b85d4e9", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^1.0", + "jane/jane": "^1.2.0", + "nikic/php-parser": "^1.4|^2.0", + "php-http/httplug": "^1.0", + "php-http/message-factory": "^1.0", + "symfony/console": "^2.3|^3.0", + "symfony/options-resolver": "^2.7|^3.0" + }, + "conflict": { + "fabpot/php-cs-fixer": "<2.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "^2.0@dev", + "phpunit/phpunit": "^4.7" + }, + "suggest": { + "fabpot/php-cs-fixer": "To have a nice formatting of the generated files" + }, + "bin": [ + "bin/jane-openapi" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1-dev" + } + }, + "autoload": { + "psr-4": { + "Joli\\Jane\\OpenApi\\Model\\": "generated/Model/", + "Joli\\Jane\\OpenApi\\Normalizer\\": "generated/Normalizer/", + "Joli\\Jane\\OpenApi\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joel Wurtz", + "email": "jwurtz@jolicode.com" + } + ], + "description": "Generate a PHP Client API (PSR7 compatible) given a OpenApi (Swagger) specification", + "keywords": [ + "jane", + "openapi", + "swagger" + ], + "time": "2016-04-13 19:16:20" + }, + { + "name": "nikic/php-parser", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "47b254ea51f1d6d5dc04b9b299e88346bf2369e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/47b254ea51f1d6d5dc04b9b299e88346bf2369e3", + "reference": "47b254ea51f1d6d5dc04b9b299e88346bf2369e3", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.4" }, "require-dev": { "phpunit/phpunit": "~4.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "2.1-dev" } }, "autoload": { "psr-4": { - "GuzzleHttp\\Stream\\": "src/" - }, + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2016-04-19 13:41:41" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/088c04e2f261c33bed6ca5245491cfca69195ccf", + "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { "files": [ - "src/functions.php" + "lib/random.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -112,93 +455,903 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" } ], - "description": "Provides a simple abstraction over streams of data (Guzzle 4+)", - "homepage": "http://guzzlephp.org/", + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", "keywords": [ - "Guzzle", - "stream" + "csprng", + "pseudorandom", + "random" ], - "time": "2014-08-10 23:57:01" + "time": "2016-04-03 06:00:07" }, { - "name": "stage1/docker-php", - "version": "dev-master", + "name": "php-http/client-common", + "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/stage1/docker-php.git", - "reference": "86a417b8cd91a6c031ff9a0a284eb17575fc82be" + "url": "https://github.com/php-http/client-common.git", + "reference": "7213b1943ca3f379536059c8d5b18865061e3359" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stage1/docker-php/zipball/86a417b8cd91a6c031ff9a0a284eb17575fc82be", - "reference": "86a417b8cd91a6c031ff9a0a284eb17575fc82be", + "url": "https://api.github.com/repos/php-http/client-common/zipball/7213b1943ca3f379536059c8d5b18865061e3359", + "reference": "7213b1943ca3f379536059c8d5b18865061e3359", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "~4.1", - "guzzlehttp/streams": "~1.3", "php": ">=5.4", - "symfony/filesystem": "~2.3", - "symfony/process": "~2.3" + "php-http/httplug": "^1.0", + "php-http/message": "^1.2", + "php-http/message-factory": "^1.0", + "symfony/options-resolver": "^2.6|^3.0" }, "require-dev": { - "phpunit/phpunit": "~3.7" + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4" + }, + "suggest": { + "php-http/cache-plugin": "PSR-6 Cache plugin", + "php-http/logger-plugin": "PSR-3 Logger plugin", + "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, "autoload": { - "psr-0": { - "": "src/" + "psr-4": { + "Http\\Client\\Common\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "A Docker PHP client", - "time": "2015-12-11 10:59:54" + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Common HTTP Client implementations and tools for HTTPlug", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "common", + "http", + "httplug" + ], + "time": "2016-07-14 09:46:16" }, { - "name": "symfony/console", - "version": "v3.0.0", + "name": "php-http/discovery", + "version": "v0.8.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/discovery.git", + "reference": "fac1240e8a070b3e2f0e38606941de80c849fa53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/discovery/zipball/fac1240e8a070b3e2f0e38606941de80c849fa53", + "reference": "fac1240e8a070b3e2f0e38606941de80c849fa53", + "shasum": "" + }, + "require": { + "php": "^5.4|7.*" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "^1.0", + "php-http/httplug": "^1.0", + "php-http/message-factory": "^1.0", + "phpspec/phpspec": "^2.4", + "puli/composer-plugin": "1.0.0-beta9" + }, + "suggest": { + "php-http/message": "Allow to use Guzzle or Diactoros factories", + "puli/composer-plugin": "Sets up Puli which is required for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." + }, + "bin": [ + "bin/puli.phar" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Discovery\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Finds installed HTTPlug implementations and PSR-7 message factories", + "homepage": "http://httplug.io", + "keywords": [ + "adapter", + "client", + "discovery", + "factory", + "http", + "message" + ], + "time": "2016-02-11 09:53:37" + }, + { + "name": "php-http/httplug", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/httplug.git", + "reference": "2061047ca53a08a6b8f52e997b2a76f386b397dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/httplug/zipball/2061047ca53a08a6b8f52e997b2a76f386b397dd", + "reference": "2061047ca53a08a6b8f52e997b2a76f386b397dd", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "php-http/promise": "^1.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eric GELOEN", + "email": "geloen.eric@gmail.com" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "HTTPlug, the HTTP client abstraction for PHP", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "http" + ], + "time": "2016-01-26 14:34:50" + }, + { + "name": "php-http/message", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/php-http/message.git", + "reference": "6d9c2d682dcf80cb2cc641eebc5693eacee95fa4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message/zipball/6d9c2d682dcf80cb2cc641eebc5693eacee95fa4", + "reference": "6d9c2d682dcf80cb2cc641eebc5693eacee95fa4", + "shasum": "" + }, + "require": { + "clue/stream-filter": "^1.3", + "php": ">=5.4", + "php-http/message-factory": "^1.0.2", + "psr/http-message": "^1.0" + }, + "require-dev": { + "coduo/phpspec-data-provider-extension": "^1.0", + "ext-zlib": "*", + "guzzlehttp/psr7": "^1.0", + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4", + "zendframework/zend-diactoros": "^1.0" + }, + "suggest": { + "ext-zlib": "Used with compressor/decompressor streams", + "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", + "zendframework/zend-diactoros": "Used with Diactoros Factories" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Message\\": "src/" + }, + "files": [ + "src/filters.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "HTTP Message related tools", + "homepage": "http://php-http.org", + "keywords": [ + "http", + "message", + "psr-7" + ], + "time": "2016-07-15 14:48:03" + }, + { + "name": "php-http/message-factory", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-http/message-factory.git", + "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", + "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Factory interfaces for PSR-7 HTTP Message", + "homepage": "http://php-http.org", + "keywords": [ + "factory", + "http", + "message", + "stream", + "uri" + ], + "time": "2015-12-19 14:08:53" + }, + { + "name": "php-http/plugins", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/plugins.git", + "reference": "0837bf5918020943dc89b1fb2410ce71825898fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/plugins/zipball/0837bf5918020943dc89b1fb2410ce71825898fc", + "reference": "0837bf5918020943dc89b1fb2410ce71825898fc", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "php-http/client-common": "^1.1", + "php-http/httplug": "^1.0", + "php-http/message": "^1.0", + "php-http/message-factory": "^1.0.2", + "symfony/options-resolver": "^2.6|^3.0" + }, + "conflict": { + "psr/cache": ">=2.0.0", + "psr/log": ">=2.0.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4", + "psr/cache": "^1.0", + "psr/log": "^1.0", + "symfony/stopwatch": "^2.3" + }, + "suggest": { + "psr/cache-implementation": "Allow to use the CachePlugin", + "psr/log-implementation": "Allow to use the LoggerPlugin", + "symfony/stopwatch": "Allow to use the StopwatchPlugin" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Client\\Plugin\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joel Wurtz", + "email": "joel.wurtz@gmail.com" + } + ], + "description": "Plugins for HTTPlug", + "homepage": "http://httplug.io", + "keywords": [ + "http", + "plugin", + "psr7" + ], + "time": "2016-05-04 23:09:25" + }, + { + "name": "php-http/promise", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/promise.git", + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", + "shasum": "" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Joel Wurtz", + "email": "joel.wurtz@gmail.com" + } + ], + "description": "Promise used for asynchronous HTTP requests", + "homepage": "http://httplug.io", + "keywords": [ + "promise" + ], + "time": "2016-01-26 13:27:02" + }, + { + "name": "php-http/socket-client", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/socket-client.git", + "reference": "1c7c6e5fddaf1f0a457a69a3c17c550321b56a2f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/socket-client/zipball/1c7c6e5fddaf1f0a457a69a3c17c550321b56a2f", + "reference": "1c7c6e5fddaf1f0a457a69a3c17c550321b56a2f", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "php-http/discovery": "^0.8", + "php-http/httplug": "^1.0", + "php-http/message-factory": "^1.0.2", + "symfony/options-resolver": "^2.6|^3.0" + }, + "provide": { + "php-http/client-implementation": "1.0" + }, + "require-dev": { + "guzzlehttp/psr7": "^1.2", + "php-http/adapter-integration-tests": "~0.3.1", + "php-http/client-common": "^1.0", + "php-http/message": "^1.0", + "phpunit/phpunit": "^4.8", + "puli/composer-plugin": "1.0.0-beta9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Client\\Socket\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joel Wurtz", + "email": "jwurtz@jolicode.com" + } + ], + "description": "Socket client for PHP-HTTP", + "time": "2016-02-25 10:31:40" + }, + { + "name": "psr/http-message", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2015-05-04 20:22:00" + }, + { + "name": "symfony/console", + "version": "v3.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "747154aa69b0f83cd02fc9aa554836dee417631a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/747154aa69b0f83cd02fc9aa554836dee417631a", + "reference": "747154aa69b0f83cd02fc9aa554836dee417631a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2016-06-29 07:02:31" + }, + { + "name": "symfony/filesystem", + "version": "v3.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "322da5f0910d8aa0b25fa65ffccaba68dbddb890" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/322da5f0910d8aa0b25fa65ffccaba68dbddb890", + "reference": "322da5f0910d8aa0b25fa65ffccaba68dbddb890", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2016-06-29 05:41:56" + }, + { + "name": "symfony/inflector", + "version": "v3.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/inflector.git", + "reference": "1ea83acdd81053bdf35ccf3ee91f01b243664b61" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/inflector/zipball/1ea83acdd81053bdf35ccf3ee91f01b243664b61", + "reference": "1ea83acdd81053bdf35ccf3ee91f01b243664b61", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Inflector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Inflector Component", + "homepage": "https://symfony.com", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string", + "symfony", + "words" + ], + "time": "2016-06-08 11:24:07" + }, + { + "name": "symfony/options-resolver", + "version": "v3.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "30605874d99af0cde6c41fd39e18546330c38100" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/30605874d99af0cde6c41fd39e18546330c38100", + "reference": "30605874d99af0cde6c41fd39e18546330c38100", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "time": "2016-05-12 15:59:27" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "dff51f72b0706335131b00a7f49606168c582594" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", + "reference": "dff51f72b0706335131b00a7f49606168c582594", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "a42f4b6b05ed458910f8af4c4e1121b0101b2d85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/a42f4b6b05ed458910f8af4c4e1121b0101b2d85", + "reference": "a42f4b6b05ed458910f8af4c4e1121b0101b2d85", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/process", + "version": "v3.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "175871ca8d1ef16ff8d8cac395a1c73afa8d0e63" + "url": "https://github.com/symfony/process.git", + "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/175871ca8d1ef16ff8d8cac395a1c73afa8d0e63", - "reference": "175871ca8d1ef16ff8d8cac395a1c73afa8d0e63", + "url": "https://api.github.com/repos/symfony/process/zipball/5c11a1a4d4016662eeaf0f8757958c7de069f9a0", + "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Console\\": "" + "Symfony\\Component\\Process\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -218,36 +1371,38 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-11-30 12:36:17" + "time": "2016-06-29 05:42:25" }, { - "name": "symfony/filesystem", - "version": "v2.8.0", + "name": "symfony/property-access", + "version": "v3.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "3e661a0d521ac67496515fa6e6704bd61bcfff60" + "url": "https://github.com/symfony/property-access.git", + "reference": "b982bfb21901b130e4f814d2835ee9759fa60f40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3e661a0d521ac67496515fa6e6704bd61bcfff60", - "reference": "3e661a0d521ac67496515fa6e6704bd61bcfff60", + "url": "https://api.github.com/repos/symfony/property-access/zipball/b982bfb21901b130e4f814d2835ee9759fa60f40", + "reference": "b982bfb21901b130e4f814d2835ee9759fa60f40", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9", + "symfony/inflector": "~3.1", + "symfony/polyfill-php70": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.1-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Filesystem\\": "" + "Symfony\\Component\\PropertyAccess\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -267,39 +1422,73 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Filesystem Component", + "description": "Symfony PropertyAccess Component", "homepage": "https://symfony.com", - "time": "2015-11-23 10:19:46" + "keywords": [ + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property path", + "reflection" + ], + "time": "2016-06-29 05:41:56" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.0.0", + "name": "symfony/serializer", + "version": "v3.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0b6a8940385311a24e060ec1fe35680e17c74497" + "url": "https://github.com/symfony/serializer.git", + "reference": "e8621c273575617e132d582983d5d14ce0c2b76c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0b6a8940385311a24e060ec1fe35680e17c74497", - "reference": "0b6a8940385311a24e060ec1fe35680e17c74497", + "url": "https://api.github.com/repos/symfony/serializer/zipball/e8621c273575617e132d582983d5d14ce0c2b76c", + "reference": "e8621c273575617e132d582983d5d14ce0c2b76c", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5.9" + }, + "conflict": { + "symfony/property-access": ">=3.0,<3.0.4|>=2.8,<2.8.4" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "symfony/cache": "~3.1", + "symfony/config": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/property-access": "~2.8|~3.0", + "symfony/property-info": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", + "doctrine/cache": "For using the default cached annotation reader and metadata cache.", + "psr/cache-implementation": "For using the metadata cache.", + "symfony/config": "For using the XML mapping loader.", + "symfony/http-foundation": "To use the DataUriNormalizer.", + "symfony/property-access": "For using the ObjectNormalizer.", + "symfony/property-info": "To deserialize relations.", + "symfony/yaml": "For using the default YAML mapping loader." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Component\\Serializer\\": "" }, - "files": [ - "bootstrap.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -308,51 +1497,44 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony Serializer Component", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2015-11-04 20:28:58" + "time": "2016-06-29 05:41:56" }, { - "name": "symfony/process", - "version": "v2.8.0", + "name": "symfony/yaml", + "version": "v3.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "1b988a88e3551102f3c2d9e1d47a18c3a78d6312" + "url": "https://github.com/symfony/yaml.git", + "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1b988a88e3551102f3c2d9e1d47a18c3a78d6312", - "reference": "1b988a88e3551102f3c2d9e1d47a18c3a78d6312", + "url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de", + "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.1-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Component\\Yaml\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -372,9 +1554,9 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-11-30 12:35:10" + "time": "2016-06-29 05:41:56" } ], "packages-dev": [ @@ -434,16 +1616,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc" + "reference": "a8773992b362b58498eed24bf85005f363c34771" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e3abefcd7f106677fd352cd7c187d6c969aa9ddc", - "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a8773992b362b58498eed24bf85005f363c34771", + "reference": "a8773992b362b58498eed24bf85005f363c34771", "shasum": "" }, "require": { @@ -472,41 +1654,138 @@ "object", "object graph" ], - "time": "2015-11-07 22:20:37" + "time": "2015-11-20 12:04:31" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27 11:43:31" }, { "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-06-10 09:48:41" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "phpDocumentor": [ + "psr-4": { + "phpDocumentor\\Reflection\\": [ "src/" ] } @@ -518,37 +1797,39 @@ "authors": [ { "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" + "email": "me@mikevanriel.com" } ], - "time": "2015-02-03 12:10:50" + "time": "2016-06-10 07:14:17" }, { "name": "phpspec/prophecy", - "version": "v1.5.0", + "version": "v1.6.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + "reference": "58a8137754bc24b25740d4281399a4a3596058e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0" }, "require-dev": { - "phpspec/phpspec": "~2.0" + "phpspec/phpspec": "^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { @@ -581,43 +1862,44 @@ "spy", "stub" ], - "time": "2015-08-13 10:07:40" + "time": "2016-06-07 08:13:47" }, { "name": "phpunit/php-code-coverage", - "version": "3.0.2", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f7bb5cddf4ffe113eeb737b05241adb947b43f9d" + "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7bb5cddf4ffe113eeb737b05241adb947b43f9d", - "reference": "f7bb5cddf4ffe113eeb737b05241adb947b43f9d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/900370c81280cc0d942ffbc5912d80464eaee7e9", + "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9", "shasum": "" }, "require": { - "php": ">=5.6", + "php": "^5.6 || ^7.0", "phpunit/php-file-iterator": "~1.3", "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", + "phpunit/php-token-stream": "^1.4.2", + "sebastian/code-unit-reverse-lookup": "~1.0", "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "sebastian/version": "~1.0|~2.0" }, "require-dev": { "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^5.4" }, "suggest": { "ext-dom": "*", - "ext-xdebug": ">=2.2.1", + "ext-xdebug": ">=2.4.0", "ext-xmlwriter": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -643,7 +1925,7 @@ "testing", "xunit" ], - "time": "2015-11-12 21:08:20" + "time": "2016-06-03 05:03:56" }, { "name": "phpunit/php-file-iterator", @@ -735,21 +2017,24 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.7", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, "type": "library", "autoload": { "classmap": [ @@ -772,7 +2057,7 @@ "keywords": [ "timer" ], - "time": "2015-06-21 08:01:12" + "time": "2016-05-12 18:03:57" }, { "name": "phpunit/php-token-stream", @@ -825,16 +2110,16 @@ }, { "name": "phpunit/phpunit", - "version": "5.1.3", + "version": "5.4.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c047ff05d2279404af9a7e89e2a7151c32c88022" + "reference": "6c8a756c17a1a92a066c99860eb57922e8b723da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c047ff05d2279404af9a7e89e2a7151c32c88022", - "reference": "c047ff05d2279404af9a7e89e2a7151c32c88022", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6c8a756c17a1a92a066c99860eb57922e8b723da", + "reference": "6c8a756c17a1a92a066c99860eb57922e8b723da", "shasum": "" }, "require": { @@ -844,22 +2129,26 @@ "ext-reflection": "*", "ext-spl": "*", "myclabs/deep-copy": "~1.3", - "php": ">=5.6", + "php": "^5.6 || ^7.0", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~3.0", + "phpunit/php-code-coverage": "^4.0", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": ">=3.0.5", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", "sebastian/comparator": "~1.1", "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", + "sebastian/environment": "^1.3 || ^2.0", "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", + "sebastian/object-enumerator": "~1.0", "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0", + "sebastian/version": "~1.0|~2.0", "symfony/yaml": "~2.1|~3.0" }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, "suggest": { "phpunit/php-invoker": "~1.1" }, @@ -869,7 +2158,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1.x-dev" + "dev-master": "5.4.x-dev" } }, "autoload": { @@ -895,30 +2184,33 @@ "testing", "xunit" ], - "time": "2015-12-10 07:54:54" + "time": "2016-07-21 06:55:27" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.0.6", + "version": "3.2.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "49bc700750196c04dd6bc2c4c99cb632b893836b" + "reference": "b13d0d9426ced06958bd32104653526a6c998a52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/49bc700750196c04dd6bc2c4c99cb632b893836b", - "reference": "49bc700750196c04dd6bc2c4c99cb632b893836b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b13d0d9426ced06958bd32104653526a6c998a52", + "reference": "b13d0d9426ced06958bd32104653526a6c998a52", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": ">=5.6", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^5.4" }, "suggest": { "ext-soap": "*" @@ -926,7 +2218,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "3.2.x-dev" } }, "autoload": { @@ -951,7 +2243,52 @@ "mock", "xunit" ], - "time": "2015-12-08 08:47:06" + "time": "2016-06-12 07:37:26" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2016-02-13 06:45:14" }, { "name": "sebastian/comparator", @@ -1071,16 +2408,16 @@ }, { "name": "sebastian/environment", - "version": "1.3.3", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6e7133793a8e5a5714a551a8324337374be209df" + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", - "reference": "6e7133793a8e5a5714a551a8324337374be209df", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", "shasum": "" }, "require": { @@ -1117,20 +2454,20 @@ "environment", "hhvm" ], - "time": "2015-12-02 08:37:27" + "time": "2016-05-17 03:18:57" }, { "name": "sebastian/exporter", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "shasum": "" }, "require": { @@ -1138,12 +2475,13 @@ "sebastian/recursion-context": "~1.0" }, "require-dev": { + "ext-mbstring": "*", "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -1183,7 +2521,7 @@ "export", "exporter" ], - "time": "2015-06-21 07:55:53" + "time": "2016-06-17 09:04:28" }, { "name": "sebastian/global-state", @@ -1236,6 +2574,52 @@ ], "time": "2015-10-12 03:26:01" }, + { + "name": "sebastian/object-enumerator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", + "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2016-01-28 13:25:10" + }, { "name": "sebastian/recursion-context", "version": "1.0.2", @@ -1333,19 +2717,27 @@ }, { "name": "sebastian/version", - "version": "1.0.6", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", "shasum": "" }, + "require": { + "php": ">=5.6" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1364,38 +2756,38 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" + "time": "2016-02-04 12:56:52" }, { - "name": "symfony/yaml", - "version": "v3.0.0", + "name": "webmozart/assert", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "177a015cb0e19ff4a49e0e2e2c5fc1c1bee07002" + "url": "https://github.com/webmozart/assert.git", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/177a015cb0e19ff4a49e0e2e2c5fc1c1bee07002", - "reference": "177a015cb0e19ff4a49e0e2e2c5fc1c1bee07002", + "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "1.0-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Webmozart\\Assert\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1403,23 +2795,23 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2015-11-30 12:36:17" + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2015-08-24 13:29:44" } ], "aliases": [], "minimum-stability": "stable", "stability-flags": { - "stage1/docker-php": 20 + "docker-php/docker-php": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/src/Command/SynchronizeHostsCommand.php b/src/Command/SynchronizeHostsCommand.php index 524ae88..b5b5e1a 100644 --- a/src/Command/SynchronizeHostsCommand.php +++ b/src/Command/SynchronizeHostsCommand.php @@ -2,7 +2,6 @@ namespace DockerHostManager\Command; -use Docker\Http\DockerClient; use DockerHostManager\Docker\Docker; use DockerHostManager\Synchronizer; use Symfony\Component\Console\Command\Command; @@ -37,42 +36,11 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { $app = new Synchronizer( - new Docker($this->createDockerClient()), + new Docker(), $input->getOption('hosts_file'), $input->getOption('tld') ); $app->run(); } - - /** - * Copy of https://github.com/hxpro/docker-php/blob/master/src/Docker/Http/DockerClient.php - * + disable peer_name check. - * - * @return DockerClient - */ - private function createDockerClient() - { - $entrypoint = getenv('DOCKER_HOST') ? getenv('DOCKER_HOST') : 'unix:///var/run/docker.sock'; - $context = null; - $useTls = false; - if (getenv('DOCKER_TLS_VERIFY') && getenv('DOCKER_TLS_VERIFY') == 1) { - if (!getenv('DOCKER_CERT_PATH')) { - throw new \RuntimeException('Connection to docker has been set to use TLS, but no PATH is defined for certificate in DOCKER_CERT_PATH docker environment variable'); - } - $useTls = true; - $cafile = getenv('DOCKER_CERT_PATH').DIRECTORY_SEPARATOR.'ca.pem'; - $certfile = getenv('DOCKER_CERT_PATH').DIRECTORY_SEPARATOR.'cert.pem'; - $keyfile = getenv('DOCKER_CERT_PATH').DIRECTORY_SEPARATOR.'key.pem'; - $context = stream_context_create([ - 'ssl' => [ - 'cafile' => $cafile, - 'local_cert' => $certfile, - 'local_pk' => $keyfile, - ], - ]); - } - - return new DockerClient([], $entrypoint, $context, $useTls); - } } diff --git a/src/Docker/Docker.php b/src/Docker/Docker.php index 81ec087..365bdc8 100644 --- a/src/Docker/Docker.php +++ b/src/Docker/Docker.php @@ -3,18 +3,43 @@ namespace DockerHostManager\Docker; use Docker\Docker as DockerBase; +use Docker\DockerClient; +use Http\Client\HttpClient; +use Http\Message\MessageFactory; +use Http\Message\MessageFactory\GuzzleMessageFactory; +use Symfony\Component\Serializer\Serializer; class Docker extends DockerBase { + /** + * @var HttpClient + */ + private $httpClient; + + /** + * @var MessageFactory + */ + private $messageFactory; + + public function __construct(HttpClient $httpClient = null, Serializer $serializer = null, MessageFactory $messageFactory = null) + { + $this->httpClient = $httpClient ?: DockerClient::createFromEnv(); + $this->messageFactory = $messageFactory ?: new GuzzleMessageFactory(); + + parent::__construct($this->httpClient, $serializer, $this->messageFactory); + } + /** * @param callable $callback */ public function listenEvents(callable $callback) { - $stream = $this->getHttpClient()->get('/events'); + $request = $this->messageFactory->createRequest('GET', '/events'); + $response = $this->httpClient->sendRequest($request); - while (!$stream->getBody()->eof()) { - $line = \GuzzleHttp\Stream\read_line($stream->getBody()); + $stream = $response->getBody(); + while (!$stream->eof()) { + $line = \GuzzleHttp\Psr7\readline($stream); if (null !== ($raw = json_decode($line, true))) { call_user_func($callback, new Event($raw)); } diff --git a/src/Synchronizer.php b/src/Synchronizer.php index 2daa3d2..b393ea5 100644 --- a/src/Synchronizer.php +++ b/src/Synchronizer.php @@ -2,9 +2,8 @@ namespace DockerHostManager; -use Docker\Container; -use Docker\Exception\APIException; -use Docker\Exception\ContainerNotFoundException; +use Docker\API\Model\Container; +use Docker\Manager\ContainerManager; use DockerHostManager\Docker\Docker; use DockerHostManager\Docker\Event; @@ -20,7 +19,7 @@ class Synchronizer /** @var string */ private $tld; - /** @var array Container */ + /** @var array */ private $activeContainers = []; /** @@ -47,9 +46,12 @@ public function run() private function init() { - foreach ($this->docker->getContainerManager()->findAll() as $container) { + foreach ($this->docker->getContainerManager()->findAll() as $containerConfig) { + $response = $this->docker->getContainerManager()->find($containerConfig->getId(), [], ContainerManager::FETCH_RESPONSE); + $container = json_decode(\GuzzleHttp\Psr7\copy_to_string($response->getBody()), true); + if ($this->isExposed($container)) { - $this->activeContainers[$container->getId()] = $container; + $this->activeContainers[$container['Id']] = $container; } } @@ -64,7 +66,8 @@ private function listen() } try { - $container = $this->docker->getContainerManager()->find($event->getId()); + $response = $this->docker->getContainerManager()->find($event->getId(), [], ContainerManager::FETCH_RESPONSE); + $container = json_decode(\GuzzleHttp\Psr7\copy_to_string($response->getBody()), true); } catch (\Exception $e) { return; } @@ -74,9 +77,9 @@ private function listen() } if ($this->isExposed($container)) { - $this->activeContainers[$container->getId()] = $container; + $this->activeContainers[$container['Id']] = $container; } else { - unset($this->activeContainers[$container->getId()]); + unset($this->activeContainers[$container['Id']]); } $this->write(); @@ -93,7 +96,7 @@ private function write() $hosts = array_merge( [self::START_TAG], array_map( - function (Container $container) { + function ($container) { return implode("\n", $this->getHostsLines($container)); }, $this->activeContainers @@ -105,41 +108,42 @@ function (Container $container) { } /** - * @param Container $container + * @param $container * * @return array - * - * @throws ContainerNotFoundException */ - private function getHostsLines(Container $container) + private function getHostsLines($container) { - $inspection = $container->getRuntimeInformations(); $lines = []; // Global - if (!empty($inspection['NetworkSettings']['IPAddress'])) { - $ip = $inspection['NetworkSettings']['IPAddress']; + if (!empty($container['NetworkSettings']['IPAddress'])) { + $ip = $container['NetworkSettings']['IPAddress']; - $lines[] = $ip.' '.implode(' ', $this->getContainerHosts($container)); + $lines[$ip] = implode(' ', $this->getContainerHosts($container)); } // Networks - if (isset($inspection['NetworkSettings']['Networks']) && is_array($inspection['NetworkSettings']['Networks'])) { - foreach ($inspection['NetworkSettings']['Networks'] as $networkName => $conf) { + if (isset($container['NetworkSettings']['Networks']) && is_array($container['NetworkSettings']['Networks'])) { + foreach ($container['NetworkSettings']['Networks'] as $networkName => $conf) { $ip = $conf['IPAddress']; $aliases = isset($conf['Aliases']) && is_array($conf['Aliases']) ? $conf['Aliases'] : []; - $aliases[] = substr($container->getName(), 1); + $aliases[] = substr($container['Name'], 1); $hosts = []; foreach (array_unique($aliases) as $alias) { $hosts[] = $alias.'.'.$networkName; } - $lines[] = $ip.' '.implode(' ', $hosts); + $lines[$ip] = sprintf('%s%s', isset($lines[$ip]) ? $lines[$ip].' ' : '', implode(' ', $hosts)); } } + array_walk($lines, function (&$host, $ip) { + $host = $ip.' '.$host; + }); + return $lines; } @@ -148,13 +152,11 @@ private function getHostsLines(Container $container) * * @return array */ - private function getContainerHosts(Container $container) + private function getContainerHosts($container) { - $inspection = $container->getRuntimeInformations(); - - $hosts = [substr($container->getName(), 1).$this->tld]; - if (isset($inspection['Config']['Env']) && is_array($inspection['Config']['Env'])) { - $env = $inspection['Config']['Env']; + $hosts = [substr($container['Name'], 1).$this->tld]; + if (isset($container['Config']['Env']) && is_array($container['Config']['Env'])) { + $env = $container['Config']['Env']; foreach (preg_grep('/DOMAIN_NAME=/', $env) as $row) { $row = substr($row, strlen('DOMAIN_NAME=')); $hosts = array_merge($hosts, explode(',', $row)); @@ -169,20 +171,12 @@ private function getContainerHosts(Container $container) * * @return bool */ - private function isExposed(Container $container) + private function isExposed($container) { - try { - $this->docker->getContainerManager()->inspect($container); - } catch (APIException $e) { - // Happen on "docker build" - return false; - } - - $inspection = $container->getRuntimeInformations(); - if (empty($inspection['NetworkSettings']['Ports']) || empty($inspection['State']['Running'])) { + if (empty($container['NetworkSettings']['Ports']) || empty($container['State']['Running'])) { return false; } - return $inspection['State']['Running']; + return $container['State']['Running']; } }