From fc76ff1e5b1f2234c3033609a642e81b2bb8b4d0 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Fri, 1 May 2020 23:55:45 -0500 Subject: [PATCH 01/24] Migration to Symfony 5 --- .env | 21 + .gitignore | 15 +- bin/console | 42 + composer.json | 73 +- composer.lock | 3217 ++++++++++------- config/bootstrap.php | 23 + config/bundles.php | 5 + config/packages/cache.yaml | 19 + config/packages/framework.yaml | 16 + config/packages/prod/routing.yaml | 3 + config/packages/routing.yaml | 3 + config/packages/test/framework.yaml | 4 + config/routes.yaml | 27 + config/routes/dev/framework.yaml | 3 + config/services.yaml | 57 + docker/.htaccess | 5 - docker/settings.php | 26 - logs/README.md | 1 - public/index.php | 33 +- src/Controller/ConsultController.php | 85 + src/Controller/ConsultMultipleController.php | 68 + src/Controller/GraphController.php | 46 + src/Controller/HomeController.php | 17 + src/Factory/GraphqlSchemaFactory.php | 30 + src/Kernel.php | 54 + src/{app => }/Middleware/TokenMiddleware.php | 2 +- src/{app => }/Resolver/DniResolver.php | 2 +- src/{app => }/Resolver/RucResolver.php | 2 +- src/{app => }/Service/DniMultiple.php | 4 +- src/{app => }/Service/GraphRunner.php | 4 +- src/{app => }/Service/RucMultiple.php | 4 +- src/{app/Repository => Types}/CompanyType.php | 2 +- src/{app/Repository => Types}/PersonType.php | 2 +- src/{app/Repository => Types}/RootType.php | 6 +- src/app/Controller/ConsultController.php | 110 - .../Controller/ConsultMultipleController.php | 86 - src/app/Controller/GraphController.php | 50 - src/app/Controller/HomeController.php | 91 - src/app/Handler/CustomError.php | 40 - src/app/Handler/ResponseWriter.php | 50 - src/app/Http/AppResponse.php | 30 - src/app/Service/ArrayConverter.php | 33 - src/dependencies.php | 126 - src/middleware.php | 13 - src/routes.php | 23 - src/settings.php | 26 - symfony.lock | 235 ++ templates/index.phtml | 104 - tests/Functional/BaseTestCase.php | 106 - tests/Functional/ClientStubDecorator.php | 69 - tests/Functional/ConsultApiTest.php | 59 - tests/Functional/ConsultMultipleApiTest.php | 75 - tests/Functional/GraphApiTest.php | 62 - tests/Functional/HomepageTest.php | 54 - tests/Functional/HttpClientStub.php | 52 - 55 files changed, 2847 insertions(+), 2568 deletions(-) create mode 100644 .env create mode 100644 bin/console create mode 100644 config/bootstrap.php create mode 100644 config/bundles.php create mode 100644 config/packages/cache.yaml create mode 100644 config/packages/framework.yaml create mode 100644 config/packages/prod/routing.yaml create mode 100644 config/packages/routing.yaml create mode 100644 config/packages/test/framework.yaml create mode 100644 config/routes.yaml create mode 100644 config/routes/dev/framework.yaml create mode 100644 config/services.yaml delete mode 100644 docker/.htaccess delete mode 100644 docker/settings.php delete mode 100644 logs/README.md create mode 100644 src/Controller/ConsultController.php create mode 100644 src/Controller/ConsultMultipleController.php create mode 100644 src/Controller/GraphController.php create mode 100644 src/Controller/HomeController.php create mode 100644 src/Factory/GraphqlSchemaFactory.php create mode 100644 src/Kernel.php rename src/{app => }/Middleware/TokenMiddleware.php (97%) rename src/{app => }/Resolver/DniResolver.php (92%) rename src/{app => }/Resolver/RucResolver.php (92%) rename src/{app => }/Service/DniMultiple.php (96%) rename src/{app => }/Service/GraphRunner.php (97%) rename src/{app => }/Service/RucMultiple.php (96%) rename src/{app/Repository => Types}/CompanyType.php (99%) rename src/{app/Repository => Types}/PersonType.php (97%) rename src/{app/Repository => Types}/RootType.php (93%) delete mode 100644 src/app/Controller/ConsultController.php delete mode 100644 src/app/Controller/ConsultMultipleController.php delete mode 100644 src/app/Controller/GraphController.php delete mode 100644 src/app/Controller/HomeController.php delete mode 100644 src/app/Handler/CustomError.php delete mode 100644 src/app/Handler/ResponseWriter.php delete mode 100644 src/app/Http/AppResponse.php delete mode 100644 src/app/Service/ArrayConverter.php delete mode 100644 src/dependencies.php delete mode 100644 src/middleware.php delete mode 100644 src/routes.php delete mode 100644 src/settings.php create mode 100644 symfony.lock delete mode 100644 templates/index.phtml delete mode 100644 tests/Functional/BaseTestCase.php delete mode 100644 tests/Functional/ClientStubDecorator.php delete mode 100644 tests/Functional/ConsultApiTest.php delete mode 100644 tests/Functional/ConsultMultipleApiTest.php delete mode 100644 tests/Functional/GraphApiTest.php delete mode 100644 tests/Functional/HomepageTest.php delete mode 100644 tests/Functional/HttpClientStub.php diff --git a/.env b/.env new file mode 100644 index 0000000..5384a00 --- /dev/null +++ b/.env @@ -0,0 +1,21 @@ +# In all environments, the following files are loaded if they exist, +# the latter taking precedence over the former: +# +# * .env contains default values for the environment variables needed by the app +# * .env.local uncommitted file with local overrides +# * .env.$APP_ENV committed environment-specific defaults +# * .env.$APP_ENV.local uncommitted environment-specific overrides +# +# Real environment variables win over .env files. +# +# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. +# +# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). +# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration + +###> symfony/framework-bundle ### +APP_ENV=dev +APP_SECRET=7c227fa2152043dfcff04a2ffe103321 +#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 +#TRUSTED_HOSTS='^(localhost|example\.com)$' +###< symfony/framework-bundle ### diff --git a/.gitignore b/.gitignore index 7170313..5dd3192 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,13 @@ + +###> symfony/framework-bundle ### +/.env.local +/.env.local.php +/.env.*.local +/config/secrets/prod/prod.decrypt.private.php +/public/bundles/ +/var/ /vendor/ -/logs/* -!/logs/README.md -/.php_cs.cache +###< symfony/framework-bundle ### + /.idea/ -/phpunit.xml \ No newline at end of file +/.php_cs.cache \ No newline at end of file diff --git a/bin/console b/bin/console new file mode 100644 index 0000000..5de0e1c --- /dev/null +++ b/bin/console @@ -0,0 +1,42 @@ +#!/usr/bin/env php +getParameterOption(['--env', '-e'], null, true)) { + putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); +} + +if ($input->hasParameterOption('--no-debug', true)) { + putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); +} + +require dirname(__DIR__).'/config/bootstrap.php'; + +if ($_SERVER['APP_DEBUG']) { + umask(0000); + + if (class_exists(Debug::class)) { + Debug::enable(); + } +} + +$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); +$application = new Application($kernel); +$application->run($input); diff --git a/composer.json b/composer.json index 726d1cd..5622ee8 100644 --- a/composer.json +++ b/composer.json @@ -1,31 +1,31 @@ { - "name": "giansalex/peru-consult-api", - "description": "Consulta RUC, DNI - Perú", - "keywords": ["peru", "rest", "ruc", "dni", "graphql"], - "homepage": "https://github.com/giansalex/peru-consult-api", - "license": "MIT", - "authors": [ - { - "name": "Giancarlos Salas", - "email": "giansalex@gmail.com" - } - ], + "type": "project", + "license": "proprietary", "require": { - "php": "^7.1", - "slim/slim": "^3.1", - "slim/php-view": "^2.0", - "katzgrau/klogger": "^1.2", - "giansalex/peru-consult": "^4.0", - "tuupola/cors-middleware": "^0.9.2", - "webonyx/graphql-php": "^0.13.4" + "php": "^7.2.5", + "ext-ctype": "*", + "ext-iconv": "*", + "ext-json": "*", + "drift/http-kernel": "^0.1.10", + "giansalex/peru-consult": "^4.1", + "symfony/console": "5.0.*", + "symfony/dotenv": "5.0.*", + "symfony/flex": "^1.3.1", + "symfony/framework-bundle": "5.0.*", + "symfony/yaml": "5.0.*", + "webonyx/graphql-php": "^0.13.8" }, "require-dev": { - "phpunit/phpunit": "^7", - "clue/block-react": "^1.3" + }, + "config": { + "preferred-install": { + "*": "dist" + }, + "sort-packages": true }, "autoload": { "psr-4": { - "Peru\\Api\\": "src/app/" + "App\\": "src/" } }, "autoload-dev": { @@ -33,11 +33,34 @@ "Tests\\": "tests/" } }, - "config": { - "process-timeout" : 0 + "replace": { + "paragonie/random_compat": "2.*", + "symfony/polyfill-ctype": "*", + "symfony/polyfill-iconv": "*", + "symfony/polyfill-php72": "*", + "symfony/polyfill-php71": "*", + "symfony/polyfill-php70": "*", + "symfony/polyfill-php56": "*" }, "scripts": { - "test": "phpunit" + "auto-scripts": { + "cache:clear": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd" + }, + "post-install-cmd": [ + "@auto-scripts" + ], + "post-update-cmd": [ + "@auto-scripts" + ] + }, + "conflict": { + "symfony/symfony": "*" + }, + "extra": { + "symfony": { + "allow-contrib": false, + "require": "5.0.*" + } } - } diff --git a/composer.lock b/composer.lock index a5c9ee2..61969a5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,64 +4,88 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8570ad4a6df60915517aeb4f8192278a", + "content-hash": "5cb70042aa466b7bf3937a25aab915cf", "packages": [ { - "name": "container-interop/container-interop", - "version": "1.2.0", + "name": "cakephp/core", + "version": "3.8.11", "source": { "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + "url": "https://github.com/cakephp/core.git", + "reference": "16249fa6771663e6649cbdb832f7ff25bf568b84" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "url": "https://api.github.com/repos/cakephp/core/zipball/16249fa6771663e6649cbdb832f7ff25bf568b84", + "reference": "16249fa6771663e6649cbdb832f7ff25bf568b84", "shasum": "" }, "require": { - "psr/container": "^1.0" + "cakephp/utility": "^3.6.0", + "php": ">=5.6.0" + }, + "suggest": { + "cakephp/cache": "To use Configure::store() and restore().", + "cakephp/event": "To use PluginApplicationInterface or plugin applications." }, "type": "library", "autoload": { "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } + "Cake\\Core\\": "." + }, + "files": [ + "functions.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "time": "2017-02-14T19:40:03+00:00" + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/core/graphs/contributors" + } + ], + "description": "CakePHP Framework Core classes", + "homepage": "https://cakephp.org", + "keywords": [ + "cakephp", + "core", + "framework" + ], + "time": "2020-01-10T15:24:40+00:00" }, { - "name": "evenement/evenement", - "version": "v3.0.1", + "name": "cakephp/utility", + "version": "3.8.11", "source": { "type": "git", - "url": "https://github.com/igorw/evenement.git", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" + "url": "https://github.com/cakephp/utility.git", + "reference": "9f121defbff4b5f3691b33de8cb203b8923fc2a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "url": "https://api.github.com/repos/cakephp/utility/zipball/9f121defbff4b5f3691b33de8cb203b8923fc2a4", + "reference": "9f121defbff4b5f3691b33de8cb203b8923fc2a4", "shasum": "" }, "require": { - "php": ">=7.0" + "cakephp/core": "^3.6.0", + "php": ">=5.6.0" }, - "require-dev": { - "phpunit/phpunit": "^6.0" + "suggest": { + "ext-intl": "To use Text::transliterate() or Text::slug()", + "lib-ICU": "To use Text::transliterate() or Text::slug()" }, "type": "library", "autoload": { - "psr-0": { - "Evenement": "src" - } + "psr-4": { + "Cake\\Utility\\": "." + }, + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -69,49 +93,50 @@ ], "authors": [ { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/utility/graphs/contributors" } ], - "description": "Événement is a very simple event dispatching library for PHP", + "description": "CakePHP Utility classes such as Inflector, String, Hash, and Security", + "homepage": "https://cakephp.org", "keywords": [ - "event-dispatcher", - "event-emitter" - ], - "time": "2017-07-23T21:35:13+00:00" + "cakephp", + "hash", + "inflector", + "security", + "string", + "utility" + ], + "time": "2020-02-18T01:57:35+00:00" }, { - "name": "giansalex/peru-consult", - "version": "v4.1.0", + "name": "clue/block-react", + "version": "v1.3.1", "source": { "type": "git", - "url": "https://github.com/giansalex/peru-consult.git", - "reference": "48d00e709dc9995060c1a8321f18a00134c958e4" + "url": "https://github.com/clue/reactphp-block.git", + "reference": "2f516b28259c203d67c4c963772dd7e9db652737" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/giansalex/peru-consult/zipball/48d00e709dc9995060c1a8321f18a00134c958e4", - "reference": "48d00e709dc9995060c1a8321f18a00134c958e4", + "url": "https://api.github.com/repos/clue/reactphp-block/zipball/2f516b28259c203d67c4c963772dd7e9db652737", + "reference": "2f516b28259c203d67c4c963772dd7e9db652737", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "php": "^7.1", - "react/http-client": "^0.5.9" + "php": ">=5.3", + "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", + "react/promise": "^2.7 || ^1.2.1", + "react/promise-timer": "^1.5" }, "require-dev": { - "behat/behat": "^3.5", - "clue/block-react": "^1.3", - "phpstan/phpstan": "^0.11.15", - "phpunit/phpunit": "^7" + "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" }, "type": "library", "autoload": { - "psr-4": { - "Peru\\": "src/Peru/" - } + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -119,51 +144,54 @@ ], "authors": [ { - "name": "Giancarlos Salas", - "email": "giansalex@gmail.com" + "name": "Christian Lück", + "email": "christian@lueck.tv" } ], - "description": "Consultas gratuita de RUC y DNI en Perú", - "homepage": "https://github.com/giansalex/peru-consult", + "description": "Lightweight library that eases integrating async components built for ReactPHP in a traditional, blocking environment.", + "homepage": "https://github.com/clue/reactphp-block", "keywords": [ - "DNI", - "clave-sol", - "peru", - "reniec", - "ruc", - "sunat" + "async", + "await", + "blocking", + "event loop", + "promise", + "reactphp", + "sleep", + "synchronous" ], - "time": "2019-10-19T03:28:25+00:00" + "time": "2019-04-09T11:45:04+00:00" }, { - "name": "katzgrau/klogger", - "version": "1.2.1", + "name": "doctrine/inflector", + "version": "1.3.1", "source": { "type": "git", - "url": "https://github.com/katzgrau/KLogger.git", - "reference": "a4ed373fa8a214aa4ae7aa4f221fe2c6ce862ef1" + "url": "https://github.com/doctrine/inflector.git", + "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/katzgrau/KLogger/zipball/a4ed373fa8a214aa4ae7aa4f221fe2c6ce862ef1", - "reference": "a4ed373fa8a214aa4ae7aa4f221fe2c6ce862ef1", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7aec1", + "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1", "shasum": "" }, "require": { - "php": ">=5.3", - "psr/log": "^1.0.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "4.0.*" + "phpunit/phpunit": "^6.2" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, "autoload": { "psr-4": { - "Katzgrau\\KLogger\\": "src/" - }, - "classmap": [ - "src/" - ] + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -171,151 +199,168 @@ ], "authors": [ { - "name": "Kenny Katzgrau", - "email": "katzgrau@gmail.com" + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" }, { - "name": "Dan Horrigan", - "email": "dan@dhorrigan.com" + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" } ], - "description": "A Simple Logging Class", + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", "keywords": [ - "logging" + "inflection", + "pluralize", + "singularize", + "string" ], - "time": "2016-11-07T19:29:14+00:00" + "time": "2019-10-30T19:59:35+00:00" }, { - "name": "neomerx/cors-psr7", - "version": "v1.0.13", + "name": "doctrine/instantiator", + "version": "1.3.0", "source": { "type": "git", - "url": "https://github.com/neomerx/cors-psr7.git", - "reference": "2556e2013f16a55532c95928455257d5b6bbc6e2" + "url": "https://github.com/doctrine/instantiator.git", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/neomerx/cors-psr7/zipball/2556e2013f16a55532c95928455257d5b6bbc6e2", - "reference": "2556e2013f16a55532c95928455257d5b6bbc6e2", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", "shasum": "" }, "require": { - "php": ">=5.6.0", - "psr/http-message": "^1.0", - "psr/log": "^1.0" + "php": "^7.1" }, "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^5.7", - "scrutinizer/ocular": "^1.1", - "squizlabs/php_codesniffer": "^3.0" + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, "autoload": { "psr-4": { - "Neomerx\\Cors\\": "src/" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { - "name": "neomerx", - "email": "info@neomerx.com" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" } ], - "description": "Framework agnostic (PSR-7) CORS implementation (www.w3.org/TR/cors/)", - "homepage": "https://github.com/neomerx/cors-psr7", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "Cross Origin Resource Sharing", - "Cross-Origin Resource Sharing", - "cors", - "neomerx", - "psr-7", - "psr7", - "w3.org", - "www.w3.org" + "constructor", + "instantiate" ], - "time": "2018-05-23T16:10:11+00:00" + "time": "2019-10-21T16:45:58+00:00" }, { - "name": "nikic/fast-route", - "version": "v1.3.0", + "name": "drift/http-kernel", + "version": "0.1.10", "source": { "type": "git", - "url": "https://github.com/nikic/FastRoute.git", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812" + "url": "https://github.com/driftphp/http-kernel.git", + "reference": "b6f243673dbc088f576619264074613e75990aa2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812", + "url": "https://api.github.com/repos/driftphp/http-kernel/zipball/b6f243673dbc088f576619264074613e75990aa2", + "reference": "b6f243673dbc088f576619264074613e75990aa2", "shasum": "" }, "require": { - "php": ">=5.4.0" + "clue/block-react": "^1.3", + "php": "^7.3", + "react/filesystem": "^0.1", + "react/http": "^0.8", + "react/promise": "^2.7", + "symfony/dependency-injection": "^5.0", + "symfony/event-dispatcher-contracts": "^2.0", + "symfony/http-kernel": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35|~5.7" + "mmoreram/base-bundle": "^2.1.0", + "phpunit/phpunit": "7.5.17", + "symfony/console": "^5.0", + "symfony/yaml": "^5.0" }, "type": "library", "autoload": { "psr-4": { - "FastRoute\\": "src/" + "Drift\\HttpKernel\\": "" }, - "files": [ - "src/functions.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Nikita Popov", - "email": "nikic@php.net" + "name": "Marc Morera", + "email": "yuhu@mmoreram.com" } ], - "description": "Fast request router for PHP", - "keywords": [ - "router", - "routing" - ], - "time": "2018-02-13T20:26:39+00:00" + "description": "Http Kernel component for Drift, based on Symfony Http Kernel component", + "time": "2020-05-02T01:17:16+00:00" }, { - "name": "pimple/pimple", - "version": "v3.2.3", + "name": "evenement/evenement", + "version": "v3.0.1", "source": { "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" + "url": "https://github.com/igorw/evenement.git", + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", + "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", "shasum": "" }, "require": { - "php": ">=5.3.0", - "psr/container": "^1.0" + "php": ">=7.0" }, "require-dev": { - "symfony/phpunit-bridge": "^3.2" + "phpunit/phpunit": "^6.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev" - } - }, "autoload": { "psr-0": { - "Pimple": "src/" + "Evenement": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -324,44 +369,48 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" } ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "http://pimple.sensiolabs.org", + "description": "Événement is a very simple event dispatching library for PHP", "keywords": [ - "container", - "dependency injection" + "event-dispatcher", + "event-emitter" ], - "time": "2018-01-21T07:42:36+00:00" + "time": "2017-07-23T21:35:13+00:00" }, { - "name": "psr/container", - "version": "1.0.0", + "name": "giansalex/peru-consult", + "version": "v4.1.0", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "url": "https://github.com/giansalex/peru-consult.git", + "reference": "48d00e709dc9995060c1a8321f18a00134c958e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/giansalex/peru-consult/zipball/48d00e709dc9995060c1a8321f18a00134c958e4", + "reference": "48d00e709dc9995060c1a8321f18a00134c958e4", "shasum": "" }, "require": { - "php": ">=5.3.0" + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "php": "^7.1", + "react/http-client": "^0.5.9" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "require-dev": { + "behat/behat": "^3.5", + "clue/block-react": "^1.3", + "phpstan/phpstan": "^0.11.15", + "phpunit/phpunit": "^7" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "Peru\\": "src/Peru/" } }, "notification-url": "https://packagist.org/downloads/", @@ -370,49 +419,53 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Giancarlos Salas", + "email": "giansalex@gmail.com" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Consultas gratuita de RUC y DNI en Perú", + "homepage": "https://github.com/giansalex/peru-consult", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "DNI", + "clave-sol", + "peru", + "reniec", + "ruc", + "sunat" ], - "time": "2017-02-14T16:28:37+00:00" + "time": "2019-10-19T03:28:25+00:00" }, { - "name": "psr/http-factory", - "version": "1.0.1", + "name": "indigophp/hash-compat", + "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "url": "https://github.com/indigophp/hash-compat.git", + "reference": "43a19f42093a0cd2d11874dff9d891027fc42214" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/indigophp/hash-compat/zipball/43a19f42093a0cd2d11874dff9d891027fc42214", + "reference": "43a19f42093a0cd2d11874dff9d891027fc42214", "shasum": "" }, "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2-dev" } }, "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } + "files": [ + "src/hash_equals.php", + "src/hash_pbkdf2.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -420,35 +473,31 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "Backports hash_* functionality to older PHP versions", + "homepage": "https://indigophp.com", "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" + "hash", + "hash_equals", + "hash_pbkdf2" ], - "time": "2019-04-30T12:38:16+00:00" + "time": "2015-08-22T07:03:35+00:00" }, { - "name": "psr/http-message", + "name": "psr/cache", "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", "shasum": "" }, "require": { @@ -462,7 +511,7 @@ }, "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "Psr\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -475,35 +524,30 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "Common interface for caching libraries", "keywords": [ - "http", - "http-message", + "cache", "psr", - "psr-7", - "request", - "response" + "psr-6" ], - "time": "2016-08-06T14:39:51+00:00" + "time": "2016-08-06T20:24:11+00:00" }, { - "name": "psr/http-server-handler", - "version": "1.0.1", + "name": "psr/container", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7" - }, + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "shasum": "" }, "require": { - "php": ">=7.0", - "psr/http-message": "^1.0" + "php": ">=5.3.0" }, "type": "library", "extra": { @@ -513,7 +557,7 @@ }, "autoload": { "psr-4": { - "Psr\\Http\\Server\\": "src/" + "Psr\\Container\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -526,38 +570,79 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for HTTP server-side request handler", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "handler", - "http", - "http-interop", + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" + "psr-14" ], - "time": "2018-10-30T16:46:14+00:00" + "time": "2019-01-08T18:20:26+00:00" }, { - "name": "psr/http-server-middleware", + "name": "psr/http-message", "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5" + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { - "php": ">=7.0", - "psr/http-message": "^1.0", - "psr/http-server-handler": "^1.0" + "php": ">=5.3.0" }, "type": "library", "extra": { @@ -567,7 +652,7 @@ }, "autoload": { "psr-4": { - "Psr\\Http\\Server\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -580,31 +665,30 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for HTTP server-side middleware", + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ "http", - "http-interop", - "middleware", + "http-message", "psr", - "psr-15", "psr-7", "request", "response" ], - "time": "2018-10-30T17:12:04+00:00" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", - "version": "1.1.0", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -613,7 +697,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -638,7 +722,7 @@ "psr", "psr-3" ], - "time": "2018-11-20T15:27:04+00:00" + "time": "2020-03-23T09:12:05+00:00" }, { "name": "react/cache", @@ -680,6 +764,49 @@ ], "time": "2019-07-11T13:45:28+00:00" }, + { + "name": "react/child-process", + "version": "v0.6.1", + "source": { + "type": "git", + "url": "https://github.com/reactphp/child-process.git", + "reference": "6895afa583d51dc10a4b9e93cd3bce17b3b77ac3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/6895afa583d51dc10a4b9e93cd3bce17b3b77ac3", + "reference": "6895afa583d51dc10a4b9e93cd3bce17b3b77ac3", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", + "react/stream": "^1.0 || ^0.7.6" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35", + "react/socket": "^1.0", + "sebastian/environment": "^3.0 || ^2.0 || ^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\ChildProcess\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Event-driven library for executing child processes with ReactPHP.", + "keywords": [ + "event-driven", + "process", + "reactphp" + ], + "time": "2019-02-15T13:48:16+00:00" + }, { "name": "react/dns", "version": "v1.2.0", @@ -726,16 +853,16 @@ }, { "name": "react/event-loop", - "version": "v1.1.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "a0ecac955c67b57c40fe4a1b88a7cca1b58c982d" + "reference": "6d24de090cd59cfc830263cfba965be77b563c13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/a0ecac955c67b57c40fe4a1b88a7cca1b58c982d", - "reference": "a0ecac955c67b57c40fe4a1b88a7cca1b58c982d", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/6d24de090cd59cfc830263cfba965be77b563c13", + "reference": "6d24de090cd59cfc830263cfba965be77b563c13", "shasum": "" }, "require": { @@ -764,20 +891,125 @@ "asynchronous", "event-loop" ], - "time": "2019-02-07T16:19:49+00:00" + "time": "2020-01-01T18:39:52+00:00" + }, + { + "name": "react/filesystem", + "version": "v0.1.2", + "source": { + "type": "git", + "url": "https://github.com/reactphp/filesystem.git", + "reference": "766cdef9ba806367114f0c5ba36ea2a6eec8ccd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/filesystem/zipball/766cdef9ba806367114f0c5ba36ea2a6eec8ccd2", + "reference": "766cdef9ba806367114f0c5ba36ea2a6eec8ccd2", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0", + "php": ">=5.4.0", + "react/event-loop": "^1.0 || ^0.5 || ^0.4", + "react/promise": "~2.2", + "react/promise-stream": "^1.1", + "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4", + "wyrihaximus/react-child-process-pool": "^1.3" + }, + "require-dev": { + "clue/block-react": "^1.1", + "phpunit/phpunit": "^6.0 || ^5.0 || ^4.8" + }, + "suggest": { + "ext-eio": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Filesystem\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Asynchronous filesystem abstraction.", + "keywords": [ + "asynchronous", + "eio", + "filesystem" + ], + "time": "2018-10-22T12:10:29+00:00" + }, + { + "name": "react/http", + "version": "v0.8.6", + "source": { + "type": "git", + "url": "https://github.com/reactphp/http.git", + "reference": "248202e57195d06a4375f6d2f5c5b9ff9da3ea9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/http/zipball/248202e57195d06a4375f6d2f5c5b9ff9da3ea9e", + "reference": "248202e57195d06a4375f6d2f5c5b9ff9da3ea9e", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/promise": "^2.3 || ^1.2.1", + "react/promise-stream": "^1.1", + "react/socket": "^1.0 || ^0.8.3", + "react/stream": "^1.0 || ^0.7.1", + "ringcentral/psr7": "^1.2" + }, + "require-dev": { + "clue/block-react": "^1.1", + "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35" + }, + "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": "2020-01-12T13:15:06+00:00" }, { "name": "react/http-client", - "version": "v0.5.9", + "version": "v0.5.10", "source": { "type": "git", "url": "https://github.com/reactphp/http-client.git", - "reference": "f8e81a022b61938e0b37c94c6351fc170b7d87f6" + "reference": "f16ab55150ec369f8f9b5db64972f248691093b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/http-client/zipball/f8e81a022b61938e0b37c94c6351fc170b7d87f6", - "reference": "f8e81a022b61938e0b37c94c6351fc170b7d87f6", + "url": "https://api.github.com/repos/reactphp/http-client/zipball/f16ab55150ec369f8f9b5db64972f248691093b0", + "reference": "f16ab55150ec369f8f9b5db64972f248691093b0", "shasum": "" }, "require": { @@ -791,7 +1023,7 @@ }, "require-dev": { "clue/block-react": "^1.2", - "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35", + "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35", "react/promise-stream": "^1.1" }, "type": "library", @@ -808,7 +1040,7 @@ "keywords": [ "http" ], - "time": "2018-04-10T11:38:54+00:00" + "time": "2020-01-14T08:36:16+00:00" }, { "name": "react/promise", @@ -856,6 +1088,62 @@ ], "time": "2019-01-07T21:25:54+00:00" }, + { + "name": "react/promise-stream", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise-stream.git", + "reference": "6384d8b76cf7dcc44b0bf3343fb2b2928412d1fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise-stream/zipball/6384d8b76cf7dcc44b0bf3343fb2b2928412d1fe", + "reference": "6384d8b76cf7dcc44b0bf3343fb2b2928412d1fe", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/promise": "^2.1 || ^1.2", + "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6" + }, + "require-dev": { + "clue/block-react": "^1.0", + "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35", + "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3", + "react/promise-timer": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Promise\\Stream\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@lueck.tv" + } + ], + "description": "The missing link between Promise-land and Stream-land for ReactPHP", + "homepage": "https://github.com/reactphp/promise-stream", + "keywords": [ + "Buffer", + "async", + "promise", + "reactphp", + "stream", + "unwrap" + ], + "time": "2019-07-03T12:29:10+00:00" + }, { "name": "react/promise-timer", "version": "v1.5.1", @@ -911,30 +1199,31 @@ }, { "name": "react/socket", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/reactphp/socket.git", - "reference": "10f0629ec83ea0fa22597f348623f554227e3ca0" + "reference": "97522e24987365e1ed873f0f4884900747a668e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/10f0629ec83ea0fa22597f348623f554227e3ca0", - "reference": "10f0629ec83ea0fa22597f348623f554227e3ca0", + "url": "https://api.github.com/repos/reactphp/socket/zipball/97522e24987365e1ed873f0f4884900747a668e0", + "reference": "97522e24987365e1ed873f0f4884900747a668e0", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.0", - "react/dns": "^1.0 || ^0.4.13", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", + "react/dns": "^1.1", + "react/event-loop": "^1.0 || ^0.5", "react/promise": "^2.6.0 || ^1.2.1", "react/promise-timer": "^1.4.0", "react/stream": "^1.1" }, "require-dev": { "clue/block-react": "^1.2", - "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^7.5 || ^6.4 || ^5.7 || ^4.8.35", + "react/promise-stream": "^1.2" }, "type": "library", "autoload": { @@ -954,7 +1243,7 @@ "reactphp", "stream" ], - "time": "2019-07-10T10:11:14+00:00" + "time": "2020-03-12T12:15:14+00:00" }, { "name": "react/stream", @@ -1061,91 +1350,61 @@ "time": "2018-01-15T21:00:49+00:00" }, { - "name": "slim/php-view", - "version": "2.2.1", + "name": "symfony/cache", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/slimphp/PHP-View.git", - "reference": "a13ada9d7962ca1b48799c0d9ffbca4c33245aed" + "url": "https://github.com/symfony/cache.git", + "reference": "0c5f5b1882dc82b255a4bdead4ed3c7738cddc04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/PHP-View/zipball/a13ada9d7962ca1b48799c0d9ffbca4c33245aed", - "reference": "a13ada9d7962ca1b48799c0d9ffbca4c33245aed", + "url": "https://api.github.com/repos/symfony/cache/zipball/0c5f5b1882dc82b255a4bdead4ed3c7738cddc04", + "reference": "0c5f5b1882dc82b255a4bdead4ed3c7738cddc04", "shasum": "" }, "require": { - "psr/http-message": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8", - "slim/slim": "^3.0" + "php": "^7.2.5", + "psr/cache": "~1.0", + "psr/log": "~1.0", + "symfony/cache-contracts": "^1.1.7|^2", + "symfony/service-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" }, - "type": "library", - "autoload": { - "psr-4": { - "Slim\\Views\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Glenn Eggleton", - "email": "geggleto@gmail.com" - } - ], - "description": "Render PHP view scripts into a PSR-7 Response object.", - "keywords": [ - "framework", - "php", - "phtml", - "renderer", - "slim", - "template", - "view" - ], - "time": "2019-04-15T20:43:28+00:00" - }, - { - "name": "slim/slim", - "version": "3.12.2", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim.git", - "reference": "200c6143f15baa477601879b64ab2326847aac0b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/200c6143f15baa477601879b64ab2326847aac0b", - "reference": "200c6143f15baa477601879b64ab2326847aac0b", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.2", - "ext-json": "*", - "ext-libxml": "*", - "ext-simplexml": "*", - "nikic/fast-route": "^1.0", - "php": ">=5.5.0", - "pimple/pimple": "^3.0", - "psr/container": "^1.0", - "psr/http-message": "^1.0" + "conflict": { + "doctrine/dbal": "<2.5", + "symfony/dependency-injection": "<4.4", + "symfony/http-kernel": "<4.4", + "symfony/var-dumper": "<4.4" }, "provide": { - "psr/http-message-implementation": "1.0" + "psr/cache-implementation": "1.0", + "psr/simple-cache-implementation": "1.0", + "symfony/cache-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.5" + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "doctrine/dbal": "~2.5", + "predis/predis": "~1.1", + "psr/simple-cache": "^1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, "autoload": { "psr-4": { - "Slim\\": "Slim" - } + "Symfony\\Component\\Cache\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1153,66 +1412,66 @@ ], "authors": [ { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "https://joshlockhart.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Cache component with PSR-6, PSR-16, and tags", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" }, { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" + "url": "https://github.com/fabpot", + "type": "github" }, { - "name": "Gabriel Manricks", - "email": "gmanricks@me.com", - "homepage": "http://gabrielmanricks.com" + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "https://slimframework.com", - "keywords": [ - "api", - "framework", - "micro", - "router" - ], - "time": "2019-08-20T18:46:05+00:00" + "time": "2020-04-28T17:58:55+00:00" }, { - "name": "tuupola/callable-handler", - "version": "1.0.0", + "name": "symfony/cache-contracts", + "version": "v2.0.1", "source": { "type": "git", - "url": "https://github.com/tuupola/callable-handler.git", - "reference": "8b9d87f88056d4234af317d65612d7b6307a747a" + "url": "https://github.com/symfony/cache-contracts.git", + "reference": "23ed8bfc1a4115feca942cb5f1aacdf3dcdf3c16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tuupola/callable-handler/zipball/8b9d87f88056d4234af317d65612d7b6307a747a", - "reference": "8b9d87f88056d4234af317d65612d7b6307a747a", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/23ed8bfc1a4115feca942cb5f1aacdf3dcdf3c16", + "reference": "23ed8bfc1a4115feca942cb5f1aacdf3dcdf3c16", "shasum": "" }, "require": { - "php": "^7.1", - "psr/http-server-middleware": "^1.0" + "php": "^7.2.5", + "psr/cache": "^1.0" }, - "require-dev": { - "codedungeon/phpunit-result-printer": "^0.4.4", - "overtrue/phplint": "^1.0", - "phpunit/phpunit": "^6.5", - "squizlabs/php_codesniffer": "^3.2", - "tuupola/http-factory": "^0.4.0|^1.0", - "zendframework/zend-diactoros": "^1.6.0|^2.0" + "suggest": { + "symfony/cache-implementation": "" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "psr-4": { - "Tuupola\\Middleware\\": "src" + "Symfony\\Contracts\\Cache\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1221,57 +1480,71 @@ ], "authors": [ { - "name": "Mika Tuupola", - "email": "tuupola@appelsiini.net", - "homepage": "https://appelsiini.net/", - "role": "Developer" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Compatibility layer for PSR-7 double pass and PSR-15 middlewares.", - "homepage": "https://github.com/tuupola/callable-handler", + "description": "Generic abstractions related to caching", + "homepage": "https://symfony.com", "keywords": [ - "middleware", - "psr-15", - "psr-7" - ], - "time": "2018-10-12T09:59:35+00:00" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-11-18T17:27:11+00:00" }, { - "name": "tuupola/cors-middleware", - "version": "0.9.4", + "name": "symfony/config", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/tuupola/cors-middleware.git", - "reference": "1b6d9927d7a643659cd0eb7ebeb8675b26df0a05" + "url": "https://github.com/symfony/config.git", + "reference": "db1674e1a261148429f123871f30d211992294e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tuupola/cors-middleware/zipball/1b6d9927d7a643659cd0eb7ebeb8675b26df0a05", - "reference": "1b6d9927d7a643659cd0eb7ebeb8675b26df0a05", + "url": "https://api.github.com/repos/symfony/config/zipball/db1674e1a261148429f123871f30d211992294e7", + "reference": "db1674e1a261148429f123871f30d211992294e7", "shasum": "" }, "require": { - "neomerx/cors-psr7": "^1.0.4", - "php": "^7.1", - "psr/http-message": "^1.0.1", - "psr/http-server-middleware": "^1.0", - "tuupola/callable-handler": "^0.3.0|^0.4.0|^1.0", - "tuupola/http-factory": "^0.4.0|^1.0" + "php": "^7.2.5", + "symfony/filesystem": "^4.4|^5.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<4.4" }, "require-dev": { - "codedungeon/phpunit-result-printer": "^0.23.2", - "equip/dispatch": "^2.0", - "overtrue/phplint": "^1.0", - "phpstan/phpstan": "^0.11.4", - "phpunit/phpunit": "^7.4", - "squizlabs/php_codesniffer": "^3.3.1", - "zendframework/zend-diactoros": "^1.0|^2.0" + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/messenger": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/yaml": "^4.4|^5.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, "autoload": { "psr-4": { - "Tuupola\\Middleware\\": "src" - } + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1279,57 +1552,89 @@ ], "authors": [ { - "name": "Mika Tuupola", - "email": "tuupola@appelsiini.net", - "homepage": "https://appelsiini.net/", - "role": "Developer" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "PSR-7 and PSR-15 CORS middleware", - "homepage": "https://github.com/tuupola/cors-middleware", - "keywords": [ - "cors", - "middleware", - "psr-15", - "psr-7" + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-03-24T08:53:13+00:00" + "time": "2020-04-15T15:59:10+00:00" }, { - "name": "tuupola/http-factory", - "version": "1.1.0", + "name": "symfony/console", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/tuupola/http-factory.git", - "reference": "5fbde4c65a10d09a85652684a6e569542265a749" + "url": "https://github.com/symfony/console.git", + "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tuupola/http-factory/zipball/5fbde4c65a10d09a85652684a6e569542265a749", - "reference": "5fbde4c65a10d09a85652684a6e569542265a749", + "url": "https://api.github.com/repos/symfony/console/zipball/5fa1caadc8cdaa17bcfb25219f3b53fe294a9935", + "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935", "shasum": "" }, "require": { - "php": "^7.1", - "psr/http-factory": "^1.0" + "php": "^7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/service-contracts": "^1.1|^2" }, "conflict": { - "nyholm/psr7": "<1.0" + "symfony/dependency-injection": "<4.4", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" }, "provide": { - "psr/http-factory-implementation": "^1.0" + "psr/log-implementation": "1.0" }, "require-dev": { - "http-interop/http-factory-tests": "^0.5.0", - "overtrue/phplint": "^1.0", - "phpunit/phpunit": "^6.0|^7.0", - "squizlabs/php_codesniffer": "^3.0" + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, "autoload": { "psr-4": { - "Tuupola\\Http\\Factory\\": "src" - } + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1337,102 +1642,151 @@ ], "authors": [ { - "name": "Mika Tuupola", - "email": "tuupola@appelsiini.net", - "homepage": "https://appelsiini.net/", - "role": "Developer" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Lightweight autodiscovering PSR-17 HTTP factories", - "homepage": "https://github.com/tuupola/http-factory", - "keywords": [ - "http", - "psr-17", - "psr-7" + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-07T07:10:58+00:00" + "time": "2020-03-30T11:42:42+00:00" }, { - "name": "webonyx/graphql-php", - "version": "v0.13.8", + "name": "symfony/dependency-injection", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/webonyx/graphql-php.git", - "reference": "6829ae58f4c59121df1f86915fb9917a2ec595e8" + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/6829ae58f4c59121df1f86915fb9917a2ec595e8", - "reference": "6829ae58f4c59121df1f86915fb9917a2ec595e8", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba", + "reference": "92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba", "shasum": "" }, "require": { - "ext-json": "*", - "ext-mbstring": "*", - "php": "^7.1||^8.0" + "php": "^7.2.5", + "psr/container": "^1.0", + "symfony/service-contracts": "^1.1.6|^2" + }, + "conflict": { + "symfony/config": "<5.0", + "symfony/finder": "<4.4", + "symfony/proxy-manager-bridge": "<4.4", + "symfony/yaml": "<4.4" + }, + "provide": { + "psr/container-implementation": "1.0", + "symfony/service-implementation": "1.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpbench/phpbench": "^0.14.0", - "phpstan/phpstan": "^0.11.4", - "phpstan/phpstan-phpunit": "^0.11.0", - "phpstan/phpstan-strict-rules": "^0.11.0", - "phpunit/phpcov": "^5.0", - "phpunit/phpunit": "^7.2", - "psr/http-message": "^1.0", - "react/promise": "2.*" + "symfony/config": "^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0" }, "suggest": { - "psr/http-message": "To use standard GraphQL server", - "react/promise": "To leverage async resolving on React PHP platform" + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, "autoload": { "psr-4": { - "GraphQL\\": "src/" - } + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "A PHP port of GraphQL reference implementation", - "homepage": "https://github.com/webonyx/graphql-php", - "keywords": [ - "api", - "graphql" + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } ], - "time": "2019-08-25T10:32:47+00:00" - } - ], - "packages-dev": [ + "description": "Symfony DependencyInjection Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-04-28T17:58:55+00:00" + }, { - "name": "clue/block-react", - "version": "v1.3.1", + "name": "symfony/dotenv", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/clue/reactphp-block.git", - "reference": "2f516b28259c203d67c4c963772dd7e9db652737" + "url": "https://github.com/symfony/dotenv.git", + "reference": "28658ee990ea643c8111bac242d6ee5f3a15ef72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-block/zipball/2f516b28259c203d67c4c963772dd7e9db652737", - "reference": "2f516b28259c203d67c4c963772dd7e9db652737", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/28658ee990ea643c8111bac242d6ee5f3a15ef72", + "reference": "28658ee990ea643c8111bac242d6ee5f3a15ef72", "shasum": "" }, "require": { - "php": ">=5.3", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", - "react/promise": "^2.7 || ^1.2.1", - "react/promise-timer": "^1.5" + "php": "^7.2.5" }, "require-dev": { - "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + "symfony/process": "^4.4|^5.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, "autoload": { - "files": [ - "src/functions_include.php" + "psr-4": { + "Symfony\\Component\\Dotenv\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1441,60 +1795,73 @@ ], "authors": [ { - "name": "Christian Lück", - "email": "christian@lueck.tv" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Lightweight library that eases integrating async components built for ReactPHP in a traditional, blocking environment.", - "homepage": "https://github.com/clue/reactphp-block", + "description": "Registers environment variables from a .env file", + "homepage": "https://symfony.com", "keywords": [ - "async", - "await", - "blocking", - "event loop", - "promise", - "reactphp", - "sleep", - "synchronous" + "dotenv", + "env", + "environment" ], - "time": "2019-04-09T11:45:04+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-03-27T16:56:45+00:00" }, { - "name": "doctrine/instantiator", - "version": "1.2.0", + "name": "symfony/error-handler", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "a2c590166b2133a4633738648b6b064edae0814a" + "url": "https://github.com/symfony/error-handler.git", + "reference": "949ffc17c3ac3a9f8e6232220e2da33913c04ea4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", - "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/949ffc17c3ac3a9f8e6232220e2da33913c04ea4", + "reference": "949ffc17c3ac3a9f8e6232220e2da33913c04ea4", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2.5", + "psr/log": "^1.0", + "symfony/var-dumper": "^4.4|^5.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" + "symfony/http-kernel": "^4.4|^5.0", + "symfony/serializer": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "5.0-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1502,201 +1869,268 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" + "description": "Symfony ErrorHandler Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-03-17T17:37:11+00:00" + "time": "2020-03-30T14:14:32+00:00" }, { - "name": "myclabs/deep-copy", - "version": "1.9.3", + "name": "symfony/event-dispatcher", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/24f40d95385774ed5c71dbf014edd047e2f2f3dc", + "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2.5", + "symfony/event-dispatcher-contracts": "^2" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^4.4|^5.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, "autoload": { "psr-4": { - "DeepCopy\\": "src/DeepCopy/" + "Symfony\\Component\\EventDispatcher\\": "" }, - "files": [ - "src/DeepCopy/deep_copy.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-09T12:45:53+00:00" + "time": "2020-03-27T16:56:45+00:00" }, { - "name": "phar-io/manifest", - "version": "1.0.3", + "name": "symfony/event-dispatcher-contracts", + "version": "v2.0.1", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd", + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "php": "^7.2.5", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-11-18T17:27:11+00:00" }, { - "name": "phar-io/version", - "version": "2.0.1", + "name": "symfony/filesystem", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "url": "https://github.com/symfony/filesystem.git", + "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7cd0dafc4353a0f62e307df90b48466379c8cc91", + "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2.5", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" }, { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" + "url": "https://github.com/fabpot", + "type": "github" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" + "time": "2020-04-12T14:40:17+00:00" }, { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", + "name": "symfony/finder", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + "url": "https://github.com/symfony/finder.git", + "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "url": "https://api.github.com/repos/symfony/finder/zipball/600a52c29afc0d1caa74acbec8d3095ca7e9910d", + "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d", "shasum": "" }, "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" + "php": "^7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "5.0-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1704,57 +2138,66 @@ ], "authors": [ { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2017-09-11T18:02:19+00:00" + "time": "2020-03-27T16:56:45+00:00" }, { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.1", + "name": "symfony/flex", + "version": "v1.6.2", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" + "url": "https://github.com/symfony/flex.git", + "reference": "e4f5a2653ca503782a31486198bd1dd1c9a47f83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "url": "https://api.github.com/repos/symfony/flex/zipball/e4f5a2653ca503782a31486198bd1dd1c9a47f83", + "reference": "e4f5a2653ca503782a31486198bd1dd1c9a47f83", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" + "composer-plugin-api": "^1.0", + "php": "^7.0" }, "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "composer/composer": "^1.0.2", + "symfony/dotenv": "^3.4|^4.0|^5.0", + "symfony/phpunit-bridge": "^3.4.19|^4.1.8|^5.0", + "symfony/process": "^2.7|^3.0|^4.0|^5.0" }, - "type": "library", + "type": "composer-plugin", "extra": { "branch-alias": { - "dev-master": "4.x-dev" - } + "dev-master": "1.5-dev" + }, + "class": "Symfony\\Flex\\Flex" }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "Symfony\\Flex\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1763,47 +2206,124 @@ ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.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": "2019-04-30T17:48:53+00:00" + "description": "Composer plugin for Symfony", + "time": "2020-01-30T12:06:45+00:00" }, { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", + "name": "symfony/framework-bundle", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + "url": "https://github.com/symfony/framework-bundle.git", + "reference": "3fd5aec4bc84750752ba1f039829362fa071e037" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/3fd5aec4bc84750752ba1f039829362fa071e037", + "reference": "3fd5aec4bc84750752ba1f039829362fa071e037", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" + "ext-xml": "*", + "php": "^7.2.5", + "symfony/cache": "^4.4|^5.0", + "symfony/config": "^5.0", + "symfony/dependency-injection": "^5.0.1", + "symfony/error-handler": "^4.4.1|^5.0.1", + "symfony/filesystem": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/http-kernel": "^5.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/routing": "^5.0" + }, + "conflict": { + "doctrine/persistence": "<1.3", + "phpdocumentor/reflection-docblock": "<3.0", + "phpdocumentor/type-resolver": "<0.2.1", + "phpunit/phpunit": "<5.4.3", + "symfony/asset": "<4.4", + "symfony/browser-kit": "<4.4", + "symfony/console": "<4.4", + "symfony/dom-crawler": "<4.4", + "symfony/dotenv": "<4.4", + "symfony/form": "<4.4", + "symfony/http-client": "<4.4", + "symfony/lock": "<4.4", + "symfony/mailer": "<4.4", + "symfony/messenger": "<4.4", + "symfony/mime": "<4.4", + "symfony/property-info": "<4.4", + "symfony/serializer": "<4.4", + "symfony/stopwatch": "<4.4", + "symfony/translation": "<5.0", + "symfony/twig-bridge": "<4.4", + "symfony/twig-bundle": "<4.4", + "symfony/validator": "<4.4", + "symfony/web-profiler-bundle": "<4.4", + "symfony/workflow": "<4.4" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "doctrine/annotations": "~1.7", + "doctrine/cache": "~1.0", + "paragonie/sodium_compat": "^1.8", + "phpdocumentor/reflection-docblock": "^3.0|^4.0", + "symfony/asset": "^4.4|^5.0", + "symfony/browser-kit": "^4.4|^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/css-selector": "^4.4|^5.0", + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/dotenv": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/form": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/mailer": "^4.4|^5.0", + "symfony/messenger": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/process": "^4.4|^5.0", + "symfony/property-info": "^4.4|^5.0", + "symfony/security-csrf": "^4.4|^5.0", + "symfony/security-http": "^4.4|^5.0", + "symfony/serializer": "^4.4|^5.0", + "symfony/stopwatch": "^4.4|^5.0", + "symfony/string": "~5.0.0", + "symfony/translation": "^5.0", + "symfony/twig-bundle": "^4.4|^5.0", + "symfony/validator": "^4.4|^5.0", + "symfony/web-link": "^4.4|^5.0", + "symfony/workflow": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0", + "twig/twig": "^2.10|^3.0" }, - "type": "library", + "suggest": { + "ext-apcu": "For best performance of the system caches", + "symfony/console": "For using the console commands", + "symfony/form": "For using forms", + "symfony/property-info": "For using the property_info service", + "symfony/serializer": "For using the serializer service", + "symfony/validator": "For using validation", + "symfony/web-link": "For using web links, features such as preloading, prefetching or prerendering", + "symfony/yaml": "For using the debug:config and lint:yaml commands" + }, + "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "5.0-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } + "Symfony\\Bundle\\FrameworkBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1811,47 +2331,68 @@ ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony FrameworkBundle", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2017-07-14T14:27:02+00:00" + "time": "2020-04-28T17:58:55+00:00" }, { - "name": "phpspec/prophecy", - "version": "1.8.1", + "name": "symfony/http-foundation", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" + "url": "https://github.com/symfony/http-foundation.git", + "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e47fdf8b24edc12022ba52923150ec6484d7f57d", + "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "php": "^7.2.5", + "symfony/mime": "^4.4|^5.0", + "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "predis/predis": "~1.0", + "symfony/expression-language": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "5.0-dev" } }, "autoload": { "psr-4": { - "Prophecy\\": "src/Prophecy" - } + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1859,961 +2400,1201 @@ ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" }, { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2019-06-13T12:50:23+00:00" + "time": "2020-04-18T20:50:06+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "name": "symfony/http-kernel", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "url": "https://github.com/symfony/http-kernel.git", + "reference": "3565e51eecd06106304baba5ccb7ba89db2d7d2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/3565e51eecd06106304baba5ccb7ba89db2d7d2b", + "reference": "3565e51eecd06106304baba5ccb7ba89db2d7d2b", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "php": "^7.2.5", + "psr/log": "~1.0", + "symfony/error-handler": "^4.4|^5.0", + "symfony/event-dispatcher": "^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-php73": "^1.9" + }, + "conflict": { + "symfony/browser-kit": "<4.4", + "symfony/cache": "<5.0", + "symfony/config": "<5.0", + "symfony/console": "<4.4", + "symfony/dependency-injection": "<4.4", + "symfony/doctrine-bridge": "<5.0", + "symfony/form": "<5.0", + "symfony/http-client": "<5.0", + "symfony/mailer": "<5.0", + "symfony/messenger": "<5.0", + "symfony/translation": "<5.0", + "symfony/twig-bridge": "<5.0", + "symfony/validator": "<5.0", + "twig/twig": "<2.4" + }, + "provide": { + "psr/log-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "psr/cache": "~1.0", + "symfony/browser-kit": "^4.4|^5.0", + "symfony/config": "^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/css-selector": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/routing": "^4.4|^5.0", + "symfony/stopwatch": "^4.4|^5.0", + "symfony/translation": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "twig/twig": "^2.4|^3.0" }, "suggest": { - "ext-xdebug": "^2.6.0" + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" + "description": "Symfony HttpKernel Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2018-10-31T16:06:48+00:00" + "time": "2020-04-28T18:53:25+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "name": "symfony/mime", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "url": "https://github.com/symfony/mime.git", + "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/symfony/mime/zipball/5d6c81c39225a750f3f43bee15f03093fb9aaa0b", + "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2.5", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "conflict": { + "symfony/mailer": "<4.4" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "egulias/email-validator": "^2.1.10", + "symfony/dependency-injection": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "5.0-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "description": "A library to manipulate MIME messages", + "homepage": "https://symfony.com", "keywords": [ - "filesystem", - "iterator" + "mime", + "mime-type" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2018-09-13T20:33:42+00:00" + "time": "2020-04-17T03:29:44+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "symfony/polyfill-intl-idn", + "version": "v1.15.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", + "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", "keywords": [ - "template" + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2015-06-21T13:50:34+00:00" + "time": "2020-03-09T19:04:49+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.2", + "name": "symfony/polyfill-mbstring", + "version": "v1.15.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=5.3.3" }, - "require-dev": { - "phpunit/phpunit": "^7.0" + "suggest": { + "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "1.15-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", "keywords": [ - "timer" + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-06-07T04:22:29+00:00" + "time": "2020-03-09T19:04:49+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "3.1.0", + "name": "symfony/polyfill-php73", + "version": "v1.15.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e899757bb3df5ff6e95089132f32cd59aac2220a", - "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" + "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "1.15-dev" } }, "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], "classmap": [ - "src/" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "tokenizer" + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-07-25T05:29:42+00:00" + "time": "2020-02-27T09:26:54+00:00" }, { - "name": "phpunit/phpunit", - "version": "7.5.15", + "name": "symfony/routing", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d79c053d972856b8b941bb233e39dc521a5093f0" + "url": "https://github.com/symfony/routing.git", + "reference": "9b18480a6e101f8d9ab7c483ace7c19441be5111" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d79c053d972856b8b941bb233e39dc521a5093f0", - "reference": "d79c053d972856b8b941bb233e39dc521a5093f0", + "url": "https://api.github.com/repos/symfony/routing/zipball/9b18480a6e101f8d9ab7c483ace7c19441be5111", + "reference": "9b18480a6e101f8d9ab7c483ace7c19441be5111", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", - "sebastian/version": "^2.0.1" + "php": "^7.2.5" }, "conflict": { - "phpunit/phpunit-mock-objects": "*" + "symfony/config": "<5.0", + "symfony/dependency-injection": "<4.4", + "symfony/yaml": "<4.4" }, "require-dev": { - "ext-pdo": "*" + "doctrine/annotations": "~1.2", + "psr/log": "~1.0", + "symfony/config": "^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" }, - "bin": [ - "phpunit" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "5.0-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", + "description": "Symfony Routing Component", + "homepage": "https://symfony.com", "keywords": [ - "phpunit", - "testing", - "xunit" + "router", + "routing", + "uri", + "url" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-21T07:05:16+00:00" + "time": "2020-04-21T21:02:50+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "name": "symfony/service-contracts", + "version": "v2.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "144c5e51266b281231e947b51223ba14acf1a749" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", + "reference": "144c5e51266b281231e947b51223ba14acf1a749", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2.5", + "psr/container": "^1.0" }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "suggest": { + "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-11-18T17:27:11+00:00" }, { - "name": "sebastian/comparator", - "version": "3.0.2", + "name": "symfony/var-dumper", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "url": "https://github.com/symfony/var-dumper.git", + "reference": "09de28632f16f81058a85fcf318397218272a07b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/09de28632f16f81058a85fcf318397218272a07b", + "reference": "09de28632f16f81058a85fcf318397218272a07b", "shasum": "" }, "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": "^7.2.5", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<4.4" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "ext-iconv": "*", + "symfony/console": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "twig/twig": "^2.4|^3.0" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" }, + "bin": [ + "Resources/bin/var-dump-server" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { - "classmap": [ - "src/" + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Volker Dusch", - "email": "github@wallbash.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" }, { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" + "url": "https://github.com/fabpot", + "type": "github" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2018-07-12T15:12:46+00:00" + "time": "2020-04-12T16:45:47+00:00" }, { - "name": "sebastian/diff", - "version": "3.0.2", + "name": "symfony/var-exporter", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "url": "https://github.com/symfony/var-exporter.git", + "reference": "5d18811da9e1ae2bb86b0a97fb2d784e27ffd59f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/5d18811da9e1ae2bb86b0a97fb2d784e27ffd59f", + "reference": "5d18811da9e1ae2bb86b0a97fb2d784e27ffd59f", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2.5" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "symfony/var-dumper": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", + "description": "A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code", + "homepage": "https://symfony.com", "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "serialize" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-02-04T06:01:07+00:00" + "time": "2020-04-15T15:59:10+00:00" }, { - "name": "sebastian/environment", - "version": "4.2.2", + "name": "symfony/yaml", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" + "url": "https://github.com/symfony/yaml.git", + "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "url": "https://api.github.com/repos/symfony/yaml/zipball/482fb4e710e5af3e0e78015f19aa716ad953392f", + "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2.5", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<4.4" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "symfony/console": "^4.4|^5.0" }, "suggest": { - "ext-posix": "*" + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.0-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-05-05T09:05:15+00:00" + "time": "2020-04-28T17:58:55+00:00" }, { - "name": "sebastian/exporter", - "version": "3.1.1", + "name": "tivie/php-os-detector", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "06a9a5947f47b3029d76118eb5c22802e5869687" + "url": "https://github.com/tivie/php-os-detector.git", + "reference": "9461dcd85c00e03842264f2fc8ccdc8d46867321" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/06a9a5947f47b3029d76118eb5c22802e5869687", - "reference": "06a9a5947f47b3029d76118eb5c22802e5869687", + "url": "https://api.github.com/repos/tivie/php-os-detector/zipball/9461dcd85c00e03842264f2fc8ccdc8d46867321", + "reference": "9461dcd85c00e03842264f2fc8ccdc8d46867321", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=5.3.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "4.3.*" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Tivie\\OS\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "APACHE 2.0" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "Estevão Soares dos Santos", + "email": "estevao@soares-dos-santos.com" } ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "description": "A small utility library that detects the OS the server is running on", + "homepage": "http://tivie.github.com/php-os-detector/", "keywords": [ - "export", - "exporter" - ], - "time": "2019-08-11T12:43:14+00:00" + "detection", + "detector", + "identification", + "operating system", + "os", + "os detection" + ], + "time": "2017-10-21T03:33:59+00:00" }, { - "name": "sebastian/global-state", - "version": "2.0.0", + "name": "webonyx/graphql-php", + "version": "v0.13.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "url": "https://github.com/webonyx/graphql-php.git", + "reference": "6829ae58f4c59121df1f86915fb9917a2ec595e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/6829ae58f4c59121df1f86915fb9917a2ec595e8", + "reference": "6829ae58f4c59121df1f86915fb9917a2ec595e8", "shasum": "" }, "require": { - "php": "^7.0" + "ext-json": "*", + "ext-mbstring": "*", + "php": "^7.1||^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "doctrine/coding-standard": "^6.0", + "phpbench/phpbench": "^0.14.0", + "phpstan/phpstan": "^0.11.4", + "phpstan/phpstan-phpunit": "^0.11.0", + "phpstan/phpstan-strict-rules": "^0.11.0", + "phpunit/phpcov": "^5.0", + "phpunit/phpunit": "^7.2", + "psr/http-message": "^1.0", + "react/promise": "2.*" }, "suggest": { - "ext-uopz": "*" + "psr/http-message": "To use standard GraphQL server", + "react/promise": "To leverage async resolving on React PHP platform" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "GraphQL\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } + "MIT" ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "description": "A PHP port of GraphQL reference implementation", + "homepage": "https://github.com/webonyx/graphql-php", "keywords": [ - "global state" + "api", + "graphql" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2019-08-25T10:32:47+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "3.0.3", + "name": "wyrihaximus/cpu-core-detector", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "url": "https://github.com/WyriHaximus/php-cpu-core-detector.git", + "reference": "fff4194540a8111c298e5e707bcfc778c4c9ddbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/WyriHaximus/php-cpu-core-detector/zipball/fff4194540a8111c298e5e707bcfc778c4c9ddbb", + "reference": "fff4194540a8111c298e5e707bcfc778c4c9ddbb", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": "^5.4||^7.0", + "react/child-process": "^0.6 || ^0.5 || ^0.4", + "react/socket": "^1.2", + "tivie/php-os-detector": "^1.1", + "wyrihaximus/file-descriptors": "^1.0 || ^0.1", + "wyrihaximus/react-child-process-promise": "^2.0.2", + "wyrihaximus/ticking-promise": "^1.5" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phake/phake": "~1.0.6", + "phpunit/phpunit": "^4.0||^5.0", + "squizlabs/php_codesniffer": "^1.5.6", + "vectorface/dunit": "~2.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "WyriHaximus\\CpuCoreDetector\\": "src/" + }, + "files": [ + "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "description": "Detect CPU core count and assign tasks to a specific code", + "time": "2019-01-19T21:54:34+00:00" }, { - "name": "sebastian/object-reflector", - "version": "1.1.1", + "name": "wyrihaximus/file-descriptors", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "url": "https://github.com/WyriHaximus/php-file-descriptors.git", + "reference": "6b3073409b94912354cc9b6bde600797940c4edf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/WyriHaximus/php-file-descriptors/zipball/6b3073409b94912354cc9b6bde600797940c4edf", + "reference": "6b3073409b94912354cc9b6bde600797940c4edf", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.2", + "tivie/php-os-detector": "^1.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "api-clients/cs-fixer-config": "^1.1", + "api-clients/test-utilities": "^5.4", + "wyrihaximus/iterator-or-array-to-array": "^1.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "WyriHaximus\\FileDescriptors\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "description": "List open file descriptors for the current process cross platform", + "time": "2019-01-15T16:08:10+00:00" }, { - "name": "sebastian/recursion-context", - "version": "3.0.0", + "name": "wyrihaximus/json-throwable", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "url": "https://github.com/WyriHaximus/php-json-throwable.git", + "reference": "8b11703f5974492f4c4e0b313836d0aed2eef01d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/WyriHaximus/php-json-throwable/zipball/8b11703f5974492f4c4e0b313836d0aed2eef01d", + "reference": "8b11703f5974492f4c4e0b313836d0aed2eef01d", "shasum": "" }, "require": { - "php": "^7.0" + "doctrine/instantiator": "^1.0.5", + "php": "^7.0", + "wyrihaximus/json-utilities": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "api-clients/test-utilities": "^4.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "WyriHaximus\\": "src/" + }, + "files": [ + "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "description": "JSON encode and decode throwables and exceptions", + "time": "2018-03-15T13:05:59+00:00" }, { - "name": "sebastian/resource-operations", - "version": "2.0.1", + "name": "wyrihaximus/json-utilities", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + "url": "https://github.com/WyriHaximus/php-json-utilities.git", + "reference": "f0f5007df750f8e44c8ba8ce9ee8e701472ea4c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "url": "https://api.github.com/repos/WyriHaximus/php-json-utilities/zipball/f0f5007df750f8e44c8ba8ce9ee8e701472ea4c7", + "reference": "f0f5007df750f8e44c8ba8ce9ee8e701472ea4c7", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } + "require-dev": { + "api-clients/cs-fixer-config": "^1.1", + "api-clients/test-utilities": "^5.2" }, + "type": "library", "autoload": { - "classmap": [ - "src/" + "psr-4": { + "WyriHaximus\\": "src/" + }, + "files": [ + "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "description": "Utilities for php-json-* packages", + "time": "2018-12-25T10:58:17+00:00" }, { - "name": "sebastian/version", - "version": "2.0.1", + "name": "wyrihaximus/react-child-process-messenger", + "version": "2.10.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "url": "https://github.com/WyriHaximus/reactphp-child-process-messenger.git", + "reference": "813bd47c69935edc1a054438f47622b629430e13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-child-process-messenger/zipball/813bd47c69935edc1a054438f47622b629430e13", + "reference": "813bd47c69935edc1a054438f47622b629430e13", "shasum": "" }, "require": { - "php": ">=5.6" + "cakephp/utility": "^3.4", + "doctrine/inflector": "^1.0", + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "indigophp/hash-compat": "^1.0", + "paragonie/random_compat": "^9.0 || ^2.0", + "php": "^7.0 || ^5.4", + "react/child-process": "^0.6 || ^0.5 | ^0.4", + "react/promise": "^2.2", + "react/promise-stream": "^1.1", + "react/promise-timer": "^1.5", + "react/socket": "^1.0 || ^0.8.1", + "wyrihaximus/file-descriptors": "^1.0 || ^0.1", + "wyrihaximus/json-throwable": "^2.0 || ^1.1.1", + "wyrihaximus/ticking-promise": "^1.4" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } + "require-dev": { + "clue/block-react": "^1.2", + "friendsofphp/php-cs-fixer": "^2.2", + "jakub-onderka/php-console-highlighter": "^0.4", + "jakub-onderka/php-parallel-lint": "^1.0.0", + "phpunit/phpunit": "^4.8.35||^5.0||^6.0" }, + "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "WyriHaximus\\React\\ChildProcess\\Messenger\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com", + "homepage": "http://wyrihaximus.net/" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "description": "Messenger decorator for react/child-process", + "time": "2019-08-28T15:10:40+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.12.0", + "name": "wyrihaximus/react-child-process-pool", + "version": "1.6.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + "url": "https://github.com/WyriHaximus/reactphp-child-process-pool.git", + "reference": "c5063e10d12894e20f17eb1aadf2437232450c08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-child-process-pool/zipball/c5063e10d12894e20f17eb1aadf2437232450c08", + "reference": "c5063e10d12894e20f17eb1aadf2437232450c08", "shasum": "" }, "require": { - "php": ">=5.3.3" + "evenement/evenement": "^3.0 || ^2.0", + "php": "^7.0 || ^5.4", + "react/event-loop": "^1.1", + "wyrihaximus/cpu-core-detector": "^1.0.2", + "wyrihaximus/file-descriptors": "^1.0 || ^0.1", + "wyrihaximus/react-child-process-messenger": "^2.10", + "wyrihaximus/ticking-promise": "^1.5" + }, + "require-dev": { + "clue/block-react": "^1.3", + "phake/phake": "^2.2.1", + "phpunit/phpunit": "^4.8.35||^5.0", + "squizlabs/php_codesniffer": "^3.3.2", + "vectorface/dunit": "~2.0" }, "suggest": { - "ext-ctype": "For best performance" + "wyrihaximus/react-child-process-pool-redis-queue": "Redis RPC queue" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.12-dev" - } - }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" + "WyriHaximus\\React\\ChildProcess\\Pool\\": "src/" }, "files": [ - "bootstrap.php" + "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2822,95 +3603,93 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "time": "2019-08-06T08:03:45+00:00" + "description": "Pool wyrihaximus/react-child-process-messenger processes", + "time": "2019-08-28T16:54:46+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.1.3", + "name": "wyrihaximus/react-child-process-promise", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "url": "https://github.com/WyriHaximus/reactphp-child-process-promise.git", + "reference": "206fe3d5180c7b6f757e8aaa9fef687f42d43164" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-child-process-promise/zipball/206fe3d5180c7b6f757e8aaa9fef687f42d43164", + "reference": "206fe3d5180c7b6f757e8aaa9fef687f42d43164", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^5.4||^7.0", + "react/child-process": "^0.6 || ^0.5 || ^0.4", + "react/promise": "^2.7", + "wyrihaximus/ticking-promise": "^1.5.2" + }, + "require-dev": { + "phpunit/phpunit": "^4.4||^5.0", + "squizlabs/php_codesniffer": "^3.3.2", + "vectorface/dunit": "^2.0" }, "type": "library", "autoload": { - "classmap": [ - "src/" + "psr-4": { + "WyriHaximus\\React\\": "src/" + }, + "files": [ + "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com", + "homepage": "http://wyrihaximus.net/" } ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" + "description": "Wrapping ticks into a promise", + "time": "2019-01-18T21:42:17+00:00" }, { - "name": "webmozart/assert", - "version": "1.5.0", + "name": "wyrihaximus/ticking-promise", + "version": "1.6.3", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + "url": "https://github.com/WyriHaximus/TickingPromise.git", + "reference": "4bb99024402bb7526de8880f3dab0c1f0858def5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "url": "https://api.github.com/repos/WyriHaximus/TickingPromise/zipball/4bb99024402bb7526de8880f3dab0c1f0858def5", + "reference": "4bb99024402bb7526de8880f3dab0c1f0858def5", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", - "symfony/polyfill-ctype": "^1.8" + "php": "^7.0 || ^5.4", + "react/event-loop": "^1.0 || ^0.5 || ^0.4", + "react/promise": "~2.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "~4.4", + "squizlabs/php_codesniffer": "^1.5.6", + "vectorface/dunit": "~1.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, "autoload": { "psr-4": { - "Webmozart\\Assert\\": "src/" - } + "WyriHaximus\\React\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2918,26 +3697,26 @@ ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com", + "homepage": "http://wyrihaximus.net/" } ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2019-08-24T08:43:50+00:00" + "description": "Wrapping ticks into a promise", + "time": "2018-04-05T12:36:50+00:00" } ], + "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.1" + "php": "^7.2.5", + "ext-ctype": "*", + "ext-iconv": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/config/bootstrap.php b/config/bootstrap.php new file mode 100644 index 0000000..55560fb --- /dev/null +++ b/config/bootstrap.php @@ -0,0 +1,23 @@ +=1.2) +if (is_array($env = @include dirname(__DIR__).'/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) { + (new Dotenv(false))->populate($env); +} else { + // load all the .env files + (new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env'); +} + +$_SERVER += $_ENV; +$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; +$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; +$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; diff --git a/config/bundles.php b/config/bundles.php new file mode 100644 index 0000000..49d3fb6 --- /dev/null +++ b/config/bundles.php @@ -0,0 +1,5 @@ + ['all' => true], +]; diff --git a/config/packages/cache.yaml b/config/packages/cache.yaml new file mode 100644 index 0000000..6899b72 --- /dev/null +++ b/config/packages/cache.yaml @@ -0,0 +1,19 @@ +framework: + cache: + # Unique name of your app: used to compute stable namespaces for cache keys. + #prefix_seed: your_vendor_name/app_name + + # The "app" cache stores to the filesystem by default. + # The data in this cache should persist between deploys. + # Other options include: + + # Redis + #app: cache.adapter.redis + #default_redis_provider: redis://localhost + + # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) + #app: cache.adapter.apcu + + # Namespaced pools use the above "app" backend by default + #pools: + #my.dedicated.cache: null diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml new file mode 100644 index 0000000..6089f4b --- /dev/null +++ b/config/packages/framework.yaml @@ -0,0 +1,16 @@ +framework: + secret: '%env(APP_SECRET)%' + #csrf_protection: true + #http_method_override: true + + # Enables session support. Note that the session will ONLY be started if you read or write from it. + # Remove or comment this section to explicitly disable session support. + session: + handler_id: null + cookie_secure: auto + cookie_samesite: lax + + #esi: true + #fragments: true + php_errors: + log: true diff --git a/config/packages/prod/routing.yaml b/config/packages/prod/routing.yaml new file mode 100644 index 0000000..b3e6a0a --- /dev/null +++ b/config/packages/prod/routing.yaml @@ -0,0 +1,3 @@ +framework: + router: + strict_requirements: null diff --git a/config/packages/routing.yaml b/config/packages/routing.yaml new file mode 100644 index 0000000..7e97762 --- /dev/null +++ b/config/packages/routing.yaml @@ -0,0 +1,3 @@ +framework: + router: + utf8: true diff --git a/config/packages/test/framework.yaml b/config/packages/test/framework.yaml new file mode 100644 index 0000000..d051c84 --- /dev/null +++ b/config/packages/test/framework.yaml @@ -0,0 +1,4 @@ +framework: + test: true + session: + storage_id: session.storage.mock_file diff --git a/config/routes.yaml b/config/routes.yaml new file mode 100644 index 0000000..ae4ad14 --- /dev/null +++ b/config/routes.yaml @@ -0,0 +1,27 @@ +app_index: + path: / + controller: App\Controller\HomeController::index + +app_ruc_invidual: + path: /api/v1/ruc/{ruc} + controller: App\Controller\ConsultController::ruc + requirements: + ruc: '\d{11}' + +app_userSol: + path: /api/v1/user-sol/{ruc}/{user} + controller: App\Controller\ConsultController::userSol + requirements: + ruc: '\d{11}' + +app_ruc_multiple: + path: /api/v1/ruc + controller: App\Controller\ConsultMultipleController::ruc + +app_dni_multiple: + path: /api/v1/dni + controller: App\Controller\ConsultMultipleController::dni + +app_graphql: + path: /api/v1/dni + controller: App\Controller\GraphController::query \ No newline at end of file diff --git a/config/routes/dev/framework.yaml b/config/routes/dev/framework.yaml new file mode 100644 index 0000000..bcbbf13 --- /dev/null +++ b/config/routes/dev/framework.yaml @@ -0,0 +1,3 @@ +_errors: + resource: '@FrameworkBundle/Resources/config/routing/errors.xml' + prefix: /_error diff --git a/config/services.yaml b/config/services.yaml new file mode 100644 index 0000000..195817a --- /dev/null +++ b/config/services.yaml @@ -0,0 +1,57 @@ +# This file is the entry point to configure your own services. +# Files in the packages/ subdirectory configure your dependencies. + +# Put parameters here that don't need to change on each machine where the app is deployed +# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration +parameters: + +services: + # default configuration for services in *this* file + _defaults: + autowire: true # Automatically injects dependencies in your services. + autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. + + # makes classes in src/ available to be used as services + # this creates a service per class whose id is the fully-qualified class name + App\: + resource: '../src/*' + exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}' + + # controllers are imported separately to make sure services can be injected + # as action arguments even if you don't extend any base controller class + App\Controller\: + resource: '../src/Controller' + tags: ['controller.service_arguments'] + + App\Resolver\: + resource: '../src/Resolver' + public: true + App\Service\: + resource: '../src/Service' + public: true + App\Types\: + resource: '../src/Types' + public: true + + Peru\Http\ContextClient: + Peru\Http\ClientInterface: '@Peru\Http\ContextClient' + Peru\Http\Async\HttpClient: + Peru\Http\Async\ClientInterface: '@Peru\Http\Async\HttpClient' + + Peru\Sunat\RucParser: + Peru\Sunat\HtmlParser: + Peru\Sunat\Ruc: + Peru\Services\RucInterface: '@Peru\Sunat\Ruc' + Peru\Sunat\Async\Ruc: + public: true + Peru\Sunat\UserValidator: + public: true + + Peru\Jne\DniParser: + Peru\Jne\Dni: + Peru\Services\DniInterface: '@Peru\Jne\Dni' + Peru\Jne\Async\Dni: + public: true + + GraphQL\Type\Schema: + factory: ['@App\Factory\GraphqlSchemaFactory', 'create'] diff --git a/docker/.htaccess b/docker/.htaccess deleted file mode 100644 index bff1cb6..0000000 --- a/docker/.htaccess +++ /dev/null @@ -1,5 +0,0 @@ - - RewriteEngine on - RewriteRule ^$ public/ [L] - RewriteRule (.*) public/$1 [L] - \ No newline at end of file diff --git a/docker/settings.php b/docker/settings.php deleted file mode 100644 index 7180913..0000000 --- a/docker/settings.php +++ /dev/null @@ -1,26 +0,0 @@ - [ - 'displayErrorDetails' => false, // set to false in production - 'addContentLengthHeader' => false, // Allow the web server to send the content-length header - - // Renderer settings - 'renderer' => [ - 'template_path' => __DIR__.'/../templates/', - ], - - 'auth' => [ - 'token' => isset($_ENV['API_TOKEN']) ? getenv('API_TOKEN') : '', - ], - - 'swagger_path' => __DIR__.'/../public/openapi.json', - - // Monolog settings - 'logger' => [ - 'name' => 'slim-app', - 'path' => 'php://stdout', - 'level' => Psr\Log\LogLevel::INFO, - ], - ], -]; diff --git a/logs/README.md b/logs/README.md deleted file mode 100644 index d4a602e..0000000 --- a/logs/README.md +++ /dev/null @@ -1 +0,0 @@ -Your Slim Framework application's log files will be written to this directory. diff --git a/public/index.php b/public/index.php index 44b1e21..0e30370 100644 --- a/public/index.php +++ b/public/index.php @@ -1,24 +1,27 @@ run(true); +if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { + Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); +} -if ($response instanceof AppResponse) { - $app->getContainer()->get(ResponseWriter::class)->process($app, $response); - return; +if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { + Request::setTrustedHosts([$trustedHosts]); } -$app->respond($response); \ No newline at end of file +$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); +$kernel->terminate($request, $response); diff --git a/src/Controller/ConsultController.php b/src/Controller/ConsultController.php new file mode 100644 index 0000000..0b1a57a --- /dev/null +++ b/src/Controller/ConsultController.php @@ -0,0 +1,85 @@ +container = $container; + } + + /** + * @param string $ruc + * + * @return PromiseInterface + */ + public function ruc($ruc) + { + $service = $this->container->get(Ruc::class); + + return $service->get($ruc) + ->then(function (?Company $company) { + if (!$company) { + throw new BadRequestHttpException(); + } + + return new JsonResponse($company); + }); + } + + /** + * @param string $ruc + * @param string $user + * + * @return JsonResponse + */ + public function userSol($ruc, $user) + { + $user = strtoupper($user); + + $service = $this->container->get(UserValidator::class); + $valid = $service->valid($ruc, $user); + + return new JsonResponse($valid); + } + + /** + * @param string $dni + * + * @return PromiseInterface + */ + public function dni($dni) + { + $service = $this->container->get(Dni::class); + + return $service->get($dni) + ->then(function (?Person $person) { + if (!$person) { + throw new BadRequestHttpException(); + } + + return new JsonResponse($person); + }); + } +} diff --git a/src/Controller/ConsultMultipleController.php b/src/Controller/ConsultMultipleController.php new file mode 100644 index 0000000..e578125 --- /dev/null +++ b/src/Controller/ConsultMultipleController.php @@ -0,0 +1,68 @@ +container = $container; + } + + /** + * @param Request $request + * @return PromiseInterface + */ + public function ruc(Request $request) + { + $rucs = json_encode($request->getContent()); + if (!is_array($rucs)) { + throw new BadRequestHttpException(); + } + + $service = $this->container->get(RucMultiple::class); + + return $service->get($rucs) + ->then(function ($companies) { + return new JsonResponse($companies); + }); + } + + /** + * @param Request $request + * @return PromiseInterface + */ + public function dni(Request $request) + { + $dnis = json_encode($request->getContent()); + if (!is_array($dnis)) { + throw new BadRequestHttpException(); + } + + $service = $this->container->get(DniMultiple::class); + + return $service->get($dnis) + ->then(function ($persons) { + return new JsonResponse($persons); + }); + } +} diff --git a/src/Controller/GraphController.php b/src/Controller/GraphController.php new file mode 100644 index 0000000..3e192fa --- /dev/null +++ b/src/Controller/GraphController.php @@ -0,0 +1,46 @@ +graph = $graph; + } + + /** + * @param Request $request + * @return JsonResponse + * @throws \Throwable + */ + public function query(Request $request) + { + $data = json_decode($request->getContent(), true); + if (!isset($data['query'])) { + throw new BadRequestHttpException(); + } + + $result = $this->graph->execute($data['query'], isset($data['variables']) ? $data['variables'] : null); + + return $this->json($result); + } +} diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php new file mode 100644 index 0000000..93c5541 --- /dev/null +++ b/src/Controller/HomeController.php @@ -0,0 +1,17 @@ + 'Peru Consult API' + ]); + } +} diff --git a/src/Factory/GraphqlSchemaFactory.php b/src/Factory/GraphqlSchemaFactory.php new file mode 100644 index 0000000..67f7cad --- /dev/null +++ b/src/Factory/GraphqlSchemaFactory.php @@ -0,0 +1,30 @@ +root = $root; + } + + public function create() + { + return new Schema([ + 'query' => $this->root + ]); + } +} \ No newline at end of file diff --git a/src/Kernel.php b/src/Kernel.php new file mode 100644 index 0000000..fee7e32 --- /dev/null +++ b/src/Kernel.php @@ -0,0 +1,54 @@ +getProjectDir().'/config/bundles.php'; + foreach ($contents as $class => $envs) { + if ($envs[$this->environment] ?? $envs['all'] ?? false) { + yield new $class(); + } + } + } + + public function getProjectDir(): string + { + return \dirname(__DIR__); + } + + protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void + { + $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php')); + $container->setParameter('container.dumper.inline_class_loader', \PHP_VERSION_ID < 70400 || $this->debug); + $container->setParameter('container.dumper.inline_factories', true); + $confDir = $this->getProjectDir().'/config'; + + $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{packages}/'.$this->environment.'/*'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob'); + } + + protected function configureRoutes(RouteCollectionBuilder $routes): void + { + $confDir = $this->getProjectDir().'/config'; + + $routes->import($confDir.'/{routes}/'.$this->environment.'/*'.self::CONFIG_EXTS, '/', 'glob'); + $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob'); + $routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob'); + } +} diff --git a/src/app/Middleware/TokenMiddleware.php b/src/Middleware/TokenMiddleware.php similarity index 97% rename from src/app/Middleware/TokenMiddleware.php rename to src/Middleware/TokenMiddleware.php index af246f0..a7d9470 100644 --- a/src/app/Middleware/TokenMiddleware.php +++ b/src/Middleware/TokenMiddleware.php @@ -8,7 +8,7 @@ declare(strict_types=1); -namespace Peru\Api\Middleware; +namespace App\Middleware; use Slim\Http\Request; use Slim\Http\Response; diff --git a/src/app/Resolver/DniResolver.php b/src/Resolver/DniResolver.php similarity index 92% rename from src/app/Resolver/DniResolver.php rename to src/Resolver/DniResolver.php index ad1baed..0472567 100644 --- a/src/app/Resolver/DniResolver.php +++ b/src/Resolver/DniResolver.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Peru\Api\Resolver; +namespace App\Resolver; use Peru\Services\DniInterface; diff --git a/src/app/Resolver/RucResolver.php b/src/Resolver/RucResolver.php similarity index 92% rename from src/app/Resolver/RucResolver.php rename to src/Resolver/RucResolver.php index 4f66108..a6937d1 100644 --- a/src/app/Resolver/RucResolver.php +++ b/src/Resolver/RucResolver.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Peru\Api\Resolver; +namespace App\Resolver; use Peru\Services\RucInterface; diff --git a/src/app/Service/DniMultiple.php b/src/Service/DniMultiple.php similarity index 96% rename from src/app/Service/DniMultiple.php rename to src/Service/DniMultiple.php index f0b793a..130bed2 100644 --- a/src/app/Service/DniMultiple.php +++ b/src/Service/DniMultiple.php @@ -8,11 +8,11 @@ declare(strict_types=1); -namespace Peru\Api\Service; +namespace App\Service; use Peru\Jne\Async\Dni; -use function React\Promise\all; use React\Promise\PromiseInterface; +use function React\Promise\all; class DniMultiple { diff --git a/src/app/Service/GraphRunner.php b/src/Service/GraphRunner.php similarity index 97% rename from src/app/Service/GraphRunner.php rename to src/Service/GraphRunner.php index 1641bd7..19060ea 100644 --- a/src/app/Service/GraphRunner.php +++ b/src/Service/GraphRunner.php @@ -8,11 +8,11 @@ declare(strict_types=1); -namespace Peru\Api\Service; +namespace App\Service; +use GraphQL\Error\FormattedError; use GraphQL\GraphQL; use GraphQL\Type\Schema; -use GraphQL\Error\FormattedError; use Psr\Log\LoggerInterface; class GraphRunner diff --git a/src/app/Service/RucMultiple.php b/src/Service/RucMultiple.php similarity index 96% rename from src/app/Service/RucMultiple.php rename to src/Service/RucMultiple.php index 851def8..2a0051e 100644 --- a/src/app/Service/RucMultiple.php +++ b/src/Service/RucMultiple.php @@ -8,11 +8,11 @@ declare(strict_types=1); -namespace Peru\Api\Service; +namespace App\Service; use Peru\Sunat\Async\Ruc; -use function React\Promise\all; use React\Promise\PromiseInterface; +use function React\Promise\all; class RucMultiple { diff --git a/src/app/Repository/CompanyType.php b/src/Types/CompanyType.php similarity index 99% rename from src/app/Repository/CompanyType.php rename to src/Types/CompanyType.php index 433c182..50f84d2 100644 --- a/src/app/Repository/CompanyType.php +++ b/src/Types/CompanyType.php @@ -8,7 +8,7 @@ declare(strict_types=1); -namespace Peru\Api\Repository; +namespace App\Types; use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\Type; diff --git a/src/app/Repository/PersonType.php b/src/Types/PersonType.php similarity index 97% rename from src/app/Repository/PersonType.php rename to src/Types/PersonType.php index a26993d..101a467 100644 --- a/src/app/Repository/PersonType.php +++ b/src/Types/PersonType.php @@ -8,7 +8,7 @@ declare(strict_types=1); -namespace Peru\Api\Repository; +namespace App\Types; use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\Type; diff --git a/src/app/Repository/RootType.php b/src/Types/RootType.php similarity index 93% rename from src/app/Repository/RootType.php rename to src/Types/RootType.php index 77792b3..c91d646 100644 --- a/src/app/Repository/RootType.php +++ b/src/Types/RootType.php @@ -8,12 +8,12 @@ declare(strict_types=1); -namespace Peru\Api\Repository; +namespace App\Types; use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\Type; -use Peru\Api\Resolver\DniResolver; -use Peru\Api\Resolver\RucResolver; +use App\Resolver\DniResolver; +use App\Resolver\RucResolver; use Psr\Container\ContainerInterface; class RootType extends ObjectType diff --git a/src/app/Controller/ConsultController.php b/src/app/Controller/ConsultController.php deleted file mode 100644 index d2808ec..0000000 --- a/src/app/Controller/ConsultController.php +++ /dev/null @@ -1,110 +0,0 @@ -container = $container; - } - - /** - * @param Request $request - * @param Response $response - * @param array $args - * - * @return Response - * - * @throws \Psr\Container\ContainerExceptionInterface - * @throws \Psr\Container\NotFoundExceptionInterface - */ - public function ruc($request, $response, array $args) - { - $ruc = $args['ruc']; - $service = $this->container->get(Ruc::class); - $promise = $service->get($ruc) - ->then(function (?Company $company) use ($response) { - if (!$company) { - return $response->withStatus(400); - } - - return $response->withJson($company); - }); - - return (new AppResponse())->withPromise($promise); - } - - /** - * @param Request $request - * @param Response $response - * @param array $args - * - * @return Response - * - * @throws \Psr\Container\ContainerExceptionInterface - * @throws \Psr\Container\NotFoundExceptionInterface - */ - public function userSol($request, $response, array $args) - { - $ruc = $args['ruc']; - $user = strtoupper($args['user']); - - $service = $this->container->get(UserValidator::class); - $valid = $service->valid($ruc, $user); - - return $response->withJson($valid); - } - - /** - * @param Request $request - * @param Response $response - * @param array $args - * - * @return Response - * - * @throws \Psr\Container\ContainerExceptionInterface - * @throws \Psr\Container\NotFoundExceptionInterface - */ - public function dni($request, $response, array $args) - { - $dni = $args['dni']; - $service = $this->container->get(Dni::class); - $promise = $service->get($dni) - ->then(function (?Person $person) use ($response) { - if (!$person) { - return $response->withStatus(400); - } - - return $response->withJson($person); - }); - - return (new AppResponse())->withPromise($promise); - } -} diff --git a/src/app/Controller/ConsultMultipleController.php b/src/app/Controller/ConsultMultipleController.php deleted file mode 100644 index 76316f2..0000000 --- a/src/app/Controller/ConsultMultipleController.php +++ /dev/null @@ -1,86 +0,0 @@ -container = $container; - } - - /** - * @param Request $request - * @param Response $response - * @param array $args - * - * @return Response - * - * @throws \Psr\Container\ContainerExceptionInterface - * @throws \Psr\Container\NotFoundExceptionInterface - */ - public function ruc($request, $response, array $args) - { - $rucs = $request->getParsedBody(); - if (!is_array($rucs)) { - return $response->withStatus(400); - } - - $service = $this->container->get(RucMultiple::class); - $promise = $service->get($rucs) - ->then(function ($companies) use ($response) { - return $response->withJson($companies); - }); - - return (new AppResponse())->withPromise($promise); - } - - /** - * @param Request $request - * @param Response $response - * @param array $args - * - * @return Response - * - * @throws \Psr\Container\ContainerExceptionInterface - * @throws \Psr\Container\NotFoundExceptionInterface - */ - public function dni($request, $response, array $args) - { - $dnis = $request->getParsedBody(); - if (!is_array($dnis)) { - return $response->withStatus(400); - } - - $service = $this->container->get(DniMultiple::class); - $promise = $service->get($dnis) - ->then(function ($persons) use ($response) { - return $response->withJson($persons); - }); - - return (new AppResponse())->withPromise($promise); - } -} diff --git a/src/app/Controller/GraphController.php b/src/app/Controller/GraphController.php deleted file mode 100644 index 1fcd3fc..0000000 --- a/src/app/Controller/GraphController.php +++ /dev/null @@ -1,50 +0,0 @@ -graph = $graph; - } - - /** - * @param Request $request - * @param Response $response - * @param array $args - * - * @return Response - * - * @throws \Psr\Container\ContainerExceptionInterface - * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \Throwable - */ - public function query($request, $response, array $args) - { - $data = $request->getParsedBody(); - if (!isset($data['query'])) { - return $response->withStatus(400); - } - - $result = $this->graph->execute($data['query'], isset($data['variables']) ? $data['variables'] : null); - - return $response->withJson($result); - } -} diff --git a/src/app/Controller/HomeController.php b/src/app/Controller/HomeController.php deleted file mode 100644 index d770963..0000000 --- a/src/app/Controller/HomeController.php +++ /dev/null @@ -1,91 +0,0 @@ -container = $container; - } - - /** - * @param Request $request - * @param Response $response - * @param array $args - * - * @return ResponseInterface - * - * @throws \Psr\Container\ContainerExceptionInterface - * @throws \Psr\Container\NotFoundExceptionInterface - */ - public function index($request, $response, array $args) - { - /** @var $uri \Slim\Http\Uri */ - $uri = $request->getUri(); - /** @var $router \Slim\Router */ - $router = $this->container->get('router'); - /** @var $renderer PhpRenderer */ - $renderer = $this->container->get('renderer'); - - return $renderer->render($response, 'index.phtml', [ - 'url' => $uri->getBasePath(), - 'json' => $router->pathFor('swagger'), - ]); - } - - /** - * @param Request $request - * @param Response $response - * @param array $args - * - * @return Response - * - * @throws \Psr\Container\ContainerExceptionInterface - * @throws \Psr\Container\NotFoundExceptionInterface - */ - public function swagger($request, $response, array $args) - { - $filename = $this->container->get('settings')['swagger_path']; - if (!file_exists($filename)) { - return $response->withStatus(404); - } - - $uri = $request->getUri(); - $url = $uri->getHost(); - if ($uri->getPort() && $uri->getPort() !== 80) { - $url .= ':'.$uri->getPort(); - } - /** @var $uri \Slim\Http\Uri */ - $url .= $uri->getBasePath(); - - $jsonContent = file_get_contents($filename); - $response->getBody()->write(str_replace('consult.api', $url, $jsonContent)); - - return $response->withHeader('Content-Type', 'application/json; charset=utf8'); - } -} diff --git a/src/app/Handler/CustomError.php b/src/app/Handler/CustomError.php deleted file mode 100644 index fb09be1..0000000 --- a/src/app/Handler/CustomError.php +++ /dev/null @@ -1,40 +0,0 @@ -determineContentType($request); - $output = 'Ocurrió un Error'; - switch ($contentType) { - case 'application/json': - $output = '{"message":"'.$output.'"}'; - break; - - case 'text/xml': - case 'application/xml': - $output = "\n $output\n"; - break; - } - - $this->writeToErrorLog($exception); - - return $response - ->withStatus(500) - ->withHeader('Content-Type', $contentType) - ->write($output); - } -} \ No newline at end of file diff --git a/src/app/Handler/ResponseWriter.php b/src/app/Handler/ResponseWriter.php deleted file mode 100644 index fe59c25..0000000 --- a/src/app/Handler/ResponseWriter.php +++ /dev/null @@ -1,50 +0,0 @@ -container = $container; - } - - public function process(App $app, AppResponse $appResponse) - { - $appResponse->getPromise() - ->then(function ($response) use ($appResponse, $app) { - $app->respond($this->fromCopyHeaders($appResponse, $response)); - }, function (Exception $e) use ($app) { - $this->container->get('errorHandler')($this->container->get('request'), new Response(500), $e); - }); - - $this->container->get(LoopInterface::class) - ->run(); - } - - private function fromCopyHeaders(Response $source, Response $target) - { - foreach ($source->getHeaders() as $header => $value) { - $target = $target->withHeader($header, $value); - } - - return $target; - } -} diff --git a/src/app/Http/AppResponse.php b/src/app/Http/AppResponse.php deleted file mode 100644 index 10a74f9..0000000 --- a/src/app/Http/AppResponse.php +++ /dev/null @@ -1,30 +0,0 @@ -promise = $promise; - - return $clone; - } - - /** - * @return PromiseInterface - */ - public function getPromise(): PromiseInterface - { - return $this->promise; - } -} \ No newline at end of file diff --git a/src/app/Service/ArrayConverter.php b/src/app/Service/ArrayConverter.php deleted file mode 100644 index 9326a79..0000000 --- a/src/app/Service/ArrayConverter.php +++ /dev/null @@ -1,33 +0,0 @@ -getContainer(); - -// view renderer -$container['renderer'] = function ($c) { - $settings = $c->get('settings')['renderer']; - - return new Slim\Views\PhpRenderer($settings['template_path']); -}; - -// monolog -$container['logger'] = function ($c) { - $settings = $c->get('settings')['logger']; - $logger = new Katzgrau\KLogger\Logger($settings['path'], $settings['level'], ['extension' => 'log']); - - return $logger; -}; - -$container[ClientInterface::class] = function () { - return new EmptyResponseDecorator(new ContextClient()); -}; - -$container[RucInterface::class] = function ($c) { - return new Ruc($c->get(ClientInterface::class), new RucParser(new HtmlParser())); -}; - -$container[DniInterface::class] = function ($c) { - return new Dni($c->get(ClientInterface::class), new DniParser()); -}; - -$container[UserValidator::class] = function ($c) { - return new UserValidator($c->get(ClientInterface::class)); -}; - -$container[RucMultiple::class] = function ($c) { - return new RucMultiple($c->get(\Peru\Sunat\Async\Ruc::class)); -}; - -$container[DniMultiple::class] = function ($c) { - return new DniMultiple($c->get(\Peru\Jne\Async\Dni::class)); -}; - -$container[ArrayConverter::class] = function () { - return new ArrayConverter(); -}; - -$container[DniResolver::class] = function ($c) { - return new DniResolver($c->get(DniInterface::class)); -}; - -$container[RucResolver::class] = function ($c) { - return new RucResolver($c->get(RucInterface::class)); -}; - -$container[PersonType::class] = function () { - return new PersonType(); -}; - -$container[CompanyType::class] = function () { - return new CompanyType(); -}; - -$container[RootType::class] = function ($c) { - return new RootType($c); -}; - -$container[Schema::class] = function ($c) { - return new Schema([ - 'query' => $c->get(RootType::class), - ]); -}; - -$container[GraphRunner::class] = function ($c) { - return new GraphRunner($c->get(Schema::class), $c->get('logger')); -}; - -$container[GraphController::class] = function ($c) { - return new GraphController($c->get(GraphRunner::class)); -}; - -$container['errorHandler'] = function ($container) { - $showErrors = $container->get('settings')['displayErrorDetails']; - if ($showErrors) { - return new Slim\Handlers\Error(true); - } - - return new CustomError($showErrors); -}; - -$container[LoopInterface::class] = function () { - return Factory::create(); -}; - -$container[\Peru\Http\Async\ClientInterface::class] = function ($c) { - return new HttpClient($c->get(LoopInterface::class)); -}; - -$container[\Peru\Sunat\Async\Ruc::class] = function ($c) { - return new \Peru\Sunat\Async\Ruc($c->get(\Peru\Http\Async\ClientInterface::class), new RucParser(new HtmlParser())); -}; - -$container[\Peru\Jne\Async\Dni::class] = function ($c) { - return new \Peru\Jne\Async\Dni($c->get(\Peru\Http\Async\ClientInterface::class), new DniParser()); -}; - -$container[ResponseWriter::class] = function ($c) { - return new ResponseWriter($c); -}; \ No newline at end of file diff --git a/src/middleware.php b/src/middleware.php deleted file mode 100644 index 57f7098..0000000 --- a/src/middleware.php +++ /dev/null @@ -1,13 +0,0 @@ -add(new \Tuupola\Middleware\CorsMiddleware([ - 'origin' => ['*'], - 'methods' => ['GET', 'POST'], - 'headers.allow' => ['Authorization', 'Accept', 'Content-Type'], - 'headers.expose' => [], - 'credentials' => false, - 'cache' => 0, -])); diff --git a/src/routes.php b/src/routes.php deleted file mode 100644 index 049e8f5..0000000 --- a/src/routes.php +++ /dev/null @@ -1,23 +0,0 @@ -getContainer(); -$auth = new TokenMiddleware($container['settings']['auth']['token']); - -// Routes -$app->group('/api', function () { - /* @var $this Slim\App */ - $this->group('/v1', function () { - $this->get('/ruc/{ruc:\d{11}}', 'Peru\Api\Controller\ConsultController:ruc'); - $this->get('/dni/{dni:\d{8}}', 'Peru\Api\Controller\ConsultController:dni'); - $this->post('/ruc', 'Peru\Api\Controller\ConsultMultipleController:ruc'); - $this->post('/dni', 'Peru\Api\Controller\ConsultMultipleController:dni'); - $this->get('/user-sol/{ruc}/{user}', 'Peru\Api\Controller\ConsultController:userSol'); - }); - $this->post('/graph', 'Peru\Api\Controller\GraphController:query'); - -})->add($auth); - -$app->get('/', 'Peru\Api\Controller\HomeController:index'); -$app->get('/swagger', 'Peru\Api\Controller\HomeController:swagger')->setName('swagger'); diff --git a/src/settings.php b/src/settings.php deleted file mode 100644 index 202e178..0000000 --- a/src/settings.php +++ /dev/null @@ -1,26 +0,0 @@ - [ - 'displayErrorDetails' => true, // set to false in production - 'addContentLengthHeader' => false, // Allow the web server to send the content-length header - - // Renderer settings - 'renderer' => [ - 'template_path' => __DIR__.'/../templates/', - ], - - 'auth' => [ - 'token' => 'abcxyz' - ], - - 'swagger_path' => __DIR__.'/../public/openapi.json', - - // Monolog settings - 'logger' => [ - 'name' => 'slim-app', - 'path' => __DIR__.'/../logs', - 'level' => Psr\Log\LogLevel::DEBUG, - ], - ], -]; diff --git a/symfony.lock b/symfony.lock new file mode 100644 index 0000000..f7d8015 --- /dev/null +++ b/symfony.lock @@ -0,0 +1,235 @@ +{ + "cakephp/core": { + "version": "3.8.11" + }, + "cakephp/utility": { + "version": "3.8.11" + }, + "clue/block-react": { + "version": "v1.3.1" + }, + "doctrine/inflector": { + "version": "1.3.1" + }, + "doctrine/instantiator": { + "version": "1.3.0" + }, + "drift/http-kernel": { + "version": "0.1.10" + }, + "evenement/evenement": { + "version": "v3.0.1" + }, + "giansalex/peru-consult": { + "version": "v4.1.0" + }, + "indigophp/hash-compat": { + "version": "v1.1.0" + }, + "php": { + "version": "7.3" + }, + "psr/cache": { + "version": "1.0.1" + }, + "psr/container": { + "version": "1.0.0" + }, + "psr/event-dispatcher": { + "version": "1.0.0" + }, + "psr/http-message": { + "version": "1.0.1" + }, + "psr/log": { + "version": "1.1.3" + }, + "react/cache": { + "version": "v1.0.0" + }, + "react/child-process": { + "version": "v0.6.1" + }, + "react/dns": { + "version": "v1.2.0" + }, + "react/event-loop": { + "version": "v1.1.1" + }, + "react/filesystem": { + "version": "v0.1.2" + }, + "react/http": { + "version": "v0.8.6" + }, + "react/http-client": { + "version": "v0.5.10" + }, + "react/promise": { + "version": "v2.7.1" + }, + "react/promise-stream": { + "version": "v1.2.0" + }, + "react/promise-timer": { + "version": "v1.5.1" + }, + "react/socket": { + "version": "v1.4.0" + }, + "react/stream": { + "version": "v1.1.0" + }, + "ringcentral/psr7": { + "version": "1.2.2" + }, + "symfony/cache": { + "version": "v5.0.8" + }, + "symfony/cache-contracts": { + "version": "v2.0.1" + }, + "symfony/config": { + "version": "v5.0.8" + }, + "symfony/console": { + "version": "4.4", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "4.4", + "ref": "ea8c0eda34fda57e7d5cd8cbd889e2a387e3472c" + }, + "files": [ + "./bin/console", + "./config/bootstrap.php" + ] + }, + "symfony/dependency-injection": { + "version": "v5.0.8" + }, + "symfony/dotenv": { + "version": "v5.0.8" + }, + "symfony/error-handler": { + "version": "v5.0.8" + }, + "symfony/event-dispatcher": { + "version": "v5.0.8" + }, + "symfony/event-dispatcher-contracts": { + "version": "v2.0.1" + }, + "symfony/filesystem": { + "version": "v5.0.8" + }, + "symfony/finder": { + "version": "v5.0.8" + }, + "symfony/flex": { + "version": "1.0", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "1.0", + "ref": "c0eeb50665f0f77226616b6038a9b06c03752d8e" + }, + "files": [ + "./.env" + ] + }, + "symfony/framework-bundle": { + "version": "4.4", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "4.4", + "ref": "36d3075b2b8e0c4de0e82356a86e4c4a4eb6681b" + }, + "files": [ + "./config/bootstrap.php", + "./config/packages/cache.yaml", + "./config/packages/framework.yaml", + "./config/packages/test/framework.yaml", + "./config/routes/dev/framework.yaml", + "./config/services.yaml", + "./public/index.php", + "./src/Controller/.gitignore", + "./src/Kernel.php" + ] + }, + "symfony/http-foundation": { + "version": "v5.0.8" + }, + "symfony/http-kernel": { + "version": "v5.0.8" + }, + "symfony/mime": { + "version": "v5.0.8" + }, + "symfony/polyfill-intl-idn": { + "version": "v1.15.0" + }, + "symfony/polyfill-mbstring": { + "version": "v1.15.0" + }, + "symfony/polyfill-php73": { + "version": "v1.15.0" + }, + "symfony/routing": { + "version": "4.2", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "4.2", + "ref": "683dcb08707ba8d41b7e34adb0344bfd68d248a7" + }, + "files": [ + "./config/packages/prod/routing.yaml", + "./config/packages/routing.yaml", + "./config/routes.yaml" + ] + }, + "symfony/service-contracts": { + "version": "v2.0.1" + }, + "symfony/var-dumper": { + "version": "v5.0.8" + }, + "symfony/var-exporter": { + "version": "v5.0.8" + }, + "symfony/yaml": { + "version": "v5.0.8" + }, + "tivie/php-os-detector": { + "version": "1.1.0" + }, + "webonyx/graphql-php": { + "version": "v0.13.8" + }, + "wyrihaximus/cpu-core-detector": { + "version": "1.0.2" + }, + "wyrihaximus/file-descriptors": { + "version": "1.0.0" + }, + "wyrihaximus/json-throwable": { + "version": "2.0.0" + }, + "wyrihaximus/json-utilities": { + "version": "1.1.0" + }, + "wyrihaximus/react-child-process-messenger": { + "version": "2.10.0" + }, + "wyrihaximus/react-child-process-pool": { + "version": "1.6.0" + }, + "wyrihaximus/react-child-process-promise": { + "version": "2.0.2" + }, + "wyrihaximus/ticking-promise": { + "version": "1.6.3" + } +} diff --git a/templates/index.phtml b/templates/index.phtml deleted file mode 100644 index 60cb039..0000000 --- a/templates/index.phtml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - API Consulta Perú - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - diff --git a/tests/Functional/BaseTestCase.php b/tests/Functional/BaseTestCase.php deleted file mode 100644 index 70689f6..0000000 --- a/tests/Functional/BaseTestCase.php +++ /dev/null @@ -1,106 +0,0 @@ - $requestMethod, - 'REQUEST_URI' => $requestUri.'?token='.$settings['settings']['auth']['token'], - ] - ); - - // Set up a request object based on the environment - $request = Request::createFromEnvironment($environment); - - // Add request data, if it exists - if (isset($requestData)) { - if (is_string($requestData)) { - $request->getBody()->write($requestData); - $request->getBody()->rewind(); - } else { - $request = $request->withParsedBody($requestData); - } - } - - // Set up a response object - $response = new Response(); - - // Use the application settings - - // Instantiate the application - $app = new App($settings); - - // Set up dependencies - require __DIR__ . '/../../src/dependencies.php'; - $container = $app->getContainer(); - $this->loadDevDependencies($container); - - // Register middleware - if ($this->withMiddleware) { - require __DIR__ . '/../../src/middleware.php'; - } - - // Register routes - require __DIR__ . '/../../src/routes.php'; - - // Process the application - $response = $app->process($request, $response); - if ($response instanceof AppResponse) { - $loop = $container->get(LoopInterface::class); - $response = await($response->getPromise(), $loop); - } - - // Return the response - return $response; - } - - private function loadDevDependencies(ContainerInterface $container) - { - $container[\Peru\Sunat\Async\Ruc::class] = function ($c) { - return new \Peru\Sunat\Async\Ruc(new HttpClientStub($c->get(\Peru\Http\Async\ClientInterface::class)), new RucParser(new HtmlParser())); - }; - - $container[Ruc::class] = function ($c) { - return new Ruc(new ClientStubDecorator($c->get(ClientInterface::class)), new RucParser(new HtmlParser())); - }; - } -} diff --git a/tests/Functional/ClientStubDecorator.php b/tests/Functional/ClientStubDecorator.php deleted file mode 100644 index 337b262..0000000 --- a/tests/Functional/ClientStubDecorator.php +++ /dev/null @@ -1,69 +0,0 @@ -client = $client; - } - - /** - * Get Request. - * - * @param string $url - * @param array $headers - * - * @return string|false - */ - public function get(string $url, array $headers = []) - { - return $this->client->get(self::getNewUrl($url), $headers); - } - - /** - * Post Request. - * - * @param string $url - * @param mixed $data - * @param array $headers - * - * @return string|false - */ - public function post(string $url, $data, array $headers = []) - { - return $this->client->post(self::getNewUrl($url), $data, $headers); - } - - public static function getNewUrl($url) - { - $urlBase = $_ENV['MOCK_URL']; - if (empty($urlBase)) { - return $url; - } - - $u = parse_url($url); - - return $urlBase.$u['path'].(isset($u['query']) ? "?$u[query]" : ''); - } -} diff --git a/tests/Functional/ConsultApiTest.php b/tests/Functional/ConsultApiTest.php deleted file mode 100644 index 1c1bf1e..0000000 --- a/tests/Functional/ConsultApiTest.php +++ /dev/null @@ -1,59 +0,0 @@ -runApp('GET', '/api/v1/ruc/12312'); - - $this->assertEquals(404, $response->getStatusCode()); - } - - public function testConsultRuc() - { - $response = $this->runApp('GET', '/api/v1/ruc/20550263948'); - - $this->assertEquals(200, $response->getStatusCode()); - - /**@var $company Company */ - $company = json_decode((string)$response->getBody()); - - $this->assertContains('SOCIEDAD COMERCIAL', $company->razonSocial); - $this->assertEquals('HABIDO', $company->condicion); - $this->assertEquals('BAJA DE OFICIO', $company->estado); - } - - public function testConsult() - { - $response = $this->runApp('GET', '/api/v1/dni/123456788'); - $this->assertEquals(404, $response->getStatusCode()); - } - public function testConsultDni() - { - $response = $this->runApp('GET', '/api/v1/dni/48004836'); - - $this->assertEquals(200, $response->getStatusCode()); - /**@var $person Person*/ - $person = json_decode((string)$response->getBody()); - $this->assertEquals('ROBERTO CARLOS', $person->nombres); - } - - public function testConsultUserSol() - { - $response = $this->runApp('GET', '/api/v1/user-sol/20000000001/HUAFDSMU'); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertTrue(in_array((string)$response->getBody(), ['true', 'false'])); - } -} \ No newline at end of file diff --git a/tests/Functional/ConsultMultipleApiTest.php b/tests/Functional/ConsultMultipleApiTest.php deleted file mode 100644 index 080e495..0000000 --- a/tests/Functional/ConsultMultipleApiTest.php +++ /dev/null @@ -1,75 +0,0 @@ -runApp('GET', '/api/v1/ruc'); - - $this->assertEquals(405, $response->getStatusCode()); - } - - public function testConsultRucInvalid() - { - $response = $this->runApp('POST', '/api/v1/ruc'); - - $this->assertEquals(400, $response->getStatusCode()); - } - - public function testConsultRuc() - { - $arr = ['20440374248', '20550263948', '20493919271']; - $response = $this->runApp('POST', '/api/v1/ruc', $arr); - - $this->assertEquals(200, $response->getStatusCode()); - - /**@var $companies Company[] */ - $companies = json_decode((string)$response->getBody()); - - $this->assertEquals(3, count($companies)); - - foreach ($companies as $company) { - $this->assertTrue(in_array($company->ruc, $arr)); - $this->assertNotEmpty($company->razonSocial); - } - } - - public function testConsultDniNotAllowed() - { - $response = $this->runApp('GET', '/api/v1/dni'); - $this->assertEquals(405, $response->getStatusCode()); - } - - public function testConsultDniNotValid() - { - $response = $this->runApp('POST', '/api/v1/dni'); - $this->assertEquals(400, $response->getStatusCode()); - } - - public function testConsultDni() - { - $arr = ['00000012', '00000005', '46658592']; - $response = $this->runApp('POST', '/api/v1/dni', $arr); - - $this->assertEquals(200, $response->getStatusCode()); - /**@var $persons Person[] */ - $persons = json_decode((string)$response->getBody()); - $this->assertEquals(3, count($persons)); - foreach ($persons as $person) { - $this->assertTrue(in_array($person->dni, $arr)); - $this->assertNotEmpty($person->nombres); - } - } -} \ No newline at end of file diff --git a/tests/Functional/GraphApiTest.php b/tests/Functional/GraphApiTest.php deleted file mode 100644 index d240b2e..0000000 --- a/tests/Functional/GraphApiTest.php +++ /dev/null @@ -1,62 +0,0 @@ -runApp('POST', '/api/graph', ['query' => $q]); - - $this->assertEquals(200, $response->getStatusCode()); - $obj = json_decode((string)$response->getBody()); - - /**@var $company Company */ - $company = $obj->data->company; - - $this->assertFalse(isset($obj->errors)); - $this->assertContains('EMPRESA CONSTRUCTORA', $company->razonSocial); - $this->assertEquals('NO HABIDO', $company->condicion); - $this->assertEquals('SUSPENSION TEMPORAL', $company->estado); - $this->assertNotEmpty($company->direccion); - $this->assertNotEmpty($company->departamento); - $this->assertNotEmpty($company->provincia); - $this->assertNotEmpty($company->distrito); - $this->assertNotEmpty($company->fechaInscripcion); - } -} \ No newline at end of file diff --git a/tests/Functional/HomepageTest.php b/tests/Functional/HomepageTest.php deleted file mode 100644 index 5f00ffe..0000000 --- a/tests/Functional/HomepageTest.php +++ /dev/null @@ -1,54 +0,0 @@ -runApp('GET', '/'); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertContains('API Consult', (string)$response->getBody()); - } - - /** - * Test that the index route won't accept a post request - */ - public function testPostHomepageNotAllowed() - { - $response = $this->runApp('POST', '/', ['test']); - - $this->assertEquals(405, $response->getStatusCode()); - $this->assertContains('Method not allowed', (string)$response->getBody()); - } - - /** - * Test that the swagger route returns a json response - */ - public function testGetSwaggerpage() - { - $response = $this->runApp('GET', '/swagger'); - - $this->assertEquals(200, $response->getStatusCode()); - $obj = json_decode((string)$response->getBody()); - $this->assertEquals(0, json_last_error()); - $this->assertTrue(isset($obj->openapi)); - $this->assertTrue(isset($obj->servers)); - $this->assertTrue(isset($obj->paths)); - } - - /** - * Test that the index route won't accept a post request - */ - public function testPostSwaggerpageNotAllowed() - { - $response = $this->runApp('POST', '/swagger'); - - $this->assertEquals(405, $response->getStatusCode()); - $this->assertContains('Method not allowed', (string)$response->getBody()); - } -} \ No newline at end of file diff --git a/tests/Functional/HttpClientStub.php b/tests/Functional/HttpClientStub.php deleted file mode 100644 index ae27995..0000000 --- a/tests/Functional/HttpClientStub.php +++ /dev/null @@ -1,52 +0,0 @@ -client = $client; - } - - /** - * Make GET Request. - * - * @param string $url - * @param array $headers - * - * @return PromiseInterface - */ - public function getAsync(string $url, array $headers = []): PromiseInterface - { - return $this->client->getAsync(ClientStubDecorator::getNewUrl($url), $headers); - } - - /** - * Post Request. - * - * @param string $url - * @param mixed $data - * @param array $headers - * - * @return PromiseInterface - */ - public function postAsync(string $url, $data, array $headers = []): PromiseInterface - { - return $this->client->postAsync(ClientStubDecorator::getNewUrl($url), $data, $headers); - } -} \ No newline at end of file From 7b0ffc697a81dfde5d91714b26b87b6834bf65df Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 00:09:33 -0500 Subject: [PATCH 02/24] Add reactphp server --- composer.json | 3 +- composer.lock | 437 ++++++++++++++++++++++++++++++++++++++- public/.htaccess | 21 -- src/AppKernelAdapter.php | 66 ++++++ symfony.lock | 24 +++ 5 files changed, 526 insertions(+), 25 deletions(-) delete mode 100644 public/.htaccess create mode 100644 src/AppKernelAdapter.php diff --git a/composer.json b/composer.json index 5622ee8..6c93cd9 100644 --- a/composer.json +++ b/composer.json @@ -2,11 +2,12 @@ "type": "project", "license": "proprietary", "require": { - "php": "^7.2.5", + "php": "^7.3", "ext-ctype": "*", "ext-iconv": "*", "ext-json": "*", "drift/http-kernel": "^0.1.10", + "drift/server": "^0.1.12", "giansalex/peru-consult": "^4.1", "symfony/console": "5.0.*", "symfony/dotenv": "5.0.*", diff --git a/composer.lock b/composer.lock index 61969a5..63dd420 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,56 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5cb70042aa466b7bf3937a25aab915cf", + "content-hash": "c79b2c9f0a0a980cfcd72afd6501fcdf", "packages": [ + { + "name": "alecrabbit/php-cli-snake", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/alecrabbit/php-cli-snake.git", + "reference": "d4aa6ab9880c708b6a35abb43f3113566ca71c38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alecrabbit/php-cli-snake/zipball/d4aa6ab9880c708b6a35abb43f3113566ca71c38", + "reference": "d4aa6ab9880c708b6a35abb43f3113566ca71c38", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "nunomaduro/collision": "^3.0", + "phpunit/phpunit": "^8.0", + "react/event-loop": "^1.1", + "symfony/var-dumper": "^4.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "AlecRabbit\\Snake\\": "src\\Snake" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Lightweight cli spinner with zero dependencies", + "keywords": [ + "256color", + "8bit", + "ansi", + "cli", + "color", + "colorful", + "console", + "php", + "snake", + "spinner" + ], + "time": "2019-11-01T19:34:36+00:00" + }, { "name": "cakephp/core", "version": "3.8.11", @@ -162,6 +210,127 @@ ], "time": "2019-04-09T11:45:04+00:00" }, + { + "name": "clue/stream-filter", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/clue/php-stream-filter.git", + "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", + "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "^5.0 || ^4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\StreamFilter\\": "src/" + }, + "files": [ + "src/functions_include.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": "2019-04-09T12:31:48+00:00" + }, + { + "name": "clue/zlib-react", + "version": "v0.2.2", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-zlib.git", + "reference": "e6a77eee88d8fbf22d1a90530dd0c810fa2d3ad3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-zlib/zipball/e6a77eee88d8fbf22d1a90530dd0c810fa2d3ad3", + "reference": "e6a77eee88d8fbf22d1a90530dd0c810fa2d3ad3", + "shasum": "" + }, + "require": { + "clue/stream-filter": "~1.3", + "php": ">=5.3", + "react/stream": "^1.0 || ^0.7 || ^0.6" + }, + "require-dev": { + "phpunit/phpunit": "^5.0 || ^4.8", + "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3" + }, + "suggest": { + "ext-zlib": "Requires ext-zlib extension" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\Zlib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Streaming zlib compressor and decompressor for ReactPHP, supporting compression and decompression of GZIP, ZLIB and raw DEFLATE formats.", + "homepage": "https://github.com/clue/reactphp-zlib", + "keywords": [ + "RFC 1950", + "RFC 1951", + "RFC 1952", + "compression", + "decompression", + "deflate", + "gz", + "gzip", + "inflate", + "reactphp", + "zlib" + ], + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2020-04-20T11:34:29+00:00" + }, { "name": "doctrine/inflector", "version": "1.3.1", @@ -285,6 +454,85 @@ ], "time": "2019-10-21T16:45:58+00:00" }, + { + "name": "drift/console-bridge", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/driftphp/console-bridge.git", + "reference": "3070d4d2686e483b14f7784021e08c408a230b9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/driftphp/console-bridge/zipball/3070d4d2686e483b14f7784021e08c408a230b9a", + "reference": "3070d4d2686e483b14f7784021e08c408a230b9a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "symfony/console": "^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Drift\\Console\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marc Morera", + "email": "yuhu@mmoreram.com" + } + ], + "description": "Console bridge for DriftPHP", + "time": "2019-12-30T19:58:08+00:00" + }, + { + "name": "drift/event-loop-utils", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/driftphp/event-loop-utils.git", + "reference": "aeb7bf0b5cf397798fc6e872f808bc7325f77d90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/driftphp/event-loop-utils/zipball/aeb7bf0b5cf397798fc6e872f808bc7325f77d90", + "reference": "aeb7bf0b5cf397798fc6e872f808bc7325f77d90", + "shasum": "" + }, + "require": { + "clue/block-react": "^1.3", + "php": "^7.3", + "react/event-loop": "^1.1", + "react/promise": "^2.7" + }, + "require-dev": { + "phpunit/phpunit": "7.5.17" + }, + "type": "library", + "autoload": { + "psr-4": { + "Drift\\EventLoop\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marc Morera", + "email": "yuhu@mmoreram.com" + } + ], + "description": "Event loop utils for Drift", + "time": "2020-03-09T19:23:16+00:00" + }, { "name": "drift/http-kernel", "version": "0.1.10", @@ -337,6 +585,67 @@ "description": "Http Kernel component for Drift, based on Symfony Http Kernel component", "time": "2020-05-02T01:17:16+00:00" }, + { + "name": "drift/server", + "version": "0.1.12", + "source": { + "type": "git", + "url": "https://github.com/driftphp/server.git", + "reference": "c0331c101a2b038e8adade2a8952271822217463" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/driftphp/server/zipball/c0331c101a2b038e8adade2a8952271822217463", + "reference": "c0331c101a2b038e8adade2a8952271822217463", + "shasum": "" + }, + "require": { + "clue/zlib-react": "^0.2.2", + "drift/console-bridge": "0.1.*", + "drift/event-loop-utils": "0.1.*", + "drift/http-kernel": "0.1.*, >=0.1.3", + "ext-pcntl": "*", + "php": ">=7.3", + "react/event-loop": "^1.0", + "react/filesystem": "^0.1", + "react/http": "^0.8", + "react/promise": "^2.7", + "react/socket": "^1.0", + "seregazhuk/php-watcher": "^0.5.2", + "symfony/console": "^5.0", + "symfony/finder": "^4.4 || ^5.0", + "symfony/http-kernel": "^5.0" + }, + "require-dev": { + "drift/event-bus-bundle": "0.1.*, >=0.1.2", + "ext-fileinfo": "*", + "phpunit/phpunit": "7.5.17", + "symfony/config": "^5.0", + "symfony/framework-bundle": "^5.0", + "symfony/process": "^5.0" + }, + "bin": [ + "bin/server" + ], + "type": "library", + "autoload": { + "psr-4": { + "Drift\\Server\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marc Morera", + "email": "yuhu@mmoreram.com" + } + ], + "description": "ReactPHP based server for DriftPHP", + "time": "2020-05-02T00:06:42+00:00" + }, { "name": "evenement/evenement", "version": "v3.0.1", @@ -1349,6 +1658,74 @@ ], "time": "2018-01-15T21:00:49+00:00" }, + { + "name": "seregazhuk/php-watcher", + "version": "v0.5.2", + "source": { + "type": "git", + "url": "https://github.com/seregazhuk/php-watcher.git", + "reference": "b1ad89f5df17c50118731cf121469cefa13ff553" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/seregazhuk/php-watcher/zipball/b1ad89f5df17c50118731cf121469cefa13ff553", + "reference": "b1ad89f5df17c50118731cf121469cefa13ff553", + "shasum": "" + }, + "require": { + "alecrabbit/php-cli-snake": "^0.5", + "ext-json": "*", + "ext-pcntl": "*", + "php": "^7.2", + "react/child-process": "^0.6.1", + "react/event-loop": "^1.1", + "react/stream": "^1.0.0", + "symfony/console": "^4.3 || ^5.0", + "symfony/finder": "^4.3 || ^5.0", + "symfony/yaml": "^4.3 || ^5.0", + "yosymfony/resource-watcher": "^2.0" + }, + "require-dev": { + "clue/block-react": "^1.3", + "phpunit/phpunit": "^8.0", + "symfony/process": "^4.3" + }, + "bin": [ + "php-watcher" + ], + "type": "library", + "autoload": { + "psr-4": { + "seregazhuk\\PhpWatcher\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sergey Zhuk", + "email": "seregazhuk88@gmail.com", + "homepage": "http://sergeyzhuk.me", + "role": "Developer" + } + ], + "description": "Automatically restart PHP application once the source code changes", + "keywords": [ + "asynchronous", + "bash", + "cli", + "clock", + "console", + "php", + "php-watcher", + "scripts", + "shell", + "watcher" + ], + "time": "2019-12-07T08:45:28+00:00" + }, { "name": "symfony/cache", "version": "v5.0.8", @@ -3704,6 +4081,59 @@ ], "description": "Wrapping ticks into a promise", "time": "2018-04-05T12:36:50+00:00" + }, + { + "name": "yosymfony/resource-watcher", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/yosymfony/resource-watcher.git", + "reference": "a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yosymfony/resource-watcher/zipball/a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73", + "reference": "a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "symfony/finder": "^2.7|^3.0|^4.0|^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7", + "symfony/filesystem": "^2.7|^3.0|^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Yosymfony\\ResourceWatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Victor Puertas", + "email": "vpgugr@gmail.com" + } + ], + "description": "A simple resource watcher using Symfony Finder", + "homepage": "http://yosymfony.com", + "keywords": [ + "finder", + "resources", + "symfony", + "watcher" + ], + "time": "2020-01-04T15:36:55+00:00" } ], "packages-dev": [], @@ -3713,9 +4143,10 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.2.5", + "php": "^7.3", "ext-ctype": "*", - "ext-iconv": "*" + "ext-iconv": "*", + "ext-json": "*" }, "platform-dev": [], "plugin-api-version": "1.1.0" diff --git a/public/.htaccess b/public/.htaccess deleted file mode 100644 index f5d1969..0000000 --- a/public/.htaccess +++ /dev/null @@ -1,21 +0,0 @@ - - RewriteEngine On - - # Some hosts may require you to use the `RewriteBase` directive. - # Determine the RewriteBase automatically and set it as environment variable. - # If you are using Apache aliases to do mass virtual hosting or installed the - # project in a subdirectory, the base path will be prepended to allow proper - # resolution of the index.php file and to redirect to the correct URI. It will - # work in environments without path prefix as well, providing a safe, one-size - # fits all solution. But as you do not need it in this case, you can comment - # the following 2 lines to eliminate the overhead. - RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ - RewriteRule ^(.*) - [E=BASE:%1] - - # If the above doesn't work you might need to set the `RewriteBase` directive manually, it should be the - # absolute physical path to the directory that contains this htaccess file. - # RewriteBase / - - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^ index.php [QSA,L] - diff --git a/src/AppKernelAdapter.php b/src/AppKernelAdapter.php new file mode 100644 index 0000000..96ebfa0 --- /dev/null +++ b/src/AppKernelAdapter.php @@ -0,0 +1,66 @@ + Date: Sat, 2 May 2020 00:26:41 -0500 Subject: [PATCH 03/24] Update docker image --- .dockerignore | 1 + Dockerfile | 19 ++++++++----------- docker-compose.yml | 13 ++++--------- docker/config/opcache.ini | 4 ++-- docker/config/symfony.ini | 5 +++++ docker/docker-entrypoint.sh | 3 +++ 6 files changed, 23 insertions(+), 22 deletions(-) create mode 100644 docker/config/symfony.ini create mode 100644 docker/docker-entrypoint.sh diff --git a/.dockerignore b/.dockerignore index 4a53375..fe29058 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,6 +3,7 @@ .github docs tests +var vendor .gitattributes .gitignore diff --git a/Dockerfile b/Dockerfile index 5480314..0cd5388 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,28 +13,25 @@ RUN apk update && apk add --no-cache \ COPY . . -RUN cp -f docker/.htaccess . && \ - cp -f docker/settings.php src/ && \ - rm -rf docker - RUN composer install --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs && \ composer dump-autoload --optimize --no-dev --classmap-authoritative && \ find vendor/ -type f ! -name "*.php" -delete -FROM php:7.3-apache +FROM php:7.3-alpine ENV API_TOKEN abcxyz +EXPOSE 8080 +WORKDIR /var/www -RUN apt-get update && \ +RUN apk update && \ docker-php-ext-configure opcache --enable-opcache && \ docker-php-ext-install opcache && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* + docker-php-ext-install pcntl # Copy configuration COPY docker/config/opcache.ini $PHP_INI_DIR/conf.d/ -RUN a2enmod rewrite +COPY docker/docker-entrypoint.sh . -COPY --from=build-env /app /var/www/html +COPY --from=build-env /app . -VOLUME /var/www/html/logs \ No newline at end of file +ENTRYPOINT ['./docker-entrypoint.sh'] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 9d1cc0d..eddeb84 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,18 +1,13 @@ -version: '2' - -volumes: - logs: - driver: local +version: '3' services: - slim: - image: php:7.1-alpine + symfony: + image: php:7.3-alpine working_dir: /var/www - command: php -S 0.0.0.0:8080 -t public public/index.php + command: vendor/bin/server watch 0.0.0.0:8080 --adapter=App\MyKernelAdapter environment: docker: "true" ports: - 8080:8080 volumes: - .:/var/www - - logs:/var/www/logs diff --git a/docker/config/opcache.ini b/docker/config/opcache.ini index 9ca9f70..89fad7f 100644 --- a/docker/config/opcache.ini +++ b/docker/config/opcache.ini @@ -1,6 +1,6 @@ -opcache.memory_consumption=128 +opcache.memory_consumption=256 opcache.interned_strings_buffer=8 -opcache.max_accelerated_files=4000 +opcache.max_accelerated_files=20000 ;opcache.revalidate_freq=60 opcache.validate_timestamps=0 opcache.fast_shutdown=1 diff --git a/docker/config/symfony.ini b/docker/config/symfony.ini new file mode 100644 index 0000000..94607a9 --- /dev/null +++ b/docker/config/symfony.ini @@ -0,0 +1,5 @@ +; maximum memory allocated to store the results +realpath_cache_size=4096K + +; save the results for 10 minutes (600 seconds) +realpath_cache_ttl=600 \ No newline at end of file diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh new file mode 100644 index 0000000..47f5f77 --- /dev/null +++ b/docker/docker-entrypoint.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +vendor/bin/server run 0.0.0.0:8080 --adapter=App\MyKernelAdapter \ No newline at end of file From 9b735d995c37da7738f564adb3b2280716627bb0 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 00:39:37 -0500 Subject: [PATCH 04/24] Fix server adapter --- README.md | 10 +++++----- docker-compose.yml | 2 +- docker/docker-entrypoint.sh | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0bdef4f..ed44a3d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ API para consultar el DNI y RUC - Perú, empleando [peru-consult](https://github ## Requerimientos - PHP 7.1 o superior. -- ext-dom +- `ext-dom` ## Instalar @@ -27,7 +27,7 @@ docker pull giansalex/peru-consult-api git clone https://github.com/giansalex/peru-consult-api.git cd peru-consult-api composer install -php -S 127.0.0.1:8090 -t public +vendor/bin/server watch 0.0.0.0:8080 --adapter=App\\AppKernelAdapter ``` ### Desplegar en Heroku @@ -74,7 +74,7 @@ Respuesta: ### DNI Ejecutar usando Curl. ```bash -curl -H "Accept: application/json" http://localhost:8090/api/v1/dni/48004836?token=abcxyz +curl -H "Accept: application/json" http://localhost:8080/api/v1/dni/48004836?token=abcxyz ``` Respuesta: @@ -92,7 +92,7 @@ Respuesta: ### RUC Ejecutar usando Curl. ```bash -curl -H "Accept: application/json" http://localhost:8090/api/v1/ruc/20131312955?token=abcxyz +curl -H "Accept: application/json" http://localhost:8080/api/v1/ruc/20131312955?token=abcxyz ``` Respuesta: @@ -151,7 +151,7 @@ Respuesta: ### Consulta Validez Usuario SOL Ejecutar usando Curl. ```bash -curl http://localhost:8090/api/v1/user-sol/20000000001/GMABCI?token=abcxyz +curl http://localhost:8080/api/v1/user-sol/20000000001/GMABCI?token=abcxyz ``` Respuesta: diff --git a/docker-compose.yml b/docker-compose.yml index eddeb84..cc2902e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: symfony: image: php:7.3-alpine working_dir: /var/www - command: vendor/bin/server watch 0.0.0.0:8080 --adapter=App\MyKernelAdapter + command: vendor/bin/server watch 0.0.0.0:8080 --adapter=App\\AppKernelAdapter environment: docker: "true" ports: diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 47f5f77..817c258 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -1,3 +1,3 @@ #!/usr/bin/env sh -vendor/bin/server run 0.0.0.0:8080 --adapter=App\MyKernelAdapter \ No newline at end of file +vendor/bin/server run 0.0.0.0:8080 --adapter=App\\AppKernelAdapter \ No newline at end of file From a338934bf853894efac123e781bd154f4bbb5e59 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 00:39:55 -0500 Subject: [PATCH 05/24] Update requirements --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed44a3d..b2c9af8 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ API para consultar el DNI y RUC - Perú, empleando [peru-consult](https://github ## Requerimientos -- PHP 7.1 o superior. -- `ext-dom` +- PHP 7.3 o superior. +- `ext-pcntl` ## Instalar From 5595b9d9a8c5a09f0bc493f3ed53d00ac079bb25 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 00:46:03 -0500 Subject: [PATCH 06/24] Fix route paths --- config/routes.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config/routes.yaml b/config/routes.yaml index ae4ad14..e65a573 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -2,7 +2,7 @@ app_index: path: / controller: App\Controller\HomeController::index -app_ruc_invidual: +app_ruc_individual: path: /api/v1/ruc/{ruc} controller: App\Controller\ConsultController::ruc requirements: @@ -14,6 +14,12 @@ app_userSol: requirements: ruc: '\d{11}' +app_dni_individual: + path: /api/v1/dni/{dni} + controller: App\Controller\ConsultController::dni + requirements: + dni: '\d{8}' + app_ruc_multiple: path: /api/v1/ruc controller: App\Controller\ConsultMultipleController::ruc @@ -23,5 +29,5 @@ app_dni_multiple: controller: App\Controller\ConsultMultipleController::dni app_graphql: - path: /api/v1/dni + path: /api/graph controller: App\Controller\GraphController::query \ No newline at end of file From f7de4908e5f87604c57a7e1d6364cc7a8da87312 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 00:52:26 -0500 Subject: [PATCH 07/24] Enable Token Authentication --- .env | 2 + config/services.yaml | 5 ++ src/EventSubscriber/AuthTokenSubscriber.php | 45 +++++++++++++++++ src/Middleware/TokenMiddleware.php | 53 --------------------- 4 files changed, 52 insertions(+), 53 deletions(-) create mode 100644 src/EventSubscriber/AuthTokenSubscriber.php delete mode 100644 src/Middleware/TokenMiddleware.php diff --git a/.env b/.env index 5384a00..4b2fabc 100644 --- a/.env +++ b/.env @@ -19,3 +19,5 @@ APP_SECRET=7c227fa2152043dfcff04a2ffe103321 #TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 #TRUSTED_HOSTS='^(localhost|example\.com)$' ###< symfony/framework-bundle ### + +API_TOKEN=abcxyz \ No newline at end of file diff --git a/config/services.yaml b/config/services.yaml index 195817a..dad1aaa 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -4,6 +4,7 @@ # Put parameters here that don't need to change on each machine where the app is deployed # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration parameters: + token: '%env(API_TOKEN)%' services: # default configuration for services in *this* file @@ -55,3 +56,7 @@ services: GraphQL\Type\Schema: factory: ['@App\Factory\GraphqlSchemaFactory', 'create'] + + App\EventSubscriber\AuthTokenSubscriber: + arguments: + $token: '%token%' \ No newline at end of file diff --git a/src/EventSubscriber/AuthTokenSubscriber.php b/src/EventSubscriber/AuthTokenSubscriber.php new file mode 100644 index 0000000..09e9ace --- /dev/null +++ b/src/EventSubscriber/AuthTokenSubscriber.php @@ -0,0 +1,45 @@ +token = $token; + } + + public function onKernelRequest(RequestEvent $event) + { + $path = $event->getRequest()->getPathInfo(); + + $isApi = substr($path, 0, 4) === "/api"; + + if (!$isApi) { + return; + } + + $token = $event->getRequest()->query->get('token'); + if ($token !== $this->token) { + throw new AccessDeniedHttpException('This action needs a valid token!'); + } + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::REQUEST => 'onKernelRequest', + ); + } +} \ No newline at end of file diff --git a/src/Middleware/TokenMiddleware.php b/src/Middleware/TokenMiddleware.php deleted file mode 100644 index a7d9470..0000000 --- a/src/Middleware/TokenMiddleware.php +++ /dev/null @@ -1,53 +0,0 @@ -token = $token; - } - - /** - * Auth middleware invokable class. - * - * @param Request $request PSR7 request - * @param Response $response PSR7 response - * @param callable $next Next middleware - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function __invoke($request, $response, $next) - { - $token = $request->getQueryParam('token'); - - if ($token !== $this->token) { - return $response->withJson(['message' => 'Token Inválido'], 401); - } - - $response = $next($request, $response); - - return $response; - } -} From db98648dc3845b42c443f6dac2d1b885abd64ea4 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 00:53:24 -0500 Subject: [PATCH 08/24] Update github-actions version --- .github/workflows/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b409a5e..7da9a90 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,13 +7,14 @@ jobs: name: PHP Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: fetch-depth: 1 - name: Setup PHP - uses: shivammathur/setup-php@1.1.1 + uses: shivammathur/setup-php@v2 with: - php-version: 7.1 + php-version: 7.3 + extensions: pcntl - run: composer install - run: vendor/bin/phpunit env: From b0546930f083111d0904a4ad62a548f51c347840 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 01:14:34 -0500 Subject: [PATCH 09/24] Use php 7.4 image --- Dockerfile | 5 ++--- docker-compose.yml | 4 +--- docker/docker-entrypoint.sh | 3 ++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0cd5388..b1a8e45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3-alpine AS build-env +FROM php:7.4-alpine AS build-env LABEL owner="Giancarlos Salas" LABEL maintainer="giansalex@gmail.com" @@ -15,9 +15,8 @@ COPY . . RUN composer install --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs && \ composer dump-autoload --optimize --no-dev --classmap-authoritative && \ - find vendor/ -type f ! -name "*.php" -delete -FROM php:7.3-alpine +FROM php:7.4-alpine ENV API_TOKEN abcxyz EXPOSE 8080 diff --git a/docker-compose.yml b/docker-compose.yml index cc2902e..bdfb4cb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,11 +2,9 @@ version: '3' services: symfony: - image: php:7.3-alpine + image: php:7.4-alpine working_dir: /var/www command: vendor/bin/server watch 0.0.0.0:8080 --adapter=App\\AppKernelAdapter - environment: - docker: "true" ports: - 8080:8080 volumes: diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 817c258..145e639 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -1,3 +1,4 @@ #!/usr/bin/env sh -vendor/bin/server run 0.0.0.0:8080 --adapter=App\\AppKernelAdapter \ No newline at end of file +vendor/bin/server run 0.0.0.0:8080 --adapter=App\\AppKernelAdapter + From dd34280490d374ed75d433b389e5b7e1b8f2fcb8 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 01:22:53 -0500 Subject: [PATCH 10/24] Remove favicon --- public/favicon.ico | Bin 112764 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 public/favicon.ico diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index f956ab87c80f1bef1ec9e702afc0dcca1bd7351d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 112764 zcmeEP2|QKL7r%JctYs^*D`gKw*{Mh=l}Oo3R7weIHieLi(qc)7ETvGgDD^lLGnrhCV|Z|=o%$XSkAwWnF7zhv!gjx(iOu#)F{ZE>Y zi~u2dH&jt^;C1lfO$0HFm}n4c*MLFi)%kkgyg z*HTd|pa5A@sj4V%hEHK6gP-1c_$K(~vRA6g3R{nswOz42M!$L(BloI8?A$6R9(l5X zhg^4RBSLy0b6U|~>I(i0;)1)gn z>p50jetT}0Nn(G^cE^aC-9*6N}s}%*NZV#CVD%Bs0p-L2gF0(4lHnsvC6>38aPDSkpR{ zn@&mvsih3g^J}q?%phVeYR)6m)Lbi)K_Z&5Q)ZK=5waUuiqP}9Z{~8ZJ%Erh8$Ymi z09}eVmKhbv2kNf~qMNrz@Gt|H8O0GF#Et;__iGR%~ z>s&OmlVuQM5D^iv1*ITKo^~2p)^< zL`3);XNv`m$JWtY?udR8k1V%MuJqn1RI=71+B%89n2D31N#U5RegvPpC9#6!2F+Je z&K%dvb;GsMmhHPe%rEX9B2qnDY2b08OgB7*kX-(JP2iqGxsA&*gis<2(WW+6j27k& ztqAN{L98&yWc=QzqOUo}2T>--wRMh&=pj}}K&3T@tYKds*mID6^>%*MLY)llli($D z@DgqA&}rn}yFmRcX0^B^*pr%(!CCsarPYEh*?b)bGGbHFZ}5(qRF51PL^<(RB-k2VZ3@5>JU@b5E*lFL7IS-e0Hq?oKL4GuxZ-UM3#z2qf=Bv`7S6 zK5w@kALFu54I= z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{dkZee9yon(NKJUuWlK%r)psMk<^4sVJW@#{43B^>Q=+sSd`_9?|G=sVbkoPk)yi zXUbPS9ILs#9GT8&JeFkfXO4%yB3ek5%KWA&pHT4Jf~-h1+abx8&-xk~cT?@MdDcAC zU3OkKu{N+@3fB*kDWAEQby2eUp9}Y}@}8=LA4qqx4%yIfGCqlx&zb`LZ0lyH&-ZuZ zZvPhymx))>0u0zfvg;v{^4UvL_S%&VY#y$(%Zl`@cvpO}rMaH^V%;2eQIPK!Px-95 z*mR*Sw|v?JbL;9z<%N5%`2E#ZMLy91>9dU4uXcOb|0oXgJNuVE+_o1zifzg(A^m#B zrPAIl8|<~yr|$DS|JArRSYBSk>0*{8(Z?)w> zo)aIi`rz7?k8L5UK6~eXYN<}mvtx1 z{qRyuzJy-VBU`d&MZ<%_Gk?U-I?Bs>Nl!W2Uk%Y5((TDds<+y5K(W%ZSDN$i{x3;O zKWc0^a`E_)WvymCh?buDf82<&R;}szb|2JSdXwZNTd~IzDLvmr`#GZfUnbdU%`?PirNU0*w-(y3PV5DuK>BjS O<=F8ZafnMA(*7^mQ$R%k From 8d87892d333bd251849cec6a77c2a999cbad2042 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 01:27:34 -0500 Subject: [PATCH 11/24] Fix call entrypoint --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b1a8e45..77ccbe7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN apk update && apk add --no-cache \ COPY . . RUN composer install --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs && \ - composer dump-autoload --optimize --no-dev --classmap-authoritative && \ + composer dump-autoload --optimize --no-dev --classmap-authoritative FROM php:7.4-alpine @@ -33,4 +33,4 @@ COPY docker/docker-entrypoint.sh . COPY --from=build-env /app . -ENTRYPOINT ['./docker-entrypoint.sh'] \ No newline at end of file +CMD ["sh", "./docker-entrypoint.sh"] \ No newline at end of file From e15e6ab9775a9f7fd9bdc407ef37deafa11fdacc Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 01:28:53 -0500 Subject: [PATCH 12/24] Update project description --- composer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6c93cd9..7acc394 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,10 @@ { + "name": "giansalex/peru-consult-api", + "description": "Consulta RUC, DNI - Perú", + "keywords": ["peru", "rest", "ruc", "dni", "graphql"], + "homepage": "https://github.com/giansalex/peru-consult-api", "type": "project", - "license": "proprietary", + "license": "MIT", "require": { "php": "^7.3", "ext-ctype": "*", From b58fb9ed445aac2b48ea9f2aeae5e04d2435d6b9 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 13:05:36 -0500 Subject: [PATCH 13/24] Fix routes requirements --- config/routes.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/config/routes.yaml b/config/routes.yaml index e65a573..2eef6da 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -3,31 +3,28 @@ app_index: controller: App\Controller\HomeController::index app_ruc_individual: - path: /api/v1/ruc/{ruc} + path: /api/v1/ruc/{ruc<\d{11}>} controller: App\Controller\ConsultController::ruc - requirements: - ruc: '\d{11}' app_userSol: - path: /api/v1/user-sol/{ruc}/{user} + path: /api/v1/user-sol/{ruc<\d{11}>}/{user} controller: App\Controller\ConsultController::userSol - requirements: - ruc: '\d{11}' app_dni_individual: - path: /api/v1/dni/{dni} + path: /api/v1/dni/{dni<\d{8}>} controller: App\Controller\ConsultController::dni - requirements: - dni: '\d{8}' app_ruc_multiple: path: /api/v1/ruc controller: App\Controller\ConsultMultipleController::ruc + methods: POST app_dni_multiple: path: /api/v1/dni controller: App\Controller\ConsultMultipleController::dni + methods: POST app_graphql: path: /api/graph - controller: App\Controller\GraphController::query \ No newline at end of file + controller: App\Controller\GraphController::query + methods: POST \ No newline at end of file From c01c0ab902c2d4aa820fd0a0847c73bf36ad65f1 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 13:06:30 -0500 Subject: [PATCH 14/24] Fix parse json --- src/Controller/ConsultMultipleController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/ConsultMultipleController.php b/src/Controller/ConsultMultipleController.php index e578125..d565607 100644 --- a/src/Controller/ConsultMultipleController.php +++ b/src/Controller/ConsultMultipleController.php @@ -34,7 +34,7 @@ public function __construct(ContainerInterface $container) */ public function ruc(Request $request) { - $rucs = json_encode($request->getContent()); + $rucs = json_decode($request->getContent()); if (!is_array($rucs)) { throw new BadRequestHttpException(); } @@ -53,7 +53,7 @@ public function ruc(Request $request) */ public function dni(Request $request) { - $dnis = json_encode($request->getContent()); + $dnis = json_decode($request->getContent()); if (!is_array($dnis)) { throw new BadRequestHttpException(); } From a8d27e218cb548bd8c1d4192e76b3a4ccf3cc6c9 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 13:08:02 -0500 Subject: [PATCH 15/24] Add phpunit bridge --- .gitignore | 10 +- bin/phpunit | 13 +++ composer.json | 4 +- composer.lock | 232 +++++++++++++++++++++++++++++++++++++++++++- phpunit.xml.dist | 28 +++++- symfony.lock | 21 ++++ tests/bootstrap.php | 11 +++ 7 files changed, 313 insertions(+), 6 deletions(-) create mode 100644 bin/phpunit create mode 100644 tests/bootstrap.php diff --git a/.gitignore b/.gitignore index 5dd3192..65b8433 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,13 @@ /vendor/ ###< symfony/framework-bundle ### +###> symfony/phpunit-bridge ### +.phpunit +.phpunit.result.cache +/phpunit.xml +###< symfony/phpunit-bridge ### + +###> App ### /.idea/ -/.php_cs.cache \ No newline at end of file +/.php_cs.cache +###< App ### \ No newline at end of file diff --git a/bin/phpunit b/bin/phpunit new file mode 100644 index 0000000..4d1ed05 --- /dev/null +++ b/bin/phpunit @@ -0,0 +1,13 @@ +#!/usr/bin/env php +=5.5.9" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0|<6.4,>=6.0|9.1.2" + }, + "suggest": { + "symfony/error-handler": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" + }, + "bin": [ + "bin/simple-phpunit" + ], + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + }, + "thanks": { + "name": "phpunit/phpunit", + "url": "https://github.com/sebastianbergmann/phpunit" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Bridge\\PhpUnit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 PHPUnit Bridge", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-04-28T17:58:55+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/phpunit.xml.dist b/phpunit.xml.dist index adde9e6..d0b6a05 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,34 @@ - + + + + + + + + + + + - + tests + + + + src + + + + + + \ No newline at end of file diff --git a/symfony.lock b/symfony.lock index bcd6537..4e4b4f8 100644 --- a/symfony.lock +++ b/symfony.lock @@ -104,6 +104,9 @@ "seregazhuk/php-watcher": { "version": "v0.5.2" }, + "symfony/browser-kit": { + "version": "v5.0.8" + }, "symfony/cache": { "version": "v5.0.8" }, @@ -129,6 +132,9 @@ "symfony/dependency-injection": { "version": "v5.0.8" }, + "symfony/dom-crawler": { + "version": "v5.0.8" + }, "symfony/dotenv": { "version": "v5.0.8" }, @@ -188,6 +194,21 @@ "symfony/mime": { "version": "v5.0.8" }, + "symfony/phpunit-bridge": { + "version": "4.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "4.3", + "ref": "6d0e35f749d5f4bfe1f011762875275cd3f9874f" + }, + "files": [ + "./.env.test", + "./bin/phpunit", + "./phpunit.xml.dist", + "./tests/bootstrap.php" + ] + }, "symfony/polyfill-intl-idn": { "version": "v1.15.0" }, diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..469dcce --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,11 @@ +bootEnv(dirname(__DIR__).'/.env'); +} From d8324bce8be353bb170fe5067a10918f660fc4c4 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 13:08:41 -0500 Subject: [PATCH 16/24] Add async kernel for tests --- .env.test | 8 ++++++++ config/services_test.yaml | 15 +++++++++++++++ tests/Kernel.php | 25 +++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 .env.test create mode 100644 config/services_test.yaml create mode 100644 tests/Kernel.php diff --git a/.env.test b/.env.test new file mode 100644 index 0000000..757e607 --- /dev/null +++ b/.env.test @@ -0,0 +1,8 @@ +# define your env variables for the test env here +KERNEL_CLASS='App\Tests\Kernel' +APP_SECRET='$ecretf0rt3st' +SYMFONY_DEPRECATIONS_HELPER=999999 +PANTHER_APP_ENV=panther + +# App env +API_TOKEN=abcxyz diff --git a/config/services_test.yaml b/config/services_test.yaml new file mode 100644 index 0000000..47d6f81 --- /dev/null +++ b/config/services_test.yaml @@ -0,0 +1,15 @@ +services: + React\EventLoop\StreamSelectLoop: ~ + reactphp.event_loop: + alias: 'React\EventLoop\StreamSelectLoop' + public: true + + App\Tests\Stub\HttpClientStub: + arguments: + - '@Peru\Http\Async\HttpClient' + App\Tests\Stub\ClientStubDecorator: + arguments: + - '@Peru\Http\ContextClient' + Peru\Http\Async\ClientInterface: + alias: 'App\Tests\Stub\HttpClientStub' + Peru\Http\ClientInterface: '@App\Tests\Stub\ClientStubDecorator' \ No newline at end of file diff --git a/tests/Kernel.php b/tests/Kernel.php new file mode 100644 index 0000000..03c5e97 --- /dev/null +++ b/tests/Kernel.php @@ -0,0 +1,25 @@ +getContainer()->get('reactphp.event_loop'); + $promise = $this->handleAsync($request); + $response = null; + $promise->then(function ($result) use (&$response) { + $response = $result; + }); + $loop->run(); + + return $response; + } +} \ No newline at end of file From a8ff947085ea4fb29a44172971f307011e4b218e Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 13:08:50 -0500 Subject: [PATCH 17/24] Add unit tests --- tests/Controller/ConsultControllerTest.php | 48 +++++++++++ .../ConsultMultipleControllerTest.php | 61 ++++++++++++++ tests/Controller/GraphControllerTest.php | 80 +++++++++++++++++++ tests/Controller/HomeControllerTest.php | 20 +++++ tests/Stub/ClientStubDecorator.php | 69 ++++++++++++++++ tests/Stub/HttpClientStub.php | 52 ++++++++++++ 6 files changed, 330 insertions(+) create mode 100644 tests/Controller/ConsultControllerTest.php create mode 100644 tests/Controller/ConsultMultipleControllerTest.php create mode 100644 tests/Controller/GraphControllerTest.php create mode 100644 tests/Controller/HomeControllerTest.php create mode 100644 tests/Stub/ClientStubDecorator.php create mode 100644 tests/Stub/HttpClientStub.php diff --git a/tests/Controller/ConsultControllerTest.php b/tests/Controller/ConsultControllerTest.php new file mode 100644 index 0000000..6d8195e --- /dev/null +++ b/tests/Controller/ConsultControllerTest.php @@ -0,0 +1,48 @@ +request('GET', '/api/v1/ruc/20550263948?token=abcxyz'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + + /**@var $company Company */ + $company = json_decode($client->getResponse()->getContent()); + + $this->assertStringContainsString('SOCIEDAD COMERCIAL', $company->razonSocial); + $this->assertEquals('HABIDO', $company->condicion); + $this->assertEquals('BAJA DE OFICIO', $company->estado); + } + + public function testConsultDni() + { + $client = static::createClient(); + + $client->request('GET', '/api/v1/dni/48004836?token=abcxyz'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + /**@var $person Person*/ + $person = json_decode($client->getResponse()->getContent()); + $this->assertEquals('NOMBRES', $person->nombres); + } + + public function testConsultUserSol() + { + $client = static::createClient(); + + $client->request('GET', '/api/v1/user-sol/20000000001/HUAFDSMU?token=abcxyz'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + $this->assertTrue(in_array($client->getResponse()->getContent(), ['true', 'false'])); + } +} \ No newline at end of file diff --git a/tests/Controller/ConsultMultipleControllerTest.php b/tests/Controller/ConsultMultipleControllerTest.php new file mode 100644 index 0000000..dde932b --- /dev/null +++ b/tests/Controller/ConsultMultipleControllerTest.php @@ -0,0 +1,61 @@ +request( + 'POST', + '/api/v1/ruc?token=abcxyz', + [], + [], + ['CONTENT_TYPE' => 'application/json'], + json_encode($array) + ); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + + /**@var $companies Company[] */ + $companies = json_decode($client->getResponse()->getContent()); + + $this->assertEquals(3, count($companies)); + + foreach ($companies as $company) { + $this->assertTrue(in_array($company->ruc, $array)); + $this->assertNotEmpty($company->razonSocial); + } + } + + public function testConsultDni() + { + $array = ['48004836']; + $client = static::createClient(); + + $client->request( + 'POST', + '/api/v1/dni?token=abcxyz', + [], + [], + ['CONTENT_TYPE' => 'application/json'], + json_encode($array) + ); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + /**@var $persons Person[] */ + $persons = json_decode($client->getResponse()->getContent()); + $this->assertEquals(1, count($persons)); + foreach ($persons as $person) { + $this->assertTrue(in_array($person->dni, $array)); + $this->assertNotEmpty($person->nombres); + } + } +} \ No newline at end of file diff --git a/tests/Controller/GraphControllerTest.php b/tests/Controller/GraphControllerTest.php new file mode 100644 index 0000000..7a5c4f2 --- /dev/null +++ b/tests/Controller/GraphControllerTest.php @@ -0,0 +1,80 @@ +request( + 'POST', + '/api/graph?token=abcxyz', + [], + [], + ['CONTENT_TYPE' => 'application/json'], + json_encode(['query' => $q]) + ); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + $obj = json_decode($client->getResponse()->getContent()); + + /**@var $company Company */ + $company = $obj->data->company; + /**@var $person Person */ + $person = $obj->data->person; + + $this->assertFalse(isset($obj->errors)); + $this->assertStringContainsString('EMPRESA CONSTRUCTORA', $company->razonSocial); + $this->assertEquals('NO HABIDO', $company->condicion); + $this->assertEquals('SUSPENSION TEMPORAL', $company->estado); + $this->assertNotEmpty($company->direccion); + $this->assertNotEmpty($company->departamento); + $this->assertNotEmpty($company->provincia); + $this->assertNotEmpty($company->distrito); + $this->assertNotEmpty($company->fechaInscripcion); + $this->assertNotEmpty($person->dni); + $this->assertNotEmpty($person->nombres); + $this->assertStringContainsString('NOMBRES', $person->nombres); + } +} \ No newline at end of file diff --git a/tests/Controller/HomeControllerTest.php b/tests/Controller/HomeControllerTest.php new file mode 100644 index 0000000..d62e330 --- /dev/null +++ b/tests/Controller/HomeControllerTest.php @@ -0,0 +1,20 @@ +request('GET', '/'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + } +} \ No newline at end of file diff --git a/tests/Stub/ClientStubDecorator.php b/tests/Stub/ClientStubDecorator.php new file mode 100644 index 0000000..9664d65 --- /dev/null +++ b/tests/Stub/ClientStubDecorator.php @@ -0,0 +1,69 @@ +client = $client; + } + + /** + * Get Request. + * + * @param string $url + * @param array $headers + * + * @return string|false + */ + public function get(string $url, array $headers = []) + { + return $this->client->get(self::getNewUrl($url), $headers); + } + + /** + * Post Request. + * + * @param string $url + * @param mixed $data + * @param array $headers + * + * @return string|false + */ + public function post(string $url, $data, array $headers = []) + { + return $this->client->post(self::getNewUrl($url), $data, $headers); + } + + public static function getNewUrl($url) + { + $urlBase = $_ENV['MOCK_URL']; + if (empty($urlBase)) { + return $url; + } + + $u = parse_url($url); + + return $urlBase.$u['path'].(isset($u['query']) ? "?$u[query]" : ''); + } +} diff --git a/tests/Stub/HttpClientStub.php b/tests/Stub/HttpClientStub.php new file mode 100644 index 0000000..e5874c4 --- /dev/null +++ b/tests/Stub/HttpClientStub.php @@ -0,0 +1,52 @@ +client = $client; + } + + /** + * Make GET Request. + * + * @param string $url + * @param array $headers + * + * @return PromiseInterface + */ + public function getAsync(string $url, array $headers = []): PromiseInterface + { + return $this->client->getAsync(ClientStubDecorator::getNewUrl($url), $headers); + } + + /** + * Post Request. + * + * @param string $url + * @param mixed $data + * @param array $headers + * + * @return PromiseInterface + */ + public function postAsync(string $url, $data, array $headers = []): PromiseInterface + { + return $this->client->postAsync(ClientStubDecorator::getNewUrl($url), $data, $headers); + } +} \ No newline at end of file From 3a3e7eac876e6096f4fe9b2c8d75dfb8a64cac50 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 13:11:40 -0500 Subject: [PATCH 18/24] Run php-cs-fixer --- src/AppKernelAdapter.php | 2 +- src/Controller/ConsultMultipleController.php | 4 ---- src/Controller/GraphController.php | 7 ++----- src/Controller/HomeController.php | 2 +- src/Factory/GraphqlSchemaFactory.php | 5 ++--- src/Resolver/DniResolver.php | 2 +- src/Service/DniMultiple.php | 6 +----- src/Service/GraphRunner.php | 2 -- src/Service/RucMultiple.php | 6 +----- src/Types/CompanyType.php | 3 +-- src/Types/PersonType.php | 3 +-- src/Types/RootType.php | 8 ++------ tests/Controller/ConsultControllerTest.php | 10 ++++++---- tests/Controller/ConsultMultipleControllerTest.php | 10 ++++++---- tests/Controller/GraphControllerTest.php | 10 ++++++---- tests/Controller/HomeControllerTest.php | 6 ++++-- tests/Kernel.php | 6 ++++-- tests/Stub/ClientStubDecorator.php | 9 +-------- tests/Stub/HttpClientStub.php | 8 +------- 19 files changed, 41 insertions(+), 68 deletions(-) diff --git a/src/AppKernelAdapter.php b/src/AppKernelAdapter.php index 96ebfa0..fa693c6 100644 --- a/src/AppKernelAdapter.php +++ b/src/AppKernelAdapter.php @@ -63,4 +63,4 @@ public static function getIgnorableFolders(): array { return []; } -} \ No newline at end of file +} diff --git a/src/Controller/ConsultMultipleController.php b/src/Controller/ConsultMultipleController.php index d565607..e9f91f6 100644 --- a/src/Controller/ConsultMultipleController.php +++ b/src/Controller/ConsultMultipleController.php @@ -20,8 +20,6 @@ class ConsultMultipleController /** * ConsultController constructor. - * - * @param ContainerInterface $container */ public function __construct(ContainerInterface $container) { @@ -29,7 +27,6 @@ public function __construct(ContainerInterface $container) } /** - * @param Request $request * @return PromiseInterface */ public function ruc(Request $request) @@ -48,7 +45,6 @@ public function ruc(Request $request) } /** - * @param Request $request * @return PromiseInterface */ public function dni(Request $request) diff --git a/src/Controller/GraphController.php b/src/Controller/GraphController.php index 3e192fa..5d36db2 100644 --- a/src/Controller/GraphController.php +++ b/src/Controller/GraphController.php @@ -6,8 +6,7 @@ use App\Service\GraphRunner; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\{JsonResponse, Request}; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; class GraphController extends AbstractController @@ -19,8 +18,6 @@ class GraphController extends AbstractController /** * GraphController constructor. - * - * @param GraphRunner $graph */ public function __construct(GraphRunner $graph) { @@ -28,8 +25,8 @@ public function __construct(GraphRunner $graph) } /** - * @param Request $request * @return JsonResponse + * * @throws \Throwable */ public function query(Request $request) diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php index 93c5541..03b4aed 100644 --- a/src/Controller/HomeController.php +++ b/src/Controller/HomeController.php @@ -11,7 +11,7 @@ class HomeController public function index(): JsonResponse { return new JsonResponse([ - 'app' => 'Peru Consult API' + 'app' => 'Peru Consult API', ]); } } diff --git a/src/Factory/GraphqlSchemaFactory.php b/src/Factory/GraphqlSchemaFactory.php index 67f7cad..eabba34 100644 --- a/src/Factory/GraphqlSchemaFactory.php +++ b/src/Factory/GraphqlSchemaFactory.php @@ -14,7 +14,6 @@ class GraphqlSchemaFactory /** * GraphqlSchemaFactory constructor. - * @param RootType $root */ public function __construct(RootType $root) { @@ -24,7 +23,7 @@ public function __construct(RootType $root) public function create() { return new Schema([ - 'query' => $this->root + 'query' => $this->root, ]); } -} \ No newline at end of file +} diff --git a/src/Resolver/DniResolver.php b/src/Resolver/DniResolver.php index 0472567..155eb11 100644 --- a/src/Resolver/DniResolver.php +++ b/src/Resolver/DniResolver.php @@ -22,4 +22,4 @@ public function __invoke($root, $args) { return $this->service->get($args['dni']); } -} \ No newline at end of file +} diff --git a/src/Service/DniMultiple.php b/src/Service/DniMultiple.php index 130bed2..8e6532a 100644 --- a/src/Service/DniMultiple.php +++ b/src/Service/DniMultiple.php @@ -11,8 +11,8 @@ namespace App\Service; use Peru\Jne\Async\Dni; -use React\Promise\PromiseInterface; use function React\Promise\all; +use React\Promise\PromiseInterface; class DniMultiple { @@ -23,8 +23,6 @@ class DniMultiple /** * DniMultiple constructor. - * - * @param Dni $service */ public function __construct(Dni $service) { @@ -32,8 +30,6 @@ public function __construct(Dni $service) } /** - * @param array $dnis - * * @return PromiseInterface */ public function get(array $dnis): PromiseInterface diff --git a/src/Service/GraphRunner.php b/src/Service/GraphRunner.php index 19060ea..992f03f 100644 --- a/src/Service/GraphRunner.php +++ b/src/Service/GraphRunner.php @@ -28,8 +28,6 @@ class GraphRunner /** * GraphRunner constructor. - * @param Schema $schema - * @param LoggerInterface $logger */ public function __construct(Schema $schema, LoggerInterface $logger) { diff --git a/src/Service/RucMultiple.php b/src/Service/RucMultiple.php index 2a0051e..38bdc93 100644 --- a/src/Service/RucMultiple.php +++ b/src/Service/RucMultiple.php @@ -11,8 +11,8 @@ namespace App\Service; use Peru\Sunat\Async\Ruc; -use React\Promise\PromiseInterface; use function React\Promise\all; +use React\Promise\PromiseInterface; class RucMultiple { @@ -23,8 +23,6 @@ class RucMultiple /** * RucMultiple constructor. - * - * @param Ruc $service */ public function __construct(Ruc $service) { @@ -32,8 +30,6 @@ public function __construct(Ruc $service) } /** - * @param array $rucs - * * @return PromiseInterface */ public function get(array $rucs): PromiseInterface diff --git a/src/Types/CompanyType.php b/src/Types/CompanyType.php index 50f84d2..8ca9420 100644 --- a/src/Types/CompanyType.php +++ b/src/Types/CompanyType.php @@ -10,8 +10,7 @@ namespace App\Types; -use GraphQL\Type\Definition\ObjectType; -use GraphQL\Type\Definition\Type; +use GraphQL\Type\Definition\{ObjectType, Type}; class CompanyType extends ObjectType { diff --git a/src/Types/PersonType.php b/src/Types/PersonType.php index 101a467..beeda2d 100644 --- a/src/Types/PersonType.php +++ b/src/Types/PersonType.php @@ -10,8 +10,7 @@ namespace App\Types; -use GraphQL\Type\Definition\ObjectType; -use GraphQL\Type\Definition\Type; +use GraphQL\Type\Definition\{ObjectType, Type}; class PersonType extends ObjectType { diff --git a/src/Types/RootType.php b/src/Types/RootType.php index c91d646..38893f2 100644 --- a/src/Types/RootType.php +++ b/src/Types/RootType.php @@ -10,10 +10,8 @@ namespace App\Types; -use GraphQL\Type\Definition\ObjectType; -use GraphQL\Type\Definition\Type; -use App\Resolver\DniResolver; -use App\Resolver\RucResolver; +use GraphQL\Type\Definition\{ObjectType, Type}; +use App\Resolver\{DniResolver, RucResolver}; use Psr\Container\ContainerInterface; class RootType extends ObjectType @@ -21,8 +19,6 @@ class RootType extends ObjectType /** * RootType constructor. * - * @param ContainerInterface $container - * * @throws \Psr\Container\ContainerExceptionInterface * @throws \Psr\Container\NotFoundExceptionInterface */ diff --git a/tests/Controller/ConsultControllerTest.php b/tests/Controller/ConsultControllerTest.php index 6d8195e..61c241a 100644 --- a/tests/Controller/ConsultControllerTest.php +++ b/tests/Controller/ConsultControllerTest.php @@ -1,4 +1,6 @@ -assertEquals(200, $client->getResponse()->getStatusCode()); - /**@var $company Company */ + /** @var $company Company */ $company = json_decode($client->getResponse()->getContent()); $this->assertStringContainsString('SOCIEDAD COMERCIAL', $company->razonSocial); @@ -31,7 +33,7 @@ public function testConsultDni() $client->request('GET', '/api/v1/dni/48004836?token=abcxyz'); $this->assertEquals(200, $client->getResponse()->getStatusCode()); - /**@var $person Person*/ + /** @var $person Person */ $person = json_decode($client->getResponse()->getContent()); $this->assertEquals('NOMBRES', $person->nombres); } @@ -45,4 +47,4 @@ public function testConsultUserSol() $this->assertEquals(200, $client->getResponse()->getStatusCode()); $this->assertTrue(in_array($client->getResponse()->getContent(), ['true', 'false'])); } -} \ No newline at end of file +} diff --git a/tests/Controller/ConsultMultipleControllerTest.php b/tests/Controller/ConsultMultipleControllerTest.php index dde932b..68fe03e 100644 --- a/tests/Controller/ConsultMultipleControllerTest.php +++ b/tests/Controller/ConsultMultipleControllerTest.php @@ -1,4 +1,6 @@ -assertEquals(200, $client->getResponse()->getStatusCode()); - /**@var $companies Company[] */ + /** @var $companies Company[] */ $companies = json_decode($client->getResponse()->getContent()); $this->assertEquals(3, count($companies)); @@ -50,7 +52,7 @@ public function testConsultDni() ); $this->assertEquals(200, $client->getResponse()->getStatusCode()); - /**@var $persons Person[] */ + /** @var $persons Person[] */ $persons = json_decode($client->getResponse()->getContent()); $this->assertEquals(1, count($persons)); foreach ($persons as $person) { @@ -58,4 +60,4 @@ public function testConsultDni() $this->assertNotEmpty($person->nombres); } } -} \ No newline at end of file +} diff --git a/tests/Controller/GraphControllerTest.php b/tests/Controller/GraphControllerTest.php index 7a5c4f2..1ade7ca 100644 --- a/tests/Controller/GraphControllerTest.php +++ b/tests/Controller/GraphControllerTest.php @@ -1,4 +1,6 @@ -assertEquals(200, $client->getResponse()->getStatusCode()); $obj = json_decode($client->getResponse()->getContent()); - /**@var $company Company */ + /** @var $company Company */ $company = $obj->data->company; - /**@var $person Person */ + /** @var $person Person */ $person = $obj->data->person; $this->assertFalse(isset($obj->errors)); @@ -77,4 +79,4 @@ public function testConsultGraph() $this->assertNotEmpty($person->nombres); $this->assertStringContainsString('NOMBRES', $person->nombres); } -} \ No newline at end of file +} diff --git a/tests/Controller/HomeControllerTest.php b/tests/Controller/HomeControllerTest.php index d62e330..f55d8be 100644 --- a/tests/Controller/HomeControllerTest.php +++ b/tests/Controller/HomeControllerTest.php @@ -1,4 +1,6 @@ -assertEquals(200, $client->getResponse()->getStatusCode()); } -} \ No newline at end of file +} diff --git a/tests/Kernel.php b/tests/Kernel.php index 03c5e97..e176fae 100644 --- a/tests/Kernel.php +++ b/tests/Kernel.php @@ -1,4 +1,6 @@ -client->postAsync(ClientStubDecorator::getNewUrl($url), $data, $headers); } -} \ No newline at end of file +} From 186da2325ff0e9439e6dd764c4f1152d07227350 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 13:25:58 -0500 Subject: [PATCH 19/24] Fix boot kernel --- tests/Kernel.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Kernel.php b/tests/Kernel.php index e176fae..00fdf6b 100644 --- a/tests/Kernel.php +++ b/tests/Kernel.php @@ -14,6 +14,7 @@ class Kernel extends \App\Kernel */ public function handle(Request $request, int $type = HttpKernelInterface::MASTER_REQUEST, bool $catch = true) { + $this->boot(); $loop = $this->getContainer()->get('reactphp.event_loop'); $promise = $this->handleAsync($request); $response = null; From 0fe24308e71f01e0c5d3bc7a5ce5faa0644fcc4a Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 13:27:43 -0500 Subject: [PATCH 20/24] Set prod env - Dockerfile --- .env | 4 +++- Dockerfile | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 4b2fabc..7f52f8f 100644 --- a/.env +++ b/.env @@ -20,4 +20,6 @@ APP_SECRET=7c227fa2152043dfcff04a2ffe103321 #TRUSTED_HOSTS='^(localhost|example\.com)$' ###< symfony/framework-bundle ### -API_TOKEN=abcxyz \ No newline at end of file +###> app ### +API_TOKEN=abcxyz +###> app ### \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 77ccbe7..f4cdbfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ RUN composer install --no-interaction --no-dev --optimize-autoloader --ignore-pl FROM php:7.4-alpine +ENV APP_ENV prod ENV API_TOKEN abcxyz EXPOSE 8080 WORKDIR /var/www From baadc8fcec126e6a4807f0739cd27b831802b001 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 13:43:50 -0500 Subject: [PATCH 21/24] Use controller event for auth-token --- config/services.yaml | 2 +- ...okenSubscriber.php => TokenSubscriber.php} | 21 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) rename src/EventSubscriber/{AuthTokenSubscriber.php => TokenSubscriber.php} (66%) diff --git a/config/services.yaml b/config/services.yaml index dad1aaa..d8c0124 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -57,6 +57,6 @@ services: GraphQL\Type\Schema: factory: ['@App\Factory\GraphqlSchemaFactory', 'create'] - App\EventSubscriber\AuthTokenSubscriber: + App\EventSubscriber\TokenSubscriber: arguments: $token: '%token%' \ No newline at end of file diff --git a/src/EventSubscriber/AuthTokenSubscriber.php b/src/EventSubscriber/TokenSubscriber.php similarity index 66% rename from src/EventSubscriber/AuthTokenSubscriber.php rename to src/EventSubscriber/TokenSubscriber.php index 09e9ace..67b2422 100644 --- a/src/EventSubscriber/AuthTokenSubscriber.php +++ b/src/EventSubscriber/TokenSubscriber.php @@ -1,14 +1,15 @@ token = $token; } - public function onKernelRequest(RequestEvent $event) + public function onKernelController(ControllerEvent $event) { $path = $event->getRequest()->getPathInfo(); - $isApi = substr($path, 0, 4) === "/api"; - + $isApi = substr($path, 0, 4) === '/api'; if (!$isApi) { return; } @@ -36,10 +36,13 @@ public function onKernelRequest(RequestEvent $event) } } + /** + * {@inheritdoc} + */ public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => 'onKernelRequest', - ); + return [ + KernelEvents::CONTROLLER => 'onKernelController', + ]; } -} \ No newline at end of file +} From f0a317ece19d8b41ac6109cbb5ab939af7d24b69 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 13:53:42 -0500 Subject: [PATCH 22/24] Update command deploy on docker --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b2c9af8..4cb62a0 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ API para consultar el DNI y RUC - Perú, empleando [peru-consult](https://github Usar la imagen desde [Docker Hub](https://hub.docker.com/r/giansalex/peru-consult-api/) ```bash -docker pull giansalex/peru-consult-api +docker run -d -p 8080:8080 --name peru-consult -e API_TOKEN=your_key giansalex/peru-consult-api ``` ### Clonar Repositorio From 04c1bd475343921b4497a31a2def95426a26f8db Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 14:02:45 -0500 Subject: [PATCH 23/24] Use symfony phpunit bin --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7da9a90..9669cef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,6 +16,6 @@ jobs: php-version: 7.3 extensions: pcntl - run: composer install - - run: vendor/bin/phpunit + - run: bin/phpunit env: MOCK_URL: ${{ secrets.MockServer }} From d4aa5bb82c20c82c96ba8bb317cf28908d452128 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Sat, 2 May 2020 14:05:44 -0500 Subject: [PATCH 24/24] Fix run phpunit bridge --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9669cef..e65267a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,6 +16,6 @@ jobs: php-version: 7.3 extensions: pcntl - run: composer install - - run: bin/phpunit + - run: php bin/phpunit env: MOCK_URL: ${{ secrets.MockServer }}