From 1cbe97319c488b8e477dd5a6e76f5f5d3372f0f0 Mon Sep 17 00:00:00 2001 From: Oliver Eglseder Date: Fri, 6 Oct 2023 14:54:02 +0200 Subject: [PATCH] WIP --- .ddev/config.yaml | 203 ++- composer.json | 12 +- composer.lock | 1411 +++++++++++++++-- packages/bluecontainer/compiled/services.php | 4 + packages/bluecontainer/composer.json | 33 + .../src/BlueContainerException.php | 10 + .../bluecontainer/src/Composer/Plugin.php | 73 + packages/bluecontainer/src/Container.php | 37 + .../bluecontainer/src/ContainerCompiler.php | 28 + .../src/Exception/ContainerException.php | 21 + .../src/Exception/NotFoundException.php | 21 + .../src/ServiceConfiguration.php | 33 + packages/bluesprints/composer.json | 6 + packages/bluesprints/container/builder.php | 8 + 14 files changed, 1721 insertions(+), 179 deletions(-) create mode 100644 packages/bluecontainer/compiled/services.php create mode 100644 packages/bluecontainer/composer.json create mode 100644 packages/bluecontainer/src/BlueContainerException.php create mode 100644 packages/bluecontainer/src/Composer/Plugin.php create mode 100644 packages/bluecontainer/src/Container.php create mode 100644 packages/bluecontainer/src/ContainerCompiler.php create mode 100644 packages/bluecontainer/src/Exception/ContainerException.php create mode 100644 packages/bluecontainer/src/Exception/NotFoundException.php create mode 100644 packages/bluecontainer/src/ServiceConfiguration.php create mode 100644 packages/bluesprints/container/builder.php diff --git a/.ddev/config.yaml b/.ddev/config.yaml index b0000e1..ab77043 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -8,19 +8,19 @@ router_https_port: "443" xdebug_enabled: false additional_hostnames: [] additional_fqdns: [] -mariadb_version: "10.3" -mysql_version: "" -nfs_mount_enabled: false -mutagen_enabled: false +database: + type: mariadb + version: "10.3" +hooks: + post-start: + - exec: composer install use_dns_when_possible: true composer_version: "" web_environment: -- VXVR_BS_CONTEXT=TRUE -hooks: - post-start: - - exec: "composer install" + - VXVR_BS_CONTEXT=TRUE +nodejs_version: "16" -# Key features of ddev's config.yaml: +# Key features of DDEV's config.yaml: # name: # Name of the project, automatically provides # http://projectname.ddev.site and https://projectname.ddev.site @@ -29,36 +29,34 @@ hooks: # docroot: # Relative path to the directory containing index.php. -# php_version: "7.4" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4" "8.0" +# php_version: "8.1" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" -# You can explicitly specify the webimage, dbimage, dbaimage lines but this -# is not recommended, as the images are often closely tied to ddev's' behavior, +# You can explicitly specify the webimage but this +# is not recommended, as the images are often closely tied to DDEV's' behavior, # so this can break upgrades. # webimage: # nginx/php docker image. -# dbimage: # mariadb docker image. -# dbaimage: -# mariadb_version and mysql_version -# ddev can use many versions of mariadb and mysql -# However these directives are mutually exclusive -# mariadb_version: 10.2 -# mysql_version: 8.0 +# database: +# type: # mysql, mariadb, postgres +# version: # database version, like "10.4" or "8.0" +# MariaDB versions can be 5.5-10.8 and 10.11, MySQL versions can be 5.5-8.0 +# PostgreSQL versions can be 9-15. -# router_http_port: # Port to be used for http (defaults to port 80) -# router_https_port: # Port for https (defaults to 443) +# router_http_port: # Port to be used for http (defaults to global configuration, usually 80) +# router_https_port: # Port for https (defaults to global configuration, usually 443) -# xdebug_enabled: false # Set to true to enable xdebug and "ddev start" or "ddev restart" +# xdebug_enabled: false # Set to true to enable Xdebug and "ddev start" or "ddev restart" # Note that for most people the commands -# "ddev xdebug" to enable xdebug and "ddev xdebug off" to disable it work better, -# as leaving xdebug enabled all the time is a big performance hit. +# "ddev xdebug" to enable Xdebug and "ddev xdebug off" to disable it work better, +# as leaving Xdebug enabled all the time is a big performance hit. -# xhprof_enabled: false # Set to true to enable xhprof and "ddev start" or "ddev restart" +# xhprof_enabled: false # Set to true to enable Xhprof and "ddev start" or "ddev restart" # Note that for most people the commands -# "ddev xhprof" to enable xhprof and "ddev xhprof off" to disable it work better, -# as leaving xhprof enabled all the time is a big performance hit. +# "ddev xhprof" to enable Xhprof and "ddev xhprof off" to disable it work better, +# as leaving Xhprof enabled all the time is a big performance hit. -# webserver_type: nginx-fpm # or apache-fpm +# webserver_type: nginx-fpm, apache-fpm, or nginx-gunicorn # timezone: Europe/Berlin # This is the timezone used in the containers and by PHP; @@ -66,12 +64,26 @@ hooks: # see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones # For example Europe/Dublin or MST7MDT -# composer_version: "" -# if composer_version:"" it will use the current ddev default composer release. -# It can also be set to "1", to get most recent composer v1 -# or "2" for most recent composer v2. -# It can be set to any existing specific composer version. -# After first project 'ddev start' this will not be updated until it changes +# composer_root: +# Relative path to the Composer root directory from the project root. This is +# the directory which contains the composer.json and where all Composer related +# commands are executed. + +# composer_version: "2" +# You can set it to "" or "2" (default) for Composer v2 or "1" for Composer v1 +# to use the latest major version available at the time your container is built. +# It is also possible to use each other Composer version channel. This includes: +# - 2.2 (latest Composer LTS version) +# - stable +# - preview +# - snapshot +# Alternatively, an explicit Composer version may be specified, for example "2.2.18". +# To reinstall Composer after the image was built, run "ddev debug refresh". + +# nodejs_version: "18" +# change from the default system Node.js version to another supported version, like 14, 16, 18, 20. +# Note that you can use 'ddev nvm' or nvm inside the web container to provide nearly any +# Node.js version, including v6, etc. # additional_hostnames: # - somename @@ -85,8 +97,19 @@ hooks: # would provide http and https URLs for "example.com" and "sub1.example.com" # Please take care with this because it can cause great confusion. -# upload_dir: custom/upload/dir -# would set the destination path for ddev import-files to custom/upload/dir. +# upload_dirs: "custom/upload/dir" +# +# upload_dirs: +# - custom/upload/dir +# - ../private +# +# would set the destination paths for ddev import-files to /custom/upload/dir +# When Mutagen is enabled this path is bind-mounted so that all the files +# in the upload_dirs don't have to be synced into Mutagen. + +# disable_upload_dirs_warning: false +# If true, turns off the normal warning that says +# "You have Mutagen enabled and your 'php' project type doesn't have upload_dirs set" # working_dir: # web: /var/www/html @@ -95,20 +118,25 @@ hooks: # These values specify the destination directory for ddev ssh and the # directory in which commands passed into ddev exec are run. -# omit_containers: [db, dba, ddev-ssh-agent] +# omit_containers: [db, ddev-ssh-agent] # Currently only these containers are supported. Some containers can also be # omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit -# the "db" container, several standard features of ddev that access the +# the "db" container, several standard features of DDEV that access the # database container will be unusable. In the global configuration it is also # possible to omit ddev-router, but not here. -# nfs_mount_enabled: false -# Great performance improvement but requires host configuration first. -# See https://ddev.readthedocs.io/en/stable/users/performance/#using-nfs-to-mount-the-project-into-the-container - -# mutagen_enabled: false -# Experimental performance improvement using mutagen asynchronous updates. -# See https://ddev.readthedocs.io/en/latest/users/performance/#using-mutagen +# performance_mode: "global" +# DDEV offers performance optimization strategies to improve the filesystem +# performance depending on your host system. Should be configured globally. +# +# If set, will override the global config. Possible values are: +# - "global": uses the value from the global config. +# - "none": disables performance optimization for this project. +# - "mutagen": enables Mutagen for this project. +# - "nfs": enables NFS for this project. +# +# See https://ddev.readthedocs.io/en/latest/users/install/performance/#nfs +# See https://ddev.readthedocs.io/en/latest/users/install/performance/#mutagen # fail_on_hook_fail: False # Decide whether 'ddev start' should be interrupted by a failing hook @@ -129,20 +157,12 @@ hooks: # The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic # unless explicitly specified. -# phpmyadmin_port: "8036" -# phpmyadmin_https_port: "8037" -# The PHPMyAdmin ports can be changed from the default 8036 and 8037 - -# host_phpmyadmin_port: "8036" -# The phpmyadmin (dba) port is not normally bound on the host at all, instead being routed -# through ddev-router, but it can be specified and bound. - -# mailhog_port: "8025" -# mailhog_https_port: "8026" -# The MailHog ports can be changed from the default 8025 and 8026 +# mailpit_http_port: "8025" +# mailpit_https_port: "8026" +# The Mailpit ports can be changed from the default 8025 and 8026 -# host_mailhog_port: "8025" -# The mailhog port is not normally bound on the host at all, instead being routed +# host_mailpit_port: "8025" +# The mailpit port is not normally bound on the host at all, instead being routed # through ddev-router, but it can be bound directly to localhost if specified here. # webimage_extra_packages: [php7.4-tidy, php-bcmath] @@ -163,12 +183,12 @@ hooks: # If you prefer you can change this to "ddev.local" to preserve # pre-v1.9 behavior. -# ngrok_args: --subdomain mysite --auth username:pass +# ngrok_args: --basic-auth username:pass1234 # Provide extra flags to the "ngrok http" command, see -# https://ngrok.com/docs#http or run "ngrok http -h" +# https://ngrok.com/docs/ngrok-agent/config or run "ngrok http -h" # disable_settings_management: false -# If true, ddev will not create CMS-specific settings files like +# If true, DDEV will not create CMS-specific settings files like # Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php # In this case the user must provide all such settings. @@ -178,21 +198,72 @@ hooks: # - SOMEOTHERENV=someothervalue # no_project_mount: false -# (Experimental) If true, ddev will not mount the project into the web container; +# (Experimental) If true, DDEV will not mount the project into the web container; # the user is responsible for mounting it manually or via a script. # This is to enable experimentation with alternate file mounting strategies. # For advanced users only! # bind_all_interfaces: false # If true, host ports will be bound on all network interfaces, -# not just the localhost interface. This means that ports +# not the localhost interface only. This means that ports # will be available on the local network if the host firewall # allows it. -# Many ddev commands can be extended to run tasks before or after the -# ddev command is executed, for example "post-start", "post-import-db", +# default_container_timeout: 120 +# The default time that DDEV waits for all containers to become ready can be increased from +# the default 120. This helps in importing huge databases, for example. + +#web_extra_exposed_ports: +#- name: nodejs +# container_port: 3000 +# http_port: 2999 +# https_port: 3000 +#- name: something +# container_port: 4000 +# https_port: 4000 +# http_port: 3999 +# Allows a set of extra ports to be exposed via ddev-router +# Fill in all three fields even if you don’t intend to use the https_port! +# If you don’t add https_port, then it defaults to 0 and ddev-router will fail to start. +# +# The port behavior on the ddev-webserver must be arranged separately, for example +# using web_extra_daemons. +# For example, with a web app on port 3000 inside the container, this config would +# expose that web app on https://.ddev.site:9999 and http://.ddev.site:9998 +# web_extra_exposed_ports: +# - name: myapp +# container_port: 3000 +# http_port: 9998 +# https_port: 9999 + +#web_extra_daemons: +#- name: "http-1" +# command: "/var/www/html/node_modules/.bin/http-server -p 3000" +# directory: /var/www/html +#- name: "http-2" +# command: "/var/www/html/node_modules/.bin/http-server /var/www/html/sub -p 3000" +# directory: /var/www/html + +# override_config: false +# By default, config.*.yaml files are *merged* into the configuration +# But this means that some things can't be overridden +# For example, if you have 'nfs_mount_enabled: true'' you can't override it with a merge +# and you can't erase existing hooks or all environment variables. +# However, with "override_config: true" in a particular config.*.yaml file, +# 'nfs_mount_enabled: false' can override the existing values, and +# hooks: +# post-start: [] +# or +# web_environment: [] +# or +# additional_hostnames: [] +# can have their intended affect. 'override_config' affects only behavior of the +# config.*.yaml file it exists in. + +# Many DDEV commands can be extended to run tasks before or after the +# DDEV command is executed, for example "post-start", "post-import-db", # "pre-composer", "post-composer" -# See https://ddev.readthedocs.io/en/stable/users/extending-commands/ for more +# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more # information on the commands that can be extended and the tasks you can define # for them. Example: #hooks: diff --git a/composer.json b/composer.json index 785f635..ae4a19e 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,9 @@ "ext-json": "*", "vertexvaar/bluesprints": "@dev", "vertexvaar/bluefluid": "@dev", - "vertexvaar/bluemysqlstore": "@dev" + "vertexvaar/bluemysqlstore": "@dev", + "vertexvaar/bluecontainer": "@dev", + "psr/container": "^2.0" }, "autoload": { "psr-4": { @@ -31,6 +33,12 @@ "codeception/codeception": "^4.1", "codeception/module-phpbrowser": "^1.0.0", "codeception/module-asserts": "^1.0.0", - "codeception/module-webdriver": "^1.0.0" + "codeception/module-webdriver": "^1.0.0", + "composer/composer": "^2.6" + }, + "config": { + "allow-plugins": { + "vertexvaar/bluecontainer": true + } } } diff --git a/composer.lock b/composer.lock index 9517904..0dde26a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b22c5a55c266d2575307f4bcb76c9aed", + "content-hash": "7bf36407c06c2fa8d62d7877ee6eb7be", "packages": [ { "name": "guzzlehttp/psr7", @@ -122,6 +122,59 @@ ], "time": "2023-08-27T10:13:57+00:00" }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, { "name": "psr/http-factory", "version": "1.0.2", @@ -437,6 +490,50 @@ }, "time": "2023-06-19T16:51:11+00:00" }, + { + "name": "vertexvaar/bluecontainer", + "version": "dev-master", + "dist": { + "type": "path", + "url": "./packages/bluecontainer", + "reference": "95da94da15e5a63e1a113553b07fba6c4c8b683d" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "8.2.*", + "psr/container": "^2.0.0" + }, + "suggest": { + "erusev/parsedown": "Is used to print exception help pages in HTML instead of pure markdown (development context only)." + }, + "bin": [ + "bin/bluesprints" + ], + "type": "composer-plugin", + "extra": { + "class": "\\VerteXVaaR\\BlueContainer\\Composer\\Plugin" + }, + "autoload": { + "psr-4": { + "VerteXVaaR\\BlueContainer\\": "src/" + } + }, + "license": [ + "GPL-3.0+" + ], + "authors": [ + { + "name": "Oliver Eglseder", + "email": "bluesprints@vxvr.de", + "homepage": "http://vxvr.de/", + "role": "Developer" + } + ], + "description": "Dependency Injection Container for bluesprints", + "transport-options": { + "relative": true + } + }, { "name": "vertexvaar/bluefluid", "version": "dev-master", @@ -512,11 +609,12 @@ "dist": { "type": "path", "url": "./packages/bluesprints", - "reference": "6c2c421de21f2a2a7145fdfa86b762908924107b" + "reference": "13bad1e1116112e9380087634583f3f2c3329279" }, "require": { "guzzlehttp/psr7": "^2.6", "php": "8.2.*", + "psr/container": "^2.0", "psr/http-server-handler": "^1.0", "psr/http-server-middleware": "^1.0" }, @@ -527,6 +625,11 @@ "bin/bluesprints" ], "type": "project", + "extra": { + "vertexvaar/bluecontainer": { + "configurator": "container/builder.php" + } + }, "autoload": { "psr-4": { "VerteXVaaR\\BlueSprints\\": "src/" @@ -966,9 +1069,559 @@ }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Bodnarchuk" + }, + { + "name": "Gintautas Miselis" + }, + { + "name": "Zaahid Bateson" + } + ], + "description": "WebDriver module for Codeception", + "homepage": "http://codeception.com/", + "keywords": [ + "acceptance-testing", + "browser-testing", + "codeception" + ], + "support": { + "issues": "https://github.com/Codeception/module-webdriver/issues", + "source": "https://github.com/Codeception/module-webdriver/tree/1.4.1" + }, + "time": "2022-09-12T05:09:51+00:00" + }, + { + "name": "codeception/phpunit-wrapper", + "version": "9.0.9", + "source": { + "type": "git", + "url": "https://github.com/Codeception/phpunit-wrapper.git", + "reference": "7439a53ae367986e9c22b2ac00f9d7376bb2f8cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/7439a53ae367986e9c22b2ac00f9d7376bb2f8cf", + "reference": "7439a53ae367986e9c22b2ac00f9d7376bb2f8cf", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "phpunit/phpunit": "^9.0" + }, + "require-dev": { + "codeception/specify": "*", + "consolidation/robo": "^3.0.0-alpha3", + "vlucas/phpdotenv": "^3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Codeception\\PHPUnit\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Davert", + "email": "davert.php@resend.cc" + }, + { + "name": "Naktibalda" + } + ], + "description": "PHPUnit classes used by Codeception", + "support": { + "issues": "https://github.com/Codeception/phpunit-wrapper/issues", + "source": "https://github.com/Codeception/phpunit-wrapper/tree/9.0.9" + }, + "time": "2022-05-23T06:24:11+00:00" + }, + { + "name": "codeception/stub", + "version": "4.0.2", + "source": { + "type": "git", + "url": "https://github.com/Codeception/Stub.git", + "reference": "18a148dacd293fc7b044042f5aa63a82b08bff5d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/Stub/zipball/18a148dacd293fc7b044042f5aa63a82b08bff5d", + "reference": "18a148dacd293fc7b044042f5aa63a82b08bff5d", + "shasum": "" + }, + "require": { + "php": "^7.4 | ^8.0", + "phpunit/phpunit": "^8.4 | ^9.0 | ^10.0 | 10.0.x-dev" + }, + "require-dev": { + "consolidation/robo": "^3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Codeception\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", + "support": { + "issues": "https://github.com/Codeception/Stub/issues", + "source": "https://github.com/Codeception/Stub/tree/4.0.2" + }, + "time": "2022-01-31T19:25:15+00:00" + }, + { + "name": "composer/ca-bundle", + "version": "1.3.7", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "76e46335014860eec1aa5a724799a00a2e47cc85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/76e46335014860eec1aa5a724799a00a2e47cc85", + "reference": "76e46335014860eec1aa5a724799a00a2e47cc85", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.3.7" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-08-30T09:31:38+00:00" + }, + { + "name": "composer/class-map-generator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/class-map-generator.git", + "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/953cc4ea32e0c31f2185549c7d216d7921f03da9", + "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9", + "shasum": "" + }, + "require": { + "composer/pcre": "^2.1 || ^3.1", + "php": "^7.2 || ^8.0", + "symfony/finder": "^4.4 || ^5.3 || ^6 || ^7" + }, + "require-dev": { + "phpstan/phpstan": "^1.6", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/filesystem": "^5.4 || ^6", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\ClassMapGenerator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Utilities to scan PHP code and generate class maps.", + "keywords": [ + "classmap" + ], + "support": { + "issues": "https://github.com/composer/class-map-generator/issues", + "source": "https://github.com/composer/class-map-generator/tree/1.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-06-30T13:58:57+00:00" + }, + { + "name": "composer/composer", + "version": "2.6.4", + "source": { + "type": "git", + "url": "https://github.com/composer/composer.git", + "reference": "d75d17c16a863438027d1d96401cddcd6aa5bb60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/composer/zipball/d75d17c16a863438027d1d96401cddcd6aa5bb60", + "reference": "d75d17c16a863438027d1d96401cddcd6aa5bb60", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "composer/class-map-generator": "^1.0", + "composer/metadata-minifier": "^1.0", + "composer/pcre": "^2.1 || ^3.1", + "composer/semver": "^3.2.5", + "composer/spdx-licenses": "^1.5.7", + "composer/xdebug-handler": "^2.0.2 || ^3.0.3", + "justinrainbow/json-schema": "^5.2.11", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "react/promise": "^2.8 || ^3", + "seld/jsonlint": "^1.4", + "seld/phar-utils": "^1.2", + "seld/signal-handler": "^2.0", + "symfony/console": "^5.4.11 || ^6.0.11 || ^7", + "symfony/filesystem": "^5.4 || ^6.0 || ^7", + "symfony/finder": "^5.4 || ^6.0 || ^7", + "symfony/polyfill-php73": "^1.24", + "symfony/polyfill-php80": "^1.24", + "symfony/polyfill-php81": "^1.24", + "symfony/process": "^5.4 || ^6.0 || ^7" + }, + "require-dev": { + "phpstan/phpstan": "^1.9.3", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1", + "phpstan/phpstan-symfony": "^1.2.10", + "symfony/phpunit-bridge": "^6.0 || ^7" + }, + "suggest": { + "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", + "ext-zip": "Enabling the zip extension allows you to unzip archives", + "ext-zlib": "Allow gzip compression of HTTP requests" + }, + "bin": [ + "bin/composer" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.6-dev" + }, + "phpstan": { + "includes": [ + "phpstan/rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Composer\\": "src/Composer/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "https://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", + "homepage": "https://getcomposer.org/", + "keywords": [ + "autoload", + "dependency", + "package" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/composer/issues", + "security": "https://github.com/composer/composer/security/policy", + "source": "https://github.com/composer/composer/tree/2.6.4" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-09-29T08:54:47+00:00" + }, + { + "name": "composer/metadata-minifier", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/metadata-minifier.git", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2", + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\MetadataMinifier\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Small utility library that handles metadata minification and expansion.", + "keywords": [ + "composer", + "compression" + ], + "support": { + "issues": "https://github.com/composer/metadata-minifier/issues", + "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-07T13:37:33+00:00" + }, + { + "name": "composer/pcre", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -976,55 +1629,79 @@ ], "authors": [ { - "name": "Michael Bodnarchuk" + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" }, { - "name": "Gintautas Miselis" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" }, { - "name": "Zaahid Bateson" + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" } ], - "description": "WebDriver module for Codeception", - "homepage": "http://codeception.com/", + "description": "Semver library that offers utilities, version constraint parsing and validation.", "keywords": [ - "acceptance-testing", - "browser-testing", - "codeception" + "semantic", + "semver", + "validation", + "versioning" ], "support": { - "issues": "https://github.com/Codeception/module-webdriver/issues", - "source": "https://github.com/Codeception/module-webdriver/tree/1.4.1" + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" }, - "time": "2022-09-12T05:09:51+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-08-31T09:50:34+00:00" }, { - "name": "codeception/phpunit-wrapper", - "version": "9.0.9", + "name": "composer/spdx-licenses", + "version": "1.5.7", "source": { "type": "git", - "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "7439a53ae367986e9c22b2ac00f9d7376bb2f8cf" + "url": "https://github.com/composer/spdx-licenses.git", + "reference": "c848241796da2abf65837d51dce1fae55a960149" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/7439a53ae367986e9c22b2ac00f9d7376bb2f8cf", - "reference": "7439a53ae367986e9c22b2ac00f9d7376bb2f8cf", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/c848241796da2abf65837d51dce1fae55a960149", + "reference": "c848241796da2abf65837d51dce1fae55a960149", "shasum": "" }, "require": { - "php": ">=7.2", - "phpunit/phpunit": "^9.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "codeception/specify": "*", - "consolidation/robo": "^3.0.0-alpha3", - "vlucas/phpdotenv": "^3.0" + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, "autoload": { "psr-4": { - "Codeception\\PHPUnit\\": "src/" + "Composer\\Spdx\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1033,57 +1710,113 @@ ], "authors": [ { - "name": "Davert", - "email": "davert.php@resend.cc" + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" }, { - "name": "Naktibalda" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" } ], - "description": "PHPUnit classes used by Codeception", + "description": "SPDX licenses list and validation library.", + "keywords": [ + "license", + "spdx", + "validator" + ], "support": { - "issues": "https://github.com/Codeception/phpunit-wrapper/issues", - "source": "https://github.com/Codeception/phpunit-wrapper/tree/9.0.9" + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.5.7" }, - "time": "2022-05-23T06:24:11+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-05-23T07:37:50+00:00" }, { - "name": "codeception/stub", - "version": "4.0.2", + "name": "composer/xdebug-handler", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/Codeception/Stub.git", - "reference": "18a148dacd293fc7b044042f5aa63a82b08bff5d" + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Stub/zipball/18a148dacd293fc7b044042f5aa63a82b08bff5d", - "reference": "18a148dacd293fc7b044042f5aa63a82b08bff5d", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "php": "^7.4 | ^8.0", - "phpunit/phpunit": "^8.4 | ^9.0 | ^10.0 | 10.0.x-dev" + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "consolidation/robo": "^3.0" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" }, "type": "library", "autoload": { "psr-4": { - "Codeception\\": "src/" + "Composer\\XdebugHandler\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], "support": { - "issues": "https://github.com/Codeception/Stub/issues", - "source": "https://github.com/Codeception/Stub/tree/4.0.2" + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, - "time": "2022-01-31T19:25:15+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T21:32:43+00:00" }, { "name": "doctrine/instantiator", @@ -1364,6 +2097,76 @@ ], "time": "2023-08-03T15:11:55+00:00" }, + { + "name": "justinrainbow/json-schema", + "version": "v5.2.13", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", + "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/v5.2.13" + }, + "time": "2023-09-26T02:20:38+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.11.1", @@ -2079,31 +2882,31 @@ "time": "2023-09-19T05:39:22+00:00" }, { - "name": "psr/container", - "version": "2.0.2", + "name": "psr/event-dispatcher", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", "shasum": "" }, "require": { - "php": ">=7.4.0" + "php": ">=7.2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "Psr\\EventDispatcher\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2113,40 +2916,38 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Standard interfaces for event handling.", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "events", + "psr", + "psr-14" ], "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" }, - "time": "2021-11-05T16:47:00+00:00" + "time": "2019-01-08T18:20:26+00:00" }, { - "name": "psr/event-dispatcher", - "version": "1.0.0", + "name": "psr/http-client", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -2156,7 +2957,7 @@ }, "autoload": { "psr-4": { - "Psr\\EventDispatcher\\": "src/" + "Psr\\Http\\Client\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2166,48 +2967,100 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Standard interfaces for event handling.", + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", "keywords": [ - "events", + "http", + "http-client", "psr", - "psr-14" + "psr-18" ], "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + "source": "https://github.com/php-fig/http-client" }, - "time": "2019-01-08T18:20:26+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { - "name": "psr/http-client", - "version": "1.0.3", + "name": "psr/log", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + "url": "https://github.com/php-fig/log.git", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/2.0.0" }, + "time": "2021-07-14T16:41:46+00:00" + }, + { + "name": "react/promise", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "c86753c76fd3be465d93b308f18d189f01a22be4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/c86753c76fd3be465d93b308f18d189f01a22be4", + "reference": "c86753c76fd3be465d93b308f18d189f01a22be4", + "shasum": "" + }, + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "phpstan/phpstan": "1.10.20 || 1.4.10", + "phpunit/phpunit": "^9.5 || ^7.5" + }, + "type": "library", "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { - "Psr\\Http\\Client\\": "src/" + "React\\Promise\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2216,22 +3069,42 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", + "description": "A lightweight implementation of CommonJS Promises/A for PHP", "keywords": [ - "http", - "http-client", - "psr", - "psr-18" + "promise", + "promises" ], "support": { - "source": "https://github.com/php-fig/http-client" + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v3.0.0" }, - "time": "2023-09-23T14:17:50+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-07-11T16:12:49+00:00" }, { "name": "sebastian/cli-parser", @@ -3197,6 +4070,179 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "seld/jsonlint", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/594fd6462aad8ecee0b45ca5045acea4776667f1", + "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.10.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2023-05-11T13:16:46+00:00" + }, + { + "name": "seld/phar-utils", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/phar-utils.git", + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\PharUtils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "PHAR file format utilities, for when PHP phars you up", + "keywords": [ + "phar" + ], + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1" + }, + "time": "2022-08-31T10:31:18+00:00" + }, + { + "name": "seld/signal-handler", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/signal-handler.git", + "reference": "04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/signal-handler/zipball/04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98", + "reference": "04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "require-dev": { + "phpstan/phpstan": "^1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^7.5.20 || ^8.5.23", + "psr/log": "^1 || ^2 || ^3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\Signal\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development", + "keywords": [ + "posix", + "sigint", + "signal", + "sigterm", + "unix" + ], + "support": { + "issues": "https://github.com/Seldaek/signal-handler/issues", + "source": "https://github.com/Seldaek/signal-handler/tree/2.0.2" + }, + "time": "2023-09-03T09:24:00+00:00" + }, { "name": "symfony/browser-kit", "version": "v5.4.21", @@ -3737,6 +4783,69 @@ ], "time": "2023-05-23T14:45:45+00:00" }, + { + "name": "symfony/filesystem", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + }, + "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": "2023-06-01T08:30:39+00:00" + }, { "name": "symfony/finder", "version": "v5.4.27", @@ -4292,6 +5401,85 @@ ], "time": "2023-01-26T09:26:14+00:00" }, + { + "name": "symfony/polyfill-php81", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.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": "2023-01-26T09:26:14+00:00" + }, { "name": "symfony/process", "version": "v6.3.4", @@ -4437,16 +5625,16 @@ }, { "name": "symfony/string", - "version": "v6.3.2", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "53d1a83225002635bca3482fcbf963001313fb68" + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", - "reference": "53d1a83225002635bca3482fcbf963001313fb68", + "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", "shasum": "" }, "require": { @@ -4503,7 +5691,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.2" + "source": "https://github.com/symfony/string/tree/v6.3.5" }, "funding": [ { @@ -4519,7 +5707,7 @@ "type": "tidelift" } ], - "time": "2023-07-05T08:41:27+00:00" + "time": "2023-09-18T10:38:32+00:00" }, { "name": "symfony/yaml", @@ -4652,7 +5840,8 @@ "stability-flags": { "vertexvaar/bluesprints": 20, "vertexvaar/bluefluid": 20, - "vertexvaar/bluemysqlstore": 20 + "vertexvaar/bluemysqlstore": 20, + "vertexvaar/bluecontainer": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/packages/bluecontainer/compiled/services.php b/packages/bluecontainer/compiled/services.php new file mode 100644 index 0000000..5b30b2a --- /dev/null +++ b/packages/bluecontainer/compiled/services.php @@ -0,0 +1,4 @@ +services[VerteXVaaR\BlueSprints\Http\Application] ??= new VerteXVaaR\BlueSprints\Http\Application(); +} diff --git a/packages/bluecontainer/composer.json b/packages/bluecontainer/composer.json new file mode 100644 index 0000000..2ae4319 --- /dev/null +++ b/packages/bluecontainer/composer.json @@ -0,0 +1,33 @@ +{ + "name": "vertexvaar/bluecontainer", + "description": "Dependency Injection Container for bluesprints", + "type": "composer-plugin", + "license": "GPL-3.0+", + "authors": [ + { + "name": "Oliver Eglseder", + "email": "bluesprints@vxvr.de", + "homepage": "http://vxvr.de/", + "role": "Developer" + } + ], + "autoload": { + "psr-4": { + "VerteXVaaR\\BlueContainer\\": "src/" + } + }, + "require": { + "php": "8.2.*", + "psr/container": "^2.0.0", + "composer-plugin-api": "^2.0" + }, + "bin": [ + "bin/bluesprints" + ], + "suggest": { + "erusev/parsedown": "Is used to print exception help pages in HTML instead of pure markdown (development context only)." + }, + "extra": { + "class": "\\VerteXVaaR\\BlueContainer\\Composer\\Plugin" + } +} diff --git a/packages/bluecontainer/src/BlueContainerException.php b/packages/bluecontainer/src/BlueContainerException.php new file mode 100644 index 0000000..68cc49f --- /dev/null +++ b/packages/bluecontainer/src/BlueContainerException.php @@ -0,0 +1,10 @@ +composer = $composer; + $this->io = $io; + } + + public function deactivate(Composer $composer, IOInterface $io) + { + $this->composer = $composer; + $this->io = $io; + } + + public function uninstall(Composer $composer, IOInterface $io) + { + $this->composer = $composer; + $this->io = $io; + } + + public static function getSubscribedEvents(): array + { + return [ + 'post-autoload-dump' => 'postAutoloadDump', + ]; + } + + public function postAutoloadDump(): void + { + $this->io->write('Generating container'); + + $container = new ContainerCompiler(); + + $packages = $this->composer->getRepositoryManager()->getLocalRepository()->getCanonicalPackages(); + foreach ($packages as $package) { + $extra = $package->getExtra(); + if (isset($extra['vertexvaar/bluecontainer']['configurator'])) { + $installPath = $this->composer->getInstallationManager()->getInstallPath($package); + $function = require($installPath . '/' . $extra['vertexvaar/bluecontainer']['configurator']); + $function($container); + } + } + + if (!file_exists(__DIR__ . '/../../compiled/')) { + mkdir(__DIR__ . '/../../compiled/'); + } + file_put_contents(__DIR__ . '/../../compiled/services.php', $container->dumpServices()); + + $this->io->write('Generated container'); + } +} diff --git a/packages/bluecontainer/src/Container.php b/packages/bluecontainer/src/Container.php new file mode 100644 index 0000000..281c7de --- /dev/null +++ b/packages/bluecontainer/src/Container.php @@ -0,0 +1,37 @@ +has($id)) { + throw new NotFoundException($id); + } + return $this->services['instance'][$id] ??= $this->services['factory'][$id](); + } + + public function has(string $id): bool + { + return isset($this->services['factory'][$id]); + } + +} diff --git a/packages/bluecontainer/src/ContainerCompiler.php b/packages/bluecontainer/src/ContainerCompiler.php new file mode 100644 index 0000000..2d4731d --- /dev/null +++ b/packages/bluecontainer/src/ContainerCompiler.php @@ -0,0 +1,28 @@ + + */ + private array $services = []; + + public function configure(string $id): ServiceConfiguration + { + if (!isset($this->services[$id])) { + $this->services[$id] = new ServiceConfiguration($id); + } + return $this->services[$id]; + } + + public function dumpServices(): string + { + $code = ''; + foreach ($this->services as $serviceConfiguration) { + $code .= $serviceConfiguration->dump(); + } + return $code; + } +} diff --git a/packages/bluecontainer/src/Exception/ContainerException.php b/packages/bluecontainer/src/Exception/ContainerException.php new file mode 100644 index 0000000..24cbcb8 --- /dev/null +++ b/packages/bluecontainer/src/Exception/ContainerException.php @@ -0,0 +1,21 @@ +id), + 1696513441, + $previous + ); + } +} diff --git a/packages/bluecontainer/src/Exception/NotFoundException.php b/packages/bluecontainer/src/Exception/NotFoundException.php new file mode 100644 index 0000000..b2c73c9 --- /dev/null +++ b/packages/bluecontainer/src/Exception/NotFoundException.php @@ -0,0 +1,21 @@ +id), + 1696513268, + $previous + ); + } +} diff --git a/packages/bluecontainer/src/ServiceConfiguration.php b/packages/bluecontainer/src/ServiceConfiguration.php new file mode 100644 index 0000000..95cde8c --- /dev/null +++ b/packages/bluecontainer/src/ServiceConfiguration.php @@ -0,0 +1,33 @@ +factory = $factory; + } + + public function dump(): string + { + if (null === $this->factory) { + return <<services[$this->id] ??= new $this->id(); +} +PHP; + } + if (is_string($this->factory)) { + return $this->factory; + } + } +} diff --git a/packages/bluesprints/composer.json b/packages/bluesprints/composer.json index b333989..7a8b35b 100644 --- a/packages/bluesprints/composer.json +++ b/packages/bluesprints/composer.json @@ -20,6 +20,7 @@ "php": "8.2.*", "psr/http-server-middleware": "^1.0", "psr/http-server-handler": "^1.0", + "psr/container": "^2.0", "guzzlehttp/psr7": "^2.6" }, "bin": [ @@ -27,5 +28,10 @@ ], "suggest": { "erusev/parsedown": "Is used to print exception help pages in HTML instead of pure markdown (development context only)." + }, + "extra": { + "vertexvaar/bluecontainer": { + "configurator": "container/builder.php" + } } } diff --git a/packages/bluesprints/container/builder.php b/packages/bluesprints/container/builder.php new file mode 100644 index 0000000..07befa1 --- /dev/null +++ b/packages/bluesprints/container/builder.php @@ -0,0 +1,8 @@ +configure(Application::class); +};