From 69d51636f27fcf2a862d8012386d5aa88abfcea1 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Sun, 29 Nov 2020 19:56:16 +0100 Subject: [PATCH] Change docker base to alpine linux --- api/.dockerignore | 4 + api/.gitignore | 3 + api/.rr.dev.yaml | 11 + api/.rr.yaml | 13 + api/Dockerfile | 37 - api/composer.json | 10 +- api/composer.lock | 1391 ++++++++++------- api/config/bundles.php | 1 + api/config/packages/baldinof_road_runner.yaml | 18 + api/fpm.Dockerfile | 31 + api/rr.Dockerfile | 24 + api/symfony.lock | 30 +- docker-compose.yml | 4 +- docker/nginx/cojedzie.conf | 5 + 14 files changed, 1007 insertions(+), 575 deletions(-) create mode 100644 api/.dockerignore create mode 100644 api/.rr.dev.yaml create mode 100644 api/.rr.yaml delete mode 100644 api/Dockerfile create mode 100644 api/config/packages/baldinof_road_runner.yaml create mode 100644 api/fpm.Dockerfile create mode 100644 api/rr.Dockerfile diff --git a/api/.dockerignore b/api/.dockerignore new file mode 100644 index 0000000..8ee5090 --- /dev/null +++ b/api/.dockerignore @@ -0,0 +1,4 @@ +/vendor/ +/var/*.db +/var/cache/* +/var/log/ diff --git a/api/.gitignore b/api/.gitignore index cb7bf0d..bc4b385 100644 --- a/api/.gitignore +++ b/api/.gitignore @@ -8,3 +8,6 @@ /public/* !/public/index.php +###> baldinof/roadrunner-bundle ### +/bin/rr +###< baldinof/roadrunner-bundle ### diff --git a/api/.rr.dev.yaml b/api/.rr.dev.yaml new file mode 100644 index 0000000..709cd3d --- /dev/null +++ b/api/.rr.dev.yaml @@ -0,0 +1,11 @@ +include: + - .rr.yaml + +reload: + enabled: true + interval: 1s + patterns: [".php"] + services: + http: + dirs: ["."] + recursive: true diff --git a/api/.rr.yaml b/api/.rr.yaml new file mode 100644 index 0000000..8360a06 --- /dev/null +++ b/api/.rr.yaml @@ -0,0 +1,13 @@ +http: + address: "0.0.0.0:8080" + + uploads: + forbid: [".php", ".exe", ".bat"] + + workers: + command: "php bin/console baldinof:roadrunner:worker" + relay: "unix://var/roadrunner.sock" + +static: + dir: "public" + forbid: [".php", ".htaccess"] diff --git a/api/Dockerfile b/api/Dockerfile deleted file mode 100644 index 27e1b3a..0000000 --- a/api/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM php:7.3-fpm - -ARG XDEBUG_REMOTE_HOST="172.17.0.1" - -RUN apt-get update && \ - apt-get install -y --no-install-recommends git zip libzip-dev - -RUN docker-php-ext-install zip - -# XDebug -RUN pecl install xdebug-2.9.0 && docker-php-ext-enable xdebug -RUN echo "xdebug.remote_enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \ - echo "xdebug.remote_host = ${XDEBUG_REMOTE_HOST}" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; - -# Blackfire -RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ - && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \ - && mkdir -p /tmp/blackfire \ - && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ - && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz - -#Composer -RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ - && php composer-setup.php \ - && php -r "unlink('composer-setup.php');" \ - && mv composer.phar /usr/local/bin/composer \ - && chmod +x /usr/local/bin/composer - -# Timezone -RUN ln -snf /usr/share/zoneinfo/Europe/Warsaw /etc/localtime -RUN echo "date.timezone = Europe/Warsaw" >> /usr/local/etc/php/conf.d/datetime.ini; - -WORKDIR /var/www - -EXPOSE 9001 diff --git a/api/composer.json b/api/composer.json index 4b433b5..33a7ea3 100644 --- a/api/composer.json +++ b/api/composer.json @@ -7,15 +7,19 @@ "ext-ctype": "*", "ext-iconv": "*", "ext-json": "*", + "baldinof/roadrunner-bundle": "^1.3", "cerbero/json-objects": "^1.1", "doctrine/doctrine-cache-bundle": "^1.4", "jms/serializer-bundle": "^3.5", + "kadet/functional": "dev-master", "nelmio/api-doc-bundle": "^3.5", "nesbot/carbon": "^1.33", "ocramius/proxy-manager": "^2.0", "sensio/framework-extra-bundle": "^5.2", + "spiral/roadrunner": "^1.8", "symfony/asset": "^4.4", "symfony/console": "^4.4", + "symfony/dotenv": "^4.4", "symfony/flex": "^1.1", "symfony/framework-bundle": "^4.4", "symfony/monolog-bundle": "^3.3", @@ -23,10 +27,7 @@ "symfony/profiler-pack": "^1.0", "symfony/twig-bundle": "^4.4", "symfony/yaml": "^4.4", - "tightenco/collect": "^5.6", - "kadet/functional": "dev-master", - "spiral/roadrunner": "^1.8", - "symfony/dotenv": "^4.4" + "tightenco/collect": "^5.6" }, "config": { "preferred-install": { @@ -43,6 +44,7 @@ "App\\": "src/" }, "files": [ + "vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php", "./src/Functions/index.php" ] }, diff --git a/api/composer.lock b/api/composer.lock index def9adb..f32a200 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -4,8 +4,93 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3a72c43fdf868b0a9b09154437791b3d", + "content-hash": "294e71e4f7c26065cc294792790581e9", "packages": [ + { + "name": "baldinof/roadrunner-bundle", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/Baldinof/roadrunner-bundle.git", + "reference": "c377846b5fe7529b207a4b803c91d752a532aa2f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Baldinof/roadrunner-bundle/zipball/c377846b5fe7529b207a4b803c91d752a532aa2f", + "reference": "c377846b5fe7529b207a4b803c91d752a532aa2f", + "shasum": "" + }, + "require": { + "dflydev/fig-cookies": "^2.0", + "php": ">=7.3", + "php-http/discovery": "^1.9", + "psr/http-factory": "^1.0", + "psr/http-factory-implementation": "1.0.0", + "psr/http-server-handler": "^1.0", + "psr/http-server-middleware": "^1.0", + "psr/log": "^1.1", + "spiral/goridge": "^2.0.2", + "spiral/roadrunner": "^1.5", + "symfony/config": "^4.4 || ^5.0", + "symfony/dependency-injection": "^4.4 || ^5.0", + "symfony/http-kernel": "^4.4 || ^5.0", + "symfony/psr-http-message-bridge": "^1.1 || ^2.0", + "symfony/yaml": "^4.4 || ^5.0" + }, + "require-dev": { + "blackfire/php-sdk": "^1.21", + "doctrine/doctrine-bundle": "^2.0", + "doctrine/mongodb-odm-bundle": "^4.1", + "doctrine/orm": "^2.7.3", + "friendsofphp/php-cs-fixer": "^2.16", + "nyholm/psr7": "^1.2", + "ocramius/package-versions": "^1.10 || ^2.0", + "phpspec/prophecy": "^1.11", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/phpstan": "^0.12.2", + "phpunit/phpunit": "^9.1", + "sentry/sentry-symfony": "^3.4", + "symfony/framework-bundle": "^4.0||^5.0", + "symfony/proxy-manager-bridge": "^4.0 || ^5.0", + "symfony/var-dumper": "^4.0||^5.0" + }, + "suggest": { + "nyholm/psr7": "For a super lightweight PSR-7/17 implementation", + "symfony/proxy-manager-bridge": "For doctrine re-connection implementation" + }, + "type": "symfony-bundle", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Baldinof\\RoadRunnerBundle\\": "src", + "Tests\\Baldinof\\RoadRunnerBundle\\": "tests" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Florent Baldino", + "email": "baldinof@gmail.com" + } + ], + "description": "A RoadRunner worker as a Symfony Bundle", + "support": { + "issues": "https://github.com/Baldinof/roadrunner-bundle/issues", + "source": "https://github.com/Baldinof/roadrunner-bundle/tree/1.3.3" + }, + "funding": [ + { + "url": "https://github.com/Baldinof", + "type": "github" + } + ], + "time": "2020-09-25T09:54:58+00:00" + }, { "name": "cerbero/json-objects", "version": "v1.1.2", @@ -141,6 +226,64 @@ ], "time": "2020-11-11T10:22:58+00:00" }, + { + "name": "dflydev/fig-cookies", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-fig-cookies.git", + "reference": "733af78ddad60aec96f7c4a1204619dd4d62afff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-fig-cookies/zipball/733af78ddad60aec96f7c4a1204619dd4d62afff", + "reference": "733af78ddad60aec96f7c4a1204619dd4d62afff", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "php": "^7.2", + "psr/http-message": "^1" + }, + "require-dev": { + "doctrine/coding-standard": "^4", + "phpstan/phpstan": "^0.10.1", + "phpunit/phpunit": "^7.2.6", + "squizlabs/php_codesniffer": "^3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dflydev\\FigCookies\\": "src/Dflydev/FigCookies" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Beau Simensen", + "email": "beau@dflydev.com" + } + ], + "description": "Cookies for PSR-7 HTTP Message Interface.", + "keywords": [ + "cookies", + "psr-7", + "psr7" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-fig-cookies/issues", + "source": "https://github.com/dflydev/dflydev-fig-cookies/tree/v2.0.1" + }, + "time": "2020-01-02T16:13:22+00:00" + }, { "name": "doctrine/annotations", "version": "1.11.1", @@ -800,6 +943,7 @@ "issues": "https://github.com/doctrine/DoctrineCacheBundle/issues", "source": "https://github.com/doctrine/DoctrineCacheBundle/tree/1.4.0" }, + "abandoned": true, "time": "2019-11-29T11:22:01+00:00" }, { @@ -1941,6 +2085,44 @@ ], "time": "2020-06-28T11:26:21+00:00" }, + { + "name": "kadet/functional", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://git.kadet.net/kadet/functional-php.git", + "reference": "0b58a4c6207d6e7b95902bb81e49b9ec207fc909" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0", + "psy/psysh": "@stable" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "Kadet\\Functional\\": "./src/" + }, + "files": [ + "./src/functions.php", + "./src/Predicates/index.php" + ] + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kacper Donat", + "email": "kadet1090@gmail.com" + } + ], + "description": "Functional library for PHP", + "time": "2018-09-08T09:28:23+00:00" + }, { "name": "kylekatarnls/update-helper", "version": "1.2.1", @@ -2004,6 +2186,166 @@ ], "time": "2020-04-07T20:44:10+00:00" }, + { + "name": "laminas/laminas-diactoros", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-diactoros.git", + "reference": "4ff7400c1c12e404144992ef43c8b733fd9ad516" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/4ff7400c1c12e404144992ef43c8b733fd9ad516", + "reference": "4ff7400c1c12e404144992ef43c8b733fd9ad516", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^7.3 || ~8.0.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0" + }, + "conflict": { + "phpspec/prophecy": "<1.9.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "replace": { + "zendframework/zend-diactoros": "^2.2.1" + }, + "require-dev": { + "ext-curl": "*", + "ext-dom": "*", + "ext-gd": "*", + "ext-libxml": "*", + "http-interop/http-factory-tests": "^0.8.0", + "laminas/laminas-coding-standard": "~1.0.0", + "php-http/psr7-integration-tests": "^1.1", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.1" + }, + "type": "library", + "extra": { + "laminas": { + "config-provider": "Laminas\\Diactoros\\ConfigProvider", + "module": "Laminas\\Diactoros" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php", + "src/functions/create_uploaded_file.legacy.php", + "src/functions/marshal_headers_from_sapi.legacy.php", + "src/functions/marshal_method_from_sapi.legacy.php", + "src/functions/marshal_protocol_version_from_sapi.legacy.php", + "src/functions/marshal_uri_from_sapi.legacy.php", + "src/functions/normalize_server.legacy.php", + "src/functions/normalize_uploaded_files.legacy.php", + "src/functions/parse_cookie_header.legacy.php" + ], + "psr-4": { + "Laminas\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "laminas", + "psr", + "psr-17", + "psr-7" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-diactoros/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-diactoros/issues", + "rss": "https://github.com/laminas/laminas-diactoros/releases.atom", + "source": "https://github.com/laminas/laminas-diactoros" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-11-18T18:39:28+00:00" + }, + { + "name": "laminas/laminas-zendframework-bridge", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "6ede70583e101030bcace4dcddd648f760ddf642" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642", + "reference": "6ede70583e101030bcace4dcddd648f760ddf642", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "keywords": [ + "ZendFramework", + "autoloading", + "laminas", + "zf" + ], + "support": { + "forum": "https://discourse.laminas.dev/", + "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", + "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", + "source": "https://github.com/laminas/laminas-zendframework-bridge" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-09-14T14:23:00+00:00" + }, { "name": "monolog/monolog", "version": "2.1.1", @@ -2333,6 +2675,75 @@ }, "time": "2019-08-10T08:37:15+00:00" }, + { + "name": "php-http/discovery", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/discovery.git", + "reference": "788f72d64c43dc361e7fcc7464c3d947c64984a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/discovery/zipball/788f72d64c43dc361e7fcc7464c3d947c64984a7", + "reference": "788f72d64c43dc361e7fcc7464c3d947c64984a7", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "nyholm/psr7": "<1.0" + }, + "require-dev": { + "graham-campbell/phpspec-skip-example-extension": "^5.0", + "php-http/httplug": "^1.0 || ^2.0", + "php-http/message-factory": "^1.0", + "phpspec/phpspec": "^5.1 || ^6.1", + "puli/composer-plugin": "1.0.0-beta10" + }, + "suggest": { + "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", + "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Discovery\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Finds installed HTTPlug implementations and PSR-7 message factories", + "homepage": "http://php-http.org", + "keywords": [ + "adapter", + "client", + "discovery", + "factory", + "http", + "message", + "psr7" + ], + "support": { + "issues": "https://github.com/php-http/discovery/issues", + "source": "https://github.com/php-http/discovery/tree/1.13.0" + }, + "time": "2020-11-27T14:49:42+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", @@ -2593,6 +3004,61 @@ }, "time": "2017-02-14T16:28:37+00:00" }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, + "time": "2019-04-30T12:38:16+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -2646,6 +3112,120 @@ }, "time": "2016-08-06T14:39:51+00:00" }, + { + "name": "psr/http-server-handler", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-server-handler.git", + "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7", + "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP server-side request handler", + "keywords": [ + "handler", + "http", + "http-interop", + "psr", + "psr-15", + "psr-7", + "request", + "response", + "server" + ], + "support": { + "issues": "https://github.com/php-fig/http-server-handler/issues", + "source": "https://github.com/php-fig/http-server-handler/tree/master" + }, + "time": "2018-10-30T16:46:14+00:00" + }, + { + "name": "psr/http-server-middleware", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-server-middleware.git", + "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5", + "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0", + "psr/http-server-handler": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP server-side middleware", + "keywords": [ + "http", + "http-interop", + "middleware", + "psr", + "psr-15", + "psr-7", + "request", + "response" + ], + "support": { + "issues": "https://github.com/php-fig/http-server-middleware/issues", + "source": "https://github.com/php-fig/http-server-middleware/tree/master" + }, + "time": "2018-10-30T17:12:04+00:00" + }, { "name": "psr/log", "version": "1.1.3", @@ -2847,6 +3427,112 @@ }, "time": "2020-08-25T19:10:18+00:00" }, + { + "name": "spiral/goridge", + "version": "v2.4.5", + "source": { + "type": "git", + "url": "https://github.com/spiral/goridge-php.git", + "reference": "a7373de7f86a5452f8ad61bd1340dc158626f7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/goridge-php/zipball/a7373de7f86a5452f8ad61bd1340dc158626f7f8", + "reference": "a7373de7f86a5452f8ad61bd1340dc158626f7f8", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=7.2" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.23", + "phpunit/phpunit": "~8.0", + "spiral/code-style": "^1.0" + }, + "type": "goridge", + "autoload": { + "psr-4": { + "Spiral\\Goridge\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov / Wolfy-J", + "email": "wolfy.jd@gmail.com" + } + ], + "description": "High-performance PHP-to-Golang RPC bridge", + "support": { + "issues": "https://github.com/spiral/goridge-php/issues", + "source": "https://github.com/spiral/goridge-php/tree/v2.4.5" + }, + "time": "2020-08-14T14:28:30+00:00" + }, + { + "name": "spiral/roadrunner", + "version": "v1.8.4", + "source": { + "type": "git", + "url": "https://github.com/spiral/roadrunner.git", + "reference": "561003b0b66a4f767782552a9282d824b08831be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/roadrunner/zipball/561003b0b66a4f767782552a9282d824b08831be", + "reference": "561003b0b66a4f767782552a9282d824b08831be", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "laminas/laminas-diactoros": "^1.3 || ^2.0", + "php": "^7.2", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "spiral/goridge": "^2.4.2", + "symfony/console": "^2.5.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" + }, + "require-dev": { + "phpstan/phpstan": "~0.12" + }, + "bin": [ + "bin/rr" + ], + "type": "server", + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov / Wolfy-J", + "email": "wolfy.jd@gmail.com" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/spiral/roadrunner/graphs/contributors" + } + ], + "description": "High-performance PHP application server, load-balancer and process manager written in Golang", + "support": { + "issues": "https://github.com/spiral/roadrunner/issues", + "source": "https://github.com/spiral/roadrunner/tree/v1.8.4" + }, + "time": "2020-10-21T11:03:49+00:00" + }, { "name": "symfony/asset", "version": "v4.4.16", @@ -3584,6 +4270,75 @@ ], "time": "2020-10-24T11:50:19+00:00" }, + { + "name": "symfony/dotenv", + "version": "v4.4.16", + "source": { + "type": "git", + "url": "https://github.com/symfony/dotenv.git", + "reference": "450e2dad0b42431ad9558bc8adf07e8c4b55d1cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/450e2dad0b42431ad9558bc8adf07e8c4b55d1cd", + "reference": "450e2dad0b42431ad9558bc8adf07e8c4b55d1cd", + "shasum": "" + }, + "require": { + "php": ">=7.1.3" + }, + "require-dev": { + "symfony/process": "^3.4.2|^4.0|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Dotenv\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Registers environment variables from a .env file", + "homepage": "https://symfony.com", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "source": "https://github.com/symfony/dotenv/tree/v4.4.16" + }, + "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-10-24T11:50:19+00:00" + }, { "name": "symfony/error-handler", "version": "v4.4.16", @@ -4926,82 +5681,6 @@ ], "time": "2020-10-23T14:02:19+00:00" }, - { - "name": "symfony/polyfill-php72", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.20.0" - }, - "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-10-23T14:02:19+00:00" - }, { "name": "symfony/polyfill-php73", "version": "v1.20.0", @@ -5298,6 +5977,88 @@ ], "time": "2020-10-24T12:01:57+00:00" }, + { + "name": "symfony/psr-http-message-bridge", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/psr-http-message-bridge.git", + "reference": "51a21cb3ba3927d4b4bf8f25cc55763351af5f2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/51a21cb3ba3927d4b4bf8f25cc55763351af5f2e", + "reference": "51a21cb3ba3927d4b4bf8f25cc55763351af5f2e", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0", + "symfony/http-foundation": "^4.4 || ^5.0" + }, + "require-dev": { + "nyholm/psr7": "^1.1", + "symfony/phpunit-bridge": "^4.4 || ^5.0" + }, + "suggest": { + "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" + }, + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bridge\\PsrHttpMessage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "PSR HTTP message bridge", + "homepage": "http://symfony.com", + "keywords": [ + "http", + "http-message", + "psr-17", + "psr-7" + ], + "support": { + "issues": "https://github.com/symfony/psr-http-message-bridge/issues", + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.0.2" + }, + "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-09-29T08:17:46+00:00" + }, { "name": "symfony/routing", "version": "v5.1.8", @@ -5982,33 +6743,32 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.16", + "version": "v5.1.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "3718e18b68d955348ad860e505991802c09f5f73" + "reference": "4e13f3fcefb1fcaaa5efb5403581406f4e840b9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3718e18b68d955348ad860e505991802c09f5f73", - "reference": "3718e18b68d955348ad860e505991802c09f5f73", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/4e13f3fcefb1fcaaa5efb5403581406f4e840b9a", + "reference": "4e13f3fcefb1fcaaa5efb5403581406f4e840b9a", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5", "symfony/polyfill-php80": "^1.15" }, "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<4.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^3.4|^4.0|^5.0", + "symfony/console": "^4.4|^5.0", "symfony/process": "^4.4|^5.0", - "twig/twig": "^1.34|^2.4|^3.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).", @@ -6051,7 +6811,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v4.4.16" + "source": "https://github.com/symfony/var-dumper/tree/v5.1.8" }, "funding": [ { @@ -6067,7 +6827,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T20:47:51+00:00" + "time": "2020-10-27T10:11:13+00:00" }, { "name": "symfony/var-exporter", @@ -6298,26 +7058,26 @@ }, { "name": "tightenco/collect", - "version": "v5.8.38", + "version": "v5.6.33", "source": { "type": "git", "url": "https://github.com/tighten/collect.git", - "reference": "c93a7039e6207ad533a09109838fe80933fcc72c" + "reference": "d7381736dca44ac17d0805a25191b094e5a22446" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tighten/collect/zipball/c93a7039e6207ad533a09109838fe80933fcc72c", - "reference": "c93a7039e6207ad533a09109838fe80933fcc72c", + "url": "https://api.github.com/repos/tighten/collect/zipball/d7381736dca44ac17d0805a25191b094e5a22446", + "reference": "d7381736dca44ac17d0805a25191b094e5a22446", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/var-dumper": ">=3.4 <5" + "php": ">=7.1.3", + "symfony/var-dumper": ">=3.1.10" }, "require-dev": { - "mockery/mockery": "^1.0", - "nesbot/carbon": "^1.26.3", - "phpunit/phpunit": "^7.0" + "mockery/mockery": "~1.0", + "nesbot/carbon": "~1.20", + "phpunit/phpunit": "~7.0" }, "type": "library", "autoload": { @@ -6346,9 +7106,9 @@ ], "support": { "issues": "https://github.com/tighten/collect/issues", - "source": "https://github.com/tighten/collect/tree/v5.8.38" + "source": "https://github.com/tighten/collect/tree/v5.6.33" }, - "time": "2019-09-17T18:57:01+00:00" + "time": "2018-08-09T16:56:26+00:00" }, { "name": "twig/twig", @@ -6671,436 +7431,7 @@ "time": "2020-05-10T13:42:24+00:00" } ], - "packages-dev": [ - { - "name": "kadet/functional", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://git.kadet.net/kadet/functional-php.git", - "reference": "0b58a4c6207d6e7b95902bb81e49b9ec207fc909" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0", - "psy/psysh": "@stable" - }, - "default-branch": true, - "type": "library", - "autoload": { - "psr-4": { - "Kadet\\Functional\\": "./src/" - }, - "files": [ - "./src/functions.php", - "./src/Predicates/index.php" - ] - }, - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kacper Donat", - "email": "kadet1090@gmail.com" - } - ], - "description": "Functional library for PHP", - "time": "2018-09-08T09:28:23+00:00" - }, - { - "name": "laminas/laminas-diactoros", - "version": "2.5.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "4ff7400c1c12e404144992ef43c8b733fd9ad516" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/4ff7400c1c12e404144992ef43c8b733fd9ad516", - "reference": "4ff7400c1c12e404144992ef43c8b733fd9ad516", - "shasum": "" - }, - "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "conflict": { - "phpspec/prophecy": "<1.9.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "replace": { - "zendframework/zend-diactoros": "^2.2.1" - }, - "require-dev": { - "ext-curl": "*", - "ext-dom": "*", - "ext-gd": "*", - "ext-libxml": "*", - "http-interop/http-factory-tests": "^0.8.0", - "laminas/laminas-coding-standard": "~1.0.0", - "php-http/psr7-integration-tests": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.1" - }, - "type": "library", - "extra": { - "laminas": { - "config-provider": "Laminas\\Diactoros\\ConfigProvider", - "module": "Laminas\\Diactoros" - } - }, - "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php", - "src/functions/create_uploaded_file.legacy.php", - "src/functions/marshal_headers_from_sapi.legacy.php", - "src/functions/marshal_method_from_sapi.legacy.php", - "src/functions/marshal_protocol_version_from_sapi.legacy.php", - "src/functions/marshal_uri_from_sapi.legacy.php", - "src/functions/normalize_server.legacy.php", - "src/functions/normalize_uploaded_files.legacy.php", - "src/functions/parse_cookie_header.legacy.php" - ], - "psr-4": { - "Laminas\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "PSR HTTP Message implementations", - "homepage": "https://laminas.dev", - "keywords": [ - "http", - "laminas", - "psr", - "psr-17", - "psr-7" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-diactoros/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-diactoros/issues", - "rss": "https://github.com/laminas/laminas-diactoros/releases.atom", - "source": "https://github.com/laminas/laminas-diactoros" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2020-11-18T18:39:28+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "6ede70583e101030bcace4dcddd648f760ddf642" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642", - "reference": "6ede70583e101030bcace4dcddd648f760ddf642", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "extra": { - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" - } - }, - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", - "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" - ], - "support": { - "forum": "https://discourse.laminas.dev/", - "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", - "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", - "source": "https://github.com/laminas/laminas-zendframework-bridge" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2020-09-14T14:23:00+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" - }, - "time": "2019-04-30T12:38:16+00:00" - }, - { - "name": "spiral/goridge", - "version": "v2.4.5", - "source": { - "type": "git", - "url": "https://github.com/spiral/goridge-php.git", - "reference": "a7373de7f86a5452f8ad61bd1340dc158626f7f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spiral/goridge-php/zipball/a7373de7f86a5452f8ad61bd1340dc158626f7f8", - "reference": "a7373de7f86a5452f8ad61bd1340dc158626f7f8", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": ">=7.2" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.23", - "phpunit/phpunit": "~8.0", - "spiral/code-style": "^1.0" - }, - "type": "goridge", - "autoload": { - "psr-4": { - "Spiral\\Goridge\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anton Titov / Wolfy-J", - "email": "wolfy.jd@gmail.com" - } - ], - "description": "High-performance PHP-to-Golang RPC bridge", - "support": { - "issues": "https://github.com/spiral/goridge-php/issues", - "source": "https://github.com/spiral/goridge-php/tree/v2.4.5" - }, - "time": "2020-08-14T14:28:30+00:00" - }, - { - "name": "spiral/roadrunner", - "version": "v1.8.4", - "source": { - "type": "git", - "url": "https://github.com/spiral/roadrunner.git", - "reference": "561003b0b66a4f767782552a9282d824b08831be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spiral/roadrunner/zipball/561003b0b66a4f767782552a9282d824b08831be", - "reference": "561003b0b66a4f767782552a9282d824b08831be", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "laminas/laminas-diactoros": "^1.3 || ^2.0", - "php": "^7.2", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "spiral/goridge": "^2.4.2", - "symfony/console": "^2.5.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" - }, - "require-dev": { - "phpstan/phpstan": "~0.12" - }, - "bin": [ - "bin/rr" - ], - "type": "server", - "autoload": { - "psr-4": { - "Spiral\\RoadRunner\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anton Titov / Wolfy-J", - "email": "wolfy.jd@gmail.com" - }, - { - "name": "RoadRunner Community", - "homepage": "https://github.com/spiral/roadrunner/graphs/contributors" - } - ], - "description": "High-performance PHP application server, load-balancer and process manager written in Golang", - "support": { - "issues": "https://github.com/spiral/roadrunner/issues", - "source": "https://github.com/spiral/roadrunner/tree/v1.8.4" - }, - "time": "2020-10-21T11:03:49+00:00" - }, - { - "name": "symfony/dotenv", - "version": "v4.4.16", - "source": { - "type": "git", - "url": "https://github.com/symfony/dotenv.git", - "reference": "450e2dad0b42431ad9558bc8adf07e8c4b55d1cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/450e2dad0b42431ad9558bc8adf07e8c4b55d1cd", - "reference": "450e2dad0b42431ad9558bc8adf07e8c4b55d1cd", - "shasum": "" - }, - "require": { - "php": ">=7.1.3" - }, - "require-dev": { - "symfony/process": "^3.4.2|^4.0|^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Dotenv\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Registers environment variables from a .env file", - "homepage": "https://symfony.com", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "support": { - "source": "https://github.com/symfony/dotenv/tree/v4.4.16" - }, - "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-10-24T11:50:19+00:00" - } - ], + "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": { diff --git a/api/config/bundles.php b/api/config/bundles.php index 88de49b..3e39222 100644 --- a/api/config/bundles.php +++ b/api/config/bundles.php @@ -11,4 +11,5 @@ return [ Nelmio\ApiDocBundle\NelmioApiDocBundle::class => ['all' => true], JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true], Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], + Baldinof\RoadRunnerBundle\BaldinofRoadRunnerBundle::class => ['all' => true], ]; diff --git a/api/config/packages/baldinof_road_runner.yaml b/api/config/packages/baldinof_road_runner.yaml new file mode 100644 index 0000000..65267f3 --- /dev/null +++ b/api/config/packages/baldinof_road_runner.yaml @@ -0,0 +1,18 @@ +baldinof_road_runner: + # The kernel is preserved between requests. Change this to `true` + # if you want to reboot it, and use a fresh container on each request. + should_reboot_kernel: false + + # Integrations are automatically detected, depending on installed bundle & current configuration + # See https://github.com/baldinof/roadrunner-bundle#integrations + default_integrations: true + + # Allow to send prometheus metrics to the master RoadRunner process, + # via a `Spiral\RoadRunner\MetricsInterface` service. + # See https://github.com/baldinof/roadrunner-bundle#metrics + metrics_enabled: false + + # You can use middlewares to manipulate PSR requests & responses. + # See https://github.com/baldinof/roadrunner-bundle#middlewares + # middlewares: + # - App\Middleware\YourMiddleware diff --git a/api/fpm.Dockerfile b/api/fpm.Dockerfile new file mode 100644 index 0000000..386ae2d --- /dev/null +++ b/api/fpm.Dockerfile @@ -0,0 +1,31 @@ +FROM php:7.4-fpm-alpine + +RUN apk add --no-cache autoconf openssl-dev g++ make pcre-dev icu-dev zlib-dev libzip-dev git && \ + docker-php-ext-install bcmath intl opcache zip sockets; + +# XDebug +RUN pecl install xdebug-3.0.0 && docker-php-ext-enable xdebug +RUN echo "xdebug.mode = develop,debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \ + echo "xdebug.discover_client_host = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; + +RUN apk del --purge autoconf g++ make + +# Blackfire +RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ + && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \ + && mkdir -p /tmp/blackfire \ + && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ + && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ + && printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \ + && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz + +#Composer +COPY --from=composer:latest /usr/bin/composer /usr/bin/composer + +# Timezone +RUN ln -snf /usr/share/zoneinfo/Europe/Warsaw /etc/localtime && + echo "date.timezone = Europe/Warsaw" >> /usr/local/etc/php/conf.d/datetime.ini; + +WORKDIR /var/www + +EXPOSE 9001 diff --git a/api/rr.Dockerfile b/api/rr.Dockerfile new file mode 100644 index 0000000..8bebd41 --- /dev/null +++ b/api/rr.Dockerfile @@ -0,0 +1,24 @@ +FROM php:7.4-alpine + +RUN apk add --no-cache autoconf openssl-dev g++ make pcre-dev icu-dev zlib-dev libzip-dev git && \ + docker-php-ext-install bcmath intl opcache zip sockets && \ + apk del --purge autoconf g++ make + +WORKDIR /usr/src/app + +COPY --from=composer:latest /usr/bin/composer /usr/bin/composer +COPY . . + +RUN composer install --no-dev --no-scripts --no-plugins --prefer-dist --no-progress --no-interaction +RUN ./vendor/bin/rr get-binary --location /usr/local/bin + +ENV APP_ENV=prod +ENV DATABASE_URL="sqlite:///var/db/app.db" + +RUN composer dump-autoload --optimize && \ + composer check-platform-reqs && \ + php bin/console cache:warmup + +EXPOSE 8080 + +CMD ["rr", "serve"] diff --git a/api/symfony.lock b/api/symfony.lock index 8722835..b6915e2 100644 --- a/api/symfony.lock +++ b/api/symfony.lock @@ -1,7 +1,22 @@ { + "baldinof/roadrunner-bundle": { + "version": "1.2", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "master", + "version": "1.2", + "ref": "47c159c44eb9e6902828da4acbb4199757dd378f" + }, + "files": [ + "config/packages/baldinof_road_runner.yaml" + ] + }, "cerbero/json-objects": { "version": "v1.1.2" }, + "dflydev/fig-cookies": { + "version": "v2.0.1" + }, "doctrine/annotations": { "version": "1.0", "recipe": { @@ -163,6 +178,9 @@ "php": { "version": "7.3.12" }, + "php-http/discovery": { + "version": "1.13.0" + }, "phpdocumentor/reflection-common": { "version": "1.0.1" }, @@ -181,6 +199,12 @@ "psr/http-message": { "version": "1.0.1" }, + "psr/http-server-handler": { + "version": "1.0.1" + }, + "psr/http-server-middleware": { + "version": "1.0.1" + }, "psr/log": { "version": "1.0.2" }, @@ -301,9 +325,6 @@ "symfony/polyfill-mbstring": { "version": "v1.9.0" }, - "symfony/polyfill-php72": { - "version": "v1.9.0" - }, "symfony/polyfill-php73": { "version": "v1.13.1" }, @@ -316,6 +337,9 @@ "symfony/property-info": { "version": "v4.1.3" }, + "symfony/psr-http-message-bridge": { + "version": "v2.0.2" + }, "symfony/routing": { "version": "4.0", "recipe": { diff --git a/docker-compose.yml b/docker-compose.yml index 5b7ca4b..85f2b9c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,9 @@ services: - ./docker/nginx/cojedzie.conf:/etc/nginx/conf.d/cojedzie.conf api: - build: ./api + build: + context: ./api + dockerfile: fpm.Dockerfile env_file: - ./docker/php/.env volumes: diff --git a/docker/nginx/cojedzie.conf b/docker/nginx/cojedzie.conf index 83bad87..b60243d 100644 --- a/docker/nginx/cojedzie.conf +++ b/docker/nginx/cojedzie.conf @@ -7,6 +7,11 @@ server { try_files $uri $uri/ index.php$is_args$args; } + location /_profiler/ { + root /var/www/api/public/; + try_files $uri $uri/ index.php$is_args$args; + } + location /bundles/ { root /var/www/api/public/; try_files $uri $uri/;