From 98a882e237020e67fda260357df91e33965dbeec Mon Sep 17 00:00:00 2001 From: Leonard LEUNG CHONG WO Date: Mon, 15 Jan 2018 18:27:35 +0100 Subject: [PATCH 1/4] [FEATURE#76038] ajout du context mock --- composer.json | 3 +- composer.lock | 1626 ++++++++++++++++++++++++++++++++---- src/HttpApiMockContext.php | 104 +++ 3 files changed, 1571 insertions(+), 162 deletions(-) create mode 100644 src/HttpApiMockContext.php diff --git a/composer.json b/composer.json index 2f4b934..b604fb3 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,8 @@ "php": ">=5.5", "behat/behat": ">=3.2", "guzzlehttp/guzzle": "~6.1", - "etna/php-rsa": "~0.2.0" + "etna/php-rsa": "~0.2.0", + "mcustiel/phiremock": "^1.7" }, "require-dev": { "phpunit/php-code-coverage": "~3.0", diff --git a/composer.lock b/composer.lock index 860a688..f76d1df 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "cfd298d801b2bad1e9fcd8feb55c5a82", + "content-hash": "8658504f4934a027cbf98508eb511955", "packages": [ { "name": "behat/behat", @@ -85,7 +85,7 @@ "symfony", "testing" ], - "time": "2016-09-25 09:40:39" + "time": "2016-09-25T09:40:39+00:00" }, { "name": "behat/gherkin", @@ -144,7 +144,7 @@ "gherkin", "parser" ], - "time": "2016-09-18 12:16:14" + "time": "2016-09-18T12:16:14+00:00" }, { "name": "behat/transliterator", @@ -184,101 +184,1237 @@ "slug", "transliterator" ], - "time": "2015-09-28 16:26:35" + "time": "2015-09-28T16:26:35+00:00" + }, + { + "name": "doctrine/annotations", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "54cacc9b81758b14e3ce750f205a393d52339e97" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/54cacc9b81758b14e3ce750f205a393d52339e97", + "reference": "54cacc9b81758b14e3ce750f205a393d52339e97", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "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": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2017-02-24T16:22:25+00:00" + }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09T13:34:57+00:00" }, { "name": "etna/php-rsa", "version": "v0.2.0", "source": { "type": "git", - "url": "https://github.com/etna-alternance/composer-php-rsa.git", - "reference": "29227c563888b6a9c3987c0f7d9e67729db42e88" + "url": "https://github.com/etna-alternance/composer-php-rsa.git", + "reference": "29227c563888b6a9c3987c0f7d9e67729db42e88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/etna-alternance/composer-php-rsa/zipball/29227c563888b6a9c3987c0f7d9e67729db42e88", + "reference": "29227c563888b6a9c3987c0f7d9e67729db42e88", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "behat/behat": "~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "ETNA\\RSA\\": "src" + } + }, + "scripts": { + "test": [ + "behat" + ] + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "ETNA", + "email": "dev@etna-alternance.net", + "homepage": "http://etna-alternance.net" + } + ], + "description": "RSA Abstraction Class", + "keywords": [ + "crypto", + "rsa" + ], + "support": { + "source": "https://github.com/etna-alternance/composer-php-rsa/tree/v0.2.0" + }, + "time": "2014-11-24T14:26:01+00:00" + }, + { + "name": "evenement/evenement", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/igorw/evenement.git", + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Evenement": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "time": "2017-07-23T21:35:13+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "d094e337976dff9d8e2424e8485872194e768662" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662", + "reference": "d094e337976dff9d8e2424e8485872194e768662", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "~1.0", + "guzzlehttp/psr7": "~1.1", + "php": ">=5.5.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "~4.0", + "psr/log": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2016-03-21T20:02:09+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", + "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-05-18T16:56:05+00:00" + }, + { + "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\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "PSR-7 message implementation", + "keywords": [ + "http", + "message", + "stream", + "uri" + ], + "time": "2016-06-24T23:00:38+00:00" + }, + { + "name": "mcustiel/creature", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/mcustiel/Creature.git", + "reference": "3a175bcd9d177dddc226c1d693ea3caec0e65f32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mcustiel/Creature/zipball/3a175bcd9d177dddc226c1d693ea3caec0e65f32", + "reference": "3a175bcd9d177dddc226c1d693ea3caec0e65f32", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.23" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mcustiel\\Creature\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0+" + ], + "authors": [ + { + "name": "Mariano Custiel", + "email": "jmcustiel@gmail.com", + "homepage": "https://github.com/mcustiel", + "role": "Developer" + } + ], + "description": "Allows to create objects using a common interface", + "keywords": [ + "create", + "creator", + "instances", + "instantiator", + "object" + ], + "time": "2017-04-15T13:08:14+00:00" + }, + { + "name": "mcustiel/mockable-datetime", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/mcustiel/mockable-datetime.git", + "reference": "1faf7437b625e3c788536b9d456621fb984077cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mcustiel/mockable-datetime/zipball/1faf7437b625e3c788536b9d456621fb984077cb", + "reference": "1faf7437b625e3c788536b9d456621fb984077cb", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "pdepend/pdepend": ">=2.0.6", + "phing/phing": ">=2.0", + "phploc/phploc": ">=2.1.1", + "phpmd/phpmd": ">=2.2.2", + "phpunit/phpunit": ">=4.3.0", + "sebastian/phpcpd": ">=1.4.3", + "squizlabs/php_codesniffer": ">=2.1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mcustiel\\Mockable\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0+" + ], + "authors": [ + { + "name": "Mariano Custiel", + "email": "jmcustiel@gmail.com", + "homepage": "https://github.com/mcustiel", + "role": "Developer" + } + ], + "description": "A DateTime library that allows mock dates and times in UnitTests.", + "keywords": [ + "date", + "library", + "mocks", + "tests", + "time" + ], + "time": "2015-05-25T07:13:43+00:00" + }, + { + "name": "mcustiel/phiremock", + "version": "v1.7.2", + "source": { + "type": "git", + "url": "https://github.com/mcustiel/phiremock.git", + "reference": "7a22aa1779a7b8ce785d238b6b9824534d9102ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mcustiel/phiremock/zipball/7a22aa1779a7b8ce785d238b6b9824534d9102ca", + "reference": "7a22aa1779a7b8ce785d238b6b9824534d9102ca", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0", + "mcustiel/php-simple-di": "^1.2.1", + "mcustiel/php-simple-request": "^3.1", + "mcustiel/power-route": "^3.0.0", + "monolog/monolog": "^1.17.2", + "php": ">=5.6", + "react/http": "~0.7.0", + "symfony/cache": "^3.1" + }, + "require-dev": { + "codeception/codeception": "^2.2.10" + }, + "suggest": { + "ext-pcntl": "Allows phiremock to handle system signals" + }, + "bin": [ + "bin/phiremock" + ], + "type": "project", + "autoload": { + "psr-4": { + "Mcustiel\\Phiremock\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0+" + ], + "authors": [ + { + "name": "Mariano Custiel", + "email": "jmcustiel@gmail.com", + "homepage": "https://github.com/mcustiel", + "role": "Developer" + } + ], + "description": "A mocker for HTTP and REST services", + "keywords": [ + "acceptance", + "external", + "http", + "mock", + "server", + "tests" + ], + "time": "2017-12-31T13:28:28+00:00" + }, + { + "name": "mcustiel/php-simple-di", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/mcustiel/php-simple-di.git", + "reference": "7c414c7740fc733c6525e77760f6b67a8e5e42c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mcustiel/php-simple-di/zipball/7c414c7740fc733c6525e77760f6b67a8e5e42c8", + "reference": "7c414c7740fc733c6525e77760f6b67a8e5e42c8", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phing/phing": ">=2.0", + "phpmd/phpmd": "@stable", + "phpunit/phpunit": ">=4.3.0", + "sebastian/phpcpd": ">=1.4.3", + "squizlabs/php_codesniffer": ">=2.1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mcustiel\\DependencyInjection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0+" + ], + "authors": [ + { + "name": "Mariano Custiel", + "email": "jmcustiel@gmail.com", + "homepage": "https://github.com/mcustiel", + "role": "Developer" + } + ], + "description": "Minimalist library to manage dependency injection with low memory usage and high performance.", + "keywords": [ + "Simple", + "dependency injection", + "library", + "minimalist" + ], + "time": "2015-01-06T14:12:39+00:00" + }, + { + "name": "mcustiel/php-simple-request", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/mcustiel/php-simple-request.git", + "reference": "4d0fc06092ccdff3ea488c67b394225c7243428f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mcustiel/php-simple-request/zipball/4d0fc06092ccdff3ea488c67b394225c7243428f", + "reference": "4d0fc06092ccdff3ea488c67b394225c7243428f", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.2", + "php": ">=5.5", + "psr/cache": "^1.0.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^1.11", + "pdepend/pdepend": "^2.0.6", + "phing/phing": "^2.12.0", + "phploc/phploc": "^2.1.1", + "phpmd/phpmd": "^2.3.2", + "phpunit/phpunit": "^4.8.9", + "satooshi/php-coveralls": "~1.0", + "sebastian/phpcpd": "^2.0.2", + "squizlabs/php_codesniffer": "^2.3.4", + "symfony/cache": "dev-master" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mcustiel\\SimpleRequest\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0+" + ], + "authors": [ + { + "name": "Mariano Custiel", + "email": "jmcustiel@gmail.com", + "homepage": "https://github.com/mcustiel", + "role": "Developer" + } + ], + "description": "php-simple-request is a minimalist library designed to simplify requests validation and filtering", + "keywords": [ + "annotations", + "filtering", + "minimalist", + "request", + "validation" + ], + "time": "2016-07-23T17:53:29+00:00" + }, + { + "name": "mcustiel/power-route", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/mcustiel/PowerRoute.git", + "reference": "b234289a455f02c64786f25b33e17ae9e19ff356" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mcustiel/PowerRoute/zipball/b234289a455f02c64786f25b33e17ae9e19ff356", + "reference": "b234289a455f02c64786f25b33e17ae9e19ff356", + "shasum": "" + }, + "require": { + "mcustiel/creature": "^2.0.0", + "mcustiel/mockable-datetime": "^1.0.0", + "php": ">=5.6", + "zendframework/zend-diactoros": "^1.1.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.9" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mcustiel\\PowerRoute\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0+" + ], + "description": "Power Route is a configurable router for PHP", + "keywords": [ + "configurable", + "extensible", + "router" + ], + "time": "2017-04-15T15:38:26+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.23.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4", + "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2017-06-19T01:22:40+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "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", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24", + "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-01-02T13:31:39+00:00" + }, + { + "name": "react/cache", + "version": "v0.4.2", + "source": { + "type": "git", + "url": "https://github.com/reactphp/cache.git", + "reference": "75494f26b4ef089db9bf8c90b63c296246e099e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/cache/zipball/75494f26b4ef089db9bf8c90b63c296246e099e8", + "reference": "75494f26b4ef089db9bf8c90b63c296246e099e8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/promise": "~2.0|~1.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Async, Promise-based cache interface for ReactPHP", + "keywords": [ + "cache", + "caching", + "promise", + "reactphp" + ], + "time": "2017-12-20T16:47:13+00:00" + }, + { + "name": "react/dns", + "version": "v0.4.12", + "source": { + "type": "git", + "url": "https://github.com/reactphp/dns.git", + "reference": "c74a0af0c7254e73600fd8c5c95f6bf23c5998f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/dns/zipball/c74a0af0c7254e73600fd8c5c95f6bf23c5998f4", + "reference": "c74a0af0c7254e73600fd8c5c95f6bf23c5998f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/cache": "~0.4.0|~0.3.0", + "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", + "react/promise": "^2.1 || ^1.2.1", + "react/promise-timer": "^1.2", + "react/socket": "^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5 || ^0.4.4", + "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.5" + }, + "require-dev": { + "clue/block-react": "^1.2", + "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Dns\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Async DNS resolver for ReactPHP", + "keywords": [ + "async", + "dns", + "dns-resolver", + "reactphp" + ], + "time": "2018-01-14T10:04:36+00:00" + }, + { + "name": "react/event-loop", + "version": "v0.4.3", + "source": { + "type": "git", + "url": "https://github.com/reactphp/event-loop.git", + "reference": "8bde03488ee897dc6bb3d91e4e17c353f9c5252f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/8bde03488ee897dc6bb3d91e4e17c353f9c5252f", + "reference": "8bde03488ee897dc6bb3d91e4e17c353f9c5252f", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "suggest": { + "ext-event": "~1.0", + "ext-libev": "*", + "ext-libevent": ">=0.1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\EventLoop\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Event loop abstraction layer that libraries can use for evented I/O.", + "keywords": [ + "asynchronous", + "event-loop" + ], + "time": "2017-04-27T10:56:23+00:00" + }, + { + "name": "react/http", + "version": "v0.7.4", + "source": { + "type": "git", + "url": "https://github.com/reactphp/http.git", + "reference": "6646135c01097b5316d2cb47bc12e541bf26efae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/http/zipball/6646135c01097b5316d2cb47bc12e541bf26efae", + "reference": "6646135c01097b5316d2cb47bc12e541bf26efae", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/promise": "^2.3 || ^1.2.1", + "react/socket": "^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5", + "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6", + "ringcentral/psr7": "^1.2" + }, + "require-dev": { + "clue/block-react": "^1.1", + "phpunit/phpunit": "^4.8.10||^5.0", + "react/promise-stream": "^0.1.1", + "react/socket": "^1.0 || ^0.8 || ^0.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Http\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Event-driven, streaming plaintext HTTP and secure HTTPS server for ReactPHP", + "keywords": [ + "event-driven", + "http", + "https", + "reactphp", + "server", + "streaming" + ], + "time": "2017-08-16T15:24:39+00:00" + }, + { + "name": "react/promise", + "version": "v2.5.1", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "62785ae604c8d69725d693eb370e1d67e94c4053" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/etna-alternance/composer-php-rsa/zipball/29227c563888b6a9c3987c0f7d9e67729db42e88", - "reference": "29227c563888b6a9c3987c0f7d9e67729db42e88", + "url": "https://api.github.com/repos/reactphp/promise/zipball/62785ae604c8d69725d693eb370e1d67e94c4053", + "reference": "62785ae604c8d69725d693eb370e1d67e94c4053", "shasum": "" }, "require": { - "php": ">=5.5" + "php": ">=5.4.0" }, "require-dev": { - "behat/behat": "~3.0" + "phpunit/phpunit": "~4.8" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { - "ETNA\\RSA\\": "src" - } - }, - "scripts": { - "test": [ - "behat" + "React\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "ETNA", - "email": "dev@etna-alternance.net", - "homepage": "http://etna-alternance.net" + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com" } ], - "description": "RSA Abstraction Class", + "description": "A lightweight implementation of CommonJS Promises/A for PHP", "keywords": [ - "crypto", - "rsa" + "promise", + "promises" ], - "support": { - "source": "https://github.com/etna-alternance/composer-php-rsa/tree/v0.2.0" - }, - "time": "2014-11-24 14:26:01" + "time": "2017-03-25T12:08:31+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "6.2.0", + "name": "react/promise-timer", + "version": "v1.2.1", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "d094e337976dff9d8e2424e8485872194e768662" + "url": "https://github.com/reactphp/promise-timer.git", + "reference": "9b4cd9cbe7457e0d87fe8aa7ccceab8a2c830fbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662", - "reference": "d094e337976dff9d8e2424e8485872194e768662", + "url": "https://api.github.com/repos/reactphp/promise-timer/zipball/9b4cd9cbe7457e0d87fe8aa7ccceab8a2c830fbd", + "reference": "9b4cd9cbe7457e0d87fe8aa7ccceab8a2c830fbd", "shasum": "" }, "require": { - "guzzlehttp/promises": "~1.0", - "guzzlehttp/psr7": "~1.1", - "php": ">=5.5.0" + "php": ">=5.3", + "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", + "react/promise": "~2.1|~1.2" }, "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0", - "psr/log": "~1.0" + "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { - "GuzzleHttp\\": "src/" - } + "React\\Promise\\Timer\\": "src/" + }, + "files": [ + "src/functions.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -286,91 +1422,131 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Christian Lück", + "email": "christian@lueck.tv" } ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", + "description": "A trivial implementation of timeouts for Promises, built on top of ReactPHP.", + "homepage": "https://github.com/react/promise-timer", "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" + "async", + "event-loop", + "promise", + "reactphp", + "timeout", + "timer" ], - "time": "2016-03-21 20:02:09" + "time": "2017-12-22T15:41:41+00:00" }, { - "name": "guzzlehttp/promises", - "version": "1.2.0", + "name": "react/socket", + "version": "v0.8.8", "source": { "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" + "url": "https://github.com/reactphp/socket.git", + "reference": "e9e206b6277023bf4afd910a764f0cd3d470e7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", + "url": "https://api.github.com/repos/reactphp/socket/zipball/e9e206b6277023bf4afd910a764f0cd3d470e7ed", + "reference": "e9e206b6277023bf4afd910a764f0cd3d470e7ed", "shasum": "" }, "require": { - "php": ">=5.5.0" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/dns": "^0.4.11", + "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", + "react/promise": "^2.1 || ^1.2", + "react/promise-timer": "~1.0", + "react/stream": "^1.0 || ^0.7.1" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "clue/block-react": "^1.2", + "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + "React\\Socket\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", + "keywords": [ + "Connection", + "Socket", + "async", + "reactphp", + "stream" + ], + "time": "2018-01-06T12:13:20+00:00" + }, + { + "name": "react/stream", + "version": "v0.7.6", + "source": { + "type": "git", + "url": "https://github.com/reactphp/stream.git", + "reference": "4e07a0014896cbbb73e2f2b2c28e86174b6e1d4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/stream/zipball/4e07a0014896cbbb73e2f2b2c28e86174b6e1d4d", + "reference": "4e07a0014896cbbb73e2f2b2c28e86174b6e1d4d", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3" + }, + "require-dev": { + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Stream\\": "src" } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "description": "Guzzle promises library", + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", "keywords": [ - "promise" + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" ], - "time": "2016-05-18 16:56:05" + "time": "2017-12-21T14:12:01+00:00" }, { - "name": "guzzlehttp/psr7", - "version": "1.3.1", + "name": "ringcentral/psr7", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + "url": "https://github.com/ringcentral/psr7.git", + "reference": "2594fb47cdc659f3fcf0aa1559b7355460555303" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "url": "https://api.github.com/repos/ringcentral/psr7/zipball/2594fb47cdc659f3fcf0aa1559b7355460555303", + "reference": "2594fb47cdc659f3fcf0aa1559b7355460555303", "shasum": "" }, "require": { - "php": ">=5.4.0", + "php": ">=5.3", "psr/http-message": "~1.0" }, "provide": { @@ -382,12 +1558,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.0-dev" } }, "autoload": { "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" + "RingCentral\\Psr7\\": "src/" }, "files": [ "src/functions_include.php" @@ -411,35 +1587,55 @@ "stream", "uri" ], - "time": "2016-06-24 23:00:38" + "time": "2016-03-25T17:36:49+00:00" }, { - "name": "psr/http-message", - "version": "1.0.1", + "name": "symfony/cache", + "version": "v3.4.3", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "url": "https://github.com/symfony/cache.git", + "reference": "5725378078bc4e1fe3c3414e9cc0e63d7de47fff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/symfony/cache/zipball/5725378078bc4e1fe3c3414e9cc0e63d7de47fff", + "reference": "5725378078bc4e1fe3c3414e9cc0e63d7de47fff", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^5.5.9|>=7.0.8", + "psr/cache": "~1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0", + "symfony/polyfill-apcu": "~1.1" + }, + "conflict": { + "symfony/var-dumper": "<3.3" + }, + "provide": { + "psr/cache-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "doctrine/dbal": "~2.4", + "predis/predis": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.4-dev" } }, "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" - } + "Symfony\\Component\\Cache\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -447,21 +1643,21 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "Symfony Cache component with PSR-6, PSR-16, and tags", + "homepage": "https://symfony.com", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "caching", + "psr6" ], - "time": "2016-08-06 14:39:51" + "time": "2018-01-03T17:14:19+00:00" }, { "name": "symfony/class-loader", @@ -517,7 +1713,7 @@ ], "description": "Symfony ClassLoader Component", "homepage": "https://symfony.com", - "time": "2016-08-23 13:39:15" + "time": "2016-08-23T13:39:15+00:00" }, { "name": "symfony/config", @@ -570,7 +1766,7 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2016-08-27 18:50:07" + "time": "2016-08-27T18:50:07+00:00" }, { "name": "symfony/console", @@ -630,7 +1826,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-08-19 06:48:39" + "time": "2016-08-19T06:48:39+00:00" }, { "name": "symfony/dependency-injection", @@ -690,7 +1886,7 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2016-08-23 13:39:15" + "time": "2016-08-23T13:39:15+00:00" }, { "name": "symfony/event-dispatcher", @@ -750,7 +1946,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-07-19 10:45:57" + "time": "2016-07-19T10:45:57+00:00" }, { "name": "symfony/filesystem", @@ -799,7 +1995,63 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-07-20 05:44:26" + "time": "2016-07-20T05:44:26+00:00" + }, + { + "name": "symfony/polyfill-apcu", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-apcu.git", + "reference": "04f62674339602def515bff4bc6901fc1d4951e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/04f62674339602def515bff4bc6901fc1d4951e8", + "reference": "04f62674339602def515bff4bc6901fc1d4951e8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Apcu\\": "" + }, + "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 backporting apcu_* functions to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "apcu", + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2017-10-11T12:05:26+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -858,7 +2110,7 @@ "portable", "shim" ], - "time": "2016-05-18 14:26:46" + "time": "2016-05-18T14:26:46+00:00" }, { "name": "symfony/translation", @@ -922,7 +2174,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-08-05 08:37:39" + "time": "2016-08-05T08:37:39+00:00" }, { "name": "symfony/yaml", @@ -971,7 +2223,59 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-09-02 02:12:52" + "time": "2016-09-02T02:12:52+00:00" + }, + { + "name": "zendframework/zend-diactoros", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-diactoros.git", + "reference": "ed6ce7e2105c400ca10277643a8327957c0384b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/ed6ce7e2105c400ca10277643a8327957c0384b7", + "reference": "ed6ce7e2105c400ca10277643a8327957c0384b7", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-dom": "*", + "ext-libxml": "*", + "phpunit/phpunit": "^5.7.16 || ^6.0.8", + "zendframework/zend-coding-standard": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7.x-dev", + "dev-develop": "1.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://github.com/zendframework/zend-diactoros", + "keywords": [ + "http", + "psr", + "psr-7" + ], + "time": "2018-01-04T18:21:48+00:00" } ], "packages-dev": [ @@ -1027,7 +2331,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2015-06-14T21:17:01+00:00" }, { "name": "myclabs/deep-copy", @@ -1069,7 +2373,7 @@ "object", "object graph" ], - "time": "2016-09-16 13:37:59" + "time": "2016-09-16T13:37:59+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1123,7 +2427,7 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2015-12-27T11:43:31+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -1168,7 +2472,7 @@ } ], "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" + "time": "2016-06-10T09:48:41+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -1215,7 +2519,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-06-10 07:14:17" + "time": "2016-06-10T07:14:17+00:00" }, { "name": "phpspec/prophecy", @@ -1277,7 +2581,7 @@ "spy", "stub" ], - "time": "2016-06-07 08:13:47" + "time": "2016-06-07T08:13:47+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1340,7 +2644,7 @@ "testing", "xunit" ], - "time": "2016-05-25 06:48:21" + "time": "2016-05-25T06:48:21+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1387,7 +2691,7 @@ "filesystem", "iterator" ], - "time": "2015-06-21 13:08:43" + "time": "2015-06-21T13:08:43+00:00" }, { "name": "phpunit/php-text-template", @@ -1428,7 +2732,7 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", @@ -1472,7 +2776,7 @@ "keywords": [ "timer" ], - "time": "2016-05-12 18:03:57" + "time": "2016-05-12T18:03:57+00:00" }, { "name": "phpunit/php-token-stream", @@ -1521,7 +2825,7 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2015-09-15T10:49:45+00:00" }, { "name": "phpunit/phpcov", @@ -1573,7 +2877,7 @@ ], "description": "CLI frontend for PHP_CodeCoverage", "homepage": "https://github.com/sebastianbergmann/phpcov", - "time": "2016-01-09 05:29:58" + "time": "2016-01-09T05:29:58+00:00" }, { "name": "phpunit/phpunit", @@ -1648,7 +2952,7 @@ "testing", "xunit" ], - "time": "2016-06-03 09:42:56" + "time": "2016-06-03T09:42:56+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -1704,7 +3008,7 @@ "mock", "xunit" ], - "time": "2016-04-20 14:39:26" + "time": "2016-04-20T14:39:26+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1749,7 +3053,7 @@ ], "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" + "time": "2016-02-13T06:45:14+00:00" }, { "name": "sebastian/comparator", @@ -1813,7 +3117,7 @@ "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2015-07-26T15:48:44+00:00" }, { "name": "sebastian/diff", @@ -1865,7 +3169,7 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2015-12-08T07:14:41+00:00" }, { "name": "sebastian/environment", @@ -1915,7 +3219,7 @@ "environment", "hhvm" ], - "time": "2016-08-18 05:49:44" + "time": "2016-08-18T05:49:44+00:00" }, { "name": "sebastian/exporter", @@ -1982,7 +3286,7 @@ "export", "exporter" ], - "time": "2016-06-17 09:04:28" + "time": "2016-06-17T09:04:28+00:00" }, { "name": "sebastian/finder-facade", @@ -2021,7 +3325,7 @@ ], "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2016-02-17 07:02:23" + "time": "2016-02-17T07:02:23+00:00" }, { "name": "sebastian/global-state", @@ -2072,7 +3376,7 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -2118,7 +3422,7 @@ ], "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" + "time": "2016-01-28T13:25:10+00:00" }, { "name": "sebastian/recursion-context", @@ -2171,7 +3475,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11 19:50:13" + "time": "2015-11-11T19:50:13+00:00" }, { "name": "sebastian/resource-operations", @@ -2213,7 +3517,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", @@ -2248,7 +3552,7 @@ ], "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": "2015-06-21T13:59:46+00:00" }, { "name": "symfony/finder", @@ -2297,7 +3601,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-08-26 12:04:02" + "time": "2016-08-26T12:04:02+00:00" }, { "name": "theseer/fdomdocument", @@ -2337,7 +3641,7 @@ ], "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2015-05-27 22:58:02" + "time": "2015-05-27T22:58:02+00:00" }, { "name": "webmozart/assert", @@ -2387,7 +3691,7 @@ "check", "validate" ], - "time": "2016-08-09 15:02:57" + "time": "2016-08-09T15:02:57+00:00" } ], "aliases": [], diff --git a/src/HttpApiMockContext.php b/src/HttpApiMockContext.php new file mode 100644 index 0000000..44fc51b --- /dev/null +++ b/src/HttpApiMockContext.php @@ -0,0 +1,104 @@ +clearExpectations(); + } + + /** + * @Then /^que le proxy "([^"]*)" effectue une requête (GET|POST|PUT|DELETE|OPTIONS) sur "((?:[a-zA-Z0-9,:!\/\.\?\&\=\+_%-]*)|"(?:[^"]+)")" et renvoie le status HTTP (\d+)(?: avec le résultat contenu dans "([^"]*\.json)")?$/ + */ + public function queLeProxyEffectueUneRequeteSurEtRenvoieLeStatusHTTP($proxy_name, $method, $url, $status_code, $body = null) + { + $phiremock = new Phiremock(self::$host, self::$port); + + $response = self::prepareMockResponse($status_code, $body); + + $method_name = strtolower($method) . 'Request'; + + // On set l'url et la méthode attendue par le mock + $expectation = Phiremock::on( + \Mcustiel\Phiremock\Client\Utils\A::{$method_name}()->andUrl(\Mcustiel\Phiremock\Client\Utils\Is::equalTo($url)) + )->then($response); + + // L'expectation attend la requête, la réponse est envoyée par le serveur phiremock + $phiremock->createExpectation($expectation); + } + + /** + * @Then /^que le proxy "([^"]*)" effectue une requête (GET|POST|PUT|DELETE|OPTIONS) sur une url qui contient "((?:[a-zA-Z0-9,:!\/\.\?\&\=\+_%-]*)|"(?:[^"]+)")" et renvoie le status HTTP (\d+)(?: avec le résultat contenu dans "([^"]*\.json)")?$/ + */ + public function queLeProxyEffectueUneRequeteSurUneUrlQuiContientEtRenvoieLeStatusHTTP($proxy_name, $method, $url, $status_code, $body = null) + { + $phiremock = new Phiremock(self::$host, self::$port); + + $response = self::prepareMockResponse($status_code, $body); + + $method_name = strtolower($method) . 'Request'; + + // On set l'url et la méthode attendue par le mock + $expectation = Phiremock::on( + \Mcustiel\Phiremock\Client\Utils\A::{$method_name}()->andUrl(\Mcustiel\Phiremock\Client\Utils\Is::containing($url)) + )->then($response); + + // L'expectation attend la requête, la réponse est envoyée par le serveur phiremock + $phiremock->createExpectation($expectation); + } + + /** + * @Then /^que le proxy "([^"]*)" effectue une requête (GET|POST|PUT|DELETE|OPTIONS) sur une url qui match "((?:[a-zA-Z0-9,:!\/\.\?\&\=\+_%-]*)|"(?:[^"]+)")" et renvoie le status HTTP (\d+)(?: avec le résultat contenu dans "([^"]*\.json)")?$/ + */ + public function queLeProxyEffectueUneRequeteSurUneUrlQuiMatchEtRenvoieLeStatusHTTP($proxy_name, $method, $url, $status_code, $body = null) + { + $phiremock = new Phiremock(self::$host, self::$port); + + $response = self::prepareMockResponse($status_code, $body); + + $method_name = strtolower($method) . 'Request'; + + // On set l'url depuis une regexp et la méthode attendue par le mock + $expectation = Phiremock::on( + \Mcustiel\Phiremock\Client\Utils\A::{$method_name}()->andUrl(\Mcustiel\Phiremock\Client\Utils\Is::matching($url)) + )->then($response); + + // L'expectation attend la requête, la réponse est envoyée par le serveur phiremock + $phiremock->createExpectation($expectation); + } + + private function prepareMockResponse($status_code, $body) + { + $response = \Mcustiel\Phiremock\Client\Utils\Respond::withStatusCode(intval($status_code))->andHeader('Content-Type', 'application/json'); + + if ($body !== null) { + $body = file_get_contents($this->results_path . $body); + + if (!$body) { + throw new \Exception("File not found : {$this->results_path}${body}"); + } + + $response->andBody($body); + } + + return $response; + } +} From 410463cb238c5f053639092e07df5c7feb4211ad Mon Sep 17 00:00:00 2001 From: Leonard LEUNG CHONG WO Date: Tue, 16 Jan 2018 10:11:10 +0100 Subject: [PATCH 2/4] [FEATURE#76038] correction norme et variable static --- src/HttpApiMockContext.php | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/HttpApiMockContext.php b/src/HttpApiMockContext.php index 44fc51b..a273958 100644 --- a/src/HttpApiMockContext.php +++ b/src/HttpApiMockContext.php @@ -7,13 +7,11 @@ class HttpApiMockContext extends BaseContext { - static private $host; - static private $port; + static private $phiremock; public function __construct($host = 'localhost', $port = 8080) { - self::$host = $host; - self::$port = $port; + self::$phiremock = new Phiremock($host, $port); } /** @@ -21,8 +19,7 @@ public function __construct($host = 'localhost', $port = 8080) */ public static function clearProxyExpectations() { - $phiremock = new Phiremock(self::$host, self::$port); - $phiremock->clearExpectations(); + self::$phiremock->clearExpectations(); } /** @@ -30,8 +27,6 @@ public static function clearProxyExpectations() */ public function queLeProxyEffectueUneRequeteSurEtRenvoieLeStatusHTTP($proxy_name, $method, $url, $status_code, $body = null) { - $phiremock = new Phiremock(self::$host, self::$port); - $response = self::prepareMockResponse($status_code, $body); $method_name = strtolower($method) . 'Request'; @@ -42,7 +37,7 @@ public function queLeProxyEffectueUneRequeteSurEtRenvoieLeStatusHTTP($proxy_name )->then($response); // L'expectation attend la requête, la réponse est envoyée par le serveur phiremock - $phiremock->createExpectation($expectation); + self::$phiremock->createExpectation($expectation); } /** @@ -50,8 +45,6 @@ public function queLeProxyEffectueUneRequeteSurEtRenvoieLeStatusHTTP($proxy_name */ public function queLeProxyEffectueUneRequeteSurUneUrlQuiContientEtRenvoieLeStatusHTTP($proxy_name, $method, $url, $status_code, $body = null) { - $phiremock = new Phiremock(self::$host, self::$port); - $response = self::prepareMockResponse($status_code, $body); $method_name = strtolower($method) . 'Request'; @@ -62,7 +55,7 @@ public function queLeProxyEffectueUneRequeteSurUneUrlQuiContientEtRenvoieLeStatu )->then($response); // L'expectation attend la requête, la réponse est envoyée par le serveur phiremock - $phiremock->createExpectation($expectation); + self::$phiremock->createExpectation($expectation); } /** @@ -70,8 +63,6 @@ public function queLeProxyEffectueUneRequeteSurUneUrlQuiContientEtRenvoieLeStatu */ public function queLeProxyEffectueUneRequeteSurUneUrlQuiMatchEtRenvoieLeStatusHTTP($proxy_name, $method, $url, $status_code, $body = null) { - $phiremock = new Phiremock(self::$host, self::$port); - $response = self::prepareMockResponse($status_code, $body); $method_name = strtolower($method) . 'Request'; @@ -82,14 +73,14 @@ public function queLeProxyEffectueUneRequeteSurUneUrlQuiMatchEtRenvoieLeStatusHT )->then($response); // L'expectation attend la requête, la réponse est envoyée par le serveur phiremock - $phiremock->createExpectation($expectation); + self::$phiremock->createExpectation($expectation); } private function prepareMockResponse($status_code, $body) { $response = \Mcustiel\Phiremock\Client\Utils\Respond::withStatusCode(intval($status_code))->andHeader('Content-Type', 'application/json'); - if ($body !== null) { + if (null !== $body) { $body = file_get_contents($this->results_path . $body); if (!$body) { From ac8915413b2a67c94809dedf6287a7e6181b0fe7 Mon Sep 17 00:00:00 2001 From: Leonard LEUNG CHONG WO Date: Tue, 16 Jan 2018 10:37:47 +0100 Subject: [PATCH 3/4] [FEATURE#76038] readme --- README.md | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 43a03cc..93d802c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,33 @@ composer-behat-coverage Composer for php code coverage with behat -Dependencies +## Pour utiliser les tests mocks sur proxy +----------------------- + +- Ajouter le context des mock dans le behat.yml avec ses paramètres : +``` +suites: + default: + paths: + - %paths.base%/Tests/Functional/features + contexts: + - ETNA\FeatureContext\HttpApiMockContext +``` + +- Penser à rajouter l'URL du proxy dans l'env de testing sur +l'adresse et le port du serveur phiremock: +exemple: +``` +putenv("CHANGEREQUEST_API_URL=http://localhost:8080"); +``` + +- Lancer le serveur phiremock avant de lancer les tests: +``` +./vendor/bin/phiremock -p 8080 -i 0.0.0.0 -d +``` + + +## Dependencies ----------------------- In your composer.json : ``` @@ -16,7 +42,7 @@ In your composer.json : }, ``` -Install +## Install ----------------------- * use this behat.yml if you dont have one : ``` @@ -83,7 +109,7 @@ wip: tags: @wip ``` -Run +##Run ----------------------- ``` From 8f07987f34f3030f5940fb0838911ca7dc05a5c3 Mon Sep 17 00:00:00 2001 From: Leonard LEUNG CHONG WO Date: Tue, 16 Jan 2018 10:38:48 +0100 Subject: [PATCH 4/4] [FEATURE#76038] readme correction --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 93d802c..2ab86a7 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,9 @@ suites: paths: - %paths.base%/Tests/Functional/features contexts: - - ETNA\FeatureContext\HttpApiMockContext + - ETNA\FeatureContext\HttpApiMockContext: + host: '0.0.0.0' + port: '8080' ``` - Penser à rajouter l'URL du proxy dans l'env de testing sur