commit c5229e48ed827b80398cd8cd4668298b3647c8fd Author: Marek Date: Tue Mar 24 00:04:55 2026 +0100 init diff --git a/.ddev/config.yaml b/.ddev/config.yaml new file mode 100644 index 0000000..b95d650 --- /dev/null +++ b/.ddev/config.yaml @@ -0,0 +1,308 @@ +name: haushalt +type: symfony +docroot: backend/public +php_version: "8.3" +webserver_type: nginx-fpm +xdebug_enabled: false +additional_hostnames: [] +additional_fqdns: [] +database: + type: mariadb + version: "10.11" +use_dns_when_possible: true +composer_version: "2" +composer_root: backend +web_environment: [] +corepack_enable: false + +web_extra_exposed_ports: +- name: vite + container_port: 5173 + http_port: 5172 + https_port: 5173 + +web_extra_daemons: +- name: vite + command: "npm run dev" + directory: /var/www/html/frontend + +# Key features of DDEV's config.yaml: + +# name: # Name of the project, automatically provides +# http://projectname.ddev.site and https://projectname.ddev.site +# If the name is omitted, the project will take the name of the enclosing directory, +# which is useful if you want to have a copy of the project side by side with this one. + +# type: # backdrop, cakephp, craftcms, drupal, drupal6, drupal7, drupal8, drupal9, drupal10, drupal11, generic, laravel, magento, magento2, php, shopware6, silverstripe, symfony, typo3, wordpress +# See https://docs.ddev.com/en/stable/users/quickstart/ for more +# information on the different project types + +# docroot: # Relative path to the directory containing index.php. + +# php_version: "8.3" # PHP version to use, "5.6" through "8.5" + +# 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: +# It’s unusual to change this option, and we don’t recommend it without Docker experience and a good reason. +# Typically, this means additions to the existing web image using a .ddev/web-build/Dockerfile.* + +# database: +# type: # mysql, mariadb, postgres +# version: # database version, like "10.11" or "8.0" +# MariaDB versions can be 5.5-10.8, 10.11, 11.4, 11.8 +# MySQL versions can be 5.5-8.0, 8.4 +# PostgreSQL versions can be 9-18 + +# 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" +# 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. + +# xhgui_http_port: "8143" +# xhgui_https_port: "8142" +# The XHGui ports can be changed from the default 8143 and 8142 +# Very rarely used + +# host_xhgui_port: "8142" +# Can be used to change the host binding port of the XHGui +# application. Rarely used; only when port conflict and +# bind_all_ports is used (normally with router disabled) + +# xhprof_mode: [prepend|xhgui|global] +# Set to "xhgui" to enable XHGui features +# "xhgui" will become default in a future major release + +# webserver_type: nginx-fpm, apache-fpm, generic + +# timezone: Europe/Berlin +# If timezone is unset, DDEV will attempt to derive it from the host system timezone +# using the $TZ environment variable or the /etc/localtime symlink. +# This is the timezone used in the containers and by PHP; +# it can be set to any valid timezone, +# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones +# For example Europe/Dublin or MST7MDT + +# 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 rebuild". + +# nodejs_version: "22" +# change from the default system Node.js version to any other version. +# See https://docs.ddev.com/en/stable/users/configuration/config/#nodejs_version for more information +# and https://www.npmjs.com/package/n#specifying-nodejs-versions for the full documentation, +# Note that using of 'ddev nvm' is discouraged because "nodejs_version" is much easier to use, +# can specify any version, and is more robust than using 'nvm'. + +# corepack_enable: false +# Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm + +# additional_hostnames: +# - somename +# - someothername +# would provide http and https URLs for "somename.ddev.site" +# and "someothername.ddev.site". + +# additional_fqdns: +# - example.com +# - sub1.example.com +# 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_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" + +# ddev_version_constraint: "" +# Example: +# ddev_version_constraint: ">= 1.24.8" +# This will enforce that the running ddev version is within this constraint. +# See https://github.com/Masterminds/semver#checking-version-constraints for +# supported constraint formats + +# working_dir: +# web: /var/www/html +# db: /home +# would set the default working directory for the web and db services. +# These values specify the destination directory for ddev ssh and the +# directory in which commands passed into ddev exec are run. + +# 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 +# database container will be unusable. In the global configuration it is also +# possible to omit ddev-router, but not here. + +# 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://docs.ddev.com/en/stable/users/install/performance/#nfs +# See https://docs.ddev.com/en/stable/users/install/performance/#mutagen + +# fail_on_hook_fail: False +# Decide whether 'ddev start' should be interrupted by a failing hook + +# host_https_port: "59002" +# The host port binding for https can be explicitly specified. It is +# dynamic unless otherwise specified. +# This is not used by most people, most people use the *router* instead +# of the localhost port. + +# host_webserver_port: "59001" +# The host port binding for the ddev-webserver can be explicitly specified. It is +# dynamic unless otherwise specified. +# This is not used by most people, most people use the *router* instead +# of the localhost port. + +# host_db_port: "59002" +# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic +# unless explicitly specified. + +# mailpit_http_port: "8025" +# mailpit_https_port: "8026" +# The Mailpit ports can be changed from the default 8025 and 8026 + +# 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] +# Extra Debian packages that are needed in the webimage can be added here + +# dbimage_extra_packages: [telnet,netcat] +# Extra Debian packages that are needed in the dbimage can be added here + +# use_dns_when_possible: true +# If the host has internet access and the domain configured can +# successfully be looked up, DNS will be used for hostname resolution +# instead of editing /etc/hosts +# Defaults to true + +# project_tld: ddev.site +# The top-level domain used for project URLs +# The default "ddev.site" allows DNS lookup via a wildcard +# If you prefer you can change this to "ddev.local" to preserve +# pre-v1.9 behavior. + +# ngrok_args: --basic-auth username:pass1234 +# Provide extra flags to the "ngrok http" command, see +# https://ngrok.com/docs/agent/config/v3/#agent-configuration or run "ngrok http -h" + +# disable_settings_management: false +# If true, DDEV will not create CMS-specific settings files like +# Drupal's settings.php/settings.ddev.php or TYPO3's additional.php +# In this case the user must provide all such settings. + +# You can inject environment variables into the web container with: +# web_environment: +# - SOMEENV=somevalue +# - SOMEOTHERENV=someothervalue + +# no_project_mount: false +# (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 the localhost interface only. This means that ports +# will be available on the local network if the host firewall +# allows it. + +# 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 'use_dns_when_possible: 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, +# 'use_dns_when_possible: 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://docs.ddev.com/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: +## Un-comment to consume async message. +# post-start: +# - exec: symfony run --daemon --watch=config,src,templates,vendor bin/console messenger:consume async -vv diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..6699076 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{compose.yaml,compose.*.yaml}] +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a67f91e --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ + +###> symfony/framework-bundle ### +/.env.local +/.env.local.php +/.env.*.local +/config/secrets/prod/prod.decrypt.private.php +/public/bundles/ +/var/ +/vendor/ +###< symfony/framework-bundle ### diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bc6b2a1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..0fcac8c --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +Kern +- Aufgaben anzeigen und verwalten +- Einmalige und Wiederholende Aufgaben sollen Erstellbar sein +- Es gibt eine Aufgabenauflistung und Aufgabendetailansicht + +Hinweise +- Backend Symfony 7, Frontend Web Vue 3, Frontend Mobil Kotlin +- Man kann Aufgaben anzeigen, erstellen, bearbeiten und entfernen. +- Jede Aufgabe besteht aus Name (string), Kategorie, einem Status (aktiv, erledigt, inaktiv) und Aufgabentyp (einzel, wiederholung) +- Eine Kategorie besteht aus Name (string) und Farbe (string, hex-farbe) +- Zum Erledigen auf die Aufgabe klicken, zum wieder aktivieren auf die erledigte Aufgabe klicken +- Startseite - Aufgaben werden aufgelistet mit Name, Badge (Kategorie) und den Buttons (Anzeigen, Edit) + - 7 Tage werden immer angezeigt mit ihren Aufgaben, Kategorisiert als Card-Elemente + - Zuerst aufgaben mit Deadline dann ohne Deadline +- Aufgabe anzeigen - Aufgabe wird mit Details angezeigt mit Name (Input), Badge (Kategorie, Select), Status (Select), Deadline (Checkbox), Aufgabentyp (Radio) und den Button (Entfernen) +- Einzel - Einfaches Date-Input (optional) +- Bei Aufgabentyp Mehrfach werden weitere Felder (Radio) angezeigt: + - Intervall (Täglich) mit Date-Input für Startdatum und Enddatum + - Intervall (Wöchentlich) mit 7 Checkboxen für die Werktage und Date-Input für Startdatum und Enddatum + - Intervall (Monatlich) mit 28-31 Checkboxen für Monatstage und Date-Input für Startdatum und Enddatum +- Aufgabe mit Deadline in der Vergangenheit wird hervorgehoben +- Die Deadline liegt zwischen dem Start- und End-Datum und kann je nach Einstellung mehrfach vorkommen (Bei einem Intervall - Wöchentlich mit 2 aktiven Checkboxen kommt 2 mal jede Woche vor) +- Deadline heißt die Aufgabe soll an genau dem Datum erledigt werden +- Kategorien haben einen Button auf der Startseite +- Kategorien haben ein Template auf dem sie verwaltet werden +- Kategorien können hinzugefügt, bearbeitet und gelöscht werden +- Aufgaben erstellen haben einen Button auf der Startseite +- Delete ist ein hard-delete +- Ist die Deadline Checkbox gesetzt, dann muss ein Datum gesetzt sein, sonst ist es optional +- Kategorie ist optional, fallback ist "Allgemein, grau" +- Eine Aufgabe hat eine Kategorie \ No newline at end of file diff --git a/backend/.env b/backend/.env new file mode 100644 index 0000000..afa7252 --- /dev/null +++ b/backend/.env @@ -0,0 +1,41 @@ +# In all environments, the following files are loaded if they exist, +# the latter taking precedence over the former: +# +# * .env contains default values for the environment variables needed by the app +# * .env.local uncommitted file with local overrides +# * .env.$APP_ENV committed environment-specific defaults +# * .env.$APP_ENV.local uncommitted environment-specific overrides +# +# Real environment variables win over .env files. +# +# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. +# https://symfony.com/doc/current/configuration/secrets.html +# +# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). +# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration + +###> symfony/framework-bundle ### +APP_ENV=dev +APP_SECRET= +APP_SHARE_DIR=var/share +###< symfony/framework-bundle ### + +###> symfony/routing ### +# Configure how to generate URLs in non-HTTP contexts, such as CLI commands. +# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands +DEFAULT_URI=http://localhost +###< symfony/routing ### + +###> nelmio/cors-bundle ### +CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$' +###< nelmio/cors-bundle ### + +###> doctrine/doctrine-bundle ### +# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url +# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml +# +# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data_%kernel.environment%.db" +# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4" +# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4" +DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" +###< doctrine/doctrine-bundle ### diff --git a/backend/.env.dev b/backend/.env.dev new file mode 100644 index 0000000..97d6dba --- /dev/null +++ b/backend/.env.dev @@ -0,0 +1,4 @@ + +###> symfony/framework-bundle ### +APP_SECRET=54e3629fe00db1bfaf40f0836cc96e2e +###< symfony/framework-bundle ### diff --git a/backend/.env.local b/backend/.env.local new file mode 100644 index 0000000..f0c5859 --- /dev/null +++ b/backend/.env.local @@ -0,0 +1,19 @@ +MAILER_HOST="127.0.0.1" +MAILER_URL="smtp://127.0.0.1:1025" +MAILER_WEB_URL="https://haushalt.ddev.site:8026" +DATABASE_HOST="db" +DATABASE_USER="db" +MAILER_AUTH_MODE="" +MAILER_PORT="1025" +DATABASE_NAME="db" +DATABASE_URL="mysql://db:db@db:3306/db?sslmode=disable&charset=utf8mb4&serverVersion=10.11.0-mariadb" +DATABASE_VERSION="10.11.0-mariadb" +MAILER_CATCHER="1" +DATABASE_DRIVER="mysql" +MAILER_USERNAME="" +DATABASE_PASSWORD="db" +DATABASE_PORT="3306" +DATABASE_SERVER="mysql://db:3306" +MAILER_PASSWORD="" +MAILER_DRIVER="smtp" +MAILER_DSN="smtp://127.0.0.1:1025" diff --git a/backend/bin/console b/backend/bin/console new file mode 100755 index 0000000..d8d530e --- /dev/null +++ b/backend/bin/console @@ -0,0 +1,21 @@ +#!/usr/bin/env php + doctrine/doctrine-bundle ### + database: + ports: + - "5432" +###< doctrine/doctrine-bundle ### diff --git a/backend/compose.yaml b/backend/compose.yaml new file mode 100644 index 0000000..89c74d1 --- /dev/null +++ b/backend/compose.yaml @@ -0,0 +1,25 @@ + +services: +###> doctrine/doctrine-bundle ### + database: + image: postgres:${POSTGRES_VERSION:-16}-alpine + environment: + POSTGRES_DB: ${POSTGRES_DB:-app} + # You should definitely change the password in production + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!} + POSTGRES_USER: ${POSTGRES_USER:-app} + healthcheck: + test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB:-app}", "-U", "${POSTGRES_USER:-app}"] + timeout: 5s + retries: 5 + start_period: 60s + volumes: + - database_data:/var/lib/postgresql/data:rw + # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data! + # - ./docker/db/data:/var/lib/postgresql/data:rw +###< doctrine/doctrine-bundle ### + +volumes: +###> doctrine/doctrine-bundle ### + database_data: +###< doctrine/doctrine-bundle ### diff --git a/backend/composer.json b/backend/composer.json new file mode 100644 index 0000000..0552012 --- /dev/null +++ b/backend/composer.json @@ -0,0 +1,79 @@ +{ + "name": "symfony/skeleton", + "type": "project", + "license": "MIT", + "description": "A minimal Symfony project recommended to create bare bones applications", + "minimum-stability": "stable", + "prefer-stable": true, + "require": { + "php": ">=8.2", + "ext-ctype": "*", + "ext-iconv": "*", + "doctrine/doctrine-bundle": "^2.18", + "doctrine/doctrine-migrations-bundle": "^3.7", + "doctrine/orm": "^3.6", + "nelmio/cors-bundle": "^2.6", + "phpdocumentor/reflection-docblock": "^6.0", + "phpstan/phpdoc-parser": "^2.3", + "symfony/console": "7.4.*", + "symfony/dotenv": "7.4.*", + "symfony/flex": "^2", + "symfony/framework-bundle": "7.4.*", + "symfony/property-access": "7.4.*", + "symfony/property-info": "7.4.*", + "symfony/runtime": "7.4.*", + "symfony/serializer": "7.4.*", + "symfony/validator": "7.4.*", + "symfony/yaml": "7.4.*" + }, + "config": { + "allow-plugins": { + "php-http/discovery": true, + "symfony/flex": true, + "symfony/runtime": true + }, + "bump-after-update": true, + "sort-packages": true + }, + "autoload": { + "psr-4": { + "App\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "App\\Tests\\": "tests/" + } + }, + "replace": { + "symfony/polyfill-ctype": "*", + "symfony/polyfill-iconv": "*", + "symfony/polyfill-php72": "*", + "symfony/polyfill-php73": "*", + "symfony/polyfill-php74": "*", + "symfony/polyfill-php80": "*", + "symfony/polyfill-php81": "*", + "symfony/polyfill-php82": "*" + }, + "scripts": { + "auto-scripts": { + "cache:clear": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd" + }, + "post-install-cmd": [ + "@auto-scripts" + ], + "post-update-cmd": [ + "@auto-scripts" + ] + }, + "conflict": { + "symfony/symfony": "*" + }, + "extra": { + "symfony": { + "allow-contrib": false, + "require": "7.4.*" + } + } +} diff --git a/backend/composer.lock b/backend/composer.lock new file mode 100644 index 0000000..21e0bb6 --- /dev/null +++ b/backend/composer.lock @@ -0,0 +1,4892 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "302dc01f3badc792a45bd0fe6fc7a796", + "packages": [ + { + "name": "doctrine/collections", + "version": "2.6.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "7713da39d8e237f28411d6a616a3dce5e20d5de2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/7713da39d8e237f28411d6a616a3dce5e20d5de2", + "reference": "7713da39d8e237f28411d6a616a3dce5e20d5de2", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1", + "php": "^8.1", + "symfony/polyfill-php84": "^1.30" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "ext-json": "*", + "phpstan/phpstan": "^2.1.30", + "phpstan/phpstan-phpunit": "^2.0.7", + "phpunit/phpunit": "^10.5.58 || ^11.5.42 || ^12.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Collections\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", + "homepage": "https://www.doctrine-project.org/projects/collections.html", + "keywords": [ + "array", + "collections", + "iterators", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/collections/issues", + "source": "https://github.com/doctrine/collections/tree/2.6.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcollections", + "type": "tidelift" + } + ], + "time": "2026-01-15T10:01:58+00:00" + }, + { + "name": "doctrine/dbal", + "version": "4.4.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "61e730f1658814821a85f2402c945f3883407dec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/61e730f1658814821a85f2402c945f3883407dec", + "reference": "61e730f1658814821a85f2402c945f3883407dec", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.1.5", + "php": "^8.2", + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" + }, + "require-dev": { + "doctrine/coding-standard": "14.0.0", + "fig/log-test": "^1", + "jetbrains/phpstorm-stubs": "2023.2", + "phpstan/phpstan": "2.1.30", + "phpstan/phpstan-phpunit": "2.0.7", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "11.5.50", + "slevomat/coding-standard": "8.27.1", + "squizlabs/php_codesniffer": "4.0.1", + "symfony/cache": "^6.3.8|^7.0|^8.0", + "symfony/console": "^5.4|^6.3|^7.0|^8.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\DBAL\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", + "keywords": [ + "abstraction", + "database", + "db2", + "dbal", + "mariadb", + "mssql", + "mysql", + "oci8", + "oracle", + "pdo", + "pgsql", + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "support": { + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/4.4.3" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2026-03-20T08:52:12+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.6", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<=7.5 || >=14" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^12 || ^14", + "phpstan/phpstan": "1.4.10 || 2.1.30", + "phpstan/phpstan-phpunit": "^1.0 || ^2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12.4 || ^13.0", + "psr/log": "^1 || ^2 || ^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.6" + }, + "time": "2026-02-07T07:09:04+00:00" + }, + { + "name": "doctrine/doctrine-bundle", + "version": "2.18.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineBundle.git", + "reference": "0ff098b29b8b3c68307c8987dcaed7fd829c6546" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/0ff098b29b8b3c68307c8987dcaed7fd829c6546", + "reference": "0ff098b29b8b3c68307c8987dcaed7fd829c6546", + "shasum": "" + }, + "require": { + "doctrine/dbal": "^3.7.0 || ^4.0", + "doctrine/deprecations": "^1.0", + "doctrine/persistence": "^3.1 || ^4", + "doctrine/sql-formatter": "^1.0.1", + "php": "^8.1", + "symfony/cache": "^6.4 || ^7.0", + "symfony/config": "^6.4 || ^7.0", + "symfony/console": "^6.4 || ^7.0", + "symfony/dependency-injection": "^6.4 || ^7.0", + "symfony/doctrine-bridge": "^6.4.3 || ^7.0.3", + "symfony/framework-bundle": "^6.4 || ^7.0", + "symfony/service-contracts": "^2.5 || ^3" + }, + "conflict": { + "doctrine/annotations": ">=3.0", + "doctrine/cache": "< 1.11", + "doctrine/orm": "<2.17 || >=4.0", + "symfony/var-exporter": "< 6.4.1 || 7.0.0", + "twig/twig": "<2.13 || >=3.0 <3.0.4" + }, + "require-dev": { + "doctrine/annotations": "^1 || ^2", + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^14", + "doctrine/orm": "^2.17 || ^3.1", + "friendsofphp/proxy-manager-lts": "^1.0", + "phpstan/phpstan": "2.1.1", + "phpstan/phpstan-phpunit": "2.0.3", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.53 || ^12.3.10", + "psr/log": "^1.1.4 || ^2.0 || ^3.0", + "symfony/doctrine-messenger": "^6.4 || ^7.0", + "symfony/expression-language": "^6.4 || ^7.0", + "symfony/messenger": "^6.4 || ^7.0", + "symfony/property-info": "^6.4 || ^7.0", + "symfony/security-bundle": "^6.4 || ^7.0", + "symfony/stopwatch": "^6.4 || ^7.0", + "symfony/string": "^6.4 || ^7.0", + "symfony/twig-bridge": "^6.4 || ^7.0", + "symfony/validator": "^6.4 || ^7.0", + "symfony/var-exporter": "^6.4.1 || ^7.0.1", + "symfony/web-profiler-bundle": "^6.4 || ^7.0", + "symfony/yaml": "^6.4 || ^7.0", + "twig/twig": "^2.14.7 || ^3.0.4" + }, + "suggest": { + "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", + "ext-pdo": "*", + "symfony/web-profiler-bundle": "To use the data collector." + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Doctrine Project", + "homepage": "https://www.doctrine-project.org/" + } + ], + "description": "Symfony DoctrineBundle", + "homepage": "https://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "orm", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/DoctrineBundle/issues", + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.18.2" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdoctrine-bundle", + "type": "tidelift" + } + ], + "time": "2025-12-20T21:35:32+00:00" + }, + { + "name": "doctrine/doctrine-migrations-bundle", + "version": "3.7.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git", + "reference": "1e380c6dd8ac8488217f39cff6b77e367f1a644b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/1e380c6dd8ac8488217f39cff6b77e367f1a644b", + "reference": "1e380c6dd8ac8488217f39cff6b77e367f1a644b", + "shasum": "" + }, + "require": { + "doctrine/doctrine-bundle": "^2.4 || ^3.0", + "doctrine/migrations": "^3.2", + "php": "^7.2 || ^8.0", + "symfony/deprecation-contracts": "^2.1 || ^3", + "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/semver": "^3.0", + "doctrine/coding-standard": "^12 || ^14", + "doctrine/orm": "^2.6 || ^3", + "phpstan/phpstan": "^1.4 || ^2", + "phpstan/phpstan-deprecation-rules": "^1 || ^2", + "phpstan/phpstan-phpunit": "^1 || ^2", + "phpstan/phpstan-strict-rules": "^1.1 || ^2", + "phpstan/phpstan-symfony": "^1.3 || ^2", + "phpunit/phpunit": "^8.5 || ^9.5", + "symfony/phpunit-bridge": "^6.3 || ^7 || ^8", + "symfony/var-exporter": "^5.4 || ^6 || ^7 || ^8" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\MigrationsBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Doctrine Project", + "homepage": "https://www.doctrine-project.org" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DoctrineMigrationsBundle", + "homepage": "https://www.doctrine-project.org", + "keywords": [ + "dbal", + "migrations", + "schema" + ], + "support": { + "issues": "https://github.com/doctrine/DoctrineMigrationsBundle/issues", + "source": "https://github.com/doctrine/DoctrineMigrationsBundle/tree/3.7.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdoctrine-migrations-bundle", + "type": "tidelift" + } + ], + "time": "2025-11-15T19:02:59+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "dda33921b198841ca8dbad2eaa5d4d34769d18cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/dda33921b198841ca8dbad2eaa5d4d34769d18cf", + "reference": "dda33921b198841ca8dbad2eaa5d4d34769d18cf", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "conflict": { + "doctrine/common": "<2.9" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "phpdocumentor/guides-cli": "^1.4", + "phpstan/phpstan": "^2.1.32", + "phpunit/phpunit": "^10.5.58" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/2.1.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2026-01-29T07:11:08+00:00" + }, + { + "name": "doctrine/inflector", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "6d6c96277ea252fc1304627204c3d5e6e15faa3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/6d6c96277ea252fc1304627204c3d5e6e15faa3b", + "reference": "6d6c96277ea252fc1304627204c3d5e6e15faa3b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^12.0 || ^13.0", + "phpstan/phpstan": "^1.12 || ^2.0", + "phpstan/phpstan-phpunit": "^1.4 || ^2.0", + "phpstan/phpstan-strict-rules": "^1.6 || ^2.0", + "phpunit/phpunit": "^8.5 || ^12.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.1.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2025-08-10T19:31:58+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:23:10+00:00" + }, + { + "name": "doctrine/lexer", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.21" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2024-02-05T11:56:58+00:00" + }, + { + "name": "doctrine/migrations", + "version": "3.9.6", + "source": { + "type": "git", + "url": "https://github.com/doctrine/migrations.git", + "reference": "ffd8355cdd8505fc650d9604f058bf62aedd80a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/migrations/zipball/ffd8355cdd8505fc650d9604f058bf62aedd80a1", + "reference": "ffd8355cdd8505fc650d9604f058bf62aedd80a1", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2", + "doctrine/dbal": "^3.6 || ^4", + "doctrine/deprecations": "^0.5.3 || ^1", + "doctrine/event-manager": "^1.2 || ^2.0", + "php": "^8.1", + "psr/log": "^1.1.3 || ^2 || ^3", + "symfony/console": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/var-exporter": "^6.2 || ^7.0 || ^8.0" + }, + "conflict": { + "doctrine/orm": "<2.12 || >=4" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "doctrine/orm": "^2.13 || ^3", + "doctrine/persistence": "^2 || ^3 || ^4", + "doctrine/sql-formatter": "^1.0", + "ext-pdo_sqlite": "*", + "fig/log-test": "^1", + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-phpunit": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpstan/phpstan-symfony": "^2", + "phpunit/phpunit": "^10.3 || ^11.0 || ^12.0", + "symfony/cache": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/process": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0 || ^8.0" + }, + "suggest": { + "doctrine/sql-formatter": "Allows to generate formatted SQL with the diff command.", + "symfony/yaml": "Allows the use of yaml for migration configuration files." + }, + "bin": [ + "bin/doctrine-migrations" + ], + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Migrations\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Michael Simonson", + "email": "contact@mikesimonson.com" + } + ], + "description": "PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.", + "homepage": "https://www.doctrine-project.org/projects/migrations.html", + "keywords": [ + "database", + "dbal", + "migrations" + ], + "support": { + "issues": "https://github.com/doctrine/migrations/issues", + "source": "https://github.com/doctrine/migrations/tree/3.9.6" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fmigrations", + "type": "tidelift" + } + ], + "time": "2026-02-11T06:46:11+00:00" + }, + { + "name": "doctrine/orm", + "version": "3.6.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/orm.git", + "reference": "4262eb495b4d2a53b45de1ac58881e0091f2970f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/orm/zipball/4262eb495b4d2a53b45de1ac58881e0091f2970f", + "reference": "4262eb495b4d2a53b45de1ac58881e0091f2970f", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2", + "doctrine/collections": "^2.2", + "doctrine/dbal": "^3.8.2 || ^4", + "doctrine/deprecations": "^0.5.3 || ^1", + "doctrine/event-manager": "^1.2 || ^2", + "doctrine/inflector": "^1.4 || ^2.0", + "doctrine/instantiator": "^1.3 || ^2", + "doctrine/lexer": "^3", + "doctrine/persistence": "^3.3.1 || ^4", + "ext-ctype": "*", + "php": "^8.1", + "psr/cache": "^1 || ^2 || ^3", + "symfony/console": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/var-exporter": "^6.3.9 || ^7.0 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^14.0", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "2.1.23", + "phpstan/phpstan-deprecation-rules": "^2", + "phpunit/phpunit": "^10.5.0 || ^11.5", + "psr/log": "^1 || ^2 || ^3", + "symfony/cache": "^5.4 || ^6.2 || ^7.0 || ^8.0" + }, + "suggest": { + "ext-dom": "Provides support for XSD validation for XML mapping files", + "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\ORM\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Object-Relational-Mapper for PHP", + "homepage": "https://www.doctrine-project.org/projects/orm.html", + "keywords": [ + "database", + "orm" + ], + "support": { + "issues": "https://github.com/doctrine/orm/issues", + "source": "https://github.com/doctrine/orm/tree/3.6.2" + }, + "time": "2026-01-30T21:41:41+00:00" + }, + { + "name": "doctrine/persistence", + "version": "4.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/persistence.git", + "reference": "b9c49ad3558bb77ef973f4e173f2e9c2eca9be09" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/b9c49ad3558bb77ef973f4e173f2e9c2eca9be09", + "reference": "b9c49ad3558bb77ef973f4e173f2e9c2eca9be09", + "shasum": "" + }, + "require": { + "doctrine/event-manager": "^1 || ^2", + "php": "^8.1", + "psr/cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "phpstan/phpstan": "2.1.30", + "phpstan/phpstan-phpunit": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.58 || ^12", + "symfony/cache": "^4.4 || ^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^4.4 || ^5.4 || ^6.0 || ^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Persistence\\": "src/Persistence" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", + "homepage": "https://www.doctrine-project.org/projects/persistence.html", + "keywords": [ + "mapper", + "object", + "odm", + "orm", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/persistence/issues", + "source": "https://github.com/doctrine/persistence/tree/4.1.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fpersistence", + "type": "tidelift" + } + ], + "time": "2025-10-16T20:13:18+00:00" + }, + { + "name": "doctrine/sql-formatter", + "version": "1.5.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/sql-formatter.git", + "reference": "9563949f5cd3bd12a17d12fb980528bc141c5806" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/9563949f5cd3bd12a17d12fb980528bc141c5806", + "reference": "9563949f5cd3bd12a17d12fb980528bc141c5806", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "ergebnis/phpunit-slow-test-detector": "^2.20", + "phpstan/phpstan": "^2.1.31", + "phpunit/phpunit": "^10.5.58" + }, + "bin": [ + "bin/sql-formatter" + ], + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\SqlFormatter\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Dorn", + "email": "jeremy@jeremydorn.com", + "homepage": "https://jeremydorn.com/" + } + ], + "description": "a PHP SQL highlighting library", + "homepage": "https://github.com/doctrine/sql-formatter/", + "keywords": [ + "highlight", + "sql" + ], + "support": { + "issues": "https://github.com/doctrine/sql-formatter/issues", + "source": "https://github.com/doctrine/sql-formatter/tree/1.5.4" + }, + "time": "2026-02-08T16:21:46+00:00" + }, + { + "name": "nelmio/cors-bundle", + "version": "2.6.1", + "source": { + "type": "git", + "url": "https://github.com/nelmio/NelmioCorsBundle.git", + "reference": "3d80dbcd5d1eb5f8b20ed5199e1778d44c2e4d1c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/3d80dbcd5d1eb5f8b20ed5199e1778d44c2e4d1c", + "reference": "3d80dbcd5d1eb5f8b20ed5199e1778d44c2e4d1c", + "shasum": "" + }, + "require": { + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.11.5", + "phpstan/phpstan-deprecation-rules": "^1.2.0", + "phpstan/phpstan-phpunit": "^1.4", + "phpstan/phpstan-symfony": "^1.4.4", + "phpunit/phpunit": "^8" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Nelmio\\CorsBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nelmio", + "homepage": "http://nelm.io" + }, + { + "name": "Symfony Community", + "homepage": "https://github.com/nelmio/NelmioCorsBundle/contributors" + } + ], + "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application", + "keywords": [ + "api", + "cors", + "crossdomain" + ], + "support": { + "issues": "https://github.com/nelmio/NelmioCorsBundle/issues", + "source": "https://github.com/nelmio/NelmioCorsBundle/tree/2.6.1" + }, + "time": "2026-01-12T15:59:08+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "6.0.3", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "7bae67520aa9f5ecc506d646810bd40d9da54582" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/7bae67520aa9f5ecc506d646810bd40d9da54582", + "reference": "7bae67520aa9f5ecc506d646810bd40d9da54582", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.1", + "ext-filter": "*", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^2.0", + "phpstan/phpdoc-parser": "^2.0", + "webmozart/assert": "^1.9.1 || ^2" + }, + "require-dev": { + "mockery/mockery": "~1.3.5 || ~1.6.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "psalm/phar": "^5.26", + "shipmonk/dead-code-detector": "^0.5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/6.0.3" + }, + "time": "2026-03-18T20:49:53+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/327a05bbee54120d4786a0dc67aad30226ad4cf9", + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psalm/phar": "^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev", + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/2.0.0" + }, + "time": "2026-01-06T21:53:42+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "2.3.2", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a004701b11273a26cd7955a61d67a7f1e525a45a", + "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^5.3.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.2" + }, + "time": "2026-01-25T14:56:51+00:00" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+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/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.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/3.0.2" + }, + "time": "2024-09-11T13:17:53+00:00" + }, + { + "name": "symfony/cache", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache.git", + "reference": "665522ec357540e66c294c08583b40ee576574f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache/zipball/665522ec357540e66c294c08583b40ee576574f0", + "reference": "665522ec357540e66c294c08583b40ee576574f0", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/cache": "^2.0|^3.0", + "psr/log": "^1.1|^2|^3", + "symfony/cache-contracts": "^3.6", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^2.5|^3", + "symfony/var-exporter": "^6.4|^7.0|^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.6", + "ext-redis": "<6.1", + "ext-relay": "<0.12.1", + "symfony/dependency-injection": "<6.4", + "symfony/http-kernel": "<6.4", + "symfony/var-dumper": "<6.4" + }, + "provide": { + "psr/cache-implementation": "2.0|3.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0", + "symfony/cache-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/dbal": "^3.6|^4", + "predis/predis": "^1.1|^2.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/filesystem": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Cache\\": "" + }, + "classmap": [ + "Traits/ValueWrapper.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], + "support": { + "source": "https://github.com/symfony/cache/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-06T08:14:57+00:00" + }, + { + "name": "symfony/cache-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache-contracts.git", + "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/5d68a57d66910405e5c0b63d6f0af941e66fc868", + "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/cache": "^3.0" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Cache\\": "" + } + }, + "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": "Generic abstractions related to caching", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/cache-contracts/tree/v3.6.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": "2025-03-13T15:25:07+00:00" + }, + { + "name": "symfony/config", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/6c17162555bfb58957a55bb0e43e00035b6ae3d5", + "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^7.1|^8.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "require-dev": { + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "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": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-06T10:41:14+00:00" + }, + { + "name": "symfony/console", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "e1e6770440fb9c9b0cf725f81d1361ad1835329d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/e1e6770440fb9c9b0cf725f81d1361ad1835329d", + "reference": "e1e6770440fb9c9b0cf725f81d1361ad1835329d", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^7.2|^8.0" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-06T14:06:20+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db", + "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^3.6", + "symfony/var-exporter": "^6.4.20|^7.2.5|^8.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2", + "symfony/config": "<6.4", + "symfony/finder": "<6.4", + "symfony/yaml": "<6.4" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "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": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-03T07:48:48+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "files": [ + "function.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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.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": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/doctrine-bridge", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/doctrine-bridge.git", + "reference": "4fc5e2dd41be3c0b6321e0373072782edeff45ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/4fc5e2dd41be3c0b6321e0373072782edeff45ed", + "reference": "4fc5e2dd41be3c0b6321e0373072782edeff45ed", + "shasum": "" + }, + "require": { + "doctrine/event-manager": "^2", + "doctrine/persistence": "^3.1|^4", + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "doctrine/collections": "<1.8", + "doctrine/dbal": "<3.6", + "doctrine/lexer": "<1.1", + "doctrine/orm": "<2.15", + "symfony/cache": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/form": "<6.4.6|>=7,<7.0.6", + "symfony/http-foundation": "<6.4", + "symfony/http-kernel": "<6.4", + "symfony/lock": "<6.4", + "symfony/messenger": "<6.4", + "symfony/property-info": "<6.4", + "symfony/security-bundle": "<6.4", + "symfony/security-core": "<6.4", + "symfony/validator": "<7.4" + }, + "require-dev": { + "doctrine/collections": "^1.8|^2.0", + "doctrine/data-fixtures": "^1.1|^2", + "doctrine/dbal": "^3.6|^4", + "doctrine/orm": "^2.15|^3", + "psr/log": "^1|^2|^3", + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/doctrine-messenger": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/form": "^7.2|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/security-core": "^6.4|^7.0|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/translation": "^6.4|^7.0|^8.0", + "symfony/type-info": "^7.1.8|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", + "symfony/validator": "^7.4|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "type": "symfony-bridge", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Doctrine\\": "" + }, + "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 integration for Doctrine with various Symfony components", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/doctrine-bridge/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-05T08:16:50+00:00" + }, + { + "name": "symfony/dotenv", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/dotenv.git", + "reference": "7e5529a0b02395cb4614cdf507495a4cef3115c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/7e5529a0b02395cb4614cdf507495a4cef3115c5", + "reference": "7e5529a0b02395cb4614cdf507495a4cef3115c5", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "conflict": { + "symfony/console": "<6.4", + "symfony/process": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.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/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-03T07:48:48+00:00" + }, + { + "name": "symfony/error-handler", + "version": "v7.4.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "8da531f364ddfee53e36092a7eebbbd0b775f6b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/8da531f364ddfee53e36092a7eebbbd0b775f6b8", + "reference": "8da531f364ddfee53e36092a7eebbbd0b775f6b8", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/polyfill-php85": "^1.32", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "conflict": { + "symfony/deprecation-contracts": "<2.5", + "symfony/http-kernel": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4|^7.0|^8.0", + "symfony/webpack-encore-bundle": "^1.0|^2.0" + }, + "bin": [ + "Resources/bin/patch-type-declarations" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "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 tools to manage errors and ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v7.4.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-01-20T16:42:42+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v7.4.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "dc2c0eba1af673e736bb851d747d266108aea746" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/dc2c0eba1af673e736bb851d747d266108aea746", + "reference": "dc2c0eba1af673e736bb851d747d266108aea746", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/framework-bundle": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "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 tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v7.4.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-01-05T11:45:34+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "59eb412e93815df44f05f342958efa9f46b1e586" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", + "reference": "59eb412e93815df44f05f342958efa9f46b1e586", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "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": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.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": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v7.4.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3ebc794fa5315e59fd122561623c2e2e4280538e", + "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^6.4|^7.0|^8.0" + }, + "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/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-02-25T16:50:00+00:00" + }, + { + "name": "symfony/finder", + "version": "v7.4.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "8655bf1076b7a3a346cb11413ffdabff50c7ffcf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/8655bf1076b7a3a346cb11413ffdabff50c7ffcf", + "reference": "8655bf1076b7a3a346cb11413ffdabff50c7ffcf", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "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": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-01-29T09:40:50+00:00" + }, + { + "name": "symfony/flex", + "version": "v2.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/flex.git", + "reference": "9cd384775973eabbf6e8b05784dda279fc67c28d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/flex/zipball/9cd384775973eabbf6e8b05784dda279fc67c28d", + "reference": "9cd384775973eabbf6e8b05784dda279fc67c28d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.1", + "php": ">=8.1" + }, + "conflict": { + "composer/semver": "<1.7.2", + "symfony/dotenv": "<5.4" + }, + "require-dev": { + "composer/composer": "^2.1", + "symfony/dotenv": "^6.4|^7.4|^8.0", + "symfony/filesystem": "^6.4|^7.4|^8.0", + "symfony/phpunit-bridge": "^6.4|^7.4|^8.0", + "symfony/process": "^6.4|^7.4|^8.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Symfony\\Flex\\Flex" + }, + "autoload": { + "psr-4": { + "Symfony\\Flex\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "Composer plugin for Symfony", + "support": { + "issues": "https://github.com/symfony/flex/issues", + "source": "https://github.com/symfony/flex/tree/v2.10.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-11-16T09:38:19+00:00" + }, + { + "name": "symfony/framework-bundle", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/framework-bundle.git", + "reference": "c94bc78c85d76af67918404a95d44940f66a7c2f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/c94bc78c85d76af67918404a95d44940f66a7c2f", + "reference": "c94bc78c85d76af67918404a95d44940f66a7c2f", + "shasum": "" + }, + "require": { + "composer-runtime-api": ">=2.1", + "ext-xml": "*", + "php": ">=8.2", + "symfony/cache": "^6.4.12|^7.0|^8.0", + "symfony/config": "^7.4.4|^8.0.4", + "symfony/dependency-injection": "^7.4.4|^8.0.4", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^7.3|^8.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/filesystem": "^7.1|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php85": "^1.32", + "symfony/routing": "^7.4|^8.0" + }, + "conflict": { + "doctrine/persistence": "<1.3", + "phpdocumentor/reflection-docblock": "<5.2|>=7", + "phpdocumentor/type-resolver": "<1.5.1", + "symfony/asset": "<6.4", + "symfony/asset-mapper": "<6.4", + "symfony/clock": "<6.4", + "symfony/console": "<6.4", + "symfony/dom-crawler": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/form": "<7.4", + "symfony/http-client": "<6.4", + "symfony/lock": "<6.4", + "symfony/mailer": "<6.4", + "symfony/messenger": "<7.4", + "symfony/mime": "<6.4", + "symfony/property-access": "<6.4", + "symfony/property-info": "<6.4", + "symfony/runtime": "<6.4.13|>=7.0,<7.1.6", + "symfony/scheduler": "<6.4.4|>=7.0.0,<7.0.4", + "symfony/security-core": "<6.4", + "symfony/security-csrf": "<7.2", + "symfony/serializer": "<7.2.5", + "symfony/stopwatch": "<6.4", + "symfony/translation": "<7.3", + "symfony/twig-bridge": "<6.4", + "symfony/twig-bundle": "<6.4", + "symfony/validator": "<6.4", + "symfony/web-profiler-bundle": "<6.4", + "symfony/webhook": "<7.2", + "symfony/workflow": "<7.4" + }, + "require-dev": { + "doctrine/persistence": "^1.3|^2|^3", + "dragonmantank/cron-expression": "^3.1", + "phpdocumentor/reflection-docblock": "^5.2|^6.0", + "seld/jsonlint": "^1.10", + "symfony/asset": "^6.4|^7.0|^8.0", + "symfony/asset-mapper": "^6.4|^7.0|^8.0", + "symfony/browser-kit": "^6.4|^7.0|^8.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/css-selector": "^6.4|^7.0|^8.0", + "symfony/dom-crawler": "^6.4|^7.0|^8.0", + "symfony/dotenv": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/form": "^7.4|^8.0", + "symfony/html-sanitizer": "^6.4|^7.0|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/json-streamer": "^7.3|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/mailer": "^6.4|^7.0|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/notifier": "^6.4|^7.0|^8.0", + "symfony/object-mapper": "^7.3|^8.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/rate-limiter": "^6.4|^7.0|^8.0", + "symfony/runtime": "^6.4.13|^7.1.6|^8.0", + "symfony/scheduler": "^6.4.4|^7.0.4|^8.0", + "symfony/security-bundle": "^6.4|^7.0|^8.0", + "symfony/semaphore": "^6.4|^7.0|^8.0", + "symfony/serializer": "^7.2.5|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/string": "^6.4|^7.0|^8.0", + "symfony/translation": "^7.3|^8.0", + "symfony/twig-bundle": "^6.4|^7.0|^8.0", + "symfony/type-info": "^7.1.8|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", + "symfony/validator": "^7.4|^8.0", + "symfony/web-link": "^6.4|^7.0|^8.0", + "symfony/webhook": "^7.2|^8.0", + "symfony/workflow": "^7.4|^8.0", + "symfony/yaml": "^7.3|^8.0", + "twig/twig": "^3.12" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\FrameworkBundle\\": "" + }, + "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 a tight integration between Symfony components and the Symfony full-stack framework", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/framework-bundle/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-06T15:39:55+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "f94b3e7b7dafd40e666f0c9ff2084133bae41e81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f94b3e7b7dafd40e666f0c9ff2084133bae41e81", + "reference": "f94b3e7b7dafd40e666f0c9ff2084133bae41e81", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "^1.1" + }, + "conflict": { + "doctrine/dbal": "<3.6", + "symfony/cache": "<6.4.12|>=7.0,<7.1.5" + }, + "require-dev": { + "doctrine/dbal": "^3.6|^4", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^6.4.12|^7.1.5|^8.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/rate-limiter": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "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": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-06T13:15:18+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "3b3fcf386c809be990c922e10e4c620d6367cab1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/3b3fcf386c809be990c922e10e4c620d6367cab1", + "reference": "3b3fcf386c809be990c922e10e4c620d6367cab1", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^7.3|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/browser-kit": "<6.4", + "symfony/cache": "<6.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/doctrine-bridge": "<6.4", + "symfony/flex": "<2.10", + "symfony/form": "<6.4", + "symfony/http-client": "<6.4", + "symfony/http-client-contracts": "<2.5", + "symfony/mailer": "<6.4", + "symfony/messenger": "<6.4", + "symfony/translation": "<6.4", + "symfony/translation-contracts": "<2.5", + "symfony/twig-bridge": "<6.4", + "symfony/validator": "<6.4", + "symfony/var-dumper": "<6.4", + "twig/twig": "<3.12" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^6.4|^7.0|^8.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/css-selector": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4.1|^7.0.1|^8.0", + "symfony/dom-crawler": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/http-client-contracts": "^2.5|^3", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/property-access": "^7.1|^8.0", + "symfony/routing": "^6.4|^7.0|^8.0", + "symfony/serializer": "^7.1|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/translation": "^6.4|^7.0|^8.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/uid": "^6.4|^7.0|^8.0", + "symfony/validator": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0", + "symfony/var-exporter": "^6.4|^7.0|^8.0", + "twig/twig": "^3.12" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "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 a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-06T16:33:18+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-06-27T09:58:17+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "3833d7255cc303546435cb650316bff708a1c75c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "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 for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-23T08:48:59+00:00" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5", + "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + }, + "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.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-07-08T02:45:35+00:00" + }, + { + "name": "symfony/polyfill-php84", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php84.git", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/d8ced4d875142b6a7426000426b8abc631d6b191", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php84\\": "" + }, + "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.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php84/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-06-24T13:30:11+00:00" + }, + { + "name": "symfony/polyfill-php85", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php85.git", + "reference": "d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91", + "reference": "d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php85\\": "" + }, + "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.5+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php85/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-06-23T16:12:55+00:00" + }, + { + "name": "symfony/property-access", + "version": "v7.4.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-access.git", + "reference": "fa49bf1ca8fce1ba0e2dba4e4658554cfb9364b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-access/zipball/fa49bf1ca8fce1ba0e2dba4e4658554cfb9364b1", + "reference": "fa49bf1ca8fce1ba0e2dba4e4658554cfb9364b1", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/property-info": "^6.4.32|~7.3.10|^7.4.4|^8.0.4" + }, + "require-dev": { + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/var-exporter": "^6.4.1|^7.0.1|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyAccess\\": "" + }, + "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 functions to read and write from/to an object or array using a simple string notation", + "homepage": "https://symfony.com", + "keywords": [ + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property-path", + "reflection" + ], + "support": { + "source": "https://github.com/symfony/property-access/tree/v7.4.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-01-05T08:47:25+00:00" + }, + { + "name": "symfony/property-info", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-info.git", + "reference": "02501d75fd834345da3ecdd8e3200ced39e370f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-info/zipball/02501d75fd834345da3ecdd8e3200ced39e370f8", + "reference": "02501d75fd834345da3ecdd8e3200ced39e370f8", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/string": "^6.4|^7.0|^8.0", + "symfony/type-info": "^7.4.7|^8.0.7" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<5.2|>=7", + "phpdocumentor/type-resolver": "<1.5.1", + "symfony/cache": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/serializer": "<6.4" + }, + "require-dev": { + "phpdocumentor/reflection-docblock": "^5.2|^6.0", + "phpstan/phpdoc-parser": "^1.0|^2.0", + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyInfo\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kévin Dunglas", + "email": "dunglas@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Extracts information about PHP class' properties using metadata of popular sources", + "homepage": "https://symfony.com", + "keywords": [ + "doctrine", + "phpdoc", + "property", + "symfony", + "type", + "validator" + ], + "support": { + "source": "https://github.com/symfony/property-info/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-04T15:53:26+00:00" + }, + { + "name": "symfony/routing", + "version": "v7.4.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "238d749c56b804b31a9bf3e26519d93b65a60938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/238d749c56b804b31a9bf3e26519d93b65a60938", + "reference": "238d749c56b804b31a9bf3e26519d93b65a60938", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/config": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/yaml": "<6.4" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "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": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-02-25T16:50:00+00:00" + }, + { + "name": "symfony/runtime", + "version": "v7.4.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/runtime.git", + "reference": "876f902a6cb6b26c003de244188c06b2ba1c172f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/runtime/zipball/876f902a6cb6b26c003de244188c06b2ba1c172f", + "reference": "876f902a6cb6b26c003de244188c06b2ba1c172f", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0|^2.0", + "php": ">=8.2" + }, + "conflict": { + "symfony/dotenv": "<6.4" + }, + "require-dev": { + "composer/composer": "^2.6", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/dotenv": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Symfony\\Component\\Runtime\\Internal\\ComposerPlugin" + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Runtime\\": "", + "Symfony\\Runtime\\Symfony\\Component\\": "Internal/" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Enables decoupling PHP applications from global state", + "homepage": "https://symfony.com", + "keywords": [ + "runtime" + ], + "support": { + "source": "https://github.com/symfony/runtime/tree/v7.4.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-12-05T14:04:53+00:00" + }, + { + "name": "symfony/serializer", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/serializer.git", + "reference": "bd395bbc6fabd136a48e1a6f91b09f88b5050b0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/serializer/zipball/bd395bbc6fabd136a48e1a6f91b09f88b5050b0b", + "reference": "bd395bbc6fabd136a48e1a6f91b09f88b5050b0b", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php84": "^1.30" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<5.2|>=7", + "phpdocumentor/type-resolver": "<1.5.1", + "symfony/dependency-injection": "<6.4", + "symfony/property-access": "<6.4", + "symfony/property-info": "<6.4", + "symfony/type-info": "<7.2.5", + "symfony/uid": "<6.4", + "symfony/validator": "<6.4", + "symfony/yaml": "<6.4" + }, + "require-dev": { + "phpdocumentor/reflection-docblock": "^5.2|^6.0", + "phpstan/phpdoc-parser": "^1.0|^2.0", + "seld/jsonlint": "^1.10", + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^7.2|^8.0", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/filesystem": "^6.4|^7.0|^8.0", + "symfony/form": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/type-info": "^7.2.5|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", + "symfony/validator": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0", + "symfony/var-exporter": "^6.4|^7.0|^8.0", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Serializer\\": "" + }, + "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": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/serializer/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-06T13:15:18+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.6.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "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": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-07-15T11:30:57+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v7.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "8a24af0a2e8a872fb745047180649b8418303084" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/8a24af0a2e8a872fb745047180649b8418303084", + "reference": "8a24af0a2e8a872fb745047180649b8418303084", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/service-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "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 a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v7.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-08-04T07:05:15+00:00" + }, + { + "name": "symfony/string", + "version": "v7.4.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "9f209231affa85aa930a5e46e6eb03381424b30b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/9f209231affa85aa930a5e46e6eb03381424b30b", + "reference": "9f209231affa85aa930a5e46e6eb03381424b30b", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.33", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/emoji": "^7.1|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/intl": "^6.4|^7.0|^8.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-02-09T09:33:46+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v3.6.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "65a8bc82080447fae78373aa10f8d13b38338977" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/65a8bc82080447fae78373aa10f8d13b38338977", + "reference": "65a8bc82080447fae78373aa10f8d13b38338977", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "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": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.6.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-07-15T13:41:35+00:00" + }, + { + "name": "symfony/type-info", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/type-info.git", + "reference": "31f1e40cbf7851c7354281c90eb1b352c4cb8269" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/type-info/zipball/31f1e40cbf7851c7354281c90eb1b352c4cb8269", + "reference": "31f1e40cbf7851c7354281c90eb1b352c4cb8269", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "phpstan/phpdoc-parser": "<1.30" + }, + "require-dev": { + "phpstan/phpdoc-parser": "^1.30|^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\TypeInfo\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mathias Arlaud", + "email": "mathias.arlaud@gmail.com" + }, + { + "name": "Baptiste LEDUC", + "email": "baptiste.leduc@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Extracts PHP types information.", + "homepage": "https://symfony.com", + "keywords": [ + "PHPStan", + "phpdoc", + "symfony", + "type" + ], + "support": { + "source": "https://github.com/symfony/type-info/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-04T12:49:16+00:00" + }, + { + "name": "symfony/validator", + "version": "v7.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/validator.git", + "reference": "3a1a460a9f8c5e5611e15c52c4baa5a62fa3c203" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/validator/zipball/3a1a460a9f8c5e5611e15c52c4baa5a62fa3c203", + "reference": "3a1a460a9f8c5e5611e15c52c4baa5a62fa3c203", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php83": "^1.27", + "symfony/translation-contracts": "^2.5|^3" + }, + "conflict": { + "doctrine/lexer": "<1.1", + "symfony/dependency-injection": "<6.4", + "symfony/doctrine-bridge": "<7.0", + "symfony/expression-language": "<6.4", + "symfony/http-kernel": "<6.4", + "symfony/intl": "<6.4", + "symfony/property-info": "<6.4", + "symfony/translation": "<6.4.3|>=7.0,<7.0.3", + "symfony/var-exporter": "<6.4.25|>=7.0,<7.3.3", + "symfony/yaml": "<6.4" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10|^3|^4", + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/intl": "^6.4|^7.0|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/string": "^6.4|^7.0|^8.0", + "symfony/translation": "^6.4.3|^7.0.3|^8.0", + "symfony/type-info": "^7.1.8", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Validator\\": "" + }, + "exclude-from-classmap": [ + "/Tests/", + "/Resources/bin/" + ] + }, + "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 tools to validate values", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/validator/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-06T11:10:17+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v7.4.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "045321c440ac18347b136c63d2e9bf28a2dc0291" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/045321c440ac18347b136c63d2e9bf28a2dc0291", + "reference": "045321c440ac18347b136c63d2e9bf28a2dc0291", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/console": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", + "twig/twig": "^3.12" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-02-15T10:53:20+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v7.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "03a60f169c79a28513a78c967316fbc8bf17816f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/03a60f169c79a28513a78c967316fbc8bf17816f", + "reference": "03a60f169c79a28513a78c967316fbc8bf17816f", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "require-dev": { + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v7.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-09-11T10:15:23+00:00" + }, + { + "name": "symfony/yaml", + "version": "v7.4.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "58751048de17bae71c5aa0d13cb19d79bca26391" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/58751048de17bae71c5aa0d13cb19d79bca26391", + "reference": "58751048de17bae71c5aa0d13cb19d79bca26391", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "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": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-02-09T09:33:46+00:00" + }, + { + "name": "webmozart/assert", + "version": "2.1.6", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "ff31ad6efc62e66e518fbab1cde3453d389bcdc8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/ff31ad6efc62e66e518fbab1cde3453d389bcdc8", + "reference": "ff31ad6efc62e66e518fbab1cde3453d389bcdc8", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-date": "*", + "ext-filter": "*", + "php": "^8.2" + }, + "suggest": { + "ext-intl": "", + "ext-simplexml": "", + "ext-spl": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-feature/2-0": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Woody Gilk", + "email": "woody.gilk@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/2.1.6" + }, + "time": "2026-02-27T10:28:38+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": ">=8.2", + "ext-ctype": "*", + "ext-iconv": "*" + }, + "platform-dev": {}, + "plugin-api-version": "2.9.0" +} diff --git a/backend/config/bundles.php b/backend/config/bundles.php new file mode 100644 index 0000000..f23ec80 --- /dev/null +++ b/backend/config/bundles.php @@ -0,0 +1,8 @@ + ['all' => true], + Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], + Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], + Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], +]; diff --git a/backend/config/packages/cache.yaml b/backend/config/packages/cache.yaml new file mode 100644 index 0000000..6899b72 --- /dev/null +++ b/backend/config/packages/cache.yaml @@ -0,0 +1,19 @@ +framework: + cache: + # Unique name of your app: used to compute stable namespaces for cache keys. + #prefix_seed: your_vendor_name/app_name + + # The "app" cache stores to the filesystem by default. + # The data in this cache should persist between deploys. + # Other options include: + + # Redis + #app: cache.adapter.redis + #default_redis_provider: redis://localhost + + # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) + #app: cache.adapter.apcu + + # Namespaced pools use the above "app" backend by default + #pools: + #my.dedicated.cache: null diff --git a/backend/config/packages/doctrine.yaml b/backend/config/packages/doctrine.yaml new file mode 100644 index 0000000..25138b9 --- /dev/null +++ b/backend/config/packages/doctrine.yaml @@ -0,0 +1,54 @@ +doctrine: + dbal: + url: '%env(resolve:DATABASE_URL)%' + + # IMPORTANT: You MUST configure your server version, + # either here or in the DATABASE_URL env var (see .env file) + #server_version: '16' + + profiling_collect_backtrace: '%kernel.debug%' + use_savepoints: true + orm: + auto_generate_proxy_classes: true + enable_lazy_ghost_objects: true + report_fields_where_declared: true + validate_xml_mapping: true + naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware + identity_generation_preferences: + Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity + auto_mapping: true + mappings: + App: + type: attribute + is_bundle: false + dir: '%kernel.project_dir%/src/Entity' + prefix: 'App\Entity' + alias: App + controller_resolver: + auto_mapping: false + +when@test: + doctrine: + dbal: + # "TEST_TOKEN" is typically set by ParaTest + dbname_suffix: '_test%env(default::TEST_TOKEN)%' + +when@prod: + doctrine: + orm: + auto_generate_proxy_classes: false + proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies' + query_cache_driver: + type: pool + pool: doctrine.system_cache_pool + result_cache_driver: + type: pool + pool: doctrine.result_cache_pool + + framework: + cache: + pools: + doctrine.result_cache_pool: + adapter: cache.app + doctrine.system_cache_pool: + adapter: cache.system diff --git a/backend/config/packages/doctrine_migrations.yaml b/backend/config/packages/doctrine_migrations.yaml new file mode 100644 index 0000000..29231d9 --- /dev/null +++ b/backend/config/packages/doctrine_migrations.yaml @@ -0,0 +1,6 @@ +doctrine_migrations: + migrations_paths: + # namespace is arbitrary but should be different from App\Migrations + # as migrations classes should NOT be autoloaded + 'DoctrineMigrations': '%kernel.project_dir%/migrations' + enable_profiler: false diff --git a/backend/config/packages/framework.yaml b/backend/config/packages/framework.yaml new file mode 100644 index 0000000..7e1ee1f --- /dev/null +++ b/backend/config/packages/framework.yaml @@ -0,0 +1,15 @@ +# see https://symfony.com/doc/current/reference/configuration/framework.html +framework: + secret: '%env(APP_SECRET)%' + + # Note that the session will be started ONLY if you read or write from it. + session: true + + #esi: true + #fragments: true + +when@test: + framework: + test: true + session: + storage_factory_id: session.storage.factory.mock_file diff --git a/backend/config/packages/nelmio_cors.yaml b/backend/config/packages/nelmio_cors.yaml new file mode 100644 index 0000000..c766508 --- /dev/null +++ b/backend/config/packages/nelmio_cors.yaml @@ -0,0 +1,10 @@ +nelmio_cors: + defaults: + origin_regex: true + allow_origin: ['%env(CORS_ALLOW_ORIGIN)%'] + allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE'] + allow_headers: ['Content-Type', 'Authorization'] + expose_headers: ['Link'] + max_age: 3600 + paths: + '^/': null diff --git a/backend/config/packages/property_info.yaml b/backend/config/packages/property_info.yaml new file mode 100644 index 0000000..dd31b9d --- /dev/null +++ b/backend/config/packages/property_info.yaml @@ -0,0 +1,3 @@ +framework: + property_info: + with_constructor_extractor: true diff --git a/backend/config/packages/routing.yaml b/backend/config/packages/routing.yaml new file mode 100644 index 0000000..0f34f87 --- /dev/null +++ b/backend/config/packages/routing.yaml @@ -0,0 +1,10 @@ +framework: + router: + # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. + # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands + default_uri: '%env(DEFAULT_URI)%' + +when@prod: + framework: + router: + strict_requirements: null diff --git a/backend/config/packages/validator.yaml b/backend/config/packages/validator.yaml new file mode 100644 index 0000000..dd47a6a --- /dev/null +++ b/backend/config/packages/validator.yaml @@ -0,0 +1,11 @@ +framework: + validation: + # Enables validator auto-mapping support. + # For instance, basic validation constraints will be inferred from Doctrine's metadata. + #auto_mapping: + # App\Entity\: [] + +when@test: + framework: + validation: + not_compromised_password: false diff --git a/backend/config/preload.php b/backend/config/preload.php new file mode 100644 index 0000000..5ebcdb2 --- /dev/null +++ b/backend/config/preload.php @@ -0,0 +1,5 @@ + [ + * 'App\\' => [ + * 'resource' => '../src/', + * ], + * ], + * ]); + * ``` + * + * @psalm-type ImportsConfig = list + * @psalm-type ParametersConfig = array|Param|null>|Param|null> + * @psalm-type ArgumentsType = list|array + * @psalm-type CallType = array|array{0:string, 1?:ArgumentsType, 2?:bool}|array{method:string, arguments?:ArgumentsType, returns_clone?:bool} + * @psalm-type TagsType = list>> // arrays inside the list must have only one element, with the tag name as the key + * @psalm-type CallbackType = string|array{0:string|ReferenceConfigurator,1:string}|\Closure|ReferenceConfigurator + * @psalm-type DeprecationType = array{package: string, version: string, message?: string} + * @psalm-type DefaultsType = array{ + * public?: bool, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * } + * @psalm-type InstanceofType = array{ + * shared?: bool, + * lazy?: bool|string, + * public?: bool, + * properties?: array, + * configurator?: CallbackType, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * bind?: array, + * constructor?: string, + * } + * @psalm-type DefinitionType = array{ + * class?: string, + * file?: string, + * parent?: string, + * shared?: bool, + * synthetic?: bool, + * lazy?: bool|string, + * public?: bool, + * abstract?: bool, + * deprecated?: DeprecationType, + * factory?: CallbackType, + * configurator?: CallbackType, + * arguments?: ArgumentsType, + * properties?: array, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * decorates?: string, + * decoration_inner_name?: string, + * decoration_priority?: int, + * decoration_on_invalid?: 'exception'|'ignore'|null, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * constructor?: string, + * from_callable?: CallbackType, + * } + * @psalm-type AliasType = string|array{ + * alias: string, + * public?: bool, + * deprecated?: DeprecationType, + * } + * @psalm-type PrototypeType = array{ + * resource: string, + * namespace?: string, + * exclude?: string|list, + * parent?: string, + * shared?: bool, + * lazy?: bool|string, + * public?: bool, + * abstract?: bool, + * deprecated?: DeprecationType, + * factory?: CallbackType, + * arguments?: ArgumentsType, + * properties?: array, + * configurator?: CallbackType, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * constructor?: string, + * } + * @psalm-type StackType = array{ + * stack: list>, + * public?: bool, + * deprecated?: DeprecationType, + * } + * @psalm-type ServicesConfig = array{ + * _defaults?: DefaultsType, + * _instanceof?: InstanceofType, + * ... + * } + * @psalm-type ExtensionType = array + * @psalm-type FrameworkConfig = array{ + * secret?: scalar|Param|null, + * http_method_override?: bool|Param, // Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. // Default: false + * allowed_http_method_override?: list|null, + * trust_x_sendfile_type_header?: scalar|Param|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%" + * ide?: scalar|Param|null, // Default: "%env(default::SYMFONY_IDE)%" + * test?: bool|Param, + * default_locale?: scalar|Param|null, // Default: "en" + * set_locale_from_accept_language?: bool|Param, // Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed). // Default: false + * set_content_language_from_locale?: bool|Param, // Whether to set the Content-Language HTTP header on the Response using the Request locale. // Default: false + * enabled_locales?: list, + * trusted_hosts?: list, + * trusted_proxies?: mixed, // Default: ["%env(default::SYMFONY_TRUSTED_PROXIES)%"] + * trusted_headers?: list, + * error_controller?: scalar|Param|null, // Default: "error_controller" + * handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true + * csrf_protection?: bool|array{ + * enabled?: scalar|Param|null, // Default: null + * stateless_token_ids?: list, + * check_header?: scalar|Param|null, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false + * cookie_name?: scalar|Param|null, // The name of the cookie to use when using stateless protection. // Default: "csrf-token" + * }, + * form?: bool|array{ // Form configuration + * enabled?: bool|Param, // Default: false + * csrf_protection?: bool|array{ + * enabled?: scalar|Param|null, // Default: null + * token_id?: scalar|Param|null, // Default: null + * field_name?: scalar|Param|null, // Default: "_token" + * field_attr?: array, + * }, + * }, + * http_cache?: bool|array{ // HTTP cache configuration + * enabled?: bool|Param, // Default: false + * debug?: bool|Param, // Default: "%kernel.debug%" + * trace_level?: "none"|"short"|"full"|Param, + * trace_header?: scalar|Param|null, + * default_ttl?: int|Param, + * private_headers?: list, + * skip_response_headers?: list, + * allow_reload?: bool|Param, + * allow_revalidate?: bool|Param, + * stale_while_revalidate?: int|Param, + * stale_if_error?: int|Param, + * terminate_on_cache_hit?: bool|Param, + * }, + * esi?: bool|array{ // ESI configuration + * enabled?: bool|Param, // Default: false + * }, + * ssi?: bool|array{ // SSI configuration + * enabled?: bool|Param, // Default: false + * }, + * fragments?: bool|array{ // Fragments configuration + * enabled?: bool|Param, // Default: false + * hinclude_default_template?: scalar|Param|null, // Default: null + * path?: scalar|Param|null, // Default: "/_fragment" + * }, + * profiler?: bool|array{ // Profiler configuration + * enabled?: bool|Param, // Default: false + * collect?: bool|Param, // Default: true + * collect_parameter?: scalar|Param|null, // The name of the parameter to use to enable or disable collection on a per request basis. // Default: null + * only_exceptions?: bool|Param, // Default: false + * only_main_requests?: bool|Param, // Default: false + * dsn?: scalar|Param|null, // Default: "file:%kernel.cache_dir%/profiler" + * collect_serializer_data?: bool|Param, // Enables the serializer data collector and profiler panel. // Default: false + * }, + * workflows?: bool|array{ + * enabled?: bool|Param, // Default: false + * workflows?: array, + * definition_validators?: list, + * support_strategy?: scalar|Param|null, + * initial_marking?: list, + * events_to_dispatch?: list|null, + * places?: list, + * }>, + * transitions?: list, + * to?: list, + * weight?: int|Param, // Default: 1 + * metadata?: array, + * }>, + * metadata?: array, + * }>, + * }, + * router?: bool|array{ // Router configuration + * enabled?: bool|Param, // Default: false + * resource?: scalar|Param|null, + * type?: scalar|Param|null, + * cache_dir?: scalar|Param|null, // Deprecated: Setting the "framework.router.cache_dir.cache_dir" configuration option is deprecated. It will be removed in version 8.0. // Default: "%kernel.build_dir%" + * default_uri?: scalar|Param|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null + * http_port?: scalar|Param|null, // Default: 80 + * https_port?: scalar|Param|null, // Default: 443 + * strict_requirements?: scalar|Param|null, // set to true to throw an exception when a parameter does not match the requirements set to false to disable exceptions when a parameter does not match the requirements (and return null instead) set to null to disable parameter checks against requirements 'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production // Default: true + * utf8?: bool|Param, // Default: true + * }, + * session?: bool|array{ // Session configuration + * enabled?: bool|Param, // Default: false + * storage_factory_id?: scalar|Param|null, // Default: "session.storage.factory.native" + * handler_id?: scalar|Param|null, // Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null. + * name?: scalar|Param|null, + * cookie_lifetime?: scalar|Param|null, + * cookie_path?: scalar|Param|null, + * cookie_domain?: scalar|Param|null, + * cookie_secure?: true|false|"auto"|Param, // Default: "auto" + * cookie_httponly?: bool|Param, // Default: true + * cookie_samesite?: null|"lax"|"strict"|"none"|Param, // Default: "lax" + * use_cookies?: bool|Param, + * gc_divisor?: scalar|Param|null, + * gc_probability?: scalar|Param|null, + * gc_maxlifetime?: scalar|Param|null, + * save_path?: scalar|Param|null, // Defaults to "%kernel.cache_dir%/sessions" if the "handler_id" option is not null. + * metadata_update_threshold?: int|Param, // Seconds to wait between 2 session metadata updates. // Default: 0 + * sid_length?: int|Param, // Deprecated: Setting the "framework.session.sid_length.sid_length" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option. + * sid_bits_per_character?: int|Param, // Deprecated: Setting the "framework.session.sid_bits_per_character.sid_bits_per_character" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option. + * }, + * request?: bool|array{ // Request configuration + * enabled?: bool|Param, // Default: false + * formats?: array>, + * }, + * assets?: bool|array{ // Assets configuration + * enabled?: bool|Param, // Default: false + * strict_mode?: bool|Param, // Throw an exception if an entry is missing from the manifest.json. // Default: false + * version_strategy?: scalar|Param|null, // Default: null + * version?: scalar|Param|null, // Default: null + * version_format?: scalar|Param|null, // Default: "%%s?%%s" + * json_manifest_path?: scalar|Param|null, // Default: null + * base_path?: scalar|Param|null, // Default: "" + * base_urls?: list, + * packages?: array, + * }>, + * }, + * asset_mapper?: bool|array{ // Asset Mapper configuration + * enabled?: bool|Param, // Default: false + * paths?: array, + * excluded_patterns?: list, + * exclude_dotfiles?: bool|Param, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true + * server?: bool|Param, // If true, a "dev server" will return the assets from the public directory (true in "debug" mode only by default). // Default: true + * public_prefix?: scalar|Param|null, // The public path where the assets will be written to (and served from when "server" is true). // Default: "/assets/" + * missing_import_mode?: "strict"|"warn"|"ignore"|Param, // Behavior if an asset cannot be found when imported from JavaScript or CSS files - e.g. "import './non-existent.js'". "strict" means an exception is thrown, "warn" means a warning is logged, "ignore" means the import is left as-is. // Default: "warn" + * extensions?: array, + * importmap_path?: scalar|Param|null, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php" + * importmap_polyfill?: scalar|Param|null, // The importmap name that will be used to load the polyfill. Set to false to disable. // Default: "es-module-shims" + * importmap_script_attributes?: array, + * vendor_dir?: scalar|Param|null, // The directory to store JavaScript vendors. // Default: "%kernel.project_dir%/assets/vendor" + * precompress?: bool|array{ // Precompress assets with Brotli, Zstandard and gzip. + * enabled?: bool|Param, // Default: false + * formats?: list, + * extensions?: list, + * }, + * }, + * translator?: bool|array{ // Translator configuration + * enabled?: bool|Param, // Default: false + * fallbacks?: list, + * logging?: bool|Param, // Default: false + * formatter?: scalar|Param|null, // Default: "translator.formatter.default" + * cache_dir?: scalar|Param|null, // Default: "%kernel.cache_dir%/translations" + * default_path?: scalar|Param|null, // The default path used to load translations. // Default: "%kernel.project_dir%/translations" + * paths?: list, + * pseudo_localization?: bool|array{ + * enabled?: bool|Param, // Default: false + * accents?: bool|Param, // Default: true + * expansion_factor?: float|Param, // Default: 1.0 + * brackets?: bool|Param, // Default: true + * parse_html?: bool|Param, // Default: false + * localizable_html_attributes?: list, + * }, + * providers?: array, + * locales?: list, + * }>, + * globals?: array, + * domain?: string|Param, + * }>, + * }, + * validation?: bool|array{ // Validation configuration + * enabled?: bool|Param, // Default: true + * cache?: scalar|Param|null, // Deprecated: Setting the "framework.validation.cache.cache" configuration option is deprecated. It will be removed in version 8.0. + * enable_attributes?: bool|Param, // Default: true + * static_method?: list, + * translation_domain?: scalar|Param|null, // Default: "validators" + * email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict"|"loose"|Param, // Default: "html5" + * mapping?: array{ + * paths?: list, + * }, + * not_compromised_password?: bool|array{ + * enabled?: bool|Param, // When disabled, compromised passwords will be accepted as valid. // Default: true + * endpoint?: scalar|Param|null, // API endpoint for the NotCompromisedPassword Validator. // Default: null + * }, + * disable_translation?: bool|Param, // Default: false + * auto_mapping?: array, + * }>, + * }, + * annotations?: bool|array{ + * enabled?: bool|Param, // Default: false + * }, + * serializer?: bool|array{ // Serializer configuration + * enabled?: bool|Param, // Default: true + * enable_attributes?: bool|Param, // Default: true + * name_converter?: scalar|Param|null, + * circular_reference_handler?: scalar|Param|null, + * max_depth_handler?: scalar|Param|null, + * mapping?: array{ + * paths?: list, + * }, + * default_context?: array, + * named_serializers?: array, + * include_built_in_normalizers?: bool|Param, // Whether to include the built-in normalizers // Default: true + * include_built_in_encoders?: bool|Param, // Whether to include the built-in encoders // Default: true + * }>, + * }, + * property_access?: bool|array{ // Property access configuration + * enabled?: bool|Param, // Default: true + * magic_call?: bool|Param, // Default: false + * magic_get?: bool|Param, // Default: true + * magic_set?: bool|Param, // Default: true + * throw_exception_on_invalid_index?: bool|Param, // Default: false + * throw_exception_on_invalid_property_path?: bool|Param, // Default: true + * }, + * type_info?: bool|array{ // Type info configuration + * enabled?: bool|Param, // Default: true + * aliases?: array, + * }, + * property_info?: bool|array{ // Property info configuration + * enabled?: bool|Param, // Default: true + * with_constructor_extractor?: bool|Param, // Registers the constructor extractor. + * }, + * cache?: array{ // Cache configuration + * prefix_seed?: scalar|Param|null, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%" + * app?: scalar|Param|null, // App related cache pools configuration. // Default: "cache.adapter.filesystem" + * system?: scalar|Param|null, // System related cache pools configuration. // Default: "cache.adapter.system" + * directory?: scalar|Param|null, // Default: "%kernel.share_dir%/pools/app" + * default_psr6_provider?: scalar|Param|null, + * default_redis_provider?: scalar|Param|null, // Default: "redis://localhost" + * default_valkey_provider?: scalar|Param|null, // Default: "valkey://localhost" + * default_memcached_provider?: scalar|Param|null, // Default: "memcached://localhost" + * default_doctrine_dbal_provider?: scalar|Param|null, // Default: "database_connection" + * default_pdo_provider?: scalar|Param|null, // Default: null + * pools?: array, + * tags?: scalar|Param|null, // Default: null + * public?: bool|Param, // Default: false + * default_lifetime?: scalar|Param|null, // Default lifetime of the pool. + * provider?: scalar|Param|null, // Overwrite the setting from the default provider for this adapter. + * early_expiration_message_bus?: scalar|Param|null, + * clearer?: scalar|Param|null, + * }>, + * }, + * php_errors?: array{ // PHP errors handling configuration + * log?: mixed, // Use the application logger instead of the PHP logger for logging PHP errors. // Default: true + * throw?: bool|Param, // Throw PHP errors as \ErrorException instances. // Default: true + * }, + * exceptions?: array, + * web_link?: bool|array{ // Web links configuration + * enabled?: bool|Param, // Default: false + * }, + * lock?: bool|string|array{ // Lock configuration + * enabled?: bool|Param, // Default: false + * resources?: array>, + * }, + * semaphore?: bool|string|array{ // Semaphore configuration + * enabled?: bool|Param, // Default: false + * resources?: array, + * }, + * messenger?: bool|array{ // Messenger configuration + * enabled?: bool|Param, // Default: false + * routing?: array, + * }>, + * serializer?: array{ + * default_serializer?: scalar|Param|null, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" + * symfony_serializer?: array{ + * format?: scalar|Param|null, // Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default). // Default: "json" + * context?: array, + * }, + * }, + * transports?: array, + * failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null + * retry_strategy?: string|array{ + * service?: scalar|Param|null, // Service id to override the retry strategy entirely. // Default: null + * max_retries?: int|Param, // Default: 3 + * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)). // Default: 2 + * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float|Param, // Randomness to apply to the delay (between 0 and 1). // Default: 0.1 + * }, + * rate_limiter?: scalar|Param|null, // Rate limiter name to use when processing messages. // Default: null + * }>, + * failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null + * stop_worker_on_signals?: list, + * default_bus?: scalar|Param|null, // Default: null + * buses?: array, + * }>, + * }>, + * }, + * scheduler?: bool|array{ // Scheduler configuration + * enabled?: bool|Param, // Default: false + * }, + * disallow_search_engine_index?: bool|Param, // Enabled by default when debug is enabled. // Default: true + * http_client?: bool|array{ // HTTP Client configuration + * enabled?: bool|Param, // Default: false + * max_host_connections?: int|Param, // The maximum number of connections to a single host. + * default_options?: array{ + * headers?: array, + * vars?: array, + * max_redirects?: int|Param, // The maximum number of redirects to follow. + * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. + * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. + * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. + * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. + * cafile?: scalar|Param|null, // A certificate authority file. + * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|Param|null, // A PEM formatted certificate file. + * local_pk?: scalar|Param|null, // A private key file. + * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|Param|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...) + * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). + * sha1?: mixed, + * pin-sha256?: mixed, + * md5?: mixed, + * }, + * crypto_method?: scalar|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null + * caching?: bool|array{ // Caching configuration. + * enabled?: bool|Param, // Default: false + * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" + * shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true + * max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null + * }, + * retry_failed?: bool|array{ + * enabled?: bool|Param, // Default: false + * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null + * http_codes?: array, + * }>, + * max_retries?: int|Param, // Default: 3 + * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 + * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 + * }, + * }, + * mock_response_factory?: scalar|Param|null, // The id of the service that should generate mock responses. It should be either an invokable or an iterable. + * scoped_clients?: array, + * headers?: array, + * max_redirects?: int|Param, // The maximum number of redirects to follow. + * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. + * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. + * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. + * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. + * cafile?: scalar|Param|null, // A certificate authority file. + * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|Param|null, // A PEM formatted certificate file. + * local_pk?: scalar|Param|null, // A private key file. + * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|Param|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...). + * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). + * sha1?: mixed, + * pin-sha256?: mixed, + * md5?: mixed, + * }, + * crypto_method?: scalar|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null + * caching?: bool|array{ // Caching configuration. + * enabled?: bool|Param, // Default: false + * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" + * shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true + * max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null + * }, + * retry_failed?: bool|array{ + * enabled?: bool|Param, // Default: false + * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null + * http_codes?: array, + * }>, + * max_retries?: int|Param, // Default: 3 + * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 + * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 + * }, + * }>, + * }, + * mailer?: bool|array{ // Mailer configuration + * enabled?: bool|Param, // Default: false + * message_bus?: scalar|Param|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * dsn?: scalar|Param|null, // Default: null + * transports?: array, + * envelope?: array{ // Mailer Envelope configuration + * sender?: scalar|Param|null, + * recipients?: list, + * allowed_recipients?: list, + * }, + * headers?: array, + * dkim_signer?: bool|array{ // DKIM signer configuration + * enabled?: bool|Param, // Default: false + * key?: scalar|Param|null, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: "" + * domain?: scalar|Param|null, // Default: "" + * select?: scalar|Param|null, // Default: "" + * passphrase?: scalar|Param|null, // The private key passphrase // Default: "" + * options?: array, + * }, + * smime_signer?: bool|array{ // S/MIME signer configuration + * enabled?: bool|Param, // Default: false + * key?: scalar|Param|null, // Path to key (in PEM format) // Default: "" + * certificate?: scalar|Param|null, // Path to certificate (in PEM format without the `file://` prefix) // Default: "" + * passphrase?: scalar|Param|null, // The private key passphrase // Default: null + * extra_certificates?: scalar|Param|null, // Default: null + * sign_options?: int|Param, // Default: null + * }, + * smime_encrypter?: bool|array{ // S/MIME encrypter configuration + * enabled?: bool|Param, // Default: false + * repository?: scalar|Param|null, // S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. // Default: "" + * cipher?: int|Param, // A set of algorithms used to encrypt the message // Default: null + * }, + * }, + * secrets?: bool|array{ + * enabled?: bool|Param, // Default: true + * vault_directory?: scalar|Param|null, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%" + * local_dotenv_file?: scalar|Param|null, // Default: "%kernel.project_dir%/.env.%kernel.environment%.local" + * decryption_env_var?: scalar|Param|null, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET" + * }, + * notifier?: bool|array{ // Notifier configuration + * enabled?: bool|Param, // Default: false + * message_bus?: scalar|Param|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * chatter_transports?: array, + * texter_transports?: array, + * notification_on_failed_messages?: bool|Param, // Default: false + * channel_policy?: array>, + * admin_recipients?: list, + * }, + * rate_limiter?: bool|array{ // Rate limiter configuration + * enabled?: bool|Param, // Default: false + * limiters?: array, + * limit?: int|Param, // The maximum allowed hits in a fixed interval or burst. + * interval?: scalar|Param|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). + * rate?: array{ // Configures the fill rate if "policy" is set to "token_bucket". + * interval?: scalar|Param|null, // Configures the rate interval. The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). + * amount?: int|Param, // Amount of tokens to add each interval. // Default: 1 + * }, + * }>, + * }, + * uid?: bool|array{ // Uid configuration + * enabled?: bool|Param, // Default: false + * default_uuid_version?: 7|6|4|1|Param, // Default: 7 + * name_based_uuid_version?: 5|3|Param, // Default: 5 + * name_based_uuid_namespace?: scalar|Param|null, + * time_based_uuid_version?: 7|6|1|Param, // Default: 7 + * time_based_uuid_node?: scalar|Param|null, + * }, + * html_sanitizer?: bool|array{ // HtmlSanitizer configuration + * enabled?: bool|Param, // Default: false + * sanitizers?: array, + * block_elements?: list, + * drop_elements?: list, + * allow_attributes?: array, + * drop_attributes?: array, + * force_attributes?: array>, + * force_https_urls?: bool|Param, // Transforms URLs using the HTTP scheme to use the HTTPS scheme instead. // Default: false + * allowed_link_schemes?: list, + * allowed_link_hosts?: list|null, + * allow_relative_links?: bool|Param, // Allows relative URLs to be used in links href attributes. // Default: false + * allowed_media_schemes?: list, + * allowed_media_hosts?: list|null, + * allow_relative_medias?: bool|Param, // Allows relative URLs to be used in media source attributes (img, audio, video, ...). // Default: false + * with_attribute_sanitizers?: list, + * without_attribute_sanitizers?: list, + * max_input_length?: int|Param, // The maximum length allowed for the sanitized input. // Default: 0 + * }>, + * }, + * webhook?: bool|array{ // Webhook configuration + * enabled?: bool|Param, // Default: false + * message_bus?: scalar|Param|null, // The message bus to use. // Default: "messenger.default_bus" + * routing?: array, + * }, + * remote-event?: bool|array{ // RemoteEvent configuration + * enabled?: bool|Param, // Default: false + * }, + * json_streamer?: bool|array{ // JSON streamer configuration + * enabled?: bool|Param, // Default: false + * }, + * } + * @psalm-type NelmioCorsConfig = array{ + * defaults?: array{ + * allow_credentials?: bool|Param, // Default: false + * allow_origin?: list, + * allow_headers?: list, + * allow_methods?: list, + * allow_private_network?: bool|Param, // Default: false + * expose_headers?: list, + * max_age?: scalar|Param|null, // Default: 0 + * hosts?: list, + * origin_regex?: bool|Param, // Default: false + * forced_allow_origin_value?: scalar|Param|null, // Default: null + * skip_same_as_origin?: bool|Param, // Default: true + * }, + * paths?: array, + * allow_headers?: list, + * allow_methods?: list, + * allow_private_network?: bool|Param, + * expose_headers?: list, + * max_age?: scalar|Param|null, // Default: 0 + * hosts?: list, + * origin_regex?: bool|Param, + * forced_allow_origin_value?: scalar|Param|null, // Default: null + * skip_same_as_origin?: bool|Param, + * }>, + * } + * @psalm-type DoctrineConfig = array{ + * dbal?: array{ + * default_connection?: scalar|Param|null, + * types?: array, + * driver_schemes?: array, + * connections?: array, + * mapping_types?: array, + * default_table_options?: array, + * schema_manager_factory?: scalar|Param|null, // Default: "doctrine.dbal.default_schema_manager_factory" + * result_cache?: scalar|Param|null, + * slaves?: array, + * replicas?: array, + * }>, + * }, + * orm?: array{ + * default_entity_manager?: scalar|Param|null, + * auto_generate_proxy_classes?: scalar|Param|null, // Auto generate mode possible values are: "NEVER", "ALWAYS", "FILE_NOT_EXISTS", "EVAL", "FILE_NOT_EXISTS_OR_CHANGED", this option is ignored when the "enable_native_lazy_objects" option is true // Default: false + * enable_lazy_ghost_objects?: bool|Param, // Enables the new implementation of proxies based on lazy ghosts instead of using the legacy implementation // Default: true + * enable_native_lazy_objects?: bool|Param, // Enables the new native implementation of PHP lazy objects instead of generated proxies // Default: false + * proxy_dir?: scalar|Param|null, // Configures the path where generated proxy classes are saved when using non-native lazy objects, this option is ignored when the "enable_native_lazy_objects" option is true // Default: "%kernel.build_dir%/doctrine/orm/Proxies" + * proxy_namespace?: scalar|Param|null, // Defines the root namespace for generated proxy classes when using non-native lazy objects, this option is ignored when the "enable_native_lazy_objects" option is true // Default: "Proxies" + * controller_resolver?: bool|array{ + * enabled?: bool|Param, // Default: true + * auto_mapping?: bool|Param|null, // Set to false to disable using route placeholders as lookup criteria when the primary key doesn't match the argument name // Default: null + * evict_cache?: bool|Param, // Set to true to fetch the entity from the database instead of using the cache, if any // Default: false + * }, + * entity_managers?: array, + * }>, + * }>, + * }, + * connection?: scalar|Param|null, + * class_metadata_factory_name?: scalar|Param|null, // Default: "Doctrine\\ORM\\Mapping\\ClassMetadataFactory" + * default_repository_class?: scalar|Param|null, // Default: "Doctrine\\ORM\\EntityRepository" + * auto_mapping?: scalar|Param|null, // Default: false + * naming_strategy?: scalar|Param|null, // Default: "doctrine.orm.naming_strategy.default" + * quote_strategy?: scalar|Param|null, // Default: "doctrine.orm.quote_strategy.default" + * typed_field_mapper?: scalar|Param|null, // Default: "doctrine.orm.typed_field_mapper.default" + * entity_listener_resolver?: scalar|Param|null, // Default: null + * fetch_mode_subselect_batch_size?: scalar|Param|null, + * repository_factory?: scalar|Param|null, // Default: "doctrine.orm.container_repository_factory" + * schema_ignore_classes?: list, + * report_fields_where_declared?: bool|Param, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.16 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/10455. // Default: true + * validate_xml_mapping?: bool|Param, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.14. See https://github.com/doctrine/orm/pull/6728. // Default: false + * second_level_cache?: array{ + * region_cache_driver?: string|array{ + * type?: scalar|Param|null, // Default: null + * id?: scalar|Param|null, + * pool?: scalar|Param|null, + * }, + * region_lock_lifetime?: scalar|Param|null, // Default: 60 + * log_enabled?: bool|Param, // Default: true + * region_lifetime?: scalar|Param|null, // Default: 3600 + * enabled?: bool|Param, // Default: true + * factory?: scalar|Param|null, + * regions?: array, + * loggers?: array, + * }, + * hydrators?: array, + * mappings?: array, + * dql?: array{ + * string_functions?: array, + * numeric_functions?: array, + * datetime_functions?: array, + * }, + * filters?: array, + * }>, + * identity_generation_preferences?: array, + * }>, + * resolve_target_entities?: array, + * }, + * } + * @psalm-type DoctrineMigrationsConfig = array{ + * enable_service_migrations?: bool|Param, // Whether to enable fetching migrations from the service container. // Default: false + * migrations_paths?: array, + * services?: array, + * factories?: array, + * storage?: array{ // Storage to use for migration status metadata. + * table_storage?: array{ // The default metadata storage, implemented as a table in the database. + * table_name?: scalar|Param|null, // Default: null + * version_column_name?: scalar|Param|null, // Default: null + * version_column_length?: scalar|Param|null, // Default: null + * executed_at_column_name?: scalar|Param|null, // Default: null + * execution_time_column_name?: scalar|Param|null, // Default: null + * }, + * }, + * migrations?: list, + * connection?: scalar|Param|null, // Connection name to use for the migrations database. // Default: null + * em?: scalar|Param|null, // Entity manager name to use for the migrations database (available when doctrine/orm is installed). // Default: null + * all_or_nothing?: scalar|Param|null, // Run all migrations in a transaction. // Default: false + * check_database_platform?: scalar|Param|null, // Adds an extra check in the generated migrations to allow execution only on the same platform as they were initially generated on. // Default: true + * custom_template?: scalar|Param|null, // Custom template path for generated migration classes. // Default: null + * organize_migrations?: scalar|Param|null, // Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false // Default: false + * enable_profiler?: bool|Param, // Whether or not to enable the profiler collector to calculate and visualize migration status. This adds some queries overhead. // Default: false + * transactional?: bool|Param, // Whether or not to wrap migrations in a single transaction. // Default: true + * } + * @psalm-type ConfigType = array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * nelmio_cors?: NelmioCorsConfig, + * doctrine?: DoctrineConfig, + * doctrine_migrations?: DoctrineMigrationsConfig, + * "when@dev"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * nelmio_cors?: NelmioCorsConfig, + * doctrine?: DoctrineConfig, + * doctrine_migrations?: DoctrineMigrationsConfig, + * }, + * "when@prod"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * nelmio_cors?: NelmioCorsConfig, + * doctrine?: DoctrineConfig, + * doctrine_migrations?: DoctrineMigrationsConfig, + * }, + * "when@test"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * nelmio_cors?: NelmioCorsConfig, + * doctrine?: DoctrineConfig, + * doctrine_migrations?: DoctrineMigrationsConfig, + * }, + * ..., + * }> + * } + */ +final class App +{ + /** + * @param ConfigType $config + * + * @psalm-return ConfigType + */ + public static function config(array $config): array + { + /** @var ConfigType $config */ + $config = AppReference::config($config); + + return $config; + } +} + +namespace Symfony\Component\Routing\Loader\Configurator; + +/** + * This class provides array-shapes for configuring the routes of an application. + * + * Example: + * + * ```php + * // config/routes.php + * namespace Symfony\Component\Routing\Loader\Configurator; + * + * return Routes::config([ + * 'controllers' => [ + * 'resource' => 'routing.controllers', + * ], + * ]); + * ``` + * + * @psalm-type RouteConfig = array{ + * path: string|array, + * controller?: string, + * methods?: string|list, + * requirements?: array, + * defaults?: array, + * options?: array, + * host?: string|array, + * schemes?: string|list, + * condition?: string, + * locale?: string, + * format?: string, + * utf8?: bool, + * stateless?: bool, + * } + * @psalm-type ImportConfig = array{ + * resource: string, + * type?: string, + * exclude?: string|list, + * prefix?: string|array, + * name_prefix?: string, + * trailing_slash_on_root?: bool, + * controller?: string, + * methods?: string|list, + * requirements?: array, + * defaults?: array, + * options?: array, + * host?: string|array, + * schemes?: string|list, + * condition?: string, + * locale?: string, + * format?: string, + * utf8?: bool, + * stateless?: bool, + * } + * @psalm-type AliasConfig = array{ + * alias: string, + * deprecated?: array{package:string, version:string, message?:string}, + * } + * @psalm-type RoutesConfig = array{ + * "when@dev"?: array, + * "when@prod"?: array, + * "when@test"?: array, + * ... + * } + */ +final class Routes +{ + /** + * @param RoutesConfig $config + * + * @psalm-return RoutesConfig + */ + public static function config(array $config): array + { + return $config; + } +} diff --git a/backend/config/routes.yaml b/backend/config/routes.yaml new file mode 100644 index 0000000..cef258c --- /dev/null +++ b/backend/config/routes.yaml @@ -0,0 +1,11 @@ +# yaml-language-server: $schema=../vendor/symfony/routing/Loader/schema/routing.schema.json + +# This file is the entry point to configure the routes of your app. +# Methods with the #[Route] attribute are automatically imported. +# See also https://symfony.com/doc/current/routing.html + +# To list all registered routes, run the following command: +# bin/console debug:router + +controllers: + resource: routing.controllers diff --git a/backend/config/routes/framework.yaml b/backend/config/routes/framework.yaml new file mode 100644 index 0000000..bc1feac --- /dev/null +++ b/backend/config/routes/framework.yaml @@ -0,0 +1,4 @@ +when@dev: + _errors: + resource: '@FrameworkBundle/Resources/config/routing/errors.php' + prefix: /_error diff --git a/backend/config/services.yaml b/backend/config/services.yaml new file mode 100644 index 0000000..79b8ce2 --- /dev/null +++ b/backend/config/services.yaml @@ -0,0 +1,23 @@ +# yaml-language-server: $schema=../vendor/symfony/dependency-injection/Loader/schema/services.schema.json + +# This file is the entry point to configure your own services. +# Files in the packages/ subdirectory configure your dependencies. +# See also https://symfony.com/doc/current/service_container/import.html + +# Put parameters here that don't need to change on each machine where the app is deployed +# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration +parameters: + +services: + # default configuration for services in *this* file + _defaults: + autowire: true # Automatically injects dependencies in your services. + autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. + + # makes classes in src/ available to be used as services + # this creates a service per class whose id is the fully-qualified class name + App\: + resource: '../src/' + + # add more service definitions when explicit configuration is needed + # please note that last definitions always *replace* previous ones diff --git a/backend/migrations/.gitignore b/backend/migrations/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/backend/public/index.php b/backend/public/index.php new file mode 100644 index 0000000..9982c21 --- /dev/null +++ b/backend/public/index.php @@ -0,0 +1,9 @@ + 'IP09wnc', + 'container.build_id' => '42ab5adc', + 'container.build_time' => 1774307047, + 'container.runtime_mode' => \in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) ? 'web=0' : 'web=1', +], __DIR__.\DIRECTORY_SEPARATOR.'ContainerIP09wnc'); diff --git a/backend/var/cache/dev/App_KernelDevDebugContainer.php.lock b/backend/var/cache/dev/App_KernelDevDebugContainer.php.lock new file mode 100644 index 0000000..e69de29 diff --git a/backend/var/cache/dev/App_KernelDevDebugContainer.php.meta b/backend/var/cache/dev/App_KernelDevDebugContainer.php.meta new file mode 100644 index 0000000..af642cb --- /dev/null +++ b/backend/var/cache/dev/App_KernelDevDebugContainer.php.meta @@ -0,0 +1 @@ +a:17:{i:0;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:52:"/var/www/html/backend/vendor/composer/installed.json";}i:1;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:36:"/var/www/html/backend/src/Kernel.php";}i:2;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:40:"/var/www/html/backend/config/bundles.php";}i:3;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:48:"/var/www/html/backend/config/packages/cache.yaml";}i:4;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:51:"/var/www/html/backend/config/packages/doctrine.yaml";}i:5;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:62:"/var/www/html/backend/config/packages/doctrine_migrations.yaml";}i:6;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:52:"/var/www/html/backend/config/packages/framework.yaml";}i:7;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:54:"/var/www/html/backend/config/packages/nelmio_cors.yaml";}i:8;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:56:"/var/www/html/backend/config/packages/property_info.yaml";}i:9;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:50:"/var/www/html/backend/config/packages/routing.yaml";}i:10;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:52:"/var/www/html/backend/config/packages/validator.yaml";}i:11;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:42:"/var/www/html/backend/config/services.yaml";}i:12;O:57:"Symfony\Component\Config\Resource\ReflectionClassResource":4:{s:5:"files";a:1:{s:36:"/var/www/html/backend/src/Kernel.php";N;}s:9:"className";s:10:"App\Kernel";s:15:"excludedVendors";a:1:{i:0;s:28:"/var/www/html/backend/vendor";}s:4:"hash";s:32:"34dd59c357ea1eb564085e89fd216437";}i:13;O:46:"Symfony\Component\Config\Resource\GlobResource":6:{s:6:"prefix";s:25:"/var/www/html/backend/src";s:7:"pattern";s:0:"";s:9:"recursive";b:1;s:4:"hash";s:32:"713b3c973eafc0d1f540369da5af6779";s:12:"forExclusion";b:0;s:16:"excludedPrefixes";a:0:{}}i:14;O:55:"Symfony\Component\Config\Resource\FileExistenceResource":2:{s:8:"resource";s:39:"/var/www/html/backend/config/serializer";s:6:"exists";b:0;}i:15;O:55:"Symfony\Component\Config\Resource\FileExistenceResource":2:{s:8:"resource";s:38:"/var/www/html/backend/config/validator";s:6:"exists";b:0;}i:16;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:42:"/var/www/html/backend/config/reference.php";}} \ No newline at end of file diff --git a/backend/var/cache/dev/App_KernelDevDebugContainer.php.meta.json b/backend/var/cache/dev/App_KernelDevDebugContainer.php.meta.json new file mode 100644 index 0000000..674dfaa --- /dev/null +++ b/backend/var/cache/dev/App_KernelDevDebugContainer.php.meta.json @@ -0,0 +1 @@ +{"resources":[{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/vendor/composer/installed.json"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/src/Kernel.php"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/bundles.php"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/cache.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/doctrine.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/doctrine_migrations.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/framework.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/nelmio_cors.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/property_info.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/routing.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/validator.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/services.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\ReflectionClassResource","files":{"/var/www/html/backend/src/Kernel.php":null},"className":"App\\Kernel","excludedVendors":["/var/www/html/backend/vendor"],"hash":"34dd59c357ea1eb564085e89fd216437"},{"@type":"Symfony\\Component\\Config\\Resource\\GlobResource","prefix":"/var/www/html/backend/src","pattern":"","recursive":true,"hash":"713b3c973eafc0d1f540369da5af6779","forExclusion":false,"excludedPrefixes":[]},{"@type":"Symfony\\Component\\Config\\Resource\\FileExistenceResource","resource":"/var/www/html/backend/config/serializer","exists":false},{"@type":"Symfony\\Component\\Config\\Resource\\FileExistenceResource","resource":"/var/www/html/backend/config/validator","exists":false},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/reference.php"}]} \ No newline at end of file diff --git a/backend/var/cache/dev/App_KernelDevDebugContainer.preload.php b/backend/var/cache/dev/App_KernelDevDebugContainer.preload.php new file mode 100644 index 0000000..8489ddc --- /dev/null +++ b/backend/var/cache/dev/App_KernelDevDebugContainer.preload.php @@ -0,0 +1,252 @@ += 7.4 when preloading is desired + +use Symfony\Component\DependencyInjection\Dumper\Preloader; + +if (in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) { + return; +} + +require dirname(__DIR__, 3).'/vendor/autoload.php'; +(require __DIR__.'/App_KernelDevDebugContainer.php')->set(\ContainerIP09wnc\App_KernelDevDebugContainer::class, null); +require __DIR__.'/ContainerIP09wnc/UriSignerGhostB68a0a1.php'; +require __DIR__.'/ContainerIP09wnc/EntityManagerGhost614a58f.php'; +require __DIR__.'/ContainerIP09wnc/RequestPayloadValueResolverGhost01ca9cc.php'; +require __DIR__.'/ContainerIP09wnc/getValidator_WhenService.php'; +require __DIR__.'/ContainerIP09wnc/getValidator_NotCompromisedPasswordService.php'; +require __DIR__.'/ContainerIP09wnc/getValidator_NoSuspiciousCharactersService.php'; +require __DIR__.'/ContainerIP09wnc/getValidator_ExpressionService.php'; +require __DIR__.'/ContainerIP09wnc/getValidator_EmailService.php'; +require __DIR__.'/ContainerIP09wnc/getSession_Handler_NativeService.php'; +require __DIR__.'/ContainerIP09wnc/getSession_FactoryService.php'; +require __DIR__.'/ContainerIP09wnc/getServicesResetterService.php'; +require __DIR__.'/ContainerIP09wnc/getSecrets_VaultService.php'; +require __DIR__.'/ContainerIP09wnc/getSecrets_EnvVarLoaderService.php'; +require __DIR__.'/ContainerIP09wnc/getRouting_LoaderService.php'; +require __DIR__.'/ContainerIP09wnc/getPropertyInfo_SerializerExtractorService.php'; +require __DIR__.'/ContainerIP09wnc/getPropertyInfo_ConstructorExtractorService.php'; +require __DIR__.'/ContainerIP09wnc/getErrorHandler_ErrorRenderer_HtmlService.php'; +require __DIR__.'/ContainerIP09wnc/getErrorControllerService.php'; +require __DIR__.'/ContainerIP09wnc/getDoctrine_UuidGeneratorService.php'; +require __DIR__.'/ContainerIP09wnc/getDoctrine_UlidGeneratorService.php'; +require __DIR__.'/ContainerIP09wnc/getDoctrine_Orm_Validator_UniqueService.php'; +require __DIR__.'/ContainerIP09wnc/getDoctrine_Orm_Listeners_PdoSessionHandlerSchemaListenerService.php'; +require __DIR__.'/ContainerIP09wnc/getDoctrine_Orm_Listeners_LockStoreSchemaListenerService.php'; +require __DIR__.'/ContainerIP09wnc/getDoctrine_Orm_Listeners_DoctrineTokenProviderSchemaListenerService.php'; +require __DIR__.'/ContainerIP09wnc/getDoctrine_Orm_Listeners_DoctrineDbalCacheAdapterSchemaListenerService.php'; +require __DIR__.'/ContainerIP09wnc/getDoctrine_Orm_DefaultListeners_AttachEntityListenersService.php'; +require __DIR__.'/ContainerIP09wnc/getDoctrine_Orm_DefaultEntityManager_PropertyInfoExtractorService.php'; +require __DIR__.'/ContainerIP09wnc/getDebug_ErrorHandlerConfiguratorService.php'; +require __DIR__.'/ContainerIP09wnc/getContainer_GetRoutingConditionServiceService.php'; +require __DIR__.'/ContainerIP09wnc/getContainer_EnvVarProcessorsLocatorService.php'; +require __DIR__.'/ContainerIP09wnc/getContainer_EnvVarProcessorService.php'; +require __DIR__.'/ContainerIP09wnc/getCache_ValidatorExpressionLanguageService.php'; +require __DIR__.'/ContainerIP09wnc/getCache_SystemClearerService.php'; +require __DIR__.'/ContainerIP09wnc/getCache_SystemService.php'; +require __DIR__.'/ContainerIP09wnc/getCache_GlobalClearerService.php'; +require __DIR__.'/ContainerIP09wnc/getCache_AppClearerService.php'; +require __DIR__.'/ContainerIP09wnc/getCache_AppService.php'; +require __DIR__.'/ContainerIP09wnc/getTemplateControllerService.php'; +require __DIR__.'/ContainerIP09wnc/getRedirectControllerService.php'; +require __DIR__.'/ContainerIP09wnc/get_ServiceLocator_8JS6QTAService.php'; +require __DIR__.'/ContainerIP09wnc/get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService.php'; +require __DIR__.'/ContainerIP09wnc/get_ServiceLocator_1vYpZ1B_KernelloadRoutesService.php'; +require __DIR__.'/ContainerIP09wnc/get_ServiceLocator_1vYpZ1BService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_Doctrine_Orm_EntityValueResolverService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_VariadicService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_SessionService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_ServiceService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestPayloadService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestAttributeService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_QueryParameterValueResolverService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_NotTaggedControllerService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_DefaultService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_DatetimeService.php'; +require __DIR__.'/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_BackedEnumResolverService.php'; + +$classes = []; +$classes[] = 'Symfony\Bundle\FrameworkBundle\FrameworkBundle'; +$classes[] = 'Nelmio\CorsBundle\NelmioCorsBundle'; +$classes[] = 'Doctrine\Bundle\DoctrineBundle\DoctrineBundle'; +$classes[] = 'Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\BackedEnumValueResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\DateTimeValueResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\NotTaggedControllerValueResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\QueryParameterValueResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\ServiceValueResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver'; +$classes[] = 'Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver'; +$classes[] = 'Symfony\Bridge\Doctrine\Attribute\MapEntity'; +$classes[] = 'Symfony\Component\DependencyInjection\ServiceLocator'; +$classes[] = 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController'; +$classes[] = 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestPayloadValueResolver'; +$classes[] = 'Symfony\Component\Cache\Adapter\FilesystemAdapter'; +$classes[] = 'Symfony\Component\Cache\Marshaller\DefaultMarshaller'; +$classes[] = 'Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer'; +$classes[] = 'Symfony\Component\Cache\Adapter\ArrayAdapter'; +$classes[] = 'Symfony\Component\Cache\Adapter\AdapterInterface'; +$classes[] = 'Symfony\Component\Cache\Adapter\AbstractAdapter'; +$classes[] = 'Symfony\Component\Config\Resource\SelfCheckingResourceChecker'; +$classes[] = 'Symfony\Component\DependencyInjection\EnvVarProcessor'; +$classes[] = 'Symfony\Component\HttpKernel\EventListener\CacheAttributeListener'; +$classes[] = 'Symfony\Component\HttpKernel\EventListener\IsSignatureValidAttributeListener'; +$classes[] = 'Symfony\Component\HttpKernel\EventListener\DebugHandlersListener'; +$classes[] = 'Symfony\Component\HttpKernel\Debug\ErrorHandlerConfigurator'; +$classes[] = 'Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter'; +$classes[] = 'Symfony\Component\Stopwatch\Stopwatch'; +$classes[] = 'Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker'; +$classes[] = 'Symfony\Component\HttpKernel\EventListener\DisallowRobotsIndexingListener'; +$classes[] = 'Doctrine\Bundle\DoctrineBundle\Registry'; +$classes[] = 'Doctrine\DBAL\Connection'; +$classes[] = 'Doctrine\Bundle\DoctrineBundle\ConnectionFactory'; +$classes[] = 'Doctrine\DBAL\Configuration'; +$classes[] = 'Doctrine\DBAL\Schema\DefaultSchemaManagerFactory'; +$classes[] = 'Doctrine\Bundle\DoctrineBundle\Dbal\SchemaAssetsFilterManager'; +$classes[] = 'Doctrine\Bundle\DoctrineBundle\Middleware\DebugMiddleware'; +$classes[] = 'Doctrine\Bundle\DoctrineBundle\Middleware\IdleConnectionMiddleware'; +$classes[] = 'Doctrine\DBAL\Tools\DsnParser'; +$classes[] = 'Symfony\Bridge\Doctrine\ContainerAwareEventManager'; +$classes[] = 'Symfony\Bridge\Doctrine\Middleware\IdleConnection\Listener'; +$classes[] = 'Doctrine\Bundle\DoctrineBundle\Middleware\BacktraceDebugDataHolder'; +$classes[] = 'Doctrine\ORM\Configuration'; +$classes[] = 'Doctrine\Bundle\DoctrineBundle\Mapping\MappingDriver'; +$classes[] = 'Doctrine\Persistence\Mapping\Driver\MappingDriverChain'; +$classes[] = 'Doctrine\ORM\Mapping\Driver\AttributeDriver'; +$classes[] = 'Doctrine\ORM\Mapping\UnderscoreNamingStrategy'; +$classes[] = 'Doctrine\ORM\Mapping\DefaultQuoteStrategy'; +$classes[] = 'Doctrine\ORM\Mapping\DefaultTypedFieldMapper'; +$classes[] = 'Doctrine\Bundle\DoctrineBundle\Mapping\ContainerEntityListenerResolver'; +$classes[] = 'Doctrine\Bundle\DoctrineBundle\Repository\ContainerRepositoryFactory'; +$classes[] = 'Doctrine\ORM\Proxy\Autoloader'; +$classes[] = 'Doctrine\ORM\EntityManager'; +$classes[] = 'Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor'; +$classes[] = 'Doctrine\ORM\Tools\AttachEntityListenersListener'; +$classes[] = 'Doctrine\Bundle\DoctrineBundle\ManagerConfigurator'; +$classes[] = 'Symfony\Bridge\Doctrine\SchemaListener\DoctrineDbalCacheAdapterSchemaListener'; +$classes[] = 'Symfony\Bridge\Doctrine\SchemaListener\RememberMeTokenProviderDoctrineSchemaListener'; +$classes[] = 'Symfony\Bridge\Doctrine\SchemaListener\LockStoreSchemaListener'; +$classes[] = 'Symfony\Bridge\Doctrine\SchemaListener\PdoSessionHandlerSchemaListener'; +$classes[] = 'Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator'; +$classes[] = 'Symfony\Bridge\Doctrine\IdGenerator\UlidGenerator'; +$classes[] = 'Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator'; +$classes[] = 'Doctrine\Bundle\MigrationsBundle\EventListener\SchemaFilterListener'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ErrorController'; +$classes[] = 'Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer'; +$classes[] = 'Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface'; +$classes[] = 'Symfony\Bundle\FrameworkBundle\ErrorHandler\ErrorRenderer\RuntimeModeErrorRendererSelector'; +$classes[] = 'Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer'; +$classes[] = 'Symfony\Component\DependencyInjection\Argument\LazyClosure'; +$classes[] = 'Symfony\Component\ErrorHandler\ErrorRenderer\CliErrorRenderer'; +$classes[] = 'Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher'; +$classes[] = 'Symfony\Component\EventDispatcher\EventDispatcher'; +$classes[] = 'Symfony\Component\HttpKernel\EventListener\ErrorListener'; +$classes[] = 'Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner'; +$classes[] = 'Symfony\Component\Runtime\Runner\Symfony\ResponseRunner'; +$classes[] = 'Symfony\Component\Runtime\SymfonyRuntime'; +$classes[] = 'Symfony\Component\HttpKernel\HttpKernel'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\TraceableControllerResolver'; +$classes[] = 'Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\TraceableArgumentResolver'; +$classes[] = 'Symfony\Component\HttpKernel\Controller\ArgumentResolver'; +$classes[] = 'Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory'; +$classes[] = 'App\Kernel'; +$classes[] = 'Symfony\Component\HttpKernel\EventListener\LocaleAwareListener'; +$classes[] = 'Symfony\Component\HttpKernel\EventListener\LocaleListener'; +$classes[] = 'Symfony\Component\HttpKernel\Log\Logger'; +$classes[] = 'Nelmio\CorsBundle\EventListener\CacheableResponseVaryListener'; +$classes[] = 'Nelmio\CorsBundle\EventListener\CorsListener'; +$classes[] = 'Nelmio\CorsBundle\Options\Resolver'; +$classes[] = 'Nelmio\CorsBundle\Options\ConfigProvider'; +$classes[] = 'Symfony\Component\PropertyInfo\PropertyInfoExtractor'; +$classes[] = 'Symfony\Component\PropertyInfo\Extractor\ConstructorExtractor'; +$classes[] = 'Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor'; +$classes[] = 'Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor'; +$classes[] = 'Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor'; +$classes[] = 'Symfony\Component\PropertyInfo\Extractor\SerializerExtractor'; +$classes[] = 'Symfony\Component\HttpFoundation\RequestStack'; +$classes[] = 'Symfony\Component\HttpKernel\EventListener\ResponseListener'; +$classes[] = 'Symfony\Bundle\FrameworkBundle\Routing\Router'; +$classes[] = 'Symfony\Component\DependencyInjection\ParameterBag\ContainerBag'; +$classes[] = 'Symfony\Component\Config\ResourceCheckerConfigCacheFactory'; +$classes[] = 'Symfony\Component\Routing\RequestContext'; +$classes[] = 'Symfony\Component\HttpKernel\EventListener\RouterListener'; +$classes[] = 'Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader'; +$classes[] = 'Symfony\Component\Config\Loader\LoaderResolver'; +$classes[] = 'Symfony\Component\Routing\Loader\XmlFileLoader'; +$classes[] = 'Symfony\Component\HttpKernel\Config\FileLocator'; +$classes[] = 'Symfony\Component\Routing\Loader\YamlFileLoader'; +$classes[] = 'Symfony\Component\Routing\Loader\PhpFileLoader'; +$classes[] = 'Symfony\Component\Routing\Loader\GlobFileLoader'; +$classes[] = 'Symfony\Component\Routing\Loader\DirectoryLoader'; +$classes[] = 'Symfony\Component\Routing\Loader\ContainerLoader'; +$classes[] = 'Symfony\Bundle\FrameworkBundle\Routing\AttributeRouteControllerLoader'; +$classes[] = 'Symfony\Component\Routing\Loader\AttributeServicesLoader'; +$classes[] = 'Symfony\Component\Routing\Loader\AttributeDirectoryLoader'; +$classes[] = 'Symfony\Component\Routing\Loader\AttributeFileLoader'; +$classes[] = 'Symfony\Component\Routing\Loader\Psr4DirectoryLoader'; +$classes[] = 'Symfony\Component\DependencyInjection\StaticEnvVarLoader'; +$classes[] = 'Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault'; +$classes[] = 'Symfony\Component\String\LazyString'; +$classes[] = 'Symfony\Component\Serializer\Serializer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\UnwrappingDenormalizer'; +$classes[] = 'Symfony\Component\PropertyAccess\PropertyAccessor'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\ProblemNormalizer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\UidNormalizer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\DateTimeNormalizer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer'; +$classes[] = 'Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\DateTimeZoneNormalizer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\FormErrorNormalizer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\BackedEnumNormalizer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\NumberNormalizer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\DataUriNormalizer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\ArrayDenormalizer'; +$classes[] = 'Symfony\Component\Serializer\Normalizer\ObjectNormalizer'; +$classes[] = 'Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata'; +$classes[] = 'Symfony\Component\Serializer\Encoder\XmlEncoder'; +$classes[] = 'Symfony\Component\Serializer\Encoder\JsonEncoder'; +$classes[] = 'Symfony\Component\Serializer\Encoder\YamlEncoder'; +$classes[] = 'Symfony\Component\Serializer\Encoder\CsvEncoder'; +$classes[] = 'Symfony\Component\Serializer\Mapping\Loader\AttributeLoader'; +$classes[] = 'Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory'; +$classes[] = 'Symfony\Component\Serializer\Mapping\Loader\LoaderChain'; +$classes[] = 'Symfony\Component\DependencyInjection\ContainerInterface'; +$classes[] = 'Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter'; +$classes[] = 'Symfony\Component\HttpFoundation\Session\SessionFactory'; +$classes[] = 'Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorageFactory'; +$classes[] = 'Symfony\Component\HttpFoundation\Session\Storage\MetadataBag'; +$classes[] = 'Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler'; +$classes[] = 'Symfony\Component\HttpKernel\EventListener\SessionListener'; +$classes[] = 'Symfony\Component\String\Slugger\AsciiSlugger'; +$classes[] = 'Symfony\Component\HttpFoundation\UriSigner'; +$classes[] = 'Symfony\Component\HttpKernel\EventListener\ValidateRequestListener'; +$classes[] = 'Symfony\Component\Validator\Validator\ValidatorInterface'; +$classes[] = 'Symfony\Component\Validator\ValidatorBuilder'; +$classes[] = 'Symfony\Component\Validator\Validation'; +$classes[] = 'Symfony\Component\Validator\ContainerConstraintValidatorFactory'; +$classes[] = 'Symfony\Bridge\Doctrine\Validator\DoctrineInitializer'; +$classes[] = 'Symfony\Component\Validator\Mapping\Loader\PropertyInfoLoader'; +$classes[] = 'Symfony\Bridge\Doctrine\Validator\DoctrineLoader'; +$classes[] = 'Symfony\Component\Validator\Constraints\EmailValidator'; +$classes[] = 'Symfony\Component\Validator\Constraints\ExpressionValidator'; +$classes[] = 'Symfony\Component\Validator\Constraints\NoSuspiciousCharactersValidator'; +$classes[] = 'Symfony\Component\Validator\Constraints\NotCompromisedPasswordValidator'; +$classes[] = 'Symfony\Component\Validator\Constraints\WhenValidator'; + +$preloaded = Preloader::preload($classes); + +$classes = []; +$classes[] = 'Symfony\\Component\\Routing\\Generator\\CompiledUrlGenerator'; +$classes[] = 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableCompiledUrlMatcher'; +$preloaded = Preloader::preload($classes, $preloaded); diff --git a/backend/var/cache/dev/App_KernelDevDebugContainer.ser b/backend/var/cache/dev/App_KernelDevDebugContainer.ser new file mode 100644 index 0000000..098080d Binary files /dev/null and b/backend/var/cache/dev/App_KernelDevDebugContainer.ser differ diff --git a/backend/var/cache/dev/App_KernelDevDebugContainer.xml b/backend/var/cache/dev/App_KernelDevDebugContainer.xml new file mode 100644 index 0000000..e6b5853 --- /dev/null +++ b/backend/var/cache/dev/App_KernelDevDebugContainer.xml @@ -0,0 +1,3868 @@ + + + + /var/www/html/backend + dev + %env(default:kernel.environment:APP_RUNTIME_ENV)% + %env(query_string:default:container.runtime_mode:APP_RUNTIME_MODE)% + %env(bool:default::key:web:default:kernel.runtime_mode:)% + %env(not:default:kernel.runtime_mode.web:)% + %env(bool:default::key:worker:default:kernel.runtime_mode:)% + true + /var/www/html/backend/var/cache/dev + /var/www/html/backend/var/cache/dev + /var/www/html/backend/var/log + + Symfony\Bundle\FrameworkBundle\FrameworkBundle + Nelmio\CorsBundle\NelmioCorsBundle + Doctrine\Bundle\DoctrineBundle\DoctrineBundle + Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle + + + + /var/www/html/backend/vendor/symfony/framework-bundle + Symfony\Bundle\FrameworkBundle + + + /var/www/html/backend/vendor/nelmio/cors-bundle + Nelmio\CorsBundle + + + /var/www/html/backend/vendor/doctrine/doctrine-bundle + Doctrine\Bundle\DoctrineBundle + + + /var/www/html/backend/vendor/doctrine/doctrine-migrations-bundle + Doctrine\Bundle\MigrationsBundle + + + UTF-8 + App_KernelDevDebugContainer + /var/www/html/backend/var/share/dev + + dev + test + prod + + /var/www/html/backend/config + + + true + + + true + + + true + + + true + + + + console.command + console.error + console.signal + console.terminate + kernel.controller_arguments + kernel.controller + kernel.response + kernel.finish_request + kernel.request + kernel.view + kernel.exception + kernel.terminate + + null + /_fragment + %env(APP_SECRET)% + false + null + %env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)% + %env(default::SYMFONY_TRUSTED_HOSTS)% + en + + error_controller + %env(default::SYMFONY_TRUSTED_PROXIES)% + %env(default::SYMFONY_TRUSTED_HEADERS)% + %env(default::SYMFONY_IDE)% + -1 + /var/www/html/backend/var/cache/dev/App_KernelDevDebugContainer.xml + localhost + http + + kernel::loadRoutes + /var/www/html/backend/var/cache/dev + 80 + 443 + /var/www/html/backend/var/cache/dev/serialization.php + + _/var/www/html/backend.App_KernelDevDebugContainer + _sf2_meta + + 0 + auto + true + lax + + null + null + 0 + /var/www/html/backend/var/cache/dev/validation.php + validators + + + + + + + %env(CORS_ALLOW_ORIGIN)% + + false + + content-type + authorization + + false + + Link + + + GET + OPTIONS + POST + PUT + PATCH + DELETE + + 3600 + + true + true + null + + Nelmio\CorsBundle\EventListener\CorsListener + Nelmio\CorsBundle\Options\Resolver + Nelmio\CorsBundle\Options\ConfigProvider + Doctrine\DBAL\Configuration + Doctrine\Bundle\DoctrineBundle\DataCollector\DoctrineDataCollector + Symfony\Bridge\Doctrine\ContainerAwareEventManager + Doctrine\Bundle\DoctrineBundle\ConnectionFactory + Doctrine\DBAL\Event\Listeners\MysqlSessionInit + Doctrine\DBAL\Event\Listeners\OracleSessionInit + Doctrine\Bundle\DoctrineBundle\Registry + + doctrine.orm.default_entity_manager + + default + + + doctrine.dbal.default_connection + + default + Doctrine\ORM\Configuration + Doctrine\ORM\EntityManager + Doctrine\Bundle\DoctrineBundle\ManagerConfigurator + Doctrine\Common\Cache\ArrayCache + Doctrine\Common\Cache\ApcCache + Doctrine\Common\Cache\MemcacheCache + localhost + 11211 + Memcache + Doctrine\Common\Cache\MemcachedCache + localhost + 11211 + Memcached + Doctrine\Common\Cache\RedisCache + localhost + 6379 + Redis + Doctrine\Common\Cache\XcacheCache + Doctrine\Common\Cache\WinCacheCache + Doctrine\Common\Cache\ZendDataCache + Doctrine\Persistence\Mapping\Driver\MappingDriverChain + Doctrine\ORM\Mapping\Driver\AnnotationDriver + Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver + Doctrine\ORM\Mapping\Driver\SimplifiedYamlDriver + Doctrine\Persistence\Mapping\Driver\PHPDriver + Doctrine\Persistence\Mapping\Driver\StaticPHPDriver + Doctrine\ORM\Mapping\Driver\AttributeDriver + Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer + Symfony\Bridge\Doctrine\Form\DoctrineOrmTypeGuesser + Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator + Symfony\Bridge\Doctrine\Validator\DoctrineInitializer + Symfony\Bridge\Doctrine\Security\User\EntityUserProvider + Doctrine\ORM\Tools\ResolveTargetEntityListener + Doctrine\ORM\Tools\AttachEntityListenersListener + Doctrine\ORM\Mapping\DefaultNamingStrategy + Doctrine\ORM\Mapping\UnderscoreNamingStrategy + Doctrine\ORM\Mapping\DefaultQuoteStrategy + Doctrine\ORM\Mapping\AnsiQuoteStrategy + Doctrine\ORM\Mapping\DefaultTypedFieldMapper + Doctrine\Bundle\DoctrineBundle\Mapping\ContainerEntityListenerResolver + Doctrine\ORM\Cache\DefaultCacheFactory + Doctrine\ORM\Cache\Region\DefaultRegion + Doctrine\ORM\Cache\Region\FileLockRegion + Doctrine\ORM\Cache\Logging\CacheLoggerChain + Doctrine\ORM\Cache\Logging\StatisticsCacheLogger + Doctrine\ORM\Cache\CacheConfiguration + Doctrine\ORM\Cache\RegionsConfiguration + true + true + false + /var/www/html/backend/var/cache/dev/doctrine/orm/Proxies + Proxies + null + null + + + + + + + + + + + controller.argument_value_resolver + + + controller.argument_value_resolver + null + + + controller.targeted_value_resolver + + + + + null + validators + + + controller.argument_value_resolver + + + controller.argument_value_resolver + + + controller.argument_value_resolver + + + controller.argument_value_resolver + + + + controller.argument_value_resolver + + + controller.argument_value_resolver + + + controller.targeted_value_resolver + + + + + UTF-8 + false + + + + + + + + en + + false + + + + + + + + + + + + + error_controller + + + + + + + + error_controller + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + null + + true + + + + /var/www/html/backend/var/share/dev/http_cache + + + + + + + + + true + /var/www/html/backend/var/cache/dev/App_KernelDevDebugContainerDeprecations.log + + + + + + + + + + %kernel.secret% + _hash + _expiration + null + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ?reset + + + ?resetRequestFormats + + + reset + + + reset + + + reset + + + reset + + + reset + + + reset + + + reset + + + reset + + + reset + + + reset + + + reset + + + reset + + + + + + + + + + + + + + + + + + + + + + + + + en + + + + + + getEnv + + + + + + + + get + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + /_fragment + + + + + + + + + /_fragment + + + + + + + true + + + + UTF-8 + + /var/www/html/backend + + + + + + + + + + + %env(bool:default::key:web:default:kernel.runtime_mode:)% + + + + + + + + + + + + + + + + + + + about + + + Display information about the current project + + + + + + + /var/www/html/backend + + assets:install + + + Install bundle's web assets under a public directory + + + + + + + + + cache:clear + + + Clear the cache + + + + + + + + cache.app + cache.system + cache.validator + cache.serializer + cache.property_info + cache.validator_expression_language + cache.doctrine.orm.default.result + cache.doctrine.orm.default.query + + + cache:pool:clear + + + Clear cache pools + + + + + + + + cache:pool:prune + + + Prune cache pools + + + + + + + + cache:pool:invalidate-tags + + + Invalidate cache tags for all or a specific pool + + + + + + + + cache.app + cache.system + cache.validator + cache.serializer + cache.property_info + cache.validator_expression_language + cache.doctrine.orm.default.result + cache.doctrine.orm.default.query + + + cache:pool:delete + + + Delete an item from a cache pool + + + + + + + cache.app + cache.system + cache.validator + cache.serializer + cache.property_info + cache.validator_expression_language + cache.doctrine.orm.default.result + cache.doctrine.orm.default.query + + + cache:pool:list + + + List available cache pools + + + + + + + + cache:warmup + + + Warm up an empty cache + + + + + + + + debug:config + + + Dump the current configuration for an extension + + + + + + + config:dump-reference + + + Dump the default configuration for an extension + + + + + + + debug:container + + + Display current services for an application + + + + + + + lint:container + + + Ensure that arguments injected into services match type declarations + + + + + + null + + + debug:autowiring + + + List classes/interfaces you can use for autowiring + + + + + + dev + /var/www/html/backend + + debug:dotenv + + + List all dotenv files with variables and values + + + + + + + + debug:event-dispatcher + + + Display configured listeners for an application + + + + + + + + + debug:router + + + Display current routes for an application + + + + + + + + + router:match + + + Help debug routes by simulating a path info match + + + + + + + + debug:serializer + + + Display serialization information for classes + + + + + + + + debug:validator + + + Display validation constraints for classes + + + + + + + lint:yaml + + + Lint a YAML file and outputs encountered errors + + + + + + + + + secrets:set + + + Set a secret in the vault + + + + + + + + + secrets:remove + + + Remove a secret from the vault + + + + + + + + + secrets:generate-keys + + + Generate new encryption keys + + + + + + + + + secrets:list + + + List all secrets + + + + + + + + + secrets:reveal + + + Reveal the value of a secret + + + + + + + + + secrets:decrypt-to-local + + + Decrypt all secrets and stores them in the local vault + + + + + + + + + secrets:encrypt-from-local + + + Encrypt all local secrets to the vault + + + + + + + + null + + error:dump + + + Dump error pages to plain HTML files that can be directly served by a web server + + + + + + false + + + + + + + + + + +c-w2mU0xY + 0 + /var/www/html/backend/var/share/dev/pools/app + + + + + + + + + + + + + kyJjiJfYg6 + 0 + %container.build_id% + /var/www/html/backend/var/cache/dev/pools/system + + + + + + + zT96lbmRS1 + 0 + %container.build_id% + /var/www/html/backend/var/cache/dev/pools/system + + + + + + + alvQs8rXc8 + 0 + %container.build_id% + /var/www/html/backend/var/cache/dev/pools/system + + + + + + + SuA1pMKqPT + 0 + %container.build_id% + /var/www/html/backend/var/cache/dev/pools/system + + + + + + + + 0 + %container.build_id% + /var/www/html/backend/var/cache/dev/pools/system + + + + + + + + 0 + %container.build_id% + + + + + + + + + 0 + /var/www/html/backend/var/share/dev/pools/app + + + + + + + + PSR-6 provider service + + 0 + + + + + Redis connection service + + 0 + + + + + + + + + Redis connection service + + 0 + + + + + + + + + Memcached connection service + + 0 + + + + + + + + + DBAL connection service + + 0 + + + + + + + + + + PDO connection service + + 0 + + + + + + + + + + 0 + + + + + + null + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + null + -1 + true + true + null + + + + + null + %env(bool:default::key:web:default:kernel.runtime_mode:)% + + + %env(default::SYMFONY_IDE)% + + + + true + + + + event_dispatcher.dispatcher + + + + + + + + null + + kernel.request + + + onKernelRequest + + 250 + + + kernel.response + + + onKernelResponse + + 0 + + + kernel.response + + + onResponse + + -15 + + + console.command + + + onConsoleCommand + + 0 + + + kernel.controller_arguments + + + onKernelControllerArguments + + 0 + + + kernel.response + + + onKernelResponse + + 0 + + + kernel.request + + + setDefaultLocale + + 100 + + + kernel.request + + + onKernelRequest + + 16 + + + kernel.finish_request + + + onKernelFinishRequest + + 0 + + + kernel.request + + + onKernelRequest + + 256 + + + kernel.response + + + onResponse + + -255 + + + kernel.controller_arguments + + + onControllerArguments + + 0 + + + kernel.exception + + + logKernelException + + 0 + + + kernel.exception + + + onKernelException + + -128 + + + kernel.response + + + removeCspHeader + + -128 + + + kernel.controller_arguments + + + onKernelControllerArguments + + 10 + + + kernel.response + + + onKernelResponse + + -10 + + + kernel.controller_arguments + + + onKernelControllerArguments + + 30 + + + kernel.request + + + onKernelRequest + + 15 + + + kernel.finish_request + + + onKernelFinishRequest + + -15 + + + console.error + + + onConsoleError + + -128 + + + console.terminate + + + onConsoleTerminate + + -128 + + + console.error + + + onConsoleError + + 0 + + + kernel.request + + + configure + + 2048 + + + console.command + + + configure + + 2048 + + + kernel.request + + + onKernelRequest + + 32 + + + kernel.finish_request + + + onKernelFinishRequest + + 0 + + + kernel.exception + + + onKernelException + + -64 + + + kernel.request + + + onKernelRequest + + 128 + + + kernel.response + + + onKernelResponse + + -1000 + + + kernel.request + + + onKernelRequest + + 192 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dev + + + + + dev + + + + + dev + + + + + dev + + + + + dev + + + + + dev + + + + dev + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + kernel::loadRoutes + + /var/www/html/backend/var/cache/dev + true + Symfony\Component\Routing\Generator\CompiledUrlGenerator + Symfony\Component\Routing\Generator\Dumper\CompiledUrlGeneratorDumper + Symfony\Bundle\FrameworkBundle\Routing\RedirectableCompiledUrlMatcher + Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper + true + service + + + + + en + + + + + + %env(DEFAULT_URI)% + localhost + http + 80 + 443 + + + en + + + + + + + + + + + + + + + + + + /var/www/html/backend + true + + + + + + + + + + + + + + + + null + + + 3 + 2 + + + + + + /var/www/html/backend/config/secrets/%env(default:kernel.environment:APP_RUNTIME_ENV)% + + APP_SECRET + + + + + + + + base64:default::SYMFONY_DECRYPTION_SECRET + + + /var/www/html/backend/.env.dev.local + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + null + + + + + + + + + + null + null + + + + + + true + + null + + + + + + + + + + + + + + + + + + + + + + + + null + + + + + + + + + null + + + + + + + + + + + + + true + + + + + + + + + + + /var/www/html/backend/var/cache/dev/serialization.php + + + /var/www/html/backend/var/cache/dev/serialization.php + + + + + + + + + + + + null + null + + + + + + null + null + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + render + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + null + null + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + redis://localhost + + true + + + + valkey://localhost + + true + + + + memcached://localhost + + true + + + + 0 + false + + + + + + + onSessionUsage + + + + %session.storage.options% + + + + _sf2_meta + 0 + null + + + true + + + + + + _sf2_meta + 0 + null + + + true + + + /var/www/html/backend/var/cache/dev/sessions + MOCKSESSID + + + _sf2_meta + 0 + null + + + + + + + + + + + + null + + + + + A string or a connection object + + + + + + + + + + true + %session.storage.options% + + + + + + + + + + + + + + validators + + + + loadValidatorMetadata + + + + + + + + + + + + + + + + + + /var/www/html/backend/var/cache/dev/validation.php + + + /var/www/html/backend/var/cache/dev/validation.php + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + null + + + + + cN6MtYyfJl + 0 + %container.build_id% + /var/www/html/backend/var/cache/dev/pools/system + + + + + + html5 + + + + null + UTF-8 + true + null + + + + null + + + + + + + + + + + null + + + + + + + + + + + + + + + + %nelmio_cors.map% + %nelmio_cors.defaults% + + + + + + + + + true + + + + + + + + + ibm_db2 + pdo_sqlsrv + pdo_mysql + pdo_mysql + pdo_pgsql + pdo_pgsql + pdo_pgsql + pdo_sqlite + pdo_sqlite + + + + + + + + + + + + + %doctrine.connections% + %doctrine.entity_managers% + default + default + + + + + + + + + + + + + + doctrine:database:create + + + + + + + + doctrine:database:drop + + + + + + + + doctrine:query:sql + + + + + + + + dbal:run-sql + + + + + + + + + + + + + + + + + + + + + + + + + + + + + postGenerateSchema + + doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener + + + + postGenerateSchema + + doctrine.orm.listeners.doctrine_token_provider_schema_listener + + + + postGenerateSchema + + doctrine.orm.listeners.pdo_session_handler_schema_listener + + + + postGenerateSchema + + doctrine.orm.listeners.lock_store_schema_listener + + + + loadClassMetadata + + doctrine.orm.default_listeners.attach_entity_listeners + + + + + + %env(resolve:DATABASE_URL)% + true + pdo_mysql + 600 + localhost + null + root + null + + + + + null + + + + + + + + + %doctrine.connections% + %doctrine.entity_managers% + default + default + + + + + + + + default + + + + + + + + + + + + 600 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + true + + + + + + + null + + + + null + + + + + + controller.argument_value_resolver + + null + + + null + null + null + + null + null + null + null + false + + + + + + + + + + doctrine:cache:clear-metadata + + + + + + + + doctrine:cache:clear-query + + + + + + + + doctrine:cache:clear-result + + + + + + + + doctrine:cache:clear-collection-region + + + + + + + + doctrine:schema:create + + + + + + + + doctrine:schema:drop + + + + + + + + doctrine:cache:clear-entity-region + + + + + + + + doctrine:mapping:info + + + + + + + + doctrine:mapping:describe + + + + + + + + doctrine:cache:clear-query-region + + + + + + + + doctrine:query:dql + + + + + + + + doctrine:schema:update + + + + + + + + doctrine:schema:validate + + + + + + + App\Entity + + + + + + + + + + + + + + + + /var/www/html/backend/var/cache/dev/doctrine/orm/Proxies + + + Proxies + + + true + + + + + + Doctrine\Bundle\DoctrineBundle\Mapping\ClassMetadataFactory + + + Doctrine\ORM\EntityRepository + + + + + + + + + + + + + + + true + + + + 4 + + + + + + + + + /var/www/html/backend/src/Entity + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + null + + + + + + + Doctrine\Migrations\Version\MigrationFactory + + + + + + + + + + + + + + + + + DoctrineMigrations + /var/www/html/backend/migrations + + + false + + + true + + + true + + + + + + + + + + + + + doctrine:migrations:diff + + doctrine:migrations:diff + + + Generate a migration by comparing your current database to your mapping information. + + + + + + + doctrine:migrations:sync-metadata-storage + + doctrine:migrations:sync-metadata-storage + + + Ensures that the metadata storage is at the latest version. + + + + + + + doctrine:migrations:versions + + doctrine:migrations:list + + + Display a list of all available migrations and their status. + + + + + + + doctrine:migrations:current + + doctrine:migrations:current + + + Outputs the current version + + + + + + + doctrine:migrations:dump-schema + + doctrine:migrations:dump-schema + + + Dump the schema for your database to a migration. + + + + + + + doctrine:migrations:execute + + doctrine:migrations:execute + + + Execute one or more migration versions up or down manually. + + + + + + + doctrine:migrations:generate + + doctrine:migrations:generate + + + Generate a blank migration class. + + + + + + + doctrine:migrations:latest + + doctrine:migrations:latest + + + Outputs the latest version + + + + + + + doctrine:migrations:migrate + + doctrine:migrations:migrate + + + Execute a migration to a specified version or the latest available version. + + + + + + + doctrine:migrations:rollup + + doctrine:migrations:rollup + + + Rollup migrations by deleting all tracked versions and insert the one version that exists. + + + + + + + doctrine:migrations:status + + doctrine:migrations:status + + + View the status of a set of migrations. + + + + + + + doctrine:migrations:up-to-date + + doctrine:migrations:up-to-date + + + Tells you if your schema is up-to-date. + + + + + + + doctrine:migrations:version + + doctrine:migrations:version + + + Manually add and delete migration versions from the version table. + + + + + + + doctrine_migration_versions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + kernel::registerContainerConfiguration() + + + + + + kernel::loadRoutes() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + default + + + + + + 600 + + + default + + + + null + null + null + + %env(bool:default::key:web:default:kernel.runtime_mode:)% + + + + + + + + + + + + + + controller.helper + + + + + + + + + + + + router.default + + + + + + + + + + + + router.cache_warmer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Symfony\Bundle\FrameworkBundle\Controller\AbstractController + Symfony\Bundle\FrameworkBundle\Controller\TemplateController + + + + + App\Kernel + Doctrine\Bundle\DoctrineBundle\Controller\ProfilerController + + + + + + + + + + + + + + + + + + + + + + + App\Entity + + + + + + + about + + Display information about the current project + false + + + + assets:install + + Install bundle's web assets under a public directory + false + + + + cache:clear + + Clear the cache + false + + + + cache:pool:clear + + Clear cache pools + false + + + + cache:pool:prune + + Prune cache pools + false + + + + cache:pool:invalidate-tags + + Invalidate cache tags for all or a specific pool + false + + + + cache:pool:delete + + Delete an item from a cache pool + false + + + + cache:pool:list + + List available cache pools + false + + + + cache:warmup + + Warm up an empty cache + false + + + + debug:config + + Dump the current configuration for an extension + false + + + + config:dump-reference + + Dump the default configuration for an extension + false + + + + debug:container + + Display current services for an application + false + + + + lint:container + + Ensure that arguments injected into services match type declarations + false + + + + debug:autowiring + + List classes/interfaces you can use for autowiring + false + + + + debug:dotenv + + List all dotenv files with variables and values + false + + + + debug:event-dispatcher + + Display configured listeners for an application + false + + + + debug:router + + Display current routes for an application + false + + + + router:match + + Help debug routes by simulating a path info match + false + + + + debug:serializer + + Display serialization information for classes + false + + + + debug:validator + + Display validation constraints for classes + false + + + + lint:yaml + + Lint a YAML file and outputs encountered errors + false + + + + secrets:set + + Set a secret in the vault + false + + + + secrets:remove + + Remove a secret from the vault + false + + + + secrets:generate-keys + + Generate new encryption keys + false + + + + secrets:list + + List all secrets + false + + + + secrets:reveal + + Reveal the value of a secret + false + + + + secrets:decrypt-to-local + + Decrypt all secrets and stores them in the local vault + false + + + + secrets:encrypt-from-local + + Encrypt all local secrets to the vault + false + + + + error:dump + + Dump error pages to plain HTML files that can be directly served by a web server + false + + + + doctrine:migrations:diff + + Generate a migration by comparing your current database to your mapping information. + false + + + + doctrine:migrations:sync-metadata-storage + + Ensures that the metadata storage is at the latest version. + false + + + + doctrine:migrations:list + + Display a list of all available migrations and their status. + false + + + + doctrine:migrations:current + + Outputs the current version + false + + + + doctrine:migrations:dump-schema + + Dump the schema for your database to a migration. + false + + + + doctrine:migrations:execute + + Execute one or more migration versions up or down manually. + false + + + + doctrine:migrations:generate + + Generate a blank migration class. + false + + + + doctrine:migrations:latest + + Outputs the latest version + false + + + + doctrine:migrations:migrate + + Execute a migration to a specified version or the latest available version. + false + + + + doctrine:migrations:rollup + + Rollup migrations by deleting all tracked versions and insert the one version that exists. + false + + + + doctrine:migrations:status + + View the status of a set of migrations. + false + + + + doctrine:migrations:up-to-date + + Tells you if your schema is up-to-date. + false + + + + doctrine:migrations:version + + Manually add and delete migration versions from the version table. + false + + + + + + + console.command.about + console.command.assets_install + console.command.cache_clear + console.command.cache_pool_clear + console.command.cache_pool_prune + console.command.cache_pool_invalidate_tags + console.command.cache_pool_delete + console.command.cache_pool_list + console.command.cache_warmup + console.command.config_debug + console.command.config_dump_reference + console.command.container_debug + console.command.container_lint + console.command.debug_autowiring + console.command.dotenv_debug + console.command.event_dispatcher_debug + console.command.router_debug + console.command.router_match + console.command.serializer_debug + console.command.validator_debug + console.command.yaml_lint + console.command.secrets_set + console.command.secrets_remove + console.command.secrets_generate_key + console.command.secrets_list + console.command.secrets_reveal + console.command.secrets_decrypt_to_local + console.command.secrets_encrypt_from_local + console.command.error_dumper + doctrine.database_create_command + doctrine.database_drop_command + doctrine.query_sql_command + Doctrine\DBAL\Tools\Console\Command\RunSqlCommand + doctrine.cache_clear_metadata_command + doctrine.cache_clear_query_cache_command + doctrine.cache_clear_result_command + doctrine.cache_collection_region_command + doctrine.schema_create_command + doctrine.schema_drop_command + doctrine.clear_entity_region_command + doctrine.mapping_info_command + doctrine.mapping_describe_command + doctrine.clear_query_region_command + doctrine.query_dql_command + doctrine.schema_update_command + doctrine.schema_validate_command + doctrine_migrations.diff_command + doctrine_migrations.sync_metadata_command + doctrine_migrations.versions_command + doctrine_migrations.current_command + doctrine_migrations.dump_schema_command + doctrine_migrations.execute_command + doctrine_migrations.generate_command + doctrine_migrations.latest_command + doctrine_migrations.migrate_command + doctrine_migrations.rollup_command + doctrine_migrations.status_command + doctrine_migrations.up_to_date_command + doctrine_migrations.version_command + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/var/cache/dev/App_KernelDevDebugContainer.xml.meta b/backend/var/cache/dev/App_KernelDevDebugContainer.xml.meta new file mode 100644 index 0000000..af642cb --- /dev/null +++ b/backend/var/cache/dev/App_KernelDevDebugContainer.xml.meta @@ -0,0 +1 @@ +a:17:{i:0;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:52:"/var/www/html/backend/vendor/composer/installed.json";}i:1;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:36:"/var/www/html/backend/src/Kernel.php";}i:2;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:40:"/var/www/html/backend/config/bundles.php";}i:3;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:48:"/var/www/html/backend/config/packages/cache.yaml";}i:4;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:51:"/var/www/html/backend/config/packages/doctrine.yaml";}i:5;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:62:"/var/www/html/backend/config/packages/doctrine_migrations.yaml";}i:6;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:52:"/var/www/html/backend/config/packages/framework.yaml";}i:7;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:54:"/var/www/html/backend/config/packages/nelmio_cors.yaml";}i:8;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:56:"/var/www/html/backend/config/packages/property_info.yaml";}i:9;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:50:"/var/www/html/backend/config/packages/routing.yaml";}i:10;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:52:"/var/www/html/backend/config/packages/validator.yaml";}i:11;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:42:"/var/www/html/backend/config/services.yaml";}i:12;O:57:"Symfony\Component\Config\Resource\ReflectionClassResource":4:{s:5:"files";a:1:{s:36:"/var/www/html/backend/src/Kernel.php";N;}s:9:"className";s:10:"App\Kernel";s:15:"excludedVendors";a:1:{i:0;s:28:"/var/www/html/backend/vendor";}s:4:"hash";s:32:"34dd59c357ea1eb564085e89fd216437";}i:13;O:46:"Symfony\Component\Config\Resource\GlobResource":6:{s:6:"prefix";s:25:"/var/www/html/backend/src";s:7:"pattern";s:0:"";s:9:"recursive";b:1;s:4:"hash";s:32:"713b3c973eafc0d1f540369da5af6779";s:12:"forExclusion";b:0;s:16:"excludedPrefixes";a:0:{}}i:14;O:55:"Symfony\Component\Config\Resource\FileExistenceResource":2:{s:8:"resource";s:39:"/var/www/html/backend/config/serializer";s:6:"exists";b:0;}i:15;O:55:"Symfony\Component\Config\Resource\FileExistenceResource":2:{s:8:"resource";s:38:"/var/www/html/backend/config/validator";s:6:"exists";b:0;}i:16;O:46:"Symfony\Component\Config\Resource\FileResource":1:{s:8:"resource";s:42:"/var/www/html/backend/config/reference.php";}} \ No newline at end of file diff --git a/backend/var/cache/dev/App_KernelDevDebugContainer.xml.meta.json b/backend/var/cache/dev/App_KernelDevDebugContainer.xml.meta.json new file mode 100644 index 0000000..674dfaa --- /dev/null +++ b/backend/var/cache/dev/App_KernelDevDebugContainer.xml.meta.json @@ -0,0 +1 @@ +{"resources":[{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/vendor/composer/installed.json"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/src/Kernel.php"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/bundles.php"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/cache.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/doctrine.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/doctrine_migrations.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/framework.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/nelmio_cors.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/property_info.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/routing.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/packages/validator.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/services.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\ReflectionClassResource","files":{"/var/www/html/backend/src/Kernel.php":null},"className":"App\\Kernel","excludedVendors":["/var/www/html/backend/vendor"],"hash":"34dd59c357ea1eb564085e89fd216437"},{"@type":"Symfony\\Component\\Config\\Resource\\GlobResource","prefix":"/var/www/html/backend/src","pattern":"","recursive":true,"hash":"713b3c973eafc0d1f540369da5af6779","forExclusion":false,"excludedPrefixes":[]},{"@type":"Symfony\\Component\\Config\\Resource\\FileExistenceResource","resource":"/var/www/html/backend/config/serializer","exists":false},{"@type":"Symfony\\Component\\Config\\Resource\\FileExistenceResource","resource":"/var/www/html/backend/config/validator","exists":false},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/reference.php"}]} \ No newline at end of file diff --git a/backend/var/cache/dev/App_KernelDevDebugContainerCompiler.log b/backend/var/cache/dev/App_KernelDevDebugContainerCompiler.log new file mode 100644 index 0000000..732dc59 --- /dev/null +++ b/backend/var/cache/dev/App_KernelDevDebugContainerCompiler.log @@ -0,0 +1,381 @@ +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "cache.app" (parent: cache.adapter.filesystem). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "cache.system" (parent: cache.adapter.system). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "cache.validator" (parent: cache.system). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "cache.serializer" (parent: cache.system). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "cache.property_info" (parent: cache.system). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "cache.system_clearer" (parent: cache.default_clearer). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "cache.global_clearer" (parent: cache.default_clearer). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "secrets.decryption_key" (parent: container.env). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "serializer.name_converter.metadata_aware" (parent: serializer.name_converter.metadata_aware.abstract). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "cache.validator_expression_language" (parent: cache.system). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "doctrine.dbal.default_connection.configuration" (parent: doctrine.dbal.connection.configuration). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "doctrine.dbal.default_connection.event_manager" (parent: doctrine.dbal.connection.event_manager). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "doctrine.dbal.default_connection" (parent: doctrine.dbal.connection). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "doctrine.orm.default_configuration" (parent: doctrine.orm.configuration). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "doctrine.orm.default_manager_configurator" (parent: doctrine.orm.manager_configurator.abstract). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "doctrine.orm.default_entity_manager" (parent: doctrine.orm.entity_manager.abstract). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "doctrine.dbal.default_schema_asset_filter_manager" (parent: doctrine.dbal.schema_asset_filter_manager). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "doctrine.dbal.debug_middleware.default" (parent: doctrine.dbal.debug_middleware). +Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass: Resolving inheritance for "doctrine.dbal.idle_connection_middleware.default" (parent: doctrine.dbal.idle_connection_middleware). +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Bundle\FrameworkBundle\Controller\ControllerHelper"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\EventDispatcher\EventDispatcherInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Contracts\EventDispatcher\EventDispatcherInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Psr\EventDispatcher\EventDispatcherInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\HttpKernel\HttpKernelInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\HttpFoundation\RequestStack"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\HttpKernel\HttpCache\StoreInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\HttpFoundation\UrlHelper"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\HttpKernel\KernelInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Filesystem\Filesystem"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\HttpKernel\Config\FileLocator"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\HttpFoundation\UriSigner"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\HttpKernel\DependencyInjection\ServicesResetterInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\DependencyInjection\ReverseContainer"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\String\Slugger\SluggerInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "error_renderer.html"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "error_renderer.cli"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "error_renderer.default"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "error_renderer"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service ".Psr\Container\ContainerInterface $parameter_bag"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Psr\Container\ContainerInterface $parameterBag"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "cache.adapter.valkey"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "cache.adapter.valkey_tag_aware"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Psr\Cache\CacheItemPoolInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Contracts\Cache\CacheInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Contracts\Cache\NamespacedPoolInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Contracts\Cache\TagAwareCacheInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Stopwatch\Stopwatch"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Routing\RouterInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Routing\Generator\UrlGeneratorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Routing\Matcher\UrlMatcherInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Routing\RequestContextAwareInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Routing\RequestContext"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\PropertyAccess\PropertyAccessorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Serializer\SerializerInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Serializer\Normalizer\NormalizerInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Serializer\Normalizer\DenormalizerInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Serializer\Encoder\EncoderInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Serializer\Encoder\DecoderInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "serializer.property_accessor"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Serializer\Mapping\ClassDiscriminatorResolverInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "error_renderer.serializer"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\TypeInfo\TypeResolver\TypeResolverInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\PropertyInfo\PropertyListExtractorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "cache.default_redis_provider"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "cache.default_valkey_provider"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "cache.default_memcached_provider"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "cache.default_doctrine_dbal_provider"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "SessionHandlerInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "session.storage.factory"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "session.handler"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Symfony\Component\Validator\Validator\ValidatorInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "validator.mapping.class_metadata_factory"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Doctrine\DBAL\Connection"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Doctrine\Persistence\ManagerRegistry"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Doctrine\Common\Persistence\ManagerRegistry"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "doctrine.dbal.event_manager"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service ".Doctrine\DBAL\Connection $default.connection"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Doctrine\DBAL\Connection $defaultConnection"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Doctrine\ORM\EntityManagerInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "doctrine.orm.default_metadata_cache"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "doctrine.orm.default_result_cache"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "doctrine.orm.default_query_cache"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service ".Doctrine\ORM\EntityManagerInterface $default.entity_manager"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Doctrine\ORM\EntityManagerInterface $defaultEntityManager"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "doctrine.orm.default_entity_manager.event_manager"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "doctrine.migrations.metadata_storage"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "argument_resolver.controller_locator"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "doctrine.id_generator_locator"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "Psr\Log\LoggerInterface"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service ".service_locator.n0.zoXR"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "controller_resolver"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "argument_resolver"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "doctrine.orm.default_metadata_driver"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service ".service_locator.c0wzfI4"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service ".service_locator.SPA6NDT"; reason: private alias. +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "locale_listener" previously pointing to "router.default" to "router". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "http_kernel" previously pointing to "debug.event_dispatcher" to "event_dispatcher". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "url_helper" previously pointing to "router.default" to "router". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "services_resetter" previously pointing to "debug.event_dispatcher" to "event_dispatcher". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "fragment.renderer.inline" previously pointing to "debug.event_dispatcher" to "event_dispatcher". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "console.command.config_debug" previously pointing to ".service_locator.ryAvHi4" to "container.env_var_processors_locator". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "console.command.router_debug" previously pointing to "router.default" to "router". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "console.command.router_match" previously pointing to "router.default" to "router". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "router_listener" previously pointing to "router.default" to "router". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "Symfony\Bundle\FrameworkBundle\Controller\RedirectController" previously pointing to "router.default" to "router". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service ".service_locator.TJNRSaV" previously pointing to "router.default" to "router". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service ".service_locator.mFBT25N" previously pointing to "router.default" to "router". +Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service ".service_locator.pKmY5Nr" previously pointing to "debug.event_dispatcher" to "event_dispatcher". +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "container.env"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Config\Loader\LoaderInterface"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\HttpFoundation\Request"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\HttpFoundation\Response"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\HttpFoundation\Session\SessionInterface"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "cache.adapter.system"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "cache.adapter.apcu"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "cache.adapter.filesystem"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "cache.adapter.psr6"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "cache.adapter.redis"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "cache.adapter.redis_tag_aware"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "cache.adapter.memcached"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "cache.adapter.doctrine_dbal"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "cache.adapter.pdo"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "cache.adapter.array"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "serializer.name_converter.metadata_aware.abstract"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service ".abstract.Symfony\Component\Validator\Constraints\AbstractComparisonValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\AllValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\AtLeastOneOfValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\BicValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\BlankValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\CallbackValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\CardSchemeValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\CharsetValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\ChoiceValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\CidrValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\CollectionValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\CompoundValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\CountValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\CountryValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\CssColorValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\CurrencyValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\DateTimeValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\DateValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\DivisibleByValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\EmailValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\EqualToValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\ExpressionSyntaxValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\ExpressionValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\FileValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\GreaterThanOrEqualValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\GreaterThanValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\HostnameValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\IbanValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\IdenticalToValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\ImageValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\IpValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\IsFalseValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\IsNullValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\IsTrueValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\IsbnValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\IsinValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\IssnValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\JsonValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\LanguageValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\LengthValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\LessThanOrEqualValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\LessThanValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\LocaleValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\LuhnValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\MacAddressValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\NoSuspiciousCharactersValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\NotBlankValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\NotCompromisedPasswordValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\NotEqualToValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\NotIdenticalToValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\NotNullValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\PasswordStrengthValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\RangeValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\RegexValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\SequentiallyValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\TimeValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\TimezoneValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\TypeValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\UlidValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\UniqueValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\UrlValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\UuidValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\ValidValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\VideoValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\WeekValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\WhenValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\WordCountValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "Symfony\Component\Validator\Constraints\YamlValidator"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.dbal.connection"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.dbal.connection.event_manager"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.dbal.connection.configuration"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.dbal.schema_asset_filter_manager"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.dbal.debug_middleware"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.dbal.idle_connection_middleware"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.orm.configuration"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.orm.entity_manager.abstract"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.orm.manager_configurator.abstract"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.orm.security.user.provider"; reason: abstract. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "controller.helper"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "http_cache"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "http_cache.store"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "url_helper"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "reverse_container"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "fragment.handler"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "fragment.uri_generator"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "fragment.renderer.inline"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "console.messenger.application"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "console.messenger.execute_command_handler"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "cache.validator"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "cache.serializer"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "cache.property_info"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "serializer.normalizer.property"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "serializer.mapping.cache.symfony"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "serializer.name_converter.camel_case_to_snake_case"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "serializer.name_converter.snake_case_to_camel_case"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "type_info.type_context_factory"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "type_info.resolver"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "type_info.resolver.reflection_type"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "type_info.resolver.reflection_parameter"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "type_info.resolver.reflection_property"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "type_info.resolver.reflection_return"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "type_info.resolver.string"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "type_info.resolver.reflection_parameter.phpdoc_aware"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "type_info.resolver.reflection_property.phpdoc_aware"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "type_info.resolver.reflection_return.phpdoc_aware"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service ".cache_connection.MfCypIA"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service ".cache_connection.H8vabc8"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service ".cache_connection.8kvDmRs"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "session.storage.factory.php_bridge"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "session.storage.factory.mock_file"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "session.handler.native_file"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "session.abstract_handler"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "session.marshaller"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "validator.mapping.cache.adapter"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "data_collector.doctrine"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.twig.doctrine_extension"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.dbal.well_known_schema_asset_filter"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "form.type_guesser.doctrine"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "form.type.entity"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.listeners.resolve_target_entity"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.naming_strategy.default"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.naming_strategy.underscore"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.quote_strategy.ansi"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.migrations.connection_loader"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.migrations.em_loader"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.migrations.connection_registry_loader"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service ".service_locator.nqEKT7G"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service ".service_locator.TJNRSaV"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service ".service_locator.TJNRSaV.controller.helper"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service ".service_locator.icAHgqM"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service ".service_locator.zfRA4vz"; reason: unused. +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "error_handler.error_renderer.serializer" to "error_controller". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "debug.controller_resolver" to "http_kernel". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "debug.argument_resolver" to "http_kernel". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "cache_clearer" to "console.command.cache_clear". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.YDYHnos" to "console.command.cache_pool_invalidate_tags". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.pKmY5Nr" to "console.command.event_dispatcher_debug". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "cache.default_marshaller" to "cache.app". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "debug.controller_resolver.inner" to "debug.controller_resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "debug.argument_resolver.inner" to "debug.argument_resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.xml" to "routing.resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.yml" to "routing.resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.php" to "routing.resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.glob" to "routing.resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.directory" to "routing.resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.container" to "routing.resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.attribute.services" to "routing.resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.attribute.directory" to "routing.resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.attribute.file" to "routing.resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.psr4" to "routing.resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.aP814lZ" to "routing.loader.container". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.resolver" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.mFBT25N.router.cache_warmer" to "router.cache_warmer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "cache.property_access" to "property_accessor". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "secrets.decryption_key" to "secrets.vault". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "container.getenv" to "secrets.decryption_key". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.denormalizer.unwrapping" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.problem" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.uid" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.datetime" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.constraint_violation_list" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.datetimezone" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.dateinterval" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.form_error" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.backed_enum" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.number" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.data_uri" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.json_serializable" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.denormalizer.array" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.normalizer.object" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.encoder.xml" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.encoder.json" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.encoder.yaml" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.encoder.csv" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.mapping.class_discriminator_resolver" to "serializer.normalizer.object". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.mapping.chain_loader" to "serializer.mapping.class_metadata_factory". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "error_handler.error_renderer.default" to "error_handler.error_renderer.serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "session.storage.factory.native" to "session.factory". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.MQ2K9ka" to "session_listener". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "validator.validator_factory" to "validator.builder". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.validator_initializer" to "validator.builder". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "validator.property_info_loader" to "validator.builder". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.default_entity_manager.validator_loader" to "validator.builder". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.ezu51To" to "validator.validator_factory". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "nelmio_cors.options_resolver" to "nelmio_cors.cors_listener". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "nelmio_cors.options_provider.config" to "nelmio_cors.options_resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.dbal.connection_factory.dsn_parser" to "doctrine.dbal.connection_factory". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.dbal.default_schema_manager_factory" to "doctrine.dbal.default_connection.configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.dbal.default_schema_asset_filter_manager" to "doctrine.dbal.default_connection.configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.dbal.debug_middleware.default" to "doctrine.dbal.default_connection.configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.dbal.idle_connection_middleware.default" to "doctrine.dbal.default_connection.configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.n98meg9" to "doctrine.dbal.default_connection.event_manager". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.dbal.default_connection.configuration" to "doctrine.dbal.default_connection". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.dbal.connection_factory" to "doctrine.dbal.default_connection". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "cache.doctrine.orm.default.metadata" to "doctrine.orm.default_configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".doctrine.orm.default_metadata_driver" to "doctrine.orm.default_configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.naming_strategy.underscore_number_aware" to "doctrine.orm.default_configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.quote_strategy.default" to "doctrine.orm.default_configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.typed_field_mapper.default" to "doctrine.orm.default_configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.default_entity_listener_resolver" to "doctrine.orm.default_configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.container_repository_factory" to "doctrine.orm.default_configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.migrations.configuration_loader" to "doctrine.migrations.dependency_factory". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.migrations.entity_manager_registry_loader" to "doctrine.migrations.dependency_factory". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.migrations.configuration" to "doctrine.migrations.configuration_loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.migrations.storage.table_storage" to "doctrine.migrations.configuration". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.entity_value_resolver" to ".debug.value_resolver.doctrine.orm.entity_value_resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "argument_resolver.backed_enum_resolver" to ".debug.value_resolver.argument_resolver.backed_enum_resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "argument_resolver.datetime" to ".debug.value_resolver.argument_resolver.datetime". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "argument_resolver.request_attribute" to ".debug.value_resolver.argument_resolver.request_attribute". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "argument_resolver.request" to ".debug.value_resolver.argument_resolver.request". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "argument_resolver.session" to ".debug.value_resolver.argument_resolver.session". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "argument_resolver.service" to ".debug.value_resolver.argument_resolver.service". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "argument_resolver.default" to ".debug.value_resolver.argument_resolver.default". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "argument_resolver.variadic" to ".debug.value_resolver.argument_resolver.variadic". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "argument_resolver.not_tagged_controller" to ".debug.value_resolver.argument_resolver.not_tagged_controller". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "argument_resolver.query_parameter_value_resolver" to ".debug.value_resolver.argument_resolver.query_parameter_value_resolver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".doctrine.orm.default_metadata_driver.inner" to ".doctrine.orm.default_metadata_driver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.W55Po6X" to ".doctrine.orm.default_metadata_driver". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.TVmQFtt" to ".service_locator.TVmQFtt.router.default". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.mFBT25N" to ".service_locator.mFBT25N.router.cache_warmer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "argument_metadata_factory" to "debug.argument_resolver.inner". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.3cr5x8e" to "debug.argument_resolver.inner". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.default_attribute_metadata_driver" to ".doctrine.orm.default_metadata_driver.inner". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.FBAtxQB" to "console.command_loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service ".service_locator.TVmQFtt.router.default" to "router". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "parameter_bag" to "router". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "config_cache_factory" to "router". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "debug.event_dispatcher.inner" to "event_dispatcher". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "file_locator" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "file_locator" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "file_locator" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "file_locator" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "file_locator" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.attribute" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "file_locator" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.attribute" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "file_locator" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.attribute" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "file_locator" to "routing.loader". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "property_accessor" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.name_converter.metadata_aware" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "serializer.name_converter.metadata_aware" to "serializer". +Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "property_accessor" to "serializer". +Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass: Tag "container.decorator" was defined on service(s) "event_dispatcher", but was never used. +Symfony\Component\DependencyInjection\Compiler\RemoveBuildParametersPass: Removing build parameter ".kernel.config_dir". \ No newline at end of file diff --git a/backend/var/cache/dev/App_KernelDevDebugContainerDeprecations.log b/backend/var/cache/dev/App_KernelDevDebugContainerDeprecations.log new file mode 100644 index 0000000..c856afc --- /dev/null +++ b/backend/var/cache/dev/App_KernelDevDebugContainerDeprecations.log @@ -0,0 +1 @@ +a:0:{} \ No newline at end of file diff --git a/backend/var/cache/dev/ContainerBuxy6WO.legacy b/backend/var/cache/dev/ContainerBuxy6WO.legacy new file mode 100644 index 0000000..e69de29 diff --git a/backend/var/cache/dev/ContainerBuxy6WO/App_KernelDevDebugContainer.php b/backend/var/cache/dev/ContainerBuxy6WO/App_KernelDevDebugContainer.php new file mode 100644 index 0000000..fe6429f --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/App_KernelDevDebugContainer.php @@ -0,0 +1,558 @@ + 'A non-empty value for the parameter "kernel.secret" is required. Did you forget to configure the "APP_SECRET" env var?', + ]; + + protected $targetDir; + protected $parameters = []; + protected \Closure $getService; + + public function __construct(private array $buildParameters = [], protected string $containerDir = __DIR__) + { + $this->targetDir = \dirname($containerDir); + $this->parameters = $this->getDefaultParameters(); + + $this->services = $this->privates = []; + $this->syntheticIds = [ + 'kernel' => true, + ]; + $this->methodMap = [ + 'event_dispatcher' => 'getEventDispatcherService', + 'http_kernel' => 'getHttpKernelService', + 'request_stack' => 'getRequestStackService', + 'router' => 'getRouterService', + ]; + $this->fileMap = [ + 'Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController' => 'getRedirectControllerService', + 'Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController' => 'getTemplateControllerService', + 'cache.app' => 'getCache_AppService', + 'cache.app_clearer' => 'getCache_AppClearerService', + 'cache.global_clearer' => 'getCache_GlobalClearerService', + 'cache.system' => 'getCache_SystemService', + 'cache.system_clearer' => 'getCache_SystemClearerService', + 'cache_warmer' => 'getCacheWarmerService', + 'console.command_loader' => 'getConsole_CommandLoaderService', + 'container.env_var_processors_locator' => 'getContainer_EnvVarProcessorsLocatorService', + 'container.get_routing_condition_service' => 'getContainer_GetRoutingConditionServiceService', + 'debug.error_handler_configurator' => 'getDebug_ErrorHandlerConfiguratorService', + 'error_controller' => 'getErrorControllerService', + 'routing.loader' => 'getRouting_LoaderService', + 'services_resetter' => 'getServicesResetterService', + ]; + $this->aliases = [ + 'App\\Kernel' => 'kernel', + ]; + + $this->privates['service_container'] = static function ($container) { + include_once \dirname(__DIR__, 4).'/vendor/symfony/event-dispatcher/EventSubscriberInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/ResponseListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/LocaleListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/ErrorListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/CacheAttributeListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/IsSignatureValidAttributeListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/event-dispatcher/EventDispatcherInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/event-dispatcher/EventDispatcher.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/RunnerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/Runner/Symfony/ResponseRunner.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/RuntimeInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/GenericRuntime.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/SymfonyRuntime.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/HttpKernelInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/TerminableInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/HttpKernel.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ControllerResolverInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ControllerResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/framework-bundle/Controller/ControllerResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ArgumentResolverInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ArgumentResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/container/src/ContainerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/service-contracts/ServiceProviderInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/service-contracts/ServiceCollectionInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/service-contracts/ServiceLocatorTrait.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ServiceLocator.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-foundation/RequestStack.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/RequestContext.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/RouterListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/service-contracts/ResetInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/SessionListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/log/src/LoggerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/log/src/LoggerTrait.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/log/src/AbstractLogger.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Log/DebugLoggerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Log/Logger.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/RequestContextAwareInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/Matcher/UrlMatcherInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/Generator/UrlGeneratorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/RouterInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/Matcher/RequestMatcherInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/Router.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/CacheWarmer/WarmableInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/service-contracts/ServiceSubscriberInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/framework-bundle/Routing/Router.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/config/ConfigCacheFactoryInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php'; + }; + } + + public function compile(): void + { + throw new LogicException('You cannot compile a dumped container that was already compiled.'); + } + + public function isCompiled(): bool + { + return true; + } + + public function getRemovedIds(): array + { + return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php'; + } + + protected function load($file, $lazyLoad = true): mixed + { + if (class_exists($class = __NAMESPACE__.'\\'.$file, false)) { + return $class::do($this, $lazyLoad); + } + + if ('.' === $file[-4]) { + $class = substr($class, 0, -4); + } else { + $file .= '.php'; + } + + $service = require $this->containerDir.\DIRECTORY_SEPARATOR.$file; + + return class_exists($class, false) ? $class::do($this, $lazyLoad) : $service; + } + + protected function createProxy($class, \Closure $factory) + { + class_exists($class, false) || require __DIR__.'/'.$class.'.php'; + + return $factory(); + } + + /** + * Gets the public 'event_dispatcher' shared service. + * + * @return \Symfony\Component\EventDispatcher\EventDispatcher + */ + protected static function getEventDispatcherService($container) + { + $container->services['event_dispatcher'] = $instance = new \Symfony\Component\EventDispatcher\EventDispatcher(); + + $instance->addListener('kernel.response', [#[\Closure(name: 'response_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener')] fn () => ($container->privates['response_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\ResponseListener('UTF-8', false)), 'onKernelResponse'], 0); + $instance->addListener('kernel.request', [#[\Closure(name: 'locale_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener')] fn () => ($container->privates['locale_listener'] ?? self::getLocaleListenerService($container)), 'setDefaultLocale'], 100); + $instance->addListener('kernel.request', [#[\Closure(name: 'locale_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener')] fn () => ($container->privates['locale_listener'] ?? self::getLocaleListenerService($container)), 'onKernelRequest'], 16); + $instance->addListener('kernel.finish_request', [#[\Closure(name: 'locale_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener')] fn () => ($container->privates['locale_listener'] ?? self::getLocaleListenerService($container)), 'onKernelFinishRequest'], 0); + $instance->addListener('kernel.request', [#[\Closure(name: 'validate_request_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener')] fn () => ($container->privates['validate_request_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\ValidateRequestListener()), 'onKernelRequest'], 256); + $instance->addListener('kernel.response', [#[\Closure(name: 'disallow_search_engine_index_response_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\DisallowRobotsIndexingListener')] fn () => ($container->privates['disallow_search_engine_index_response_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\DisallowRobotsIndexingListener()), 'onResponse'], -255); + $instance->addListener('kernel.controller_arguments', [#[\Closure(name: 'exception_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener')] fn () => ($container->privates['exception_listener'] ?? self::getExceptionListenerService($container)), 'onControllerArguments'], 0); + $instance->addListener('kernel.exception', [#[\Closure(name: 'exception_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener')] fn () => ($container->privates['exception_listener'] ?? self::getExceptionListenerService($container)), 'logKernelException'], 0); + $instance->addListener('kernel.exception', [#[\Closure(name: 'exception_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener')] fn () => ($container->privates['exception_listener'] ?? self::getExceptionListenerService($container)), 'onKernelException'], -128); + $instance->addListener('kernel.response', [#[\Closure(name: 'exception_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener')] fn () => ($container->privates['exception_listener'] ?? self::getExceptionListenerService($container)), 'removeCspHeader'], -128); + $instance->addListener('kernel.controller_arguments', [#[\Closure(name: 'controller.cache_attribute_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\CacheAttributeListener')] fn () => ($container->privates['controller.cache_attribute_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\CacheAttributeListener()), 'onKernelControllerArguments'], 10); + $instance->addListener('kernel.response', [#[\Closure(name: 'controller.cache_attribute_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\CacheAttributeListener')] fn () => ($container->privates['controller.cache_attribute_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\CacheAttributeListener()), 'onKernelResponse'], -10); + $instance->addListener('kernel.controller_arguments', [#[\Closure(name: 'controller.is_signature_valid_attribute_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\IsSignatureValidAttributeListener')] fn () => ($container->privates['controller.is_signature_valid_attribute_listener'] ?? self::getController_IsSignatureValidAttributeListenerService($container)), 'onKernelControllerArguments'], 30); + $instance->addListener('console.error', [#[\Closure(name: 'console.error_listener', class: 'Symfony\\Component\\Console\\EventListener\\ErrorListener')] fn () => ($container->privates['console.error_listener'] ?? $container->load('getConsole_ErrorListenerService')), 'onConsoleError'], -128); + $instance->addListener('console.terminate', [#[\Closure(name: 'console.error_listener', class: 'Symfony\\Component\\Console\\EventListener\\ErrorListener')] fn () => ($container->privates['console.error_listener'] ?? $container->load('getConsole_ErrorListenerService')), 'onConsoleTerminate'], -128); + $instance->addListener('console.error', [#[\Closure(name: 'console.suggest_missing_package_subscriber', class: 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SuggestMissingPackageSubscriber')] fn () => ($container->privates['console.suggest_missing_package_subscriber'] ??= new \Symfony\Bundle\FrameworkBundle\EventListener\SuggestMissingPackageSubscriber()), 'onConsoleError'], 0); + $instance->addListener('kernel.request', [#[\Closure(name: 'debug.debug_handlers_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener')] fn () => ($container->privates['debug.debug_handlers_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\DebugHandlersListener(NULL, $container->getEnv('bool:default::key:web:default:kernel.runtime_mode:'))), 'configure'], 2048); + $instance->addListener('console.command', [#[\Closure(name: 'debug.debug_handlers_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener')] fn () => ($container->privates['debug.debug_handlers_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\DebugHandlersListener(NULL, $container->getEnv('bool:default::key:web:default:kernel.runtime_mode:'))), 'configure'], 2048); + $instance->addListener('kernel.request', [#[\Closure(name: 'router_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener')] fn () => ($container->privates['router_listener'] ?? self::getRouterListenerService($container)), 'onKernelRequest'], 32); + $instance->addListener('kernel.finish_request', [#[\Closure(name: 'router_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener')] fn () => ($container->privates['router_listener'] ?? self::getRouterListenerService($container)), 'onKernelFinishRequest'], 0); + $instance->addListener('kernel.exception', [#[\Closure(name: 'router_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener')] fn () => ($container->privates['router_listener'] ?? self::getRouterListenerService($container)), 'onKernelException'], -64); + $instance->addListener('kernel.request', [#[\Closure(name: 'session_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\SessionListener')] fn () => ($container->privates['session_listener'] ?? self::getSessionListenerService($container)), 'onKernelRequest'], 128); + $instance->addListener('kernel.response', [#[\Closure(name: 'session_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\SessionListener')] fn () => ($container->privates['session_listener'] ?? self::getSessionListenerService($container)), 'onKernelResponse'], -1000); + + return $instance; + } + + /** + * Gets the public 'http_kernel' shared service. + * + * @return \Symfony\Component\HttpKernel\HttpKernel + */ + protected static function getHttpKernelService($container) + { + $a = new \Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver($container, ($container->privates['logger'] ?? self::getLoggerService($container))); + $a->allowControllers(['Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController', 'Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController']); + $a->allowControllers(['App\\Kernel']); + + return $container->services['http_kernel'] = new \Symfony\Component\HttpKernel\HttpKernel(($container->services['event_dispatcher'] ?? self::getEventDispatcherService($container)), $a, ($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), new \Symfony\Component\HttpKernel\Controller\ArgumentResolver(new \Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory(), new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['argument_resolver.backed_enum_resolver'] ??= new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\BackedEnumValueResolver()); + yield 1 => ($container->privates['argument_resolver.datetime'] ??= new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\DateTimeValueResolver(NULL)); + yield 2 => ($container->privates['argument_resolver.request_attribute'] ??= new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver()); + yield 3 => ($container->privates['argument_resolver.request'] ??= new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver()); + yield 4 => ($container->privates['argument_resolver.session'] ??= new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver()); + yield 5 => ($container->privates['argument_resolver.service'] ?? $container->load('getArgumentResolver_ServiceService')); + yield 6 => ($container->privates['argument_resolver.default'] ??= new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver()); + yield 7 => ($container->privates['argument_resolver.variadic'] ??= new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver()); + }, 8), new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestPayloadValueResolver' => ['privates', 'argument_resolver.request_payload', NULL, 'You can neither use "#[MapRequestPayload]" nor "#[MapQueryString]" since the Serializer component is not installed. Try running "composer require symfony/serializer-pack".'], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\QueryParameterValueResolver' => ['privates', 'argument_resolver.query_parameter_value_resolver', 'getArgumentResolver_QueryParameterValueResolverService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\BackedEnumValueResolver' => ['privates', 'argument_resolver.backed_enum_resolver', 'getArgumentResolver_BackedEnumResolverService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DateTimeValueResolver' => ['privates', 'argument_resolver.datetime', 'getArgumentResolver_DatetimeService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => ['privates', 'argument_resolver.request_attribute', 'getArgumentResolver_RequestAttributeService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => ['privates', 'argument_resolver.request', 'getArgumentResolver_RequestService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\SessionValueResolver' => ['privates', 'argument_resolver.session', 'getArgumentResolver_SessionService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\ServiceValueResolver' => ['privates', 'argument_resolver.service', 'getArgumentResolver_ServiceService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => ['privates', 'argument_resolver.default', 'getArgumentResolver_DefaultService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver' => ['privates', 'argument_resolver.variadic', 'getArgumentResolver_VariadicService', true], + ], [ + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestPayloadValueResolver' => 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestPayloadValueResolver', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\QueryParameterValueResolver' => 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\QueryParameterValueResolver', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\BackedEnumValueResolver' => 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\BackedEnumValueResolver', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DateTimeValueResolver' => 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DateTimeValueResolver', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\SessionValueResolver' => 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\SessionValueResolver', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\ServiceValueResolver' => 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\ServiceValueResolver', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver' => 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver', + ])), true); + } + + /** + * Gets the public 'request_stack' shared service. + * + * @return \Symfony\Component\HttpFoundation\RequestStack + */ + protected static function getRequestStackService($container) + { + return $container->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack(); + } + + /** + * Gets the public 'router' shared service. + * + * @return \Symfony\Bundle\FrameworkBundle\Routing\Router + */ + protected static function getRouterService($container) + { + $container->services['router'] = $instance = new \Symfony\Bundle\FrameworkBundle\Routing\Router((new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'routing.loader' => ['services', 'routing.loader', 'getRouting_LoaderService', true], + ], [ + 'routing.loader' => 'Symfony\\Component\\Config\\Loader\\LoaderInterface', + ]))->withContext('router.default', $container), 'kernel::loadRoutes', ['cache_dir' => $container->targetDir.'', 'debug' => true, 'generator_class' => 'Symfony\\Component\\Routing\\Generator\\CompiledUrlGenerator', 'generator_dumper_class' => 'Symfony\\Component\\Routing\\Generator\\Dumper\\CompiledUrlGeneratorDumper', 'matcher_class' => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableCompiledUrlMatcher', 'matcher_dumper_class' => 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherDumper', 'strict_requirements' => true, 'resource_type' => 'service'], ($container->privates['router.request_context'] ?? self::getRouter_RequestContextService($container)), new \Symfony\Component\DependencyInjection\ParameterBag\ContainerBag($container), ($container->privates['logger'] ?? self::getLoggerService($container)), 'en'); + + $instance->setConfigCacheFactory(new \Symfony\Component\Config\ResourceCheckerConfigCacheFactory(new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['dependency_injection.config.container_parameters_resource_checker'] ??= new \Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker($container)); + yield 1 => ($container->privates['config.resource.self_checking_resource_checker'] ??= new \Symfony\Component\Config\Resource\SelfCheckingResourceChecker()); + }, 2))); + + return $instance; + } + + /** + * Gets the private 'controller.is_signature_valid_attribute_listener' shared service. + * + * @return \Symfony\Component\HttpKernel\EventListener\IsSignatureValidAttributeListener + */ + protected static function getController_IsSignatureValidAttributeListenerService($container) + { + return $container->privates['controller.is_signature_valid_attribute_listener'] = new \Symfony\Component\HttpKernel\EventListener\IsSignatureValidAttributeListener(($container->privates['uri_signer'] ?? self::getUriSignerService($container))); + } + + /** + * Gets the private 'exception_listener' shared service. + * + * @return \Symfony\Component\HttpKernel\EventListener\ErrorListener + */ + protected static function getExceptionListenerService($container) + { + return $container->privates['exception_listener'] = new \Symfony\Component\HttpKernel\EventListener\ErrorListener('error_controller', ($container->privates['logger'] ?? self::getLoggerService($container)), true, [], []); + } + + /** + * Gets the private 'locale_listener' shared service. + * + * @return \Symfony\Component\HttpKernel\EventListener\LocaleListener + */ + protected static function getLocaleListenerService($container) + { + return $container->privates['locale_listener'] = new \Symfony\Component\HttpKernel\EventListener\LocaleListener(($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), 'en', ($container->services['router'] ?? self::getRouterService($container)), false, []); + } + + /** + * Gets the private 'logger' shared service. + * + * @return \Symfony\Component\HttpKernel\Log\Logger + */ + protected static function getLoggerService($container) + { + return $container->privates['logger'] = new \Symfony\Component\HttpKernel\Log\Logger(NULL, NULL, NULL, ($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), $container->getEnv('bool:default::key:web:default:kernel.runtime_mode:')); + } + + /** + * Gets the private 'router.request_context' shared service. + * + * @return \Symfony\Component\Routing\RequestContext + */ + protected static function getRouter_RequestContextService($container) + { + $container->privates['router.request_context'] = $instance = \Symfony\Component\Routing\RequestContext::fromUri($container->getEnv('DEFAULT_URI'), 'localhost', 'http', 80, 443); + + $instance->setParameters(['_locale' => 'en']); + + return $instance; + } + + /** + * Gets the private 'router_listener' shared service. + * + * @return \Symfony\Component\HttpKernel\EventListener\RouterListener + */ + protected static function getRouterListenerService($container) + { + return $container->privates['router_listener'] = new \Symfony\Component\HttpKernel\EventListener\RouterListener(($container->services['router'] ?? self::getRouterService($container)), ($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), ($container->privates['router.request_context'] ?? self::getRouter_RequestContextService($container)), ($container->privates['logger'] ?? self::getLoggerService($container)), \dirname(__DIR__, 4), true); + } + + /** + * Gets the private 'session_listener' shared service. + * + * @return \Symfony\Component\HttpKernel\EventListener\SessionListener + */ + protected static function getSessionListenerService($container) + { + $instance = new \Symfony\Component\HttpKernel\EventListener\SessionListener(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'session_factory' => ['privates', 'session.factory', 'getSession_FactoryService', true], + 'logger' => ['privates', 'logger', 'getLoggerService', false], + 'request_stack' => ['services', 'request_stack', 'getRequestStackService', false], + ], [ + 'session_factory' => '?', + 'logger' => '?', + 'request_stack' => '?', + ]), true, $container->parameters['session.storage.options']); + + if (isset($container->privates['session_listener'])) { + return $container->privates['session_listener']; + } + + return $container->privates['session_listener'] = $instance; + } + + /** + * Gets the private 'uri_signer' shared service. + * + * @return \Symfony\Component\HttpFoundation\UriSigner + */ + protected static function getUriSignerService($container, $lazyLoad = true) + { + if (true === $lazyLoad) { + return $container->privates['uri_signer'] = $container->createProxy('UriSignerGhostB68a0a1', static fn () => \UriSignerGhostB68a0a1::createLazyGhost(static fn ($proxy) => self::getUriSignerService($container, $proxy))); + } + + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-foundation/UriSigner.php'; + + return ($lazyLoad->__construct($container->getParameter('kernel.secret'), '_hash', '_expiration', NULL) && false ?: $lazyLoad); + } + + public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null + { + if (\array_key_exists($name, $this->buildParameters)) { + return $this->buildParameters[$name]; + } + + if (isset($this->loadedDynamicParameters[$name])) { + $value = $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } elseif (\array_key_exists($name, $this->parameters) && '.' !== ($name[0] ?? '')) { + $value = $this->parameters[$name]; + } else { + throw new ParameterNotFoundException($name, extraMessage: self::NONEMPTY_PARAMETERS[$name] ?? null); + } + + if (isset(self::NONEMPTY_PARAMETERS[$name]) && (null === $value || '' === $value || [] === $value)) { + throw new \Symfony\Component\DependencyInjection\Exception\EmptyParameterValueException(self::NONEMPTY_PARAMETERS[$name]); + } + + return $value; + } + + public function hasParameter(string $name): bool + { + if (\array_key_exists($name, $this->buildParameters)) { + return true; + } + + return \array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]); + } + + public function setParameter(string $name, $value): void + { + throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); + } + + public function getParameterBag(): ParameterBagInterface + { + if (!isset($this->parameterBag)) { + $parameters = $this->parameters; + foreach ($this->loadedDynamicParameters as $name => $loaded) { + $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + foreach ($this->buildParameters as $name => $value) { + $parameters[$name] = $value; + } + $this->parameterBag = new FrozenParameterBag($parameters, [], self::NONEMPTY_PARAMETERS); + } + + return $this->parameterBag; + } + + private $loadedDynamicParameters = [ + 'kernel.runtime_environment' => false, + 'kernel.runtime_mode' => false, + 'kernel.runtime_mode.web' => false, + 'kernel.runtime_mode.cli' => false, + 'kernel.runtime_mode.worker' => false, + 'kernel.build_dir' => false, + 'kernel.cache_dir' => false, + 'kernel.secret' => false, + 'kernel.trust_x_sendfile_type_header' => false, + 'kernel.trusted_hosts' => false, + 'kernel.trusted_proxies' => false, + 'kernel.trusted_headers' => false, + 'debug.file_link_format' => false, + 'debug.container.dump' => false, + 'router.cache_dir' => false, + ]; + private $dynamicParameters = []; + + private function getDynamicParameter(string $name) + { + $container = $this; + $value = match ($name) { + 'kernel.runtime_environment' => $container->getEnv('default:kernel.environment:APP_RUNTIME_ENV'), + 'kernel.runtime_mode' => $container->getEnv('query_string:default:container.runtime_mode:APP_RUNTIME_MODE'), + 'kernel.runtime_mode.web' => $container->getEnv('bool:default::key:web:default:kernel.runtime_mode:'), + 'kernel.runtime_mode.cli' => $container->getEnv('not:default:kernel.runtime_mode.web:'), + 'kernel.runtime_mode.worker' => $container->getEnv('bool:default::key:worker:default:kernel.runtime_mode:'), + 'kernel.build_dir' => $container->targetDir.'', + 'kernel.cache_dir' => $container->targetDir.'', + 'kernel.secret' => $container->getEnv('APP_SECRET'), + 'kernel.trust_x_sendfile_type_header' => $container->getEnv('bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER'), + 'kernel.trusted_hosts' => $container->getEnv('default::SYMFONY_TRUSTED_HOSTS'), + 'kernel.trusted_proxies' => $container->getEnv('default::SYMFONY_TRUSTED_PROXIES'), + 'kernel.trusted_headers' => $container->getEnv('default::SYMFONY_TRUSTED_HEADERS'), + 'debug.file_link_format' => $container->getEnv('default::SYMFONY_IDE'), + 'debug.container.dump' => ($container->targetDir.''.'/App_KernelDevDebugContainer.xml'), + 'router.cache_dir' => $container->targetDir.'', + default => throw new ParameterNotFoundException($name), + }; + $this->loadedDynamicParameters[$name] = true; + + return $this->dynamicParameters[$name] = $value; + } + + protected function getDefaultParameters(): array + { + return [ + 'kernel.project_dir' => \dirname(__DIR__, 4), + 'kernel.environment' => 'dev', + 'kernel.debug' => true, + 'kernel.logs_dir' => (\dirname(__DIR__, 3).'/log'), + 'kernel.bundles' => [ + 'FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle', + ], + 'kernel.bundles_metadata' => [ + 'FrameworkBundle' => [ + 'path' => (\dirname(__DIR__, 4).'/vendor/symfony/framework-bundle'), + 'namespace' => 'Symfony\\Bundle\\FrameworkBundle', + ], + ], + 'kernel.charset' => 'UTF-8', + 'kernel.container_class' => 'App_KernelDevDebugContainer', + 'kernel.share_dir' => (\dirname(__DIR__, 3).'/share/dev'), + '.container.known_envs' => [ + 0 => 'dev', + 1 => 'test', + 2 => 'prod', + ], + '.kernel.bundles_definition' => [ + 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle' => [ + 'all' => true, + ], + ], + 'validator.translation_domain' => 'validators', + 'event_dispatcher.event_aliases' => [ + 'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => 'console.command', + 'Symfony\\Component\\Console\\Event\\ConsoleErrorEvent' => 'console.error', + 'Symfony\\Component\\Console\\Event\\ConsoleSignalEvent' => 'console.signal', + 'Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => 'console.terminate', + 'Symfony\\Component\\HttpKernel\\Event\\ControllerArgumentsEvent' => 'kernel.controller_arguments', + 'Symfony\\Component\\HttpKernel\\Event\\ControllerEvent' => 'kernel.controller', + 'Symfony\\Component\\HttpKernel\\Event\\ResponseEvent' => 'kernel.response', + 'Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent' => 'kernel.finish_request', + 'Symfony\\Component\\HttpKernel\\Event\\RequestEvent' => 'kernel.request', + 'Symfony\\Component\\HttpKernel\\Event\\ViewEvent' => 'kernel.view', + 'Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent' => 'kernel.exception', + 'Symfony\\Component\\HttpKernel\\Event\\TerminateEvent' => 'kernel.terminate', + ], + 'fragment.renderer.hinclude.global_template' => NULL, + 'fragment.path' => '/_fragment', + 'kernel.http_method_override' => false, + 'kernel.allowed_http_method_override' => NULL, + 'kernel.default_locale' => 'en', + 'kernel.enabled_locales' => [ + + ], + 'kernel.error_controller' => 'error_controller', + 'debug.error_handler.throw_at' => -1, + 'router.request_context.host' => 'localhost', + 'router.request_context.scheme' => 'http', + 'router.request_context.base_url' => '', + 'router.resource' => 'kernel::loadRoutes', + 'request_listener.http_port' => 80, + 'request_listener.https_port' => 443, + 'session.metadata.storage_key' => '_sf2_meta', + 'session.storage.options' => [ + 'cache_limiter' => '0', + 'cookie_secure' => 'auto', + 'cookie_httponly' => true, + 'cookie_samesite' => 'lax', + ], + 'session.metadata.cookie_lifetime' => NULL, + 'session.save_path' => NULL, + 'session.metadata.update_threshold' => 0, + 'data_collector.templates' => [ + + ], + 'console.command.ids' => [ + + ], + ]; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/RequestPayloadValueResolverGhost01ca9cc.php b/backend/var/cache/dev/ContainerBuxy6WO/RequestPayloadValueResolverGhost01ca9cc.php new file mode 100644 index 0000000..07f3a1d --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/RequestPayloadValueResolverGhost01ca9cc.php @@ -0,0 +1,30 @@ + [parent::class, 'serializer', null, 530], + "\0".parent::class."\0".'translationDomain' => [parent::class, 'translationDomain', null, 16], + "\0".parent::class."\0".'translator' => [parent::class, 'translator', null, 530], + "\0".parent::class."\0".'validator' => [parent::class, 'validator', null, 530], + 'serializer' => [parent::class, 'serializer', null, 530], + 'translationDomain' => [parent::class, 'translationDomain', null, 16], + 'translator' => [parent::class, 'translator', null, 530], + 'validator' => [parent::class, 'validator', null, 530], + ]; +} + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + +if (!\class_exists('RequestPayloadValueResolverGhost01ca9cc', false)) { + \class_alias(__NAMESPACE__.'\\RequestPayloadValueResolverGhost01ca9cc', 'RequestPayloadValueResolverGhost01ca9cc', false); +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/UriSignerGhostB68a0a1.php b/backend/var/cache/dev/ContainerBuxy6WO/UriSignerGhostB68a0a1.php new file mode 100644 index 0000000..5bc88e0 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/UriSignerGhostB68a0a1.php @@ -0,0 +1,29 @@ + [parent::class, 'clock', null, 16], + "\0".parent::class."\0".'expirationParameter' => [parent::class, 'expirationParameter', null, 16], + "\0".parent::class."\0".'hashParameter' => [parent::class, 'hashParameter', null, 16], + "\0".parent::class."\0".'secret' => [parent::class, 'secret', null, 16], + 'clock' => [parent::class, 'clock', null, 16], + 'expirationParameter' => [parent::class, 'expirationParameter', null, 16], + 'hashParameter' => [parent::class, 'hashParameter', null, 16], + 'secret' => [parent::class, 'secret', null, 16], + ]; +} + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + +if (!\class_exists('UriSignerGhostB68a0a1', false)) { + \class_alias(__NAMESPACE__.'\\UriSignerGhostB68a0a1', 'UriSignerGhostB68a0a1', false); +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_BackedEnumResolverService.php b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_BackedEnumResolverService.php new file mode 100644 index 0000000..343a29b --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_BackedEnumResolverService.php @@ -0,0 +1,26 @@ +privates['argument_resolver.backed_enum_resolver'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\BackedEnumValueResolver(); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_DatetimeService.php b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_DatetimeService.php new file mode 100644 index 0000000..aa214c1 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_DatetimeService.php @@ -0,0 +1,26 @@ +privates['argument_resolver.datetime'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\DateTimeValueResolver(NULL); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_DefaultService.php b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_DefaultService.php new file mode 100644 index 0000000..bcbfe8a --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_DefaultService.php @@ -0,0 +1,26 @@ +privates['argument_resolver.default'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver(); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_QueryParameterValueResolverService.php b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_QueryParameterValueResolverService.php new file mode 100644 index 0000000..ded8c49 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_QueryParameterValueResolverService.php @@ -0,0 +1,26 @@ +privates['argument_resolver.query_parameter_value_resolver'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\QueryParameterValueResolver(); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_RequestAttributeService.php b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_RequestAttributeService.php new file mode 100644 index 0000000..72229db --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_RequestAttributeService.php @@ -0,0 +1,26 @@ +privates['argument_resolver.request_attribute'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver(); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_RequestPayloadService.php b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_RequestPayloadService.php new file mode 100644 index 0000000..1cea98b --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_RequestPayloadService.php @@ -0,0 +1,23 @@ +privates['argument_resolver.request'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver(); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_ServiceService.php b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_ServiceService.php new file mode 100644 index 0000000..cadd7ae --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_ServiceService.php @@ -0,0 +1,40 @@ +privates['argument_resolver.service'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\ServiceValueResolver(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'kernel::registerContainerConfiguration' => ['privates', '.service_locator.1vYpZ1B.kernel::registerContainerConfiguration()', 'get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService', true], + 'App\\Kernel::registerContainerConfiguration' => ['privates', '.service_locator.1vYpZ1B.kernel::registerContainerConfiguration()', 'get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService', true], + 'kernel::loadRoutes' => ['privates', '.service_locator.1vYpZ1B.kernel::loadRoutes()', 'get_ServiceLocator_1vYpZ1B_KernelloadRoutesService', true], + 'App\\Kernel::loadRoutes' => ['privates', '.service_locator.1vYpZ1B.kernel::loadRoutes()', 'get_ServiceLocator_1vYpZ1B_KernelloadRoutesService', true], + 'kernel:registerContainerConfiguration' => ['privates', '.service_locator.1vYpZ1B.kernel::registerContainerConfiguration()', 'get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService', true], + 'kernel:loadRoutes' => ['privates', '.service_locator.1vYpZ1B.kernel::loadRoutes()', 'get_ServiceLocator_1vYpZ1B_KernelloadRoutesService', true], + ], [ + 'kernel::registerContainerConfiguration' => '?', + 'App\\Kernel::registerContainerConfiguration' => '?', + 'kernel::loadRoutes' => '?', + 'App\\Kernel::loadRoutes' => '?', + 'kernel:registerContainerConfiguration' => '?', + 'kernel:loadRoutes' => '?', + ])); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_SessionService.php b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_SessionService.php new file mode 100644 index 0000000..79bd42c --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_SessionService.php @@ -0,0 +1,26 @@ +privates['argument_resolver.session'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver(); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_VariadicService.php b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_VariadicService.php new file mode 100644 index 0000000..0e340f9 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getArgumentResolver_VariadicService.php @@ -0,0 +1,26 @@ +privates['argument_resolver.variadic'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver(); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getCacheWarmerService.php b/backend/var/cache/dev/ContainerBuxy6WO/getCacheWarmerService.php new file mode 100644 index 0000000..060aa2a --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getCacheWarmerService.php @@ -0,0 +1,29 @@ +services['cache_warmer'] = new \Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate(new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['config_builder.warmer'] ?? $container->load('getConfigBuilder_WarmerService')); + yield 1 => ($container->privates['router.cache_warmer'] ?? $container->load('getRouter_CacheWarmerService')); + }, 2), true, ($container->targetDir.''.'/App_KernelDevDebugContainerDeprecations.log')); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getCache_AppClearerService.php b/backend/var/cache/dev/ContainerBuxy6WO/getCache_AppClearerService.php new file mode 100644 index 0000000..8e9c2e4 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getCache_AppClearerService.php @@ -0,0 +1,26 @@ +services['cache.app_clearer'] = new \Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer(['cache.app' => ($container->services['cache.app'] ?? $container->load('getCache_AppService'))]); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getCache_AppService.php b/backend/var/cache/dev/ContainerBuxy6WO/getCache_AppService.php new file mode 100644 index 0000000..1185a4d --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getCache_AppService.php @@ -0,0 +1,45 @@ +services['cache.app'] = $instance = new \Symfony\Component\Cache\Adapter\FilesystemAdapter('+c-w2mU0xY', 0, (\dirname(__DIR__, 3).'/share/dev/pools/app'), new \Symfony\Component\Cache\Marshaller\DefaultMarshaller(NULL, true)); + + $instance->setLogger(($container->privates['logger'] ?? self::getLoggerService($container))); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getCache_App_TaggableService.php b/backend/var/cache/dev/ContainerBuxy6WO/getCache_App_TaggableService.php new file mode 100644 index 0000000..6f00caf --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getCache_App_TaggableService.php @@ -0,0 +1,37 @@ +privates['cache.app.taggable'] = new \Symfony\Component\Cache\Adapter\TagAwareAdapter(($container->services['cache.app'] ?? $container->load('getCache_AppService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getCache_GlobalClearerService.php b/backend/var/cache/dev/ContainerBuxy6WO/getCache_GlobalClearerService.php new file mode 100644 index 0000000..c7f7aab --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getCache_GlobalClearerService.php @@ -0,0 +1,26 @@ +services['cache.global_clearer'] = new \Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer(['cache.app' => ($container->services['cache.app'] ?? $container->load('getCache_AppService')), 'cache.system' => ($container->services['cache.system'] ?? $container->load('getCache_SystemService'))]); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getCache_SystemClearerService.php b/backend/var/cache/dev/ContainerBuxy6WO/getCache_SystemClearerService.php new file mode 100644 index 0000000..d56e59a --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getCache_SystemClearerService.php @@ -0,0 +1,26 @@ +services['cache.system_clearer'] = new \Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer(['cache.system' => ($container->services['cache.system'] ?? $container->load('getCache_SystemService'))]); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getCache_SystemService.php b/backend/var/cache/dev/ContainerBuxy6WO/getCache_SystemService.php new file mode 100644 index 0000000..ae756af --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getCache_SystemService.php @@ -0,0 +1,35 @@ +services['cache.system'] = \Symfony\Component\Cache\Adapter\AbstractAdapter::createSystemCache('kyJjiJfYg6', 0, $container->getParameter('container.build_id'), ($container->targetDir.''.'/pools/system'), ($container->privates['logger'] ?? self::getLoggerService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConfigBuilder_WarmerService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConfigBuilder_WarmerService.php new file mode 100644 index 0000000..16233f1 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConfigBuilder_WarmerService.php @@ -0,0 +1,26 @@ +privates['config_builder.warmer'] = new \Symfony\Bundle\FrameworkBundle\CacheWarmer\ConfigBuilderCacheWarmer(($container->services['kernel'] ?? $container->get('kernel', 1)), ($container->privates['logger'] ?? self::getLoggerService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_CommandLoaderService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_CommandLoaderService.php new file mode 100644 index 0000000..cc7cf3d --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_CommandLoaderService.php @@ -0,0 +1,82 @@ +services['console.command_loader'] = new \Symfony\Component\Console\CommandLoader\ContainerCommandLoader(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'console.command.about' => ['privates', '.console.command.about.lazy', 'get_Console_Command_About_LazyService', true], + 'console.command.assets_install' => ['privates', '.console.command.assets_install.lazy', 'get_Console_Command_AssetsInstall_LazyService', true], + 'console.command.cache_clear' => ['privates', '.console.command.cache_clear.lazy', 'get_Console_Command_CacheClear_LazyService', true], + 'console.command.cache_pool_clear' => ['privates', '.console.command.cache_pool_clear.lazy', 'get_Console_Command_CachePoolClear_LazyService', true], + 'console.command.cache_pool_prune' => ['privates', '.console.command.cache_pool_prune.lazy', 'get_Console_Command_CachePoolPrune_LazyService', true], + 'console.command.cache_pool_invalidate_tags' => ['privates', '.console.command.cache_pool_invalidate_tags.lazy', 'get_Console_Command_CachePoolInvalidateTags_LazyService', true], + 'console.command.cache_pool_delete' => ['privates', '.console.command.cache_pool_delete.lazy', 'get_Console_Command_CachePoolDelete_LazyService', true], + 'console.command.cache_pool_list' => ['privates', '.console.command.cache_pool_list.lazy', 'get_Console_Command_CachePoolList_LazyService', true], + 'console.command.cache_warmup' => ['privates', '.console.command.cache_warmup.lazy', 'get_Console_Command_CacheWarmup_LazyService', true], + 'console.command.config_debug' => ['privates', '.console.command.config_debug.lazy', 'get_Console_Command_ConfigDebug_LazyService', true], + 'console.command.config_dump_reference' => ['privates', '.console.command.config_dump_reference.lazy', 'get_Console_Command_ConfigDumpReference_LazyService', true], + 'console.command.container_debug' => ['privates', '.console.command.container_debug.lazy', 'get_Console_Command_ContainerDebug_LazyService', true], + 'console.command.container_lint' => ['privates', '.console.command.container_lint.lazy', 'get_Console_Command_ContainerLint_LazyService', true], + 'console.command.debug_autowiring' => ['privates', '.console.command.debug_autowiring.lazy', 'get_Console_Command_DebugAutowiring_LazyService', true], + 'console.command.dotenv_debug' => ['privates', '.console.command.dotenv_debug.lazy', 'get_Console_Command_DotenvDebug_LazyService', true], + 'console.command.event_dispatcher_debug' => ['privates', '.console.command.event_dispatcher_debug.lazy', 'get_Console_Command_EventDispatcherDebug_LazyService', true], + 'console.command.router_debug' => ['privates', '.console.command.router_debug.lazy', 'get_Console_Command_RouterDebug_LazyService', true], + 'console.command.router_match' => ['privates', '.console.command.router_match.lazy', 'get_Console_Command_RouterMatch_LazyService', true], + 'console.command.yaml_lint' => ['privates', '.console.command.yaml_lint.lazy', 'get_Console_Command_YamlLint_LazyService', true], + 'console.command.secrets_set' => ['privates', '.console.command.secrets_set.lazy', 'get_Console_Command_SecretsSet_LazyService', true], + 'console.command.secrets_remove' => ['privates', '.console.command.secrets_remove.lazy', 'get_Console_Command_SecretsRemove_LazyService', true], + 'console.command.secrets_generate_key' => ['privates', '.console.command.secrets_generate_key.lazy', 'get_Console_Command_SecretsGenerateKey_LazyService', true], + 'console.command.secrets_list' => ['privates', '.console.command.secrets_list.lazy', 'get_Console_Command_SecretsList_LazyService', true], + 'console.command.secrets_reveal' => ['privates', '.console.command.secrets_reveal.lazy', 'get_Console_Command_SecretsReveal_LazyService', true], + 'console.command.secrets_decrypt_to_local' => ['privates', '.console.command.secrets_decrypt_to_local.lazy', 'get_Console_Command_SecretsDecryptToLocal_LazyService', true], + 'console.command.secrets_encrypt_from_local' => ['privates', '.console.command.secrets_encrypt_from_local.lazy', 'get_Console_Command_SecretsEncryptFromLocal_LazyService', true], + 'console.command.error_dumper' => ['privates', '.console.command.error_dumper.lazy', 'get_Console_Command_ErrorDumper_LazyService', true], + ], [ + 'console.command.about' => '?', + 'console.command.assets_install' => '?', + 'console.command.cache_clear' => '?', + 'console.command.cache_pool_clear' => '?', + 'console.command.cache_pool_prune' => '?', + 'console.command.cache_pool_invalidate_tags' => '?', + 'console.command.cache_pool_delete' => '?', + 'console.command.cache_pool_list' => '?', + 'console.command.cache_warmup' => '?', + 'console.command.config_debug' => '?', + 'console.command.config_dump_reference' => '?', + 'console.command.container_debug' => '?', + 'console.command.container_lint' => '?', + 'console.command.debug_autowiring' => '?', + 'console.command.dotenv_debug' => '?', + 'console.command.event_dispatcher_debug' => '?', + 'console.command.router_debug' => '?', + 'console.command.router_match' => '?', + 'console.command.yaml_lint' => '?', + 'console.command.secrets_set' => '?', + 'console.command.secrets_remove' => '?', + 'console.command.secrets_generate_key' => '?', + 'console.command.secrets_list' => '?', + 'console.command.secrets_reveal' => '?', + 'console.command.secrets_decrypt_to_local' => '?', + 'console.command.secrets_encrypt_from_local' => '?', + 'console.command.error_dumper' => '?', + ]), ['about' => 'console.command.about', 'assets:install' => 'console.command.assets_install', 'cache:clear' => 'console.command.cache_clear', 'cache:pool:clear' => 'console.command.cache_pool_clear', 'cache:pool:prune' => 'console.command.cache_pool_prune', 'cache:pool:invalidate-tags' => 'console.command.cache_pool_invalidate_tags', 'cache:pool:delete' => 'console.command.cache_pool_delete', 'cache:pool:list' => 'console.command.cache_pool_list', 'cache:warmup' => 'console.command.cache_warmup', 'debug:config' => 'console.command.config_debug', 'config:dump-reference' => 'console.command.config_dump_reference', 'debug:container' => 'console.command.container_debug', 'lint:container' => 'console.command.container_lint', 'debug:autowiring' => 'console.command.debug_autowiring', 'debug:dotenv' => 'console.command.dotenv_debug', 'debug:event-dispatcher' => 'console.command.event_dispatcher_debug', 'debug:router' => 'console.command.router_debug', 'router:match' => 'console.command.router_match', 'lint:yaml' => 'console.command.yaml_lint', 'secrets:set' => 'console.command.secrets_set', 'secrets:remove' => 'console.command.secrets_remove', 'secrets:generate-keys' => 'console.command.secrets_generate_key', 'secrets:list' => 'console.command.secrets_list', 'secrets:reveal' => 'console.command.secrets_reveal', 'secrets:decrypt-to-local' => 'console.command.secrets_decrypt_to_local', 'secrets:encrypt-from-local' => 'console.command.secrets_encrypt_from_local', 'error:dump' => 'console.command.error_dumper']); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_AboutService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_AboutService.php new file mode 100644 index 0000000..aad773a --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_AboutService.php @@ -0,0 +1,32 @@ +privates['console.command.about'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\AboutCommand(); + + $instance->setName('about'); + $instance->setDescription('Display information about the current project'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_AssetsInstallService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_AssetsInstallService.php new file mode 100644 index 0000000..752766f --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_AssetsInstallService.php @@ -0,0 +1,33 @@ +privates['console.command.assets_install'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand(($container->privates['filesystem'] ??= new \Symfony\Component\Filesystem\Filesystem()), \dirname(__DIR__, 4)); + + $instance->setName('assets:install'); + $instance->setDescription('Install bundle\'s web assets under a public directory'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CacheClearService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CacheClearService.php new file mode 100644 index 0000000..a3a7078 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CacheClearService.php @@ -0,0 +1,35 @@ +privates['console.command.cache_clear'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand(new \Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer(new RewindableGenerator(fn () => new \EmptyIterator(), 0)), ($container->privates['filesystem'] ??= new \Symfony\Component\Filesystem\Filesystem())); + + $instance->setName('cache:clear'); + $instance->setDescription('Clear the cache'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolClearService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolClearService.php new file mode 100644 index 0000000..0355d53 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolClearService.php @@ -0,0 +1,32 @@ +privates['console.command.cache_pool_clear'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand(($container->services['cache.global_clearer'] ?? $container->load('getCache_GlobalClearerService')), ['cache.app', 'cache.system', 'cache.validator', 'cache.serializer', 'cache.property_info']); + + $instance->setName('cache:pool:clear'); + $instance->setDescription('Clear cache pools'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolDeleteService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolDeleteService.php new file mode 100644 index 0000000..1ba86a6 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolDeleteService.php @@ -0,0 +1,32 @@ +privates['console.command.cache_pool_delete'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CachePoolDeleteCommand(($container->services['cache.global_clearer'] ?? $container->load('getCache_GlobalClearerService')), ['cache.app', 'cache.system', 'cache.validator', 'cache.serializer', 'cache.property_info']); + + $instance->setName('cache:pool:delete'); + $instance->setDescription('Delete an item from a cache pool'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolInvalidateTagsService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolInvalidateTagsService.php new file mode 100644 index 0000000..eb6bc2f --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolInvalidateTagsService.php @@ -0,0 +1,36 @@ +privates['console.command.cache_pool_invalidate_tags'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CachePoolInvalidateTagsCommand(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'cache.app' => ['privates', 'cache.app.taggable', 'getCache_App_TaggableService', true], + ], [ + 'cache.app' => 'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapter', + ])); + + $instance->setName('cache:pool:invalidate-tags'); + $instance->setDescription('Invalidate cache tags for all or a specific pool'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolListService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolListService.php new file mode 100644 index 0000000..b6cb74a --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolListService.php @@ -0,0 +1,32 @@ +privates['console.command.cache_pool_list'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CachePoolListCommand(['cache.app', 'cache.system', 'cache.validator', 'cache.serializer', 'cache.property_info']); + + $instance->setName('cache:pool:list'); + $instance->setDescription('List available cache pools'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolPruneService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolPruneService.php new file mode 100644 index 0000000..f47a877 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CachePoolPruneService.php @@ -0,0 +1,34 @@ +privates['console.command.cache_pool_prune'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand(new RewindableGenerator(function () use ($container) { + yield 'cache.app' => ($container->services['cache.app'] ?? $container->load('getCache_AppService')); + }, 1)); + + $instance->setName('cache:pool:prune'); + $instance->setDescription('Prune cache pools'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CacheWarmupService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CacheWarmupService.php new file mode 100644 index 0000000..5ab0418 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_CacheWarmupService.php @@ -0,0 +1,32 @@ +privates['console.command.cache_warmup'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand(($container->services['cache_warmer'] ?? $container->load('getCacheWarmerService'))); + + $instance->setName('cache:warmup'); + $instance->setDescription('Warm up an empty cache'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ConfigDebugService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ConfigDebugService.php new file mode 100644 index 0000000..23975ff --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ConfigDebugService.php @@ -0,0 +1,35 @@ +privates['console.command.config_debug'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\ConfigDebugCommand(($container->services['container.env_var_processors_locator'] ?? $container->load('getContainer_EnvVarProcessorsLocatorService'))); + + $instance->setName('debug:config'); + $instance->setDescription('Dump the current configuration for an extension'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ConfigDumpReferenceService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ConfigDumpReferenceService.php new file mode 100644 index 0000000..e60fd1f --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ConfigDumpReferenceService.php @@ -0,0 +1,35 @@ +privates['console.command.config_dump_reference'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\ConfigDumpReferenceCommand(); + + $instance->setName('config:dump-reference'); + $instance->setDescription('Dump the default configuration for an extension'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ContainerDebugService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ContainerDebugService.php new file mode 100644 index 0000000..9b033f3 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ContainerDebugService.php @@ -0,0 +1,33 @@ +privates['console.command.container_debug'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\ContainerDebugCommand(); + + $instance->setName('debug:container'); + $instance->setDescription('Display current services for an application'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ContainerLintService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ContainerLintService.php new file mode 100644 index 0000000..037fefb --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ContainerLintService.php @@ -0,0 +1,32 @@ +privates['console.command.container_lint'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\ContainerLintCommand(); + + $instance->setName('lint:container'); + $instance->setDescription('Ensure that arguments injected into services match type declarations'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_DebugAutowiringService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_DebugAutowiringService.php new file mode 100644 index 0000000..8fa93de --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_DebugAutowiringService.php @@ -0,0 +1,35 @@ +privates['console.command.debug_autowiring'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\DebugAutowiringCommand(NULL, ($container->privates['debug.file_link_formatter'] ??= new \Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter($container->getEnv('default::SYMFONY_IDE')))); + + $instance->setName('debug:autowiring'); + $instance->setDescription('List classes/interfaces you can use for autowiring'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_DotenvDebugService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_DotenvDebugService.php new file mode 100644 index 0000000..8f74ab2 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_DotenvDebugService.php @@ -0,0 +1,32 @@ +privates['console.command.dotenv_debug'] = $instance = new \Symfony\Component\Dotenv\Command\DebugCommand('dev', \dirname(__DIR__, 4)); + + $instance->setName('debug:dotenv'); + $instance->setDescription('List all dotenv files with variables and values'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ErrorDumperService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ErrorDumperService.php new file mode 100644 index 0000000..32ac836 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_ErrorDumperService.php @@ -0,0 +1,33 @@ +privates['console.command.error_dumper'] = $instance = new \Symfony\Component\ErrorHandler\Command\ErrorDumpCommand(($container->privates['filesystem'] ??= new \Symfony\Component\Filesystem\Filesystem()), ($container->privates['error_handler.error_renderer.html'] ?? $container->load('getErrorHandler_ErrorRenderer_HtmlService')), NULL); + + $instance->setName('error:dump'); + $instance->setDescription('Dump error pages to plain HTML files that can be directly served by a web server'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_EventDispatcherDebugService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_EventDispatcherDebugService.php new file mode 100644 index 0000000..733cee2 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_EventDispatcherDebugService.php @@ -0,0 +1,36 @@ +privates['console.command.event_dispatcher_debug'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'event_dispatcher' => ['services', 'event_dispatcher', 'getEventDispatcherService', false], + ], [ + 'event_dispatcher' => 'Symfony\\Component\\EventDispatcher\\EventDispatcher', + ])); + + $instance->setName('debug:event-dispatcher'); + $instance->setDescription('Display configured listeners for an application'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_RouterDebugService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_RouterDebugService.php new file mode 100644 index 0000000..f58994d --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_RouterDebugService.php @@ -0,0 +1,34 @@ +privates['console.command.router_debug'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand(($container->services['router'] ?? self::getRouterService($container)), ($container->privates['debug.file_link_formatter'] ??= new \Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter($container->getEnv('default::SYMFONY_IDE')))); + + $instance->setName('debug:router'); + $instance->setDescription('Display current routes for an application'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_RouterMatchService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_RouterMatchService.php new file mode 100644 index 0000000..41b0bd7 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_RouterMatchService.php @@ -0,0 +1,32 @@ +privates['console.command.router_match'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand(($container->services['router'] ?? self::getRouterService($container)), new RewindableGenerator(fn () => new \EmptyIterator(), 0)); + + $instance->setName('router:match'); + $instance->setDescription('Help debug routes by simulating a path info match'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsDecryptToLocalService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsDecryptToLocalService.php new file mode 100644 index 0000000..d2946ed --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsDecryptToLocalService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_decrypt_to_local'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsDecryptToLocalCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:decrypt-to-local'); + $instance->setDescription('Decrypt all secrets and stores them in the local vault'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsEncryptFromLocalService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsEncryptFromLocalService.php new file mode 100644 index 0000000..f1adee9 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsEncryptFromLocalService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_encrypt_from_local'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsEncryptFromLocalCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:encrypt-from-local'); + $instance->setDescription('Encrypt all local secrets to the vault'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsGenerateKeyService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsGenerateKeyService.php new file mode 100644 index 0000000..91029ba --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsGenerateKeyService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_generate_key'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsGenerateKeysCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:generate-keys'); + $instance->setDescription('Generate new encryption keys'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsListService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsListService.php new file mode 100644 index 0000000..a48baf0 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsListService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_list'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsListCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:list'); + $instance->setDescription('List all secrets'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsRemoveService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsRemoveService.php new file mode 100644 index 0000000..8e85f0a --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsRemoveService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_remove'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsRemoveCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:remove'); + $instance->setDescription('Remove a secret from the vault'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsRevealService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsRevealService.php new file mode 100644 index 0000000..978c722 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsRevealService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_reveal'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsRevealCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:reveal'); + $instance->setDescription('Reveal the value of a secret'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsSetService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsSetService.php new file mode 100644 index 0000000..0693a4e --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_SecretsSetService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_set'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsSetCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:set'); + $instance->setDescription('Set a secret in the vault'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_YamlLintService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_YamlLintService.php new file mode 100644 index 0000000..bc6938f --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_Command_YamlLintService.php @@ -0,0 +1,33 @@ +privates['console.command.yaml_lint'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand(); + + $instance->setName('lint:yaml'); + $instance->setDescription('Lint a YAML file and outputs encountered errors'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getConsole_ErrorListenerService.php b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_ErrorListenerService.php new file mode 100644 index 0000000..8597cc1 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getConsole_ErrorListenerService.php @@ -0,0 +1,25 @@ +privates['console.error_listener'] = new \Symfony\Component\Console\EventListener\ErrorListener(($container->privates['logger'] ?? self::getLoggerService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getContainer_EnvVarProcessorService.php b/backend/var/cache/dev/ContainerBuxy6WO/getContainer_EnvVarProcessorService.php new file mode 100644 index 0000000..36fe798 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getContainer_EnvVarProcessorService.php @@ -0,0 +1,28 @@ +privates['container.env_var_processor'] = new \Symfony\Component\DependencyInjection\EnvVarProcessor($container, new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['secrets.env_var_loader'] ?? $container->load('getSecrets_EnvVarLoaderService')); + }, 1)); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getContainer_EnvVarProcessorsLocatorService.php b/backend/var/cache/dev/ContainerBuxy6WO/getContainer_EnvVarProcessorsLocatorService.php new file mode 100644 index 0000000..554ae7c --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getContainer_EnvVarProcessorsLocatorService.php @@ -0,0 +1,67 @@ +services['container.env_var_processors_locator'] = new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'base64' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'bool' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'not' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'const' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'csv' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'file' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'float' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'int' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'json' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'key' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'url' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'query_string' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'resolve' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'default' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'string' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'trim' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'require' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'enum' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'shuffle' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'defined' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'urlencode' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + ], [ + 'base64' => '?', + 'bool' => '?', + 'not' => '?', + 'const' => '?', + 'csv' => '?', + 'file' => '?', + 'float' => '?', + 'int' => '?', + 'json' => '?', + 'key' => '?', + 'url' => '?', + 'query_string' => '?', + 'resolve' => '?', + 'default' => '?', + 'string' => '?', + 'trim' => '?', + 'require' => '?', + 'enum' => '?', + 'shuffle' => '?', + 'defined' => '?', + 'urlencode' => '?', + ]); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getContainer_GetRoutingConditionServiceService.php b/backend/var/cache/dev/ContainerBuxy6WO/getContainer_GetRoutingConditionServiceService.php new file mode 100644 index 0000000..c9d5c24 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getContainer_GetRoutingConditionServiceService.php @@ -0,0 +1,23 @@ +services['container.get_routing_condition_service'] = (new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [], []))->get(...); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getDebug_ErrorHandlerConfiguratorService.php b/backend/var/cache/dev/ContainerBuxy6WO/getDebug_ErrorHandlerConfiguratorService.php new file mode 100644 index 0000000..8a5f9dc --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getDebug_ErrorHandlerConfiguratorService.php @@ -0,0 +1,25 @@ +services['debug.error_handler_configurator'] = new \Symfony\Component\HttpKernel\Debug\ErrorHandlerConfigurator(($container->privates['logger'] ?? self::getLoggerService($container)), NULL, -1, true, true, NULL); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getErrorControllerService.php b/backend/var/cache/dev/ContainerBuxy6WO/getErrorControllerService.php new file mode 100644 index 0000000..d0a2044 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getErrorControllerService.php @@ -0,0 +1,27 @@ +services['error_controller'] = new \Symfony\Component\HttpKernel\Controller\ErrorController(($container->services['http_kernel'] ?? self::getHttpKernelService($container)), 'error_controller', \Symfony\Bundle\FrameworkBundle\ErrorHandler\ErrorRenderer\RuntimeModeErrorRendererSelector::select($container->getEnv('bool:default::key:web:default:kernel.runtime_mode:'), #[\Closure(name: 'error_handler.error_renderer.html', class: 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\HtmlErrorRenderer')] fn () => ($container->privates['error_handler.error_renderer.html'] ?? $container->load('getErrorHandler_ErrorRenderer_HtmlService')), #[\Closure(name: 'error_handler.error_renderer.cli', class: 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\CliErrorRenderer')] fn () => ($container->privates['error_handler.error_renderer.cli'] ??= new \Symfony\Component\ErrorHandler\ErrorRenderer\CliErrorRenderer()))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getErrorHandler_ErrorRenderer_HtmlService.php b/backend/var/cache/dev/ContainerBuxy6WO/getErrorHandler_ErrorRenderer_HtmlService.php new file mode 100644 index 0000000..5e74160 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getErrorHandler_ErrorRenderer_HtmlService.php @@ -0,0 +1,29 @@ +services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()); + + return $container->privates['error_handler.error_renderer.html'] = new \Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer(\Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer::isDebug($a, true), 'UTF-8', ($container->privates['debug.file_link_formatter'] ??= new \Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter($container->getEnv('default::SYMFONY_IDE'))), \dirname(__DIR__, 4), \Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer::getAndCleanOutputBuffer($a), ($container->privates['logger'] ?? self::getLoggerService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getLoaderInterfaceService.php b/backend/var/cache/dev/ContainerBuxy6WO/getLoaderInterfaceService.php new file mode 100644 index 0000000..ece8e3f --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getLoaderInterfaceService.php @@ -0,0 +1,23 @@ +privates['router.request_context'] ?? self::getRouter_RequestContextService($container)); + + return $container->services['Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController'] = new \Symfony\Bundle\FrameworkBundle\Controller\RedirectController(($container->services['router'] ?? self::getRouterService($container)), $a->getHttpPort(), $a->getHttpsPort()); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getRouter_CacheWarmerService.php b/backend/var/cache/dev/ContainerBuxy6WO/getRouter_CacheWarmerService.php new file mode 100644 index 0000000..d62f2ff --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getRouter_CacheWarmerService.php @@ -0,0 +1,30 @@ +privates['router.cache_warmer'] = new \Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer((new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'router' => ['services', 'router', 'getRouterService', false], + ], [ + 'router' => '?', + ]))->withContext('router.cache_warmer', $container)); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getRouting_LoaderService.php b/backend/var/cache/dev/ContainerBuxy6WO/getRouting_LoaderService.php new file mode 100644 index 0000000..48d1491 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getRouting_LoaderService.php @@ -0,0 +1,72 @@ +services['kernel'] ?? $container->get('kernel', 1))); + $c = new \Symfony\Bundle\FrameworkBundle\Routing\AttributeRouteControllerLoader('dev'); + + $a->addLoader(new \Symfony\Component\Routing\Loader\XmlFileLoader($b, 'dev')); + $a->addLoader(new \Symfony\Component\Routing\Loader\YamlFileLoader($b, 'dev')); + $a->addLoader(new \Symfony\Component\Routing\Loader\PhpFileLoader($b, 'dev')); + $a->addLoader(new \Symfony\Component\Routing\Loader\GlobFileLoader($b, 'dev')); + $a->addLoader(new \Symfony\Component\Routing\Loader\DirectoryLoader($b, 'dev')); + $a->addLoader(new \Symfony\Component\Routing\Loader\ContainerLoader(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'kernel' => ['services', 'kernel', 'getKernelService', true], + ], [ + 'kernel' => 'App\\Kernel', + ]), 'dev')); + $a->addLoader($c); + $a->addLoader(new \Symfony\Component\Routing\Loader\AttributeServicesLoader([])); + $a->addLoader(new \Symfony\Component\Routing\Loader\AttributeDirectoryLoader($b, $c)); + $a->addLoader(new \Symfony\Component\Routing\Loader\AttributeFileLoader($b, $c)); + $a->addLoader(new \Symfony\Component\Routing\Loader\Psr4DirectoryLoader($b)); + + return $container->services['routing.loader'] = new \Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader($a, ['utf8' => true], []); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getSecrets_EnvVarLoaderService.php b/backend/var/cache/dev/ContainerBuxy6WO/getSecrets_EnvVarLoaderService.php new file mode 100644 index 0000000..85d0cfd --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getSecrets_EnvVarLoaderService.php @@ -0,0 +1,26 @@ +privates['secrets.env_var_loader'] = new \Symfony\Component\DependencyInjection\StaticEnvVarLoader(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getSecrets_VaultService.php b/backend/var/cache/dev/ContainerBuxy6WO/getSecrets_VaultService.php new file mode 100644 index 0000000..de2dd54 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getSecrets_VaultService.php @@ -0,0 +1,28 @@ +privates['secrets.vault'] = new \Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault((\dirname(__DIR__, 4).'/config/secrets/'.$container->getEnv('string:default:kernel.environment:APP_RUNTIME_ENV')), \Symfony\Component\String\LazyString::fromCallable($container->getEnv(...), 'base64:default::SYMFONY_DECRYPTION_SECRET'), 'APP_SECRET'); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getServicesResetterService.php b/backend/var/cache/dev/ContainerBuxy6WO/getServicesResetterService.php new file mode 100644 index 0000000..0e876ad --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getServicesResetterService.php @@ -0,0 +1,54 @@ +services['services_resetter'] = new \Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter(new RewindableGenerator(function () use ($container) { + if (isset($container->privates['controller.cache_attribute_listener'])) { + yield 'controller.cache_attribute_listener' => ($container->privates['controller.cache_attribute_listener'] ?? null); + } + if (isset($container->services['request_stack'])) { + yield 'request_stack' => ($container->services['request_stack'] ?? null); + } + if (isset($container->privates['container.env_var_processor'])) { + yield 'container.env_var_processor' => ($container->privates['container.env_var_processor'] ?? null); + } + if (isset($container->services['cache.app'])) { + yield 'cache.app' => ($container->services['cache.app'] ?? null); + } + if (isset($container->services['cache.system'])) { + yield 'cache.system' => ($container->services['cache.system'] ?? null); + } + if (false) { + yield 'cache.validator' => null; + } + if (false) { + yield 'cache.serializer' => null; + } + if (false) { + yield 'cache.property_info' => null; + } + if (isset($container->privates['session_listener'])) { + yield 'session_listener' => ($container->privates['session_listener'] ?? null); + } + }, fn () => 0 + (int) (isset($container->privates['controller.cache_attribute_listener'])) + (int) (isset($container->services['request_stack'])) + (int) (isset($container->privates['container.env_var_processor'])) + (int) (isset($container->services['cache.app'])) + (int) (isset($container->services['cache.system'])) + (int) (false) + (int) (false) + (int) (false) + (int) (isset($container->privates['session_listener']))), ['controller.cache_attribute_listener' => ['?reset'], 'request_stack' => ['?resetRequestFormats'], 'container.env_var_processor' => ['reset'], 'cache.app' => ['reset'], 'cache.system' => ['reset'], 'cache.validator' => ['reset'], 'cache.serializer' => ['reset'], 'cache.property_info' => ['reset'], 'session_listener' => ['reset']]); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getSession_FactoryService.php b/backend/var/cache/dev/ContainerBuxy6WO/getSession_FactoryService.php new file mode 100644 index 0000000..108920c --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getSession_FactoryService.php @@ -0,0 +1,44 @@ +privates['session_listener'] ?? self::getSessionListenerService($container)); + + if (isset($container->privates['session.factory'])) { + return $container->privates['session.factory']; + } + + $instance = new \Symfony\Component\HttpFoundation\Session\SessionFactory(($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorageFactory($container->parameters['session.storage.options'], new \Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler(new \SessionHandler()), new \Symfony\Component\HttpFoundation\Session\Storage\MetadataBag('_sf2_meta', 0, NULL), true), [$a, 'onSessionUsage']); + + if (isset($container->privates['session.factory'])) { + return $container->privates['session.factory']; + } + + return $container->privates['session.factory'] = $instance; + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/getTemplateControllerService.php b/backend/var/cache/dev/ContainerBuxy6WO/getTemplateControllerService.php new file mode 100644 index 0000000..8aa7d1d --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/getTemplateControllerService.php @@ -0,0 +1,25 @@ +services['Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController'] = new \Symfony\Bundle\FrameworkBundle\Controller\TemplateController(NULL); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_About_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_About_LazyService.php new file mode 100644 index 0000000..8cb694f --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_About_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.about.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('about', [], 'Display information about the current project', false, #[\Closure(name: 'console.command.about', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\AboutCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\AboutCommand => ($container->privates['console.command.about'] ?? $container->load('getConsole_Command_AboutService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_AssetsInstall_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_AssetsInstall_LazyService.php new file mode 100644 index 0000000..7159ace --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_AssetsInstall_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.assets_install.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('assets:install', [], 'Install bundle\'s web assets under a public directory', false, #[\Closure(name: 'console.command.assets_install', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\AssetsInstallCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand => ($container->privates['console.command.assets_install'] ?? $container->load('getConsole_Command_AssetsInstallService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CacheClear_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CacheClear_LazyService.php new file mode 100644 index 0000000..45ca481 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CacheClear_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_clear.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:clear', [], 'Clear the cache', false, #[\Closure(name: 'console.command.cache_clear', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand => ($container->privates['console.command.cache_clear'] ?? $container->load('getConsole_Command_CacheClearService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolClear_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolClear_LazyService.php new file mode 100644 index 0000000..64cc702 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolClear_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_pool_clear.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:pool:clear', [], 'Clear cache pools', false, #[\Closure(name: 'console.command.cache_pool_clear', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolClearCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand => ($container->privates['console.command.cache_pool_clear'] ?? $container->load('getConsole_Command_CachePoolClearService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolDelete_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolDelete_LazyService.php new file mode 100644 index 0000000..e7220da --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolDelete_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_pool_delete.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:pool:delete', [], 'Delete an item from a cache pool', false, #[\Closure(name: 'console.command.cache_pool_delete', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolDeleteCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CachePoolDeleteCommand => ($container->privates['console.command.cache_pool_delete'] ?? $container->load('getConsole_Command_CachePoolDeleteService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolInvalidateTags_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolInvalidateTags_LazyService.php new file mode 100644 index 0000000..98e4080 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolInvalidateTags_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_pool_invalidate_tags.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:pool:invalidate-tags', [], 'Invalidate cache tags for all or a specific pool', false, #[\Closure(name: 'console.command.cache_pool_invalidate_tags', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolInvalidateTagsCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CachePoolInvalidateTagsCommand => ($container->privates['console.command.cache_pool_invalidate_tags'] ?? $container->load('getConsole_Command_CachePoolInvalidateTagsService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolList_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolList_LazyService.php new file mode 100644 index 0000000..9359b4c --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolList_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_pool_list.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:pool:list', [], 'List available cache pools', false, #[\Closure(name: 'console.command.cache_pool_list', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolListCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CachePoolListCommand => ($container->privates['console.command.cache_pool_list'] ?? $container->load('getConsole_Command_CachePoolListService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolPrune_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolPrune_LazyService.php new file mode 100644 index 0000000..7662eec --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CachePoolPrune_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_pool_prune.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:pool:prune', [], 'Prune cache pools', false, #[\Closure(name: 'console.command.cache_pool_prune', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolPruneCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand => ($container->privates['console.command.cache_pool_prune'] ?? $container->load('getConsole_Command_CachePoolPruneService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CacheWarmup_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CacheWarmup_LazyService.php new file mode 100644 index 0000000..2c01193 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_CacheWarmup_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_warmup.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:warmup', [], 'Warm up an empty cache', false, #[\Closure(name: 'console.command.cache_warmup', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheWarmupCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand => ($container->privates['console.command.cache_warmup'] ?? $container->load('getConsole_Command_CacheWarmupService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ConfigDebug_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ConfigDebug_LazyService.php new file mode 100644 index 0000000..ff5f4b2 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ConfigDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.config_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:config', [], 'Dump the current configuration for an extension', false, #[\Closure(name: 'console.command.config_debug', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDebugCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\ConfigDebugCommand => ($container->privates['console.command.config_debug'] ?? $container->load('getConsole_Command_ConfigDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ConfigDumpReference_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ConfigDumpReference_LazyService.php new file mode 100644 index 0000000..05ea254 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ConfigDumpReference_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.config_dump_reference.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('config:dump-reference', [], 'Dump the default configuration for an extension', false, #[\Closure(name: 'console.command.config_dump_reference', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDumpReferenceCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\ConfigDumpReferenceCommand => ($container->privates['console.command.config_dump_reference'] ?? $container->load('getConsole_Command_ConfigDumpReferenceService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ContainerDebug_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ContainerDebug_LazyService.php new file mode 100644 index 0000000..639fd68 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ContainerDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.container_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:container', [], 'Display current services for an application', false, #[\Closure(name: 'console.command.container_debug', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerDebugCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\ContainerDebugCommand => ($container->privates['console.command.container_debug'] ?? $container->load('getConsole_Command_ContainerDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ContainerLint_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ContainerLint_LazyService.php new file mode 100644 index 0000000..62b0a08 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ContainerLint_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.container_lint.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('lint:container', [], 'Ensure that arguments injected into services match type declarations', false, #[\Closure(name: 'console.command.container_lint', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerLintCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\ContainerLintCommand => ($container->privates['console.command.container_lint'] ?? $container->load('getConsole_Command_ContainerLintService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_DebugAutowiring_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_DebugAutowiring_LazyService.php new file mode 100644 index 0000000..54f0049 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_DebugAutowiring_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.debug_autowiring.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:autowiring', [], 'List classes/interfaces you can use for autowiring', false, #[\Closure(name: 'console.command.debug_autowiring', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\DebugAutowiringCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\DebugAutowiringCommand => ($container->privates['console.command.debug_autowiring'] ?? $container->load('getConsole_Command_DebugAutowiringService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_DotenvDebug_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_DotenvDebug_LazyService.php new file mode 100644 index 0000000..a37fe90 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_DotenvDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.dotenv_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:dotenv', [], 'List all dotenv files with variables and values', false, #[\Closure(name: 'console.command.dotenv_debug', class: 'Symfony\\Component\\Dotenv\\Command\\DebugCommand')] fn (): \Symfony\Component\Dotenv\Command\DebugCommand => ($container->privates['console.command.dotenv_debug'] ?? $container->load('getConsole_Command_DotenvDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ErrorDumper_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ErrorDumper_LazyService.php new file mode 100644 index 0000000..11c0ae4 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_ErrorDumper_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.error_dumper.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('error:dump', [], 'Dump error pages to plain HTML files that can be directly served by a web server', false, #[\Closure(name: 'console.command.error_dumper', class: 'Symfony\\Component\\ErrorHandler\\Command\\ErrorDumpCommand')] fn (): \Symfony\Component\ErrorHandler\Command\ErrorDumpCommand => ($container->privates['console.command.error_dumper'] ?? $container->load('getConsole_Command_ErrorDumperService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_EventDispatcherDebug_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_EventDispatcherDebug_LazyService.php new file mode 100644 index 0000000..cf08a4c --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_EventDispatcherDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.event_dispatcher_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:event-dispatcher', [], 'Display configured listeners for an application', false, #[\Closure(name: 'console.command.event_dispatcher_debug', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\EventDispatcherDebugCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand => ($container->privates['console.command.event_dispatcher_debug'] ?? $container->load('getConsole_Command_EventDispatcherDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_RouterDebug_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_RouterDebug_LazyService.php new file mode 100644 index 0000000..f60b553 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_RouterDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.router_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:router', [], 'Display current routes for an application', false, #[\Closure(name: 'console.command.router_debug', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterDebugCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand => ($container->privates['console.command.router_debug'] ?? $container->load('getConsole_Command_RouterDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_RouterMatch_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_RouterMatch_LazyService.php new file mode 100644 index 0000000..525a466 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_RouterMatch_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.router_match.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('router:match', [], 'Help debug routes by simulating a path info match', false, #[\Closure(name: 'console.command.router_match', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterMatchCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand => ($container->privates['console.command.router_match'] ?? $container->load('getConsole_Command_RouterMatchService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsDecryptToLocal_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsDecryptToLocal_LazyService.php new file mode 100644 index 0000000..e7c1ada --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsDecryptToLocal_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_decrypt_to_local.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:decrypt-to-local', [], 'Decrypt all secrets and stores them in the local vault', false, #[\Closure(name: 'console.command.secrets_decrypt_to_local', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsDecryptToLocalCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsDecryptToLocalCommand => ($container->privates['console.command.secrets_decrypt_to_local'] ?? $container->load('getConsole_Command_SecretsDecryptToLocalService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsEncryptFromLocal_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsEncryptFromLocal_LazyService.php new file mode 100644 index 0000000..4b4f2ea --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsEncryptFromLocal_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_encrypt_from_local.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:encrypt-from-local', [], 'Encrypt all local secrets to the vault', false, #[\Closure(name: 'console.command.secrets_encrypt_from_local', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsEncryptFromLocalCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsEncryptFromLocalCommand => ($container->privates['console.command.secrets_encrypt_from_local'] ?? $container->load('getConsole_Command_SecretsEncryptFromLocalService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsGenerateKey_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsGenerateKey_LazyService.php new file mode 100644 index 0000000..7cdfb7d --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsGenerateKey_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_generate_key.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:generate-keys', [], 'Generate new encryption keys', false, #[\Closure(name: 'console.command.secrets_generate_key', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsGenerateKeysCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsGenerateKeysCommand => ($container->privates['console.command.secrets_generate_key'] ?? $container->load('getConsole_Command_SecretsGenerateKeyService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsList_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsList_LazyService.php new file mode 100644 index 0000000..09fc8a1 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsList_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_list.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:list', [], 'List all secrets', false, #[\Closure(name: 'console.command.secrets_list', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsListCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsListCommand => ($container->privates['console.command.secrets_list'] ?? $container->load('getConsole_Command_SecretsListService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsRemove_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsRemove_LazyService.php new file mode 100644 index 0000000..6b5c6c1 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsRemove_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_remove.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:remove', [], 'Remove a secret from the vault', false, #[\Closure(name: 'console.command.secrets_remove', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsRemoveCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsRemoveCommand => ($container->privates['console.command.secrets_remove'] ?? $container->load('getConsole_Command_SecretsRemoveService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsReveal_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsReveal_LazyService.php new file mode 100644 index 0000000..0070093 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsReveal_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_reveal.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:reveal', [], 'Reveal the value of a secret', false, #[\Closure(name: 'console.command.secrets_reveal', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsRevealCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsRevealCommand => ($container->privates['console.command.secrets_reveal'] ?? $container->load('getConsole_Command_SecretsRevealService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsSet_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsSet_LazyService.php new file mode 100644 index 0000000..7fae05c --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_SecretsSet_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_set.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:set', [], 'Set a secret in the vault', false, #[\Closure(name: 'console.command.secrets_set', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsSetCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsSetCommand => ($container->privates['console.command.secrets_set'] ?? $container->load('getConsole_Command_SecretsSetService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_YamlLint_LazyService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_YamlLint_LazyService.php new file mode 100644 index 0000000..c984023 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_Console_Command_YamlLint_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.yaml_lint.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('lint:yaml', [], 'Lint a YAML file and outputs encountered errors', false, #[\Closure(name: 'console.command.yaml_lint', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\YamlLintCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand => ($container->privates['console.command.yaml_lint'] ?? $container->load('getConsole_Command_YamlLintService'))); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_ServiceLocator_1vYpZ1BService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_ServiceLocator_1vYpZ1BService.php new file mode 100644 index 0000000..673276f --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_ServiceLocator_1vYpZ1BService.php @@ -0,0 +1,27 @@ +privates['.service_locator.1vYpZ1B'] = new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'loader' => ['privates', '.errored..service_locator.1vYpZ1B.Symfony\\Component\\Config\\Loader\\LoaderInterface', NULL, 'Cannot autowire service ".service_locator.1vYpZ1B": it needs an instance of "Symfony\\Component\\Config\\Loader\\LoaderInterface" but this type has been excluded from autowiring.'], + ], [ + 'loader' => 'Symfony\\Component\\Config\\Loader\\LoaderInterface', + ]); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_ServiceLocator_1vYpZ1B_KernelloadRoutesService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_ServiceLocator_1vYpZ1B_KernelloadRoutesService.php new file mode 100644 index 0000000..b9a8ad9 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_ServiceLocator_1vYpZ1B_KernelloadRoutesService.php @@ -0,0 +1,23 @@ +privates['.service_locator.1vYpZ1B.kernel::loadRoutes()'] = ($container->privates['.service_locator.1vYpZ1B'] ?? $container->load('get_ServiceLocator_1vYpZ1BService'))->withContext('kernel::loadRoutes()', $container); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService.php b/backend/var/cache/dev/ContainerBuxy6WO/get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService.php new file mode 100644 index 0000000..8dbb3d8 --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService.php @@ -0,0 +1,23 @@ +privates['.service_locator.1vYpZ1B.kernel::registerContainerConfiguration()'] = ($container->privates['.service_locator.1vYpZ1B'] ?? $container->load('get_ServiceLocator_1vYpZ1BService'))->withContext('kernel::registerContainerConfiguration()', $container); + } +} diff --git a/backend/var/cache/dev/ContainerBuxy6WO/removed-ids.php b/backend/var/cache/dev/ContainerBuxy6WO/removed-ids.php new file mode 100644 index 0000000..de981fe --- /dev/null +++ b/backend/var/cache/dev/ContainerBuxy6WO/removed-ids.php @@ -0,0 +1,180 @@ + true, + 'Psr\\Container\\ContainerInterface $parameterBag' => true, + 'Psr\\EventDispatcher\\EventDispatcherInterface' => true, + 'Psr\\Log\\LoggerInterface' => true, + 'SessionHandlerInterface' => true, + 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerHelper' => true, + 'Symfony\\Component\\Config\\Loader\\LoaderInterface' => true, + 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBagInterface' => true, + 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBagInterface' => true, + 'Symfony\\Component\\DependencyInjection\\ReverseContainer' => true, + 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\FileLinkFormatter' => true, + 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => true, + 'Symfony\\Component\\Filesystem\\Filesystem' => true, + 'Symfony\\Component\\HttpFoundation\\Request' => true, + 'Symfony\\Component\\HttpFoundation\\RequestStack' => true, + 'Symfony\\Component\\HttpFoundation\\Response' => true, + 'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface' => true, + 'Symfony\\Component\\HttpFoundation\\UriSigner' => true, + 'Symfony\\Component\\HttpFoundation\\UrlHelper' => true, + 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' => true, + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ServicesResetterInterface' => true, + 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentUriGeneratorInterface' => true, + 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => true, + 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => true, + 'Symfony\\Component\\HttpKernel\\KernelInterface' => true, + 'Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface' => true, + 'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface' => true, + 'Symfony\\Component\\Routing\\RequestContext' => true, + 'Symfony\\Component\\Routing\\RequestContextAwareInterface' => true, + 'Symfony\\Component\\Routing\\RouterInterface' => true, + 'Symfony\\Component\\String\\Slugger\\SluggerInterface' => true, + 'Symfony\\Contracts\\Cache\\CacheInterface' => true, + 'Symfony\\Contracts\\Cache\\NamespacedPoolInterface' => true, + 'Symfony\\Contracts\\Cache\\TagAwareCacheInterface' => true, + 'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => true, + 'argument_metadata_factory' => true, + 'argument_resolver' => true, + 'argument_resolver.backed_enum_resolver' => true, + 'argument_resolver.controller_locator' => true, + 'argument_resolver.datetime' => true, + 'argument_resolver.default' => true, + 'argument_resolver.query_parameter_value_resolver' => true, + 'argument_resolver.request' => true, + 'argument_resolver.request_attribute' => true, + 'argument_resolver.request_payload' => true, + 'argument_resolver.service' => true, + 'argument_resolver.session' => true, + 'argument_resolver.variadic' => true, + 'cache.adapter.apcu' => true, + 'cache.adapter.array' => true, + 'cache.adapter.doctrine_dbal' => true, + 'cache.adapter.filesystem' => true, + 'cache.adapter.memcached' => true, + 'cache.adapter.pdo' => true, + 'cache.adapter.psr6' => true, + 'cache.adapter.redis' => true, + 'cache.adapter.redis_tag_aware' => true, + 'cache.adapter.system' => true, + 'cache.adapter.valkey' => true, + 'cache.adapter.valkey_tag_aware' => true, + 'cache.app.taggable' => true, + 'cache.default_clearer' => true, + 'cache.default_doctrine_dbal_provider' => true, + 'cache.default_marshaller' => true, + 'cache.default_memcached_provider' => true, + 'cache.default_redis_provider' => true, + 'cache.default_valkey_provider' => true, + 'cache.early_expiration_handler' => true, + 'cache.property_info' => true, + 'cache.serializer' => true, + 'cache.validator' => true, + 'cache_clearer' => true, + 'config.resource.self_checking_resource_checker' => true, + 'config_builder.warmer' => true, + 'config_cache_factory' => true, + 'console.command.about' => true, + 'console.command.assets_install' => true, + 'console.command.cache_clear' => true, + 'console.command.cache_pool_clear' => true, + 'console.command.cache_pool_delete' => true, + 'console.command.cache_pool_invalidate_tags' => true, + 'console.command.cache_pool_list' => true, + 'console.command.cache_pool_prune' => true, + 'console.command.cache_warmup' => true, + 'console.command.config_debug' => true, + 'console.command.config_dump_reference' => true, + 'console.command.container_debug' => true, + 'console.command.container_lint' => true, + 'console.command.debug_autowiring' => true, + 'console.command.dotenv_debug' => true, + 'console.command.error_dumper' => true, + 'console.command.event_dispatcher_debug' => true, + 'console.command.router_debug' => true, + 'console.command.router_match' => true, + 'console.command.secrets_decrypt_to_local' => true, + 'console.command.secrets_encrypt_from_local' => true, + 'console.command.secrets_generate_key' => true, + 'console.command.secrets_list' => true, + 'console.command.secrets_remove' => true, + 'console.command.secrets_reveal' => true, + 'console.command.secrets_set' => true, + 'console.command.yaml_lint' => true, + 'console.error_listener' => true, + 'console.messenger.application' => true, + 'console.messenger.execute_command_handler' => true, + 'console.suggest_missing_package_subscriber' => true, + 'container.env' => true, + 'container.env_var_processor' => true, + 'container.getenv' => true, + 'controller.cache_attribute_listener' => true, + 'controller.helper' => true, + 'controller.is_signature_valid_attribute_listener' => true, + 'controller_resolver' => true, + 'debug.debug_handlers_listener' => true, + 'debug.file_link_formatter' => true, + 'dependency_injection.config.container_parameters_resource_checker' => true, + 'disallow_search_engine_index_response_listener' => true, + 'error_handler.error_renderer.cli' => true, + 'error_handler.error_renderer.default' => true, + 'error_handler.error_renderer.html' => true, + 'error_renderer' => true, + 'error_renderer.cli' => true, + 'error_renderer.default' => true, + 'error_renderer.html' => true, + 'exception_listener' => true, + 'file_locator' => true, + 'filesystem' => true, + 'fragment.handler' => true, + 'fragment.renderer.inline' => true, + 'fragment.uri_generator' => true, + 'http_cache' => true, + 'http_cache.store' => true, + 'locale_aware_listener' => true, + 'locale_listener' => true, + 'logger' => true, + 'parameter_bag' => true, + 'response_listener' => true, + 'reverse_container' => true, + 'router.cache_warmer' => true, + 'router.default' => true, + 'router.request_context' => true, + 'router_listener' => true, + 'routing.loader.attribute' => true, + 'routing.loader.attribute.directory' => true, + 'routing.loader.attribute.file' => true, + 'routing.loader.attribute.services' => true, + 'routing.loader.container' => true, + 'routing.loader.directory' => true, + 'routing.loader.glob' => true, + 'routing.loader.php' => true, + 'routing.loader.psr4' => true, + 'routing.loader.xml' => true, + 'routing.loader.yml' => true, + 'routing.resolver' => true, + 'secrets.decryption_key' => true, + 'secrets.env_var_loader' => true, + 'secrets.local_vault' => true, + 'secrets.vault' => true, + 'session.abstract_handler' => true, + 'session.factory' => true, + 'session.handler' => true, + 'session.handler.native' => true, + 'session.handler.native_file' => true, + 'session.marshaller' => true, + 'session.marshalling_handler' => true, + 'session.storage.factory' => true, + 'session.storage.factory.mock_file' => true, + 'session.storage.factory.native' => true, + 'session.storage.factory.php_bridge' => true, + 'session_listener' => true, + 'slugger' => true, + 'uri_signer' => true, + 'url_helper' => true, + 'validate_request_listener' => true, +]; diff --git a/backend/var/cache/dev/ContainerIP09wnc/App_KernelDevDebugContainer.php b/backend/var/cache/dev/ContainerIP09wnc/App_KernelDevDebugContainer.php new file mode 100644 index 0000000..0a82c66 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/App_KernelDevDebugContainer.php @@ -0,0 +1,1143 @@ + 'A non-empty value for the parameter "kernel.secret" is required. Did you forget to configure the "APP_SECRET" env var?', + ]; + + protected $targetDir; + protected $parameters = []; + protected \Closure $getService; + + public function __construct(private array $buildParameters = [], protected string $containerDir = __DIR__) + { + $this->targetDir = \dirname($containerDir); + $this->parameters = $this->getDefaultParameters(); + + $this->services = $this->privates = []; + $this->syntheticIds = [ + 'kernel' => true, + ]; + $this->methodMap = [ + 'debug.stopwatch' => 'getDebug_StopwatchService', + 'doctrine' => 'getDoctrineService', + 'doctrine.dbal.default_connection' => 'getDoctrine_Dbal_DefaultConnectionService', + 'doctrine.orm.default_entity_manager' => 'getDoctrine_Orm_DefaultEntityManagerService', + 'event_dispatcher' => 'getEventDispatcherService', + 'http_kernel' => 'getHttpKernelService', + 'request_stack' => 'getRequestStackService', + 'router' => 'getRouterService', + ]; + $this->fileMap = [ + 'Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController' => 'getRedirectControllerService', + 'Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController' => 'getTemplateControllerService', + 'cache.app' => 'getCache_AppService', + 'cache.app_clearer' => 'getCache_AppClearerService', + 'cache.global_clearer' => 'getCache_GlobalClearerService', + 'cache.system' => 'getCache_SystemService', + 'cache.system_clearer' => 'getCache_SystemClearerService', + 'cache.validator_expression_language' => 'getCache_ValidatorExpressionLanguageService', + 'cache_warmer' => 'getCacheWarmerService', + 'console.command_loader' => 'getConsole_CommandLoaderService', + 'container.env_var_processors_locator' => 'getContainer_EnvVarProcessorsLocatorService', + 'container.get_routing_condition_service' => 'getContainer_GetRoutingConditionServiceService', + 'debug.error_handler_configurator' => 'getDebug_ErrorHandlerConfiguratorService', + 'error_controller' => 'getErrorControllerService', + 'routing.loader' => 'getRouting_LoaderService', + 'services_resetter' => 'getServicesResetterService', + ]; + $this->aliases = [ + 'App\\Kernel' => 'kernel', + 'database_connection' => 'doctrine.dbal.default_connection', + 'doctrine.orm.entity_manager' => 'doctrine.orm.default_entity_manager', + ]; + + $this->privates['service_container'] = static function ($container) { + include_once \dirname(__DIR__, 4).'/vendor/symfony/event-dispatcher/EventSubscriberInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/ResponseListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/LocaleListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/ErrorListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/CacheAttributeListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/IsSignatureValidAttributeListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/RunnerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/Runner/Symfony/ResponseRunner.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/RuntimeInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/GenericRuntime.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/runtime/SymfonyRuntime.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/HttpKernelInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/TerminableInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/HttpKernel.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ControllerResolverInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ControllerResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/framework-bundle/Controller/ControllerResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ArgumentResolverInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ArgumentResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/container/src/ContainerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/service-contracts/ServiceProviderInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/service-contracts/ServiceCollectionInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/service-contracts/ServiceLocatorTrait.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ServiceLocator.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-foundation/RequestStack.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/LocaleAwareListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/service-contracts/ResetInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/stopwatch/Stopwatch.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/RequestContext.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/RouterListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/SerializerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/NormalizerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/DenormalizerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/EncoderInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/ContextAwareEncoderInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/DecoderInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/ContextAwareDecoderInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Serializer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/SerializerAwareInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/SerializerAwareTrait.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/UnwrappingDenormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-access/PropertyAccessorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-access/PropertyAccessor.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/cache/src/CacheItemPoolInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/cache/Adapter/AdapterInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/cache-contracts/CacheInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/cache-contracts/NamespacedPoolInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/log/src/LoggerAwareInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/cache/ResettableInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/log/src/LoggerAwareTrait.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/cache/Adapter/ArrayAdapter.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/ProblemNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/UidNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/DateTimeNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/ConstraintViolationListNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/NameConverter/NameConverterInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/NameConverter/AdvancedNameConverterInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/NameConverter/MetadataAwareNameConverter.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/DateTimeZoneNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/DateIntervalNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/FormErrorNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/BackedEnumNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/NumberNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/DataUriNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/ObjectToPopulateTrait.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/AbstractNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/JsonSerializableNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/DenormalizerAwareInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/DenormalizerAwareTrait.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/ArrayDenormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Mapping/Loader/AccessorCollisionResolverTrait.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Normalizer/ObjectNormalizer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Mapping/ClassDiscriminatorResolverInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Mapping/ClassDiscriminatorFromClassMetadata.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/NormalizationAwareInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/XmlEncoder.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/JsonEncoder.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/YamlEncoder.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/CsvEncoder.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Mapping/Loader/LoaderInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Mapping/Loader/AttributeLoader.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Mapping/Factory/ClassMetadataFactoryInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Mapping/Factory/ClassResolverTrait.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Mapping/Factory/ClassMetadataFactory.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Mapping/Loader/LoaderChain.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-info/PropertyTypeExtractorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-info/PropertyDescriptionExtractorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-info/PropertyAccessExtractorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-info/PropertyListExtractorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-info/PropertyInfoExtractorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-info/PropertyInitializableExtractorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-info/PropertyInfoExtractor.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-info/PropertyReadInfoExtractorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-info/PropertyWriteInfoExtractorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/property-info/Extractor/ReflectionExtractor.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/EventListener/SessionListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/validator/Validator/ValidatorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/validator/ValidatorBuilder.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/validator/Validation.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/validator/ConstraintValidatorFactoryInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/validator/ContainerConstraintValidatorFactory.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/validator/ObjectInitializerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/doctrine-bridge/Validator/DoctrineInitializer.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/validator/Mapping/Loader/LoaderInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/validator/Mapping/Loader/AutoMappingTrait.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/validator/Mapping/Loader/PropertyInfoLoader.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/doctrine-bridge/Validator/DoctrineLoader.php'; + include_once \dirname(__DIR__, 4).'/vendor/nelmio/cors-bundle/EventListener/CorsListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/nelmio/cors-bundle/Options/ResolverInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/nelmio/cors-bundle/Options/Resolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/nelmio/cors-bundle/Options/ProviderInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/nelmio/cors-bundle/Options/ConfigProvider.php'; + include_once \dirname(__DIR__, 4).'/vendor/nelmio/cors-bundle/EventListener/CacheableResponseVaryListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/persistence/src/Persistence/ConnectionRegistry.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/persistence/src/Persistence/ManagerRegistry.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/persistence/src/Persistence/AbstractManagerRegistry.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/doctrine-bridge/ManagerRegistry.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/Registry.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/doctrine-bridge/Middleware/IdleConnection/Listener.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/event-manager/src/EventDispatcher.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/event-manager/src/EventListenerIntrospector.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/event-manager/src/EventListenerRegistry.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/event-manager/src/EventSubscriberRegistry.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/event-manager/src/EventManagerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/event-manager/src/EventManager.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/dbal/src/ServerVersionProvider.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/dbal/src/Connection.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/ConnectionFactory.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/dbal/src/Configuration.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/dbal/src/Schema/SchemaManagerFactory.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/dbal/src/Schema/DefaultSchemaManagerFactory.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/Dbal/SchemaAssetsFilterManager.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/dbal/src/Driver/Middleware.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/Middleware/ConnectionNameAwareInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/Middleware/DebugMiddleware.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/Middleware/IdleConnectionMiddleware.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/dbal/src/Tools/DsnParser.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/doctrine-bridge/Middleware/Debug/DebugDataHolder.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/Middleware/BacktraceDebugDataHolder.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Configuration.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/MappingDriver.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/Mapping/MappingDriver.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/MappingDriverChain.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/persistence/src/Persistence/Mapping/Driver/ColocatedMappingDriver.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Mapping/Driver/ReflectionBasedDriver.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Mapping/Driver/AttributeDriver.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Mapping/NamingStrategy.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Mapping/UnderscoreNamingStrategy.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Mapping/QuoteStrategy.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Internal/SQLResultCasing.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Mapping/DefaultQuoteStrategy.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Mapping/TypedFieldMapper.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Mapping/DefaultTypedFieldMapper.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Mapping/EntityListenerResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/Mapping/EntityListenerServiceResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/Mapping/ContainerEntityListenerResolver.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Repository/RepositoryFactory.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/Repository/RepositoryFactoryCompatibility.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/Repository/ContainerRepositoryFactory.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/src/ManagerConfigurator.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-migrations-bundle/src/EventListener/SchemaFilterListener.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/log/src/LoggerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/log/src/LoggerTrait.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/log/src/AbstractLogger.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Log/DebugLoggerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Log/Logger.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/RequestContextAwareInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/Matcher/UrlMatcherInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/Generator/UrlGeneratorInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/RouterInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/Matcher/RequestMatcherInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/routing/Router.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/CacheWarmer/WarmableInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/service-contracts/ServiceSubscriberInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/framework-bundle/Routing/Router.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/config/ConfigCacheFactoryInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php'; + include_once \dirname(__DIR__, 4).'/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/event-dispatcher/EventDispatcherInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/event-dispatcher/EventDispatcher.php'; + }; + } + + public function compile(): void + { + throw new LogicException('You cannot compile a dumped container that was already compiled.'); + } + + public function isCompiled(): bool + { + return true; + } + + public function getRemovedIds(): array + { + return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php'; + } + + protected function load($file, $lazyLoad = true): mixed + { + if (class_exists($class = __NAMESPACE__.'\\'.$file, false)) { + return $class::do($this, $lazyLoad); + } + + if ('.' === $file[-4]) { + $class = substr($class, 0, -4); + } else { + $file .= '.php'; + } + + $service = require $this->containerDir.\DIRECTORY_SEPARATOR.$file; + + return class_exists($class, false) ? $class::do($this, $lazyLoad) : $service; + } + + protected function createProxy($class, \Closure $factory) + { + class_exists($class, false) || require __DIR__.'/'.$class.'.php'; + + return $factory(); + } + + /** + * Gets the public 'debug.stopwatch' shared service. + * + * @return \Symfony\Component\Stopwatch\Stopwatch + */ + protected static function getDebug_StopwatchService($container) + { + return $container->services['debug.stopwatch'] = new \Symfony\Component\Stopwatch\Stopwatch(true); + } + + /** + * Gets the public 'doctrine' shared service. + * + * @return \Doctrine\Bundle\DoctrineBundle\Registry + */ + protected static function getDoctrineService($container) + { + return $container->services['doctrine'] = new \Doctrine\Bundle\DoctrineBundle\Registry($container, $container->parameters['doctrine.connections'], $container->parameters['doctrine.entity_managers'], 'default', 'default'); + } + + /** + * Gets the public 'doctrine.dbal.default_connection' shared service. + * + * @return \Doctrine\DBAL\Connection + */ + protected static function getDoctrine_Dbal_DefaultConnectionService($container) + { + $a = new \Doctrine\DBAL\Configuration(); + + $b = new \Doctrine\Bundle\DoctrineBundle\Middleware\DebugMiddleware(($container->privates['doctrine.debug_data_holder'] ??= new \Doctrine\Bundle\DoctrineBundle\Middleware\BacktraceDebugDataHolder(['default'])), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + $b->setConnectionName('default'); + $c = new \Doctrine\Bundle\DoctrineBundle\Middleware\IdleConnectionMiddleware(($container->privates['doctrine.dbal.connection_expiries'] ??= new \ArrayObject()), ['default' => 600]); + $c->setConnectionName('default'); + + $a->setSchemaManagerFactory(new \Doctrine\DBAL\Schema\DefaultSchemaManagerFactory()); + $a->setSchemaAssetsFilter(new \Doctrine\Bundle\DoctrineBundle\Dbal\SchemaAssetsFilterManager([($container->privates['doctrine_migrations.schema_filter_listener'] ??= new \Doctrine\Bundle\MigrationsBundle\EventListener\SchemaFilterListener('doctrine_migration_versions'))])); + $a->setMiddlewares([$b, $c]); + + return $container->services['doctrine.dbal.default_connection'] = (new \Doctrine\Bundle\DoctrineBundle\ConnectionFactory([], new \Doctrine\DBAL\Tools\DsnParser(['db2' => 'ibm_db2', 'mssql' => 'pdo_sqlsrv', 'mysql' => 'pdo_mysql', 'mysql2' => 'pdo_mysql', 'postgres' => 'pdo_pgsql', 'postgresql' => 'pdo_pgsql', 'pgsql' => 'pdo_pgsql', 'sqlite' => 'pdo_sqlite', 'sqlite3' => 'pdo_sqlite'])))->createConnection(['url' => $container->getEnv('resolve:DATABASE_URL'), 'use_savepoints' => true, 'driver' => 'pdo_mysql', 'idle_connection_ttl' => 600, 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => [], 'defaultTableOptions' => []], $a, NULL, []); + } + + /** + * Gets the public 'doctrine.orm.default_entity_manager' shared service. + * + * @return \Doctrine\ORM\EntityManager + */ + protected static function getDoctrine_Orm_DefaultEntityManagerService($container, $lazyLoad = true) + { + if (true === $lazyLoad) { + return $container->services['doctrine.orm.default_entity_manager'] = $container->createProxy('EntityManagerGhost614a58f', static fn () => \EntityManagerGhost614a58f::createLazyGhost(static fn ($proxy) => self::getDoctrine_Orm_DefaultEntityManagerService($container, $proxy))); + } + + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/Proxy/Autoloader.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/persistence/src/Persistence/ObjectManager.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/EntityManagerInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/src/EntityManager.php'; + + $instance = ($lazyLoad->__construct(($container->services['doctrine.dbal.default_connection'] ?? self::getDoctrine_Dbal_DefaultConnectionService($container)), ($container->privates['doctrine.orm.default_configuration'] ?? self::getDoctrine_Orm_DefaultConfigurationService($container)), ($container->privates['doctrine.dbal.default_connection.event_manager'] ?? self::getDoctrine_Dbal_DefaultConnection_EventManagerService($container))) && false ?: $lazyLoad); + + ($container->privates['doctrine.orm.default_manager_configurator'] ??= new \Doctrine\Bundle\DoctrineBundle\ManagerConfigurator([], []))->configure($instance); + + return $instance; + } + + /** + * Gets the public 'event_dispatcher' shared service. + * + * @return \Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher + */ + protected static function getEventDispatcherService($container) + { + $container->services['event_dispatcher'] = $instance = new \Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher(new \Symfony\Component\EventDispatcher\EventDispatcher(), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true)), ($container->privates['logger'] ?? self::getLoggerService($container)), ($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), NULL); + + $instance->addListener('kernel.request', [#[\Closure(name: 'nelmio_cors.cors_listener', class: 'Nelmio\\CorsBundle\\EventListener\\CorsListener')] fn () => ($container->privates['nelmio_cors.cors_listener'] ?? self::getNelmioCors_CorsListenerService($container)), 'onKernelRequest'], 250); + $instance->addListener('kernel.response', [#[\Closure(name: 'nelmio_cors.cors_listener', class: 'Nelmio\\CorsBundle\\EventListener\\CorsListener')] fn () => ($container->privates['nelmio_cors.cors_listener'] ?? self::getNelmioCors_CorsListenerService($container)), 'onKernelResponse'], 0); + $instance->addListener('kernel.response', [#[\Closure(name: 'nelmio_cors.cacheable_response_vary_listener', class: 'Nelmio\\CorsBundle\\EventListener\\CacheableResponseVaryListener')] fn () => ($container->privates['nelmio_cors.cacheable_response_vary_listener'] ??= new \Nelmio\CorsBundle\EventListener\CacheableResponseVaryListener()), 'onResponse'], -15); + $instance->addListener('console.command', [#[\Closure(name: 'doctrine_migrations.schema_filter_listener', class: 'Doctrine\\Bundle\\MigrationsBundle\\EventListener\\SchemaFilterListener')] fn () => ($container->privates['doctrine_migrations.schema_filter_listener'] ??= new \Doctrine\Bundle\MigrationsBundle\EventListener\SchemaFilterListener('doctrine_migration_versions')), 'onConsoleCommand'], 0); + $instance->addListener('kernel.controller_arguments', [#[\Closure(name: 'argument_resolver.request_payload', class: 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestPayloadValueResolver')] fn () => ($container->privates['argument_resolver.request_payload'] ?? self::getArgumentResolver_RequestPayloadService($container)), 'onKernelControllerArguments'], 0); + $instance->addListener('kernel.response', [#[\Closure(name: 'response_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener')] fn () => ($container->privates['response_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\ResponseListener('UTF-8', false)), 'onKernelResponse'], 0); + $instance->addListener('kernel.request', [#[\Closure(name: 'locale_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener')] fn () => ($container->privates['locale_listener'] ?? self::getLocaleListenerService($container)), 'setDefaultLocale'], 100); + $instance->addListener('kernel.request', [#[\Closure(name: 'locale_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener')] fn () => ($container->privates['locale_listener'] ?? self::getLocaleListenerService($container)), 'onKernelRequest'], 16); + $instance->addListener('kernel.finish_request', [#[\Closure(name: 'locale_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener')] fn () => ($container->privates['locale_listener'] ?? self::getLocaleListenerService($container)), 'onKernelFinishRequest'], 0); + $instance->addListener('kernel.request', [#[\Closure(name: 'validate_request_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener')] fn () => ($container->privates['validate_request_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\ValidateRequestListener()), 'onKernelRequest'], 256); + $instance->addListener('kernel.response', [#[\Closure(name: 'disallow_search_engine_index_response_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\DisallowRobotsIndexingListener')] fn () => ($container->privates['disallow_search_engine_index_response_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\DisallowRobotsIndexingListener()), 'onResponse'], -255); + $instance->addListener('kernel.controller_arguments', [#[\Closure(name: 'exception_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener')] fn () => ($container->privates['exception_listener'] ?? self::getExceptionListenerService($container)), 'onControllerArguments'], 0); + $instance->addListener('kernel.exception', [#[\Closure(name: 'exception_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener')] fn () => ($container->privates['exception_listener'] ?? self::getExceptionListenerService($container)), 'logKernelException'], 0); + $instance->addListener('kernel.exception', [#[\Closure(name: 'exception_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener')] fn () => ($container->privates['exception_listener'] ?? self::getExceptionListenerService($container)), 'onKernelException'], -128); + $instance->addListener('kernel.response', [#[\Closure(name: 'exception_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener')] fn () => ($container->privates['exception_listener'] ?? self::getExceptionListenerService($container)), 'removeCspHeader'], -128); + $instance->addListener('kernel.controller_arguments', [#[\Closure(name: 'controller.cache_attribute_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\CacheAttributeListener')] fn () => ($container->privates['controller.cache_attribute_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\CacheAttributeListener()), 'onKernelControllerArguments'], 10); + $instance->addListener('kernel.response', [#[\Closure(name: 'controller.cache_attribute_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\CacheAttributeListener')] fn () => ($container->privates['controller.cache_attribute_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\CacheAttributeListener()), 'onKernelResponse'], -10); + $instance->addListener('kernel.controller_arguments', [#[\Closure(name: 'controller.is_signature_valid_attribute_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\IsSignatureValidAttributeListener')] fn () => ($container->privates['controller.is_signature_valid_attribute_listener'] ?? self::getController_IsSignatureValidAttributeListenerService($container)), 'onKernelControllerArguments'], 30); + $instance->addListener('kernel.request', [#[\Closure(name: 'locale_aware_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener')] fn () => ($container->privates['locale_aware_listener'] ?? self::getLocaleAwareListenerService($container)), 'onKernelRequest'], 15); + $instance->addListener('kernel.finish_request', [#[\Closure(name: 'locale_aware_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener')] fn () => ($container->privates['locale_aware_listener'] ?? self::getLocaleAwareListenerService($container)), 'onKernelFinishRequest'], -15); + $instance->addListener('console.error', [#[\Closure(name: 'console.error_listener', class: 'Symfony\\Component\\Console\\EventListener\\ErrorListener')] fn () => ($container->privates['console.error_listener'] ?? $container->load('getConsole_ErrorListenerService')), 'onConsoleError'], -128); + $instance->addListener('console.terminate', [#[\Closure(name: 'console.error_listener', class: 'Symfony\\Component\\Console\\EventListener\\ErrorListener')] fn () => ($container->privates['console.error_listener'] ?? $container->load('getConsole_ErrorListenerService')), 'onConsoleTerminate'], -128); + $instance->addListener('console.error', [#[\Closure(name: 'console.suggest_missing_package_subscriber', class: 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SuggestMissingPackageSubscriber')] fn () => ($container->privates['console.suggest_missing_package_subscriber'] ??= new \Symfony\Bundle\FrameworkBundle\EventListener\SuggestMissingPackageSubscriber()), 'onConsoleError'], 0); + $instance->addListener('kernel.request', [#[\Closure(name: 'debug.debug_handlers_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener')] fn () => ($container->privates['debug.debug_handlers_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\DebugHandlersListener(NULL, $container->getEnv('bool:default::key:web:default:kernel.runtime_mode:'))), 'configure'], 2048); + $instance->addListener('console.command', [#[\Closure(name: 'debug.debug_handlers_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener')] fn () => ($container->privates['debug.debug_handlers_listener'] ??= new \Symfony\Component\HttpKernel\EventListener\DebugHandlersListener(NULL, $container->getEnv('bool:default::key:web:default:kernel.runtime_mode:'))), 'configure'], 2048); + $instance->addListener('kernel.request', [#[\Closure(name: 'router_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener')] fn () => ($container->privates['router_listener'] ?? self::getRouterListenerService($container)), 'onKernelRequest'], 32); + $instance->addListener('kernel.finish_request', [#[\Closure(name: 'router_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener')] fn () => ($container->privates['router_listener'] ?? self::getRouterListenerService($container)), 'onKernelFinishRequest'], 0); + $instance->addListener('kernel.exception', [#[\Closure(name: 'router_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener')] fn () => ($container->privates['router_listener'] ?? self::getRouterListenerService($container)), 'onKernelException'], -64); + $instance->addListener('kernel.request', [#[\Closure(name: 'session_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\SessionListener')] fn () => ($container->privates['session_listener'] ?? self::getSessionListenerService($container)), 'onKernelRequest'], 128); + $instance->addListener('kernel.response', [#[\Closure(name: 'session_listener', class: 'Symfony\\Component\\HttpKernel\\EventListener\\SessionListener')] fn () => ($container->privates['session_listener'] ?? self::getSessionListenerService($container)), 'onKernelResponse'], -1000); + $instance->addListener('kernel.request', [#[\Closure(name: 'doctrine.dbal.idle_connection_listener', class: 'Symfony\\Bridge\\Doctrine\\Middleware\\IdleConnection\\Listener')] fn () => ($container->privates['doctrine.dbal.idle_connection_listener'] ?? self::getDoctrine_Dbal_IdleConnectionListenerService($container)), 'onKernelRequest'], 192); + + return $instance; + } + + /** + * Gets the public 'http_kernel' shared service. + * + * @return \Symfony\Component\HttpKernel\HttpKernel + */ + protected static function getHttpKernelService($container) + { + $a = new \Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver($container, ($container->privates['logger'] ?? self::getLoggerService($container))); + $a->allowControllers(['Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController', 'Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController']); + $a->allowControllers(['App\\Kernel', 'Doctrine\\Bundle\\DoctrineBundle\\Controller\\ProfilerController']); + $b = ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true)); + + return $container->services['http_kernel'] = new \Symfony\Component\HttpKernel\HttpKernel(($container->services['event_dispatcher'] ?? self::getEventDispatcherService($container)), new \Symfony\Component\HttpKernel\Controller\TraceableControllerResolver($a, $b), ($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), new \Symfony\Component\HttpKernel\Controller\TraceableArgumentResolver(new \Symfony\Component\HttpKernel\Controller\ArgumentResolver(new \Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory(), new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['.debug.value_resolver.doctrine.orm.entity_value_resolver'] ?? $container->load('get_Debug_ValueResolver_Doctrine_Orm_EntityValueResolverService')); + yield 1 => ($container->privates['.debug.value_resolver.argument_resolver.backed_enum_resolver'] ?? $container->load('get_Debug_ValueResolver_ArgumentResolver_BackedEnumResolverService')); + yield 2 => ($container->privates['.debug.value_resolver.argument_resolver.datetime'] ?? $container->load('get_Debug_ValueResolver_ArgumentResolver_DatetimeService')); + yield 3 => ($container->privates['.debug.value_resolver.argument_resolver.request_attribute'] ?? $container->load('get_Debug_ValueResolver_ArgumentResolver_RequestAttributeService')); + yield 4 => ($container->privates['.debug.value_resolver.argument_resolver.request'] ?? $container->load('get_Debug_ValueResolver_ArgumentResolver_RequestService')); + yield 5 => ($container->privates['.debug.value_resolver.argument_resolver.session'] ?? $container->load('get_Debug_ValueResolver_ArgumentResolver_SessionService')); + yield 6 => ($container->privates['.debug.value_resolver.argument_resolver.service'] ?? $container->load('get_Debug_ValueResolver_ArgumentResolver_ServiceService')); + yield 7 => ($container->privates['.debug.value_resolver.argument_resolver.default'] ?? $container->load('get_Debug_ValueResolver_ArgumentResolver_DefaultService')); + yield 8 => ($container->privates['.debug.value_resolver.argument_resolver.variadic'] ?? $container->load('get_Debug_ValueResolver_ArgumentResolver_VariadicService')); + yield 9 => ($container->privates['.debug.value_resolver.argument_resolver.not_tagged_controller'] ?? $container->load('get_Debug_ValueResolver_ArgumentResolver_NotTaggedControllerService')); + }, 10), new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestPayloadValueResolver' => ['privates', '.debug.value_resolver.argument_resolver.request_payload', 'get_Debug_ValueResolver_ArgumentResolver_RequestPayloadService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\QueryParameterValueResolver' => ['privates', '.debug.value_resolver.argument_resolver.query_parameter_value_resolver', 'get_Debug_ValueResolver_ArgumentResolver_QueryParameterValueResolverService', true], + 'Symfony\\Bridge\\Doctrine\\ArgumentResolver\\EntityValueResolver' => ['privates', '.debug.value_resolver.doctrine.orm.entity_value_resolver', 'get_Debug_ValueResolver_Doctrine_Orm_EntityValueResolverService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\BackedEnumValueResolver' => ['privates', '.debug.value_resolver.argument_resolver.backed_enum_resolver', 'get_Debug_ValueResolver_ArgumentResolver_BackedEnumResolverService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DateTimeValueResolver' => ['privates', '.debug.value_resolver.argument_resolver.datetime', 'get_Debug_ValueResolver_ArgumentResolver_DatetimeService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => ['privates', '.debug.value_resolver.argument_resolver.request_attribute', 'get_Debug_ValueResolver_ArgumentResolver_RequestAttributeService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => ['privates', '.debug.value_resolver.argument_resolver.request', 'get_Debug_ValueResolver_ArgumentResolver_RequestService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\SessionValueResolver' => ['privates', '.debug.value_resolver.argument_resolver.session', 'get_Debug_ValueResolver_ArgumentResolver_SessionService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\ServiceValueResolver' => ['privates', '.debug.value_resolver.argument_resolver.service', 'get_Debug_ValueResolver_ArgumentResolver_ServiceService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => ['privates', '.debug.value_resolver.argument_resolver.default', 'get_Debug_ValueResolver_ArgumentResolver_DefaultService', true], + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver' => ['privates', '.debug.value_resolver.argument_resolver.variadic', 'get_Debug_ValueResolver_ArgumentResolver_VariadicService', true], + 'argument_resolver.not_tagged_controller' => ['privates', '.debug.value_resolver.argument_resolver.not_tagged_controller', 'get_Debug_ValueResolver_ArgumentResolver_NotTaggedControllerService', true], + ], [ + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestPayloadValueResolver' => '?', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\QueryParameterValueResolver' => '?', + 'Symfony\\Bridge\\Doctrine\\ArgumentResolver\\EntityValueResolver' => '?', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\BackedEnumValueResolver' => '?', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DateTimeValueResolver' => '?', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => '?', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => '?', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\SessionValueResolver' => '?', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\ServiceValueResolver' => '?', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => '?', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver' => '?', + 'argument_resolver.not_tagged_controller' => '?', + ])), $b), true); + } + + /** + * Gets the public 'request_stack' shared service. + * + * @return \Symfony\Component\HttpFoundation\RequestStack + */ + protected static function getRequestStackService($container) + { + return $container->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack(); + } + + /** + * Gets the public 'router' shared service. + * + * @return \Symfony\Bundle\FrameworkBundle\Routing\Router + */ + protected static function getRouterService($container) + { + $container->services['router'] = $instance = new \Symfony\Bundle\FrameworkBundle\Routing\Router((new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'routing.loader' => ['services', 'routing.loader', 'getRouting_LoaderService', true], + ], [ + 'routing.loader' => 'Symfony\\Component\\Config\\Loader\\LoaderInterface', + ]))->withContext('router.default', $container), 'kernel::loadRoutes', ['cache_dir' => $container->targetDir.'', 'debug' => true, 'generator_class' => 'Symfony\\Component\\Routing\\Generator\\CompiledUrlGenerator', 'generator_dumper_class' => 'Symfony\\Component\\Routing\\Generator\\Dumper\\CompiledUrlGeneratorDumper', 'matcher_class' => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableCompiledUrlMatcher', 'matcher_dumper_class' => 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherDumper', 'strict_requirements' => true, 'resource_type' => 'service'], ($container->privates['router.request_context'] ?? self::getRouter_RequestContextService($container)), new \Symfony\Component\DependencyInjection\ParameterBag\ContainerBag($container), ($container->privates['logger'] ?? self::getLoggerService($container)), 'en'); + + $instance->setConfigCacheFactory(new \Symfony\Component\Config\ResourceCheckerConfigCacheFactory(new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['dependency_injection.config.container_parameters_resource_checker'] ??= new \Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker($container)); + yield 1 => ($container->privates['config.resource.self_checking_resource_checker'] ??= new \Symfony\Component\Config\Resource\SelfCheckingResourceChecker()); + }, 2))); + + return $instance; + } + + /** + * Gets the private 'argument_resolver.request_payload' shared service. + * + * @return \Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestPayloadValueResolver + */ + protected static function getArgumentResolver_RequestPayloadService($container, $lazyLoad = true) + { + if (true === $lazyLoad) { + return $container->privates['argument_resolver.request_payload'] = $container->createProxy('RequestPayloadValueResolverGhost01ca9cc', static fn () => \RequestPayloadValueResolverGhost01ca9cc::createLazyGhost(static fn ($proxy) => self::getArgumentResolver_RequestPayloadService($container, $proxy))); + } + + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ValueResolverInterface.php'; + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php'; + + return ($lazyLoad->__construct(($container->privates['serializer'] ?? self::getSerializerService($container)), ($container->privates['validator'] ?? self::getValidatorService($container)), NULL, 'validators') && false ?: $lazyLoad); + } + + /** + * Gets the private 'controller.is_signature_valid_attribute_listener' shared service. + * + * @return \Symfony\Component\HttpKernel\EventListener\IsSignatureValidAttributeListener + */ + protected static function getController_IsSignatureValidAttributeListenerService($container) + { + return $container->privates['controller.is_signature_valid_attribute_listener'] = new \Symfony\Component\HttpKernel\EventListener\IsSignatureValidAttributeListener(($container->privates['uri_signer'] ?? self::getUriSignerService($container))); + } + + /** + * Gets the private 'doctrine.dbal.default_connection.event_manager' shared service. + * + * @return \Symfony\Bridge\Doctrine\ContainerAwareEventManager + */ + protected static function getDoctrine_Dbal_DefaultConnection_EventManagerService($container) + { + return $container->privates['doctrine.dbal.default_connection.event_manager'] = new \Symfony\Bridge\Doctrine\ContainerAwareEventManager(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener' => ['privates', 'doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener', 'getDoctrine_Orm_Listeners_DoctrineDbalCacheAdapterSchemaListenerService', true], + 'doctrine.orm.listeners.doctrine_token_provider_schema_listener' => ['privates', 'doctrine.orm.listeners.doctrine_token_provider_schema_listener', 'getDoctrine_Orm_Listeners_DoctrineTokenProviderSchemaListenerService', true], + 'doctrine.orm.listeners.pdo_session_handler_schema_listener' => ['privates', 'doctrine.orm.listeners.pdo_session_handler_schema_listener', 'getDoctrine_Orm_Listeners_PdoSessionHandlerSchemaListenerService', true], + 'doctrine.orm.listeners.lock_store_schema_listener' => ['privates', 'doctrine.orm.listeners.lock_store_schema_listener', 'getDoctrine_Orm_Listeners_LockStoreSchemaListenerService', true], + 'doctrine.orm.default_listeners.attach_entity_listeners' => ['privates', 'doctrine.orm.default_listeners.attach_entity_listeners', 'getDoctrine_Orm_DefaultListeners_AttachEntityListenersService', true], + ], [ + 'doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener' => '?', + 'doctrine.orm.listeners.doctrine_token_provider_schema_listener' => '?', + 'doctrine.orm.listeners.pdo_session_handler_schema_listener' => '?', + 'doctrine.orm.listeners.lock_store_schema_listener' => '?', + 'doctrine.orm.default_listeners.attach_entity_listeners' => '?', + ]), [[['postGenerateSchema'], 'doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener'], [['postGenerateSchema'], 'doctrine.orm.listeners.doctrine_token_provider_schema_listener'], [['postGenerateSchema'], 'doctrine.orm.listeners.pdo_session_handler_schema_listener'], [['postGenerateSchema'], 'doctrine.orm.listeners.lock_store_schema_listener'], [['loadClassMetadata'], 'doctrine.orm.default_listeners.attach_entity_listeners']]); + } + + /** + * Gets the private 'doctrine.dbal.idle_connection_listener' shared service. + * + * @return \Symfony\Bridge\Doctrine\Middleware\IdleConnection\Listener + */ + protected static function getDoctrine_Dbal_IdleConnectionListenerService($container) + { + return $container->privates['doctrine.dbal.idle_connection_listener'] = new \Symfony\Bridge\Doctrine\Middleware\IdleConnection\Listener(($container->privates['doctrine.dbal.connection_expiries'] ??= new \ArrayObject()), $container); + } + + /** + * Gets the private 'doctrine.orm.default_configuration' shared service. + * + * @return \Doctrine\ORM\Configuration + */ + protected static function getDoctrine_Orm_DefaultConfigurationService($container) + { + $container->privates['doctrine.orm.default_configuration'] = $instance = new \Doctrine\ORM\Configuration(); + + $a = new \Doctrine\Persistence\Mapping\Driver\MappingDriverChain(); + $a->addDriver(new \Doctrine\ORM\Mapping\Driver\AttributeDriver([(\dirname(__DIR__, 4).'/src/Entity')], true), 'App\\Entity'); + + $instance->setEntityNamespaces(['App' => 'App\\Entity']); + $instance->setMetadataCache(new \Symfony\Component\Cache\Adapter\ArrayAdapter()); + $instance->setQueryCache(($container->privates['cache.doctrine.orm.default.query'] ??= new \Symfony\Component\Cache\Adapter\ArrayAdapter())); + $instance->setResultCache(($container->privates['cache.doctrine.orm.default.result'] ??= new \Symfony\Component\Cache\Adapter\ArrayAdapter())); + $instance->setMetadataDriverImpl(new \Doctrine\Bundle\DoctrineBundle\Mapping\MappingDriver($a, new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'doctrine.ulid_generator' => ['privates', 'doctrine.ulid_generator', 'getDoctrine_UlidGeneratorService', true], + 'doctrine.uuid_generator' => ['privates', 'doctrine.uuid_generator', 'getDoctrine_UuidGeneratorService', true], + ], [ + 'doctrine.ulid_generator' => '?', + 'doctrine.uuid_generator' => '?', + ]))); + $instance->setProxyDir(($container->targetDir.''.'/doctrine/orm/Proxies')); + $instance->setProxyNamespace('Proxies'); + $instance->setAutoGenerateProxyClasses(true); + $instance->setSchemaIgnoreClasses([]); + $instance->setClassMetadataFactoryName('Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ClassMetadataFactory'); + $instance->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository'); + $instance->setNamingStrategy(new \Doctrine\ORM\Mapping\UnderscoreNamingStrategy(0, true)); + $instance->setQuoteStrategy(new \Doctrine\ORM\Mapping\DefaultQuoteStrategy()); + $instance->setTypedFieldMapper(new \Doctrine\ORM\Mapping\DefaultTypedFieldMapper()); + $instance->setEntityListenerResolver(new \Doctrine\Bundle\DoctrineBundle\Mapping\ContainerEntityListenerResolver($container)); + $instance->setLazyGhostObjectEnabled(true); + $instance->setIdentityGenerationPreferences(['Doctrine\\DBAL\\Platforms\\PostgreSQLPlatform' => 4]); + $instance->setRepositoryFactory(new \Doctrine\Bundle\DoctrineBundle\Repository\ContainerRepositoryFactory(($container->privates['.service_locator.dpiLQ5O'] ??= new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [], [])))); + + return $instance; + } + + /** + * Gets the private 'exception_listener' shared service. + * + * @return \Symfony\Component\HttpKernel\EventListener\ErrorListener + */ + protected static function getExceptionListenerService($container) + { + return $container->privates['exception_listener'] = new \Symfony\Component\HttpKernel\EventListener\ErrorListener('error_controller', ($container->privates['logger'] ?? self::getLoggerService($container)), true, [], []); + } + + /** + * Gets the private 'locale_aware_listener' shared service. + * + * @return \Symfony\Component\HttpKernel\EventListener\LocaleAwareListener + */ + protected static function getLocaleAwareListenerService($container) + { + return $container->privates['locale_aware_listener'] = new \Symfony\Component\HttpKernel\EventListener\LocaleAwareListener(new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['slugger'] ??= new \Symfony\Component\String\Slugger\AsciiSlugger('en')); + }, 1), ($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack())); + } + + /** + * Gets the private 'locale_listener' shared service. + * + * @return \Symfony\Component\HttpKernel\EventListener\LocaleListener + */ + protected static function getLocaleListenerService($container) + { + return $container->privates['locale_listener'] = new \Symfony\Component\HttpKernel\EventListener\LocaleListener(($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), 'en', ($container->services['router'] ?? self::getRouterService($container)), false, []); + } + + /** + * Gets the private 'logger' shared service. + * + * @return \Symfony\Component\HttpKernel\Log\Logger + */ + protected static function getLoggerService($container) + { + return $container->privates['logger'] = new \Symfony\Component\HttpKernel\Log\Logger(NULL, NULL, NULL, ($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), $container->getEnv('bool:default::key:web:default:kernel.runtime_mode:')); + } + + /** + * Gets the private 'nelmio_cors.cors_listener' shared service. + * + * @return \Nelmio\CorsBundle\EventListener\CorsListener + */ + protected static function getNelmioCors_CorsListenerService($container) + { + return $container->privates['nelmio_cors.cors_listener'] = new \Nelmio\CorsBundle\EventListener\CorsListener(new \Nelmio\CorsBundle\Options\Resolver([new \Nelmio\CorsBundle\Options\ConfigProvider($container->parameters['nelmio_cors.map'], $container->getParameter('nelmio_cors.defaults'))])); + } + + /** + * Gets the private 'property_info' shared service. + * + * @return \Symfony\Component\PropertyInfo\PropertyInfoExtractor + */ + protected static function getPropertyInfoService($container) + { + return $container->privates['property_info'] = new \Symfony\Component\PropertyInfo\PropertyInfoExtractor(new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['property_info.serializer_extractor'] ?? $container->load('getPropertyInfo_SerializerExtractorService')); + yield 1 => ($container->privates['property_info.reflection_extractor'] ??= new \Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor()); + yield 2 => ($container->privates['doctrine.orm.default_entity_manager.property_info_extractor'] ?? $container->load('getDoctrine_Orm_DefaultEntityManager_PropertyInfoExtractorService')); + }, 3), new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['property_info.constructor_extractor'] ?? $container->load('getPropertyInfo_ConstructorExtractorService')); + yield 1 => ($container->privates['doctrine.orm.default_entity_manager.property_info_extractor'] ?? $container->load('getDoctrine_Orm_DefaultEntityManager_PropertyInfoExtractorService')); + yield 2 => ($container->privates['property_info.phpstan_extractor'] ??= new \Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor()); + yield 3 => ($container->privates['property_info.php_doc_extractor'] ??= new \Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor()); + yield 4 => ($container->privates['property_info.reflection_extractor'] ??= new \Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor()); + }, 5), new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['property_info.php_doc_extractor'] ??= new \Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor()); + }, 1), new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['doctrine.orm.default_entity_manager.property_info_extractor'] ?? $container->load('getDoctrine_Orm_DefaultEntityManager_PropertyInfoExtractorService')); + yield 1 => ($container->privates['property_info.reflection_extractor'] ??= new \Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor()); + }, 2), new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['property_info.reflection_extractor'] ??= new \Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor()); + }, 1)); + } + + /** + * Gets the private 'router.request_context' shared service. + * + * @return \Symfony\Component\Routing\RequestContext + */ + protected static function getRouter_RequestContextService($container) + { + $container->privates['router.request_context'] = $instance = \Symfony\Component\Routing\RequestContext::fromUri($container->getEnv('DEFAULT_URI'), 'localhost', 'http', 80, 443); + + $instance->setParameters(['_locale' => 'en']); + + return $instance; + } + + /** + * Gets the private 'router_listener' shared service. + * + * @return \Symfony\Component\HttpKernel\EventListener\RouterListener + */ + protected static function getRouterListenerService($container) + { + return $container->privates['router_listener'] = new \Symfony\Component\HttpKernel\EventListener\RouterListener(($container->services['router'] ?? self::getRouterService($container)), ($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), ($container->privates['router.request_context'] ?? self::getRouter_RequestContextService($container)), ($container->privates['logger'] ?? self::getLoggerService($container)), \dirname(__DIR__, 4), true); + } + + /** + * Gets the private 'serializer' shared service. + * + * @return \Symfony\Component\Serializer\Serializer + */ + protected static function getSerializerService($container) + { + $a = ($container->privates['property_info.reflection_extractor'] ??= new \Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor()); + + $b = new \Symfony\Component\PropertyAccess\PropertyAccessor(3, 2, new \Symfony\Component\Cache\Adapter\ArrayAdapter(0, false), $a, $a); + $c = ($container->privates['serializer.mapping.class_metadata_factory'] ?? self::getSerializer_Mapping_ClassMetadataFactoryService($container)); + + $d = new \Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter($c); + $e = ($container->privates['property_info'] ?? self::getPropertyInfoService($container)); + + return $container->privates['serializer'] = new \Symfony\Component\Serializer\Serializer([new \Symfony\Component\Serializer\Normalizer\UnwrappingDenormalizer($b), new \Symfony\Component\Serializer\Normalizer\ProblemNormalizer(true, [], NULL), new \Symfony\Component\Serializer\Normalizer\UidNormalizer([]), new \Symfony\Component\Serializer\Normalizer\DateTimeNormalizer([]), new \Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer([], $d), new \Symfony\Component\Serializer\Normalizer\DateTimeZoneNormalizer(), new \Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer([]), new \Symfony\Component\Serializer\Normalizer\FormErrorNormalizer(), new \Symfony\Component\Serializer\Normalizer\BackedEnumNormalizer(), new \Symfony\Component\Serializer\Normalizer\NumberNormalizer(), new \Symfony\Component\Serializer\Normalizer\DataUriNormalizer(NULL), new \Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer(NULL, NULL, []), new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new \Symfony\Component\Serializer\Normalizer\ObjectNormalizer($c, $d, $b, $e, new \Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata($c), NULL, [], $e)], [new \Symfony\Component\Serializer\Encoder\XmlEncoder([]), new \Symfony\Component\Serializer\Encoder\JsonEncoder(NULL, NULL, []), new \Symfony\Component\Serializer\Encoder\YamlEncoder(NULL, NULL, []), new \Symfony\Component\Serializer\Encoder\CsvEncoder([])], []); + } + + /** + * Gets the private 'serializer.mapping.class_metadata_factory' shared service. + * + * @return \Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory + */ + protected static function getSerializer_Mapping_ClassMetadataFactoryService($container) + { + return $container->privates['serializer.mapping.class_metadata_factory'] = new \Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory(new \Symfony\Component\Serializer\Mapping\Loader\LoaderChain([($container->privates['serializer.mapping.attribute_loader'] ??= new \Symfony\Component\Serializer\Mapping\Loader\AttributeLoader(true, []))])); + } + + /** + * Gets the private 'session_listener' shared service. + * + * @return \Symfony\Component\HttpKernel\EventListener\SessionListener + */ + protected static function getSessionListenerService($container) + { + $instance = new \Symfony\Component\HttpKernel\EventListener\SessionListener(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'session_factory' => ['privates', 'session.factory', 'getSession_FactoryService', true], + 'logger' => ['privates', 'logger', 'getLoggerService', false], + 'request_stack' => ['services', 'request_stack', 'getRequestStackService', false], + ], [ + 'session_factory' => '?', + 'logger' => '?', + 'request_stack' => '?', + ]), true, $container->parameters['session.storage.options']); + + if (isset($container->privates['session_listener'])) { + return $container->privates['session_listener']; + } + + return $container->privates['session_listener'] = $instance; + } + + /** + * Gets the private 'uri_signer' shared service. + * + * @return \Symfony\Component\HttpFoundation\UriSigner + */ + protected static function getUriSignerService($container, $lazyLoad = true) + { + if (true === $lazyLoad) { + return $container->privates['uri_signer'] = $container->createProxy('UriSignerGhostB68a0a1', static fn () => \UriSignerGhostB68a0a1::createLazyGhost(static fn ($proxy) => self::getUriSignerService($container, $proxy))); + } + + include_once \dirname(__DIR__, 4).'/vendor/symfony/http-foundation/UriSigner.php'; + + return ($lazyLoad->__construct($container->getParameter('kernel.secret'), '_hash', '_expiration', NULL) && false ?: $lazyLoad); + } + + /** + * Gets the private 'validator' shared service. + * + * @return \Symfony\Component\Validator\Validator\ValidatorInterface + */ + protected static function getValidatorService($container) + { + return $container->privates['validator'] = ($container->privates['validator.builder'] ?? self::getValidator_BuilderService($container))->getValidator(); + } + + /** + * Gets the private 'validator.builder' shared service. + * + * @return \Symfony\Component\Validator\ValidatorBuilder + */ + protected static function getValidator_BuilderService($container) + { + $container->privates['validator.builder'] = $instance = \Symfony\Component\Validator\Validation::createValidatorBuilder(); + + $a = ($container->privates['property_info'] ?? self::getPropertyInfoService($container)); + + $instance->setConstraintValidatorFactory(new \Symfony\Component\Validator\ContainerConstraintValidatorFactory(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'validator.expression' => ['privates', 'validator.expression', 'getValidator_ExpressionService', true], + 'Symfony\\Component\\Validator\\Constraints\\ExpressionValidator' => ['privates', 'validator.expression', 'getValidator_ExpressionService', true], + 'Symfony\\Component\\Validator\\Constraints\\EmailValidator' => ['privates', 'validator.email', 'getValidator_EmailService', true], + 'Symfony\\Component\\Validator\\Constraints\\NotCompromisedPasswordValidator' => ['privates', 'validator.not_compromised_password', 'getValidator_NotCompromisedPasswordService', true], + 'Symfony\\Component\\Validator\\Constraints\\WhenValidator' => ['privates', 'validator.when', 'getValidator_WhenService', true], + 'Symfony\\Component\\Validator\\Constraints\\NoSuspiciousCharactersValidator' => ['privates', 'validator.no_suspicious_characters', 'getValidator_NoSuspiciousCharactersService', true], + 'doctrine.orm.validator.unique' => ['privates', 'doctrine.orm.validator.unique', 'getDoctrine_Orm_Validator_UniqueService', true], + 'Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\UniqueEntityValidator' => ['privates', 'doctrine.orm.validator.unique', 'getDoctrine_Orm_Validator_UniqueService', true], + ], [ + 'validator.expression' => '?', + 'Symfony\\Component\\Validator\\Constraints\\ExpressionValidator' => '?', + 'Symfony\\Component\\Validator\\Constraints\\EmailValidator' => '?', + 'Symfony\\Component\\Validator\\Constraints\\NotCompromisedPasswordValidator' => '?', + 'Symfony\\Component\\Validator\\Constraints\\WhenValidator' => '?', + 'Symfony\\Component\\Validator\\Constraints\\NoSuspiciousCharactersValidator' => '?', + 'doctrine.orm.validator.unique' => '?', + 'Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\UniqueEntityValidator' => '?', + ]))); + $instance->setGroupProviderLocator(($container->privates['.service_locator.dpiLQ5O'] ??= new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [], []))); + $instance->setTranslationDomain('validators'); + $instance->enableAttributeMapping(); + $instance->addMethodMapping('loadValidatorMetadata'); + $instance->addObjectInitializers([new \Symfony\Bridge\Doctrine\Validator\DoctrineInitializer(($container->services['doctrine'] ?? self::getDoctrineService($container)))]); + $instance->addLoader(new \Symfony\Component\Validator\Mapping\Loader\PropertyInfoLoader($a, $a, $a, NULL)); + $instance->addLoader(new \Symfony\Bridge\Doctrine\Validator\DoctrineLoader(($container->services['doctrine.orm.default_entity_manager'] ?? self::getDoctrine_Orm_DefaultEntityManagerService($container)), NULL)); + + return $instance; + } + + public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null + { + if (\array_key_exists($name, $this->buildParameters)) { + return $this->buildParameters[$name]; + } + + if (isset($this->loadedDynamicParameters[$name])) { + $value = $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } elseif (\array_key_exists($name, $this->parameters) && '.' !== ($name[0] ?? '')) { + $value = $this->parameters[$name]; + } else { + throw new ParameterNotFoundException($name, extraMessage: self::NONEMPTY_PARAMETERS[$name] ?? null); + } + + if (isset(self::NONEMPTY_PARAMETERS[$name]) && (null === $value || '' === $value || [] === $value)) { + throw new \Symfony\Component\DependencyInjection\Exception\EmptyParameterValueException(self::NONEMPTY_PARAMETERS[$name]); + } + + return $value; + } + + public function hasParameter(string $name): bool + { + if (\array_key_exists($name, $this->buildParameters)) { + return true; + } + + return \array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]); + } + + public function setParameter(string $name, $value): void + { + throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); + } + + public function getParameterBag(): ParameterBagInterface + { + if (!isset($this->parameterBag)) { + $parameters = $this->parameters; + foreach ($this->loadedDynamicParameters as $name => $loaded) { + $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + foreach ($this->buildParameters as $name => $value) { + $parameters[$name] = $value; + } + $this->parameterBag = new FrozenParameterBag($parameters, [], self::NONEMPTY_PARAMETERS); + } + + return $this->parameterBag; + } + + private $loadedDynamicParameters = [ + 'kernel.runtime_environment' => false, + 'kernel.runtime_mode' => false, + 'kernel.runtime_mode.web' => false, + 'kernel.runtime_mode.cli' => false, + 'kernel.runtime_mode.worker' => false, + 'kernel.build_dir' => false, + 'kernel.cache_dir' => false, + 'kernel.secret' => false, + 'kernel.trust_x_sendfile_type_header' => false, + 'kernel.trusted_hosts' => false, + 'kernel.trusted_proxies' => false, + 'kernel.trusted_headers' => false, + 'debug.file_link_format' => false, + 'debug.container.dump' => false, + 'router.cache_dir' => false, + 'serializer.mapping.cache.file' => false, + 'validator.mapping.cache.file' => false, + 'nelmio_cors.defaults' => false, + 'doctrine.orm.proxy_dir' => false, + ]; + private $dynamicParameters = []; + + private function getDynamicParameter(string $name) + { + $container = $this; + $value = match ($name) { + 'kernel.runtime_environment' => $container->getEnv('default:kernel.environment:APP_RUNTIME_ENV'), + 'kernel.runtime_mode' => $container->getEnv('query_string:default:container.runtime_mode:APP_RUNTIME_MODE'), + 'kernel.runtime_mode.web' => $container->getEnv('bool:default::key:web:default:kernel.runtime_mode:'), + 'kernel.runtime_mode.cli' => $container->getEnv('not:default:kernel.runtime_mode.web:'), + 'kernel.runtime_mode.worker' => $container->getEnv('bool:default::key:worker:default:kernel.runtime_mode:'), + 'kernel.build_dir' => $container->targetDir.'', + 'kernel.cache_dir' => $container->targetDir.'', + 'kernel.secret' => $container->getEnv('APP_SECRET'), + 'kernel.trust_x_sendfile_type_header' => $container->getEnv('bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER'), + 'kernel.trusted_hosts' => $container->getEnv('default::SYMFONY_TRUSTED_HOSTS'), + 'kernel.trusted_proxies' => $container->getEnv('default::SYMFONY_TRUSTED_PROXIES'), + 'kernel.trusted_headers' => $container->getEnv('default::SYMFONY_TRUSTED_HEADERS'), + 'debug.file_link_format' => $container->getEnv('default::SYMFONY_IDE'), + 'debug.container.dump' => ($container->targetDir.''.'/App_KernelDevDebugContainer.xml'), + 'router.cache_dir' => $container->targetDir.'', + 'serializer.mapping.cache.file' => ($container->targetDir.''.'/serialization.php'), + 'validator.mapping.cache.file' => ($container->targetDir.''.'/validation.php'), + 'nelmio_cors.defaults' => [ + 'allow_origin' => [ + 0 => $container->getEnv('CORS_ALLOW_ORIGIN'), + ], + 'allow_credentials' => false, + 'allow_headers' => [ + 0 => 'content-type', + 1 => 'authorization', + ], + 'allow_private_network' => false, + 'expose_headers' => [ + 0 => 'Link', + ], + 'allow_methods' => [ + 0 => 'GET', + 1 => 'OPTIONS', + 2 => 'POST', + 3 => 'PUT', + 4 => 'PATCH', + 5 => 'DELETE', + ], + 'max_age' => 3600, + 'hosts' => [ + + ], + 'origin_regex' => true, + 'skip_same_as_origin' => true, + 'forced_allow_origin_value' => NULL, + ], + 'doctrine.orm.proxy_dir' => ($container->targetDir.''.'/doctrine/orm/Proxies'), + default => throw new ParameterNotFoundException($name), + }; + $this->loadedDynamicParameters[$name] = true; + + return $this->dynamicParameters[$name] = $value; + } + + protected function getDefaultParameters(): array + { + return [ + 'kernel.project_dir' => \dirname(__DIR__, 4), + 'kernel.environment' => 'dev', + 'kernel.debug' => true, + 'kernel.logs_dir' => (\dirname(__DIR__, 3).'/log'), + 'kernel.bundles' => [ + 'FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle', + 'NelmioCorsBundle' => 'Nelmio\\CorsBundle\\NelmioCorsBundle', + 'DoctrineBundle' => 'Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle', + 'DoctrineMigrationsBundle' => 'Doctrine\\Bundle\\MigrationsBundle\\DoctrineMigrationsBundle', + ], + 'kernel.bundles_metadata' => [ + 'FrameworkBundle' => [ + 'path' => (\dirname(__DIR__, 4).'/vendor/symfony/framework-bundle'), + 'namespace' => 'Symfony\\Bundle\\FrameworkBundle', + ], + 'NelmioCorsBundle' => [ + 'path' => (\dirname(__DIR__, 4).'/vendor/nelmio/cors-bundle'), + 'namespace' => 'Nelmio\\CorsBundle', + ], + 'DoctrineBundle' => [ + 'path' => (\dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle'), + 'namespace' => 'Doctrine\\Bundle\\DoctrineBundle', + ], + 'DoctrineMigrationsBundle' => [ + 'path' => (\dirname(__DIR__, 4).'/vendor/doctrine/doctrine-migrations-bundle'), + 'namespace' => 'Doctrine\\Bundle\\MigrationsBundle', + ], + ], + 'kernel.charset' => 'UTF-8', + 'kernel.container_class' => 'App_KernelDevDebugContainer', + 'kernel.share_dir' => (\dirname(__DIR__, 3).'/share/dev'), + '.container.known_envs' => [ + 0 => 'dev', + 1 => 'test', + 2 => 'prod', + ], + '.kernel.bundles_definition' => [ + 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle' => [ + 'all' => true, + ], + 'Nelmio\\CorsBundle\\NelmioCorsBundle' => [ + 'all' => true, + ], + 'Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle' => [ + 'all' => true, + ], + 'Doctrine\\Bundle\\MigrationsBundle\\DoctrineMigrationsBundle' => [ + 'all' => true, + ], + ], + 'event_dispatcher.event_aliases' => [ + 'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => 'console.command', + 'Symfony\\Component\\Console\\Event\\ConsoleErrorEvent' => 'console.error', + 'Symfony\\Component\\Console\\Event\\ConsoleSignalEvent' => 'console.signal', + 'Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => 'console.terminate', + 'Symfony\\Component\\HttpKernel\\Event\\ControllerArgumentsEvent' => 'kernel.controller_arguments', + 'Symfony\\Component\\HttpKernel\\Event\\ControllerEvent' => 'kernel.controller', + 'Symfony\\Component\\HttpKernel\\Event\\ResponseEvent' => 'kernel.response', + 'Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent' => 'kernel.finish_request', + 'Symfony\\Component\\HttpKernel\\Event\\RequestEvent' => 'kernel.request', + 'Symfony\\Component\\HttpKernel\\Event\\ViewEvent' => 'kernel.view', + 'Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent' => 'kernel.exception', + 'Symfony\\Component\\HttpKernel\\Event\\TerminateEvent' => 'kernel.terminate', + ], + 'fragment.renderer.hinclude.global_template' => NULL, + 'fragment.path' => '/_fragment', + 'kernel.http_method_override' => false, + 'kernel.allowed_http_method_override' => NULL, + 'kernel.default_locale' => 'en', + 'kernel.enabled_locales' => [ + + ], + 'kernel.error_controller' => 'error_controller', + 'debug.error_handler.throw_at' => -1, + 'router.request_context.host' => 'localhost', + 'router.request_context.scheme' => 'http', + 'router.request_context.base_url' => '', + 'router.resource' => 'kernel::loadRoutes', + 'request_listener.http_port' => 80, + 'request_listener.https_port' => 443, + '.serializer.named_serializers' => [ + + ], + 'session.metadata.storage_key' => '_sf2_meta', + 'session.storage.options' => [ + 'cache_limiter' => '0', + 'cookie_secure' => 'auto', + 'cookie_httponly' => true, + 'cookie_samesite' => 'lax', + ], + 'session.metadata.cookie_lifetime' => NULL, + 'session.save_path' => NULL, + 'session.metadata.update_threshold' => 0, + 'validator.translation_domain' => 'validators', + 'data_collector.templates' => [ + + ], + 'nelmio_cors.map' => [ + '^/' => [ + + ], + ], + 'nelmio_cors.cors_listener.class' => 'Nelmio\\CorsBundle\\EventListener\\CorsListener', + 'nelmio_cors.options_resolver.class' => 'Nelmio\\CorsBundle\\Options\\Resolver', + 'nelmio_cors.options_provider.config.class' => 'Nelmio\\CorsBundle\\Options\\ConfigProvider', + 'doctrine.dbal.configuration.class' => 'Doctrine\\DBAL\\Configuration', + 'doctrine.data_collector.class' => 'Doctrine\\Bundle\\DoctrineBundle\\DataCollector\\DoctrineDataCollector', + 'doctrine.dbal.connection.event_manager.class' => 'Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager', + 'doctrine.dbal.connection_factory.class' => 'Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory', + 'doctrine.dbal.events.mysql_session_init.class' => 'Doctrine\\DBAL\\Event\\Listeners\\MysqlSessionInit', + 'doctrine.dbal.events.oracle_session_init.class' => 'Doctrine\\DBAL\\Event\\Listeners\\OracleSessionInit', + 'doctrine.class' => 'Doctrine\\Bundle\\DoctrineBundle\\Registry', + 'doctrine.entity_managers' => [ + 'default' => 'doctrine.orm.default_entity_manager', + ], + 'doctrine.default_entity_manager' => 'default', + 'doctrine.dbal.connection_factory.types' => [ + + ], + 'doctrine.connections' => [ + 'default' => 'doctrine.dbal.default_connection', + ], + 'doctrine.default_connection' => 'default', + 'doctrine.orm.configuration.class' => 'Doctrine\\ORM\\Configuration', + 'doctrine.orm.entity_manager.class' => 'Doctrine\\ORM\\EntityManager', + 'doctrine.orm.manager_configurator.class' => 'Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator', + 'doctrine.orm.cache.array.class' => 'Doctrine\\Common\\Cache\\ArrayCache', + 'doctrine.orm.cache.apc.class' => 'Doctrine\\Common\\Cache\\ApcCache', + 'doctrine.orm.cache.memcache.class' => 'Doctrine\\Common\\Cache\\MemcacheCache', + 'doctrine.orm.cache.memcache_host' => 'localhost', + 'doctrine.orm.cache.memcache_port' => 11211, + 'doctrine.orm.cache.memcache_instance.class' => 'Memcache', + 'doctrine.orm.cache.memcached.class' => 'Doctrine\\Common\\Cache\\MemcachedCache', + 'doctrine.orm.cache.memcached_host' => 'localhost', + 'doctrine.orm.cache.memcached_port' => 11211, + 'doctrine.orm.cache.memcached_instance.class' => 'Memcached', + 'doctrine.orm.cache.redis.class' => 'Doctrine\\Common\\Cache\\RedisCache', + 'doctrine.orm.cache.redis_host' => 'localhost', + 'doctrine.orm.cache.redis_port' => 6379, + 'doctrine.orm.cache.redis_instance.class' => 'Redis', + 'doctrine.orm.cache.xcache.class' => 'Doctrine\\Common\\Cache\\XcacheCache', + 'doctrine.orm.cache.wincache.class' => 'Doctrine\\Common\\Cache\\WinCacheCache', + 'doctrine.orm.cache.zenddata.class' => 'Doctrine\\Common\\Cache\\ZendDataCache', + 'doctrine.orm.metadata.driver_chain.class' => 'Doctrine\\Persistence\\Mapping\\Driver\\MappingDriverChain', + 'doctrine.orm.metadata.annotation.class' => 'Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver', + 'doctrine.orm.metadata.xml.class' => 'Doctrine\\ORM\\Mapping\\Driver\\SimplifiedXmlDriver', + 'doctrine.orm.metadata.yml.class' => 'Doctrine\\ORM\\Mapping\\Driver\\SimplifiedYamlDriver', + 'doctrine.orm.metadata.php.class' => 'Doctrine\\Persistence\\Mapping\\Driver\\PHPDriver', + 'doctrine.orm.metadata.staticphp.class' => 'Doctrine\\Persistence\\Mapping\\Driver\\StaticPHPDriver', + 'doctrine.orm.metadata.attribute.class' => 'Doctrine\\ORM\\Mapping\\Driver\\AttributeDriver', + 'doctrine.orm.proxy_cache_warmer.class' => 'Symfony\\Bridge\\Doctrine\\CacheWarmer\\ProxyCacheWarmer', + 'form.type_guesser.doctrine.class' => 'Symfony\\Bridge\\Doctrine\\Form\\DoctrineOrmTypeGuesser', + 'doctrine.orm.validator.unique.class' => 'Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\UniqueEntityValidator', + 'doctrine.orm.validator_initializer.class' => 'Symfony\\Bridge\\Doctrine\\Validator\\DoctrineInitializer', + 'doctrine.orm.security.user.provider.class' => 'Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider', + 'doctrine.orm.listeners.resolve_target_entity.class' => 'Doctrine\\ORM\\Tools\\ResolveTargetEntityListener', + 'doctrine.orm.listeners.attach_entity_listeners.class' => 'Doctrine\\ORM\\Tools\\AttachEntityListenersListener', + 'doctrine.orm.naming_strategy.default.class' => 'Doctrine\\ORM\\Mapping\\DefaultNamingStrategy', + 'doctrine.orm.naming_strategy.underscore.class' => 'Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy', + 'doctrine.orm.quote_strategy.default.class' => 'Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy', + 'doctrine.orm.quote_strategy.ansi.class' => 'Doctrine\\ORM\\Mapping\\AnsiQuoteStrategy', + 'doctrine.orm.typed_field_mapper.default.class' => 'Doctrine\\ORM\\Mapping\\DefaultTypedFieldMapper', + 'doctrine.orm.entity_listener_resolver.class' => 'Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerEntityListenerResolver', + 'doctrine.orm.second_level_cache.default_cache_factory.class' => 'Doctrine\\ORM\\Cache\\DefaultCacheFactory', + 'doctrine.orm.second_level_cache.default_region.class' => 'Doctrine\\ORM\\Cache\\Region\\DefaultRegion', + 'doctrine.orm.second_level_cache.filelock_region.class' => 'Doctrine\\ORM\\Cache\\Region\\FileLockRegion', + 'doctrine.orm.second_level_cache.logger_chain.class' => 'Doctrine\\ORM\\Cache\\Logging\\CacheLoggerChain', + 'doctrine.orm.second_level_cache.logger_statistics.class' => 'Doctrine\\ORM\\Cache\\Logging\\StatisticsCacheLogger', + 'doctrine.orm.second_level_cache.cache_configuration.class' => 'Doctrine\\ORM\\Cache\\CacheConfiguration', + 'doctrine.orm.second_level_cache.regions_configuration.class' => 'Doctrine\\ORM\\Cache\\RegionsConfiguration', + 'doctrine.orm.auto_generate_proxy_classes' => true, + 'doctrine.orm.enable_lazy_ghost_objects' => true, + 'doctrine.orm.enable_native_lazy_objects' => false, + 'doctrine.orm.proxy_namespace' => 'Proxies', + 'doctrine.migrations.preferred_em' => NULL, + 'doctrine.migrations.preferred_connection' => NULL, + 'console.command.ids' => [ + + ], + ]; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/EntityManagerGhost614a58f.php b/backend/var/cache/dev/ContainerIP09wnc/EntityManagerGhost614a58f.php new file mode 100644 index 0000000..85a7d61 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/EntityManagerGhost614a58f.php @@ -0,0 +1,45 @@ + [parent::class, 'cache', null, 16], + "\0".parent::class."\0".'closed' => [parent::class, 'closed', null, 16], + "\0".parent::class."\0".'config' => [parent::class, 'config', null, 16], + "\0".parent::class."\0".'conn' => [parent::class, 'conn', null, 16], + "\0".parent::class."\0".'eventManager' => [parent::class, 'eventManager', null, 16], + "\0".parent::class."\0".'expressionBuilder' => [parent::class, 'expressionBuilder', null, 16], + "\0".parent::class."\0".'filterCollection' => [parent::class, 'filterCollection', null, 16], + "\0".parent::class."\0".'metadataFactory' => [parent::class, 'metadataFactory', null, 16], + "\0".parent::class."\0".'proxyFactory' => [parent::class, 'proxyFactory', null, 16], + "\0".parent::class."\0".'repositoryFactory' => [parent::class, 'repositoryFactory', null, 16], + "\0".parent::class."\0".'unitOfWork' => [parent::class, 'unitOfWork', null, 16], + 'cache' => [parent::class, 'cache', null, 16], + 'closed' => [parent::class, 'closed', null, 16], + 'config' => [parent::class, 'config', null, 16], + 'conn' => [parent::class, 'conn', null, 16], + 'eventManager' => [parent::class, 'eventManager', null, 16], + 'expressionBuilder' => [parent::class, 'expressionBuilder', null, 16], + 'filterCollection' => [parent::class, 'filterCollection', null, 16], + 'metadataFactory' => [parent::class, 'metadataFactory', null, 16], + 'proxyFactory' => [parent::class, 'proxyFactory', null, 16], + 'repositoryFactory' => [parent::class, 'repositoryFactory', null, 16], + 'unitOfWork' => [parent::class, 'unitOfWork', null, 16], + ]; +} + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + +if (!\class_exists('EntityManagerGhost614a58f', false)) { + \class_alias(__NAMESPACE__.'\\EntityManagerGhost614a58f', 'EntityManagerGhost614a58f', false); +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/RequestPayloadValueResolverGhost01ca9cc.php b/backend/var/cache/dev/ContainerIP09wnc/RequestPayloadValueResolverGhost01ca9cc.php new file mode 100644 index 0000000..358376b --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/RequestPayloadValueResolverGhost01ca9cc.php @@ -0,0 +1,30 @@ + [parent::class, 'serializer', null, 530], + "\0".parent::class."\0".'translationDomain' => [parent::class, 'translationDomain', null, 16], + "\0".parent::class."\0".'translator' => [parent::class, 'translator', null, 530], + "\0".parent::class."\0".'validator' => [parent::class, 'validator', null, 530], + 'serializer' => [parent::class, 'serializer', null, 530], + 'translationDomain' => [parent::class, 'translationDomain', null, 16], + 'translator' => [parent::class, 'translator', null, 530], + 'validator' => [parent::class, 'validator', null, 530], + ]; +} + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + +if (!\class_exists('RequestPayloadValueResolverGhost01ca9cc', false)) { + \class_alias(__NAMESPACE__.'\\RequestPayloadValueResolverGhost01ca9cc', 'RequestPayloadValueResolverGhost01ca9cc', false); +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/UriSignerGhostB68a0a1.php b/backend/var/cache/dev/ContainerIP09wnc/UriSignerGhostB68a0a1.php new file mode 100644 index 0000000..ff26f30 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/UriSignerGhostB68a0a1.php @@ -0,0 +1,29 @@ + [parent::class, 'clock', null, 16], + "\0".parent::class."\0".'expirationParameter' => [parent::class, 'expirationParameter', null, 16], + "\0".parent::class."\0".'hashParameter' => [parent::class, 'hashParameter', null, 16], + "\0".parent::class."\0".'secret' => [parent::class, 'secret', null, 16], + 'clock' => [parent::class, 'clock', null, 16], + 'expirationParameter' => [parent::class, 'expirationParameter', null, 16], + 'hashParameter' => [parent::class, 'hashParameter', null, 16], + 'secret' => [parent::class, 'secret', null, 16], + ]; +} + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + +if (!\class_exists('UriSignerGhostB68a0a1', false)) { + \class_alias(__NAMESPACE__.'\\UriSignerGhostB68a0a1', 'UriSignerGhostB68a0a1', false); +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getCacheWarmerService.php b/backend/var/cache/dev/ContainerIP09wnc/getCacheWarmerService.php new file mode 100644 index 0000000..b5a9b41 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getCacheWarmerService.php @@ -0,0 +1,32 @@ +services['cache_warmer'] = new \Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate(new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['config_builder.warmer'] ?? $container->load('getConfigBuilder_WarmerService')); + yield 1 => ($container->privates['router.cache_warmer'] ?? $container->load('getRouter_CacheWarmerService')); + yield 2 => ($container->privates['serializer.mapping.cache_warmer'] ?? $container->load('getSerializer_Mapping_CacheWarmerService')); + yield 3 => ($container->privates['validator.mapping.cache_warmer'] ?? $container->load('getValidator_Mapping_CacheWarmerService')); + yield 4 => ($container->privates['doctrine.orm.proxy_cache_warmer'] ?? $container->load('getDoctrine_Orm_ProxyCacheWarmerService')); + }, 5), true, ($container->targetDir.''.'/App_KernelDevDebugContainerDeprecations.log')); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getCache_AppClearerService.php b/backend/var/cache/dev/ContainerIP09wnc/getCache_AppClearerService.php new file mode 100644 index 0000000..cc8ebf3 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getCache_AppClearerService.php @@ -0,0 +1,26 @@ +services['cache.app_clearer'] = new \Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer(['cache.app' => ($container->services['cache.app'] ?? $container->load('getCache_AppService'))]); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getCache_AppService.php b/backend/var/cache/dev/ContainerIP09wnc/getCache_AppService.php new file mode 100644 index 0000000..6cffe23 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getCache_AppService.php @@ -0,0 +1,38 @@ +services['cache.app'] = $instance = new \Symfony\Component\Cache\Adapter\FilesystemAdapter('+c-w2mU0xY', 0, (\dirname(__DIR__, 3).'/share/dev/pools/app'), new \Symfony\Component\Cache\Marshaller\DefaultMarshaller(NULL, true)); + + $instance->setLogger(($container->privates['logger'] ?? self::getLoggerService($container))); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getCache_App_TaggableService.php b/backend/var/cache/dev/ContainerIP09wnc/getCache_App_TaggableService.php new file mode 100644 index 0000000..dc41a1e --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getCache_App_TaggableService.php @@ -0,0 +1,30 @@ +privates['cache.app.taggable'] = new \Symfony\Component\Cache\Adapter\TagAwareAdapter(($container->services['cache.app'] ?? $container->load('getCache_AppService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getCache_GlobalClearerService.php b/backend/var/cache/dev/ContainerIP09wnc/getCache_GlobalClearerService.php new file mode 100644 index 0000000..8c2b8d2 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getCache_GlobalClearerService.php @@ -0,0 +1,26 @@ +services['cache.global_clearer'] = new \Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer(['cache.app' => ($container->services['cache.app'] ?? $container->load('getCache_AppService')), 'cache.system' => ($container->services['cache.system'] ?? $container->load('getCache_SystemService')), 'cache.validator_expression_language' => ($container->services['cache.validator_expression_language'] ?? $container->load('getCache_ValidatorExpressionLanguageService')), 'cache.doctrine.orm.default.result' => ($container->privates['cache.doctrine.orm.default.result'] ??= new \Symfony\Component\Cache\Adapter\ArrayAdapter()), 'cache.doctrine.orm.default.query' => ($container->privates['cache.doctrine.orm.default.query'] ??= new \Symfony\Component\Cache\Adapter\ArrayAdapter())]); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getCache_SystemClearerService.php b/backend/var/cache/dev/ContainerIP09wnc/getCache_SystemClearerService.php new file mode 100644 index 0000000..8d3a3b9 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getCache_SystemClearerService.php @@ -0,0 +1,26 @@ +services['cache.system_clearer'] = new \Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer(['cache.system' => ($container->services['cache.system'] ?? $container->load('getCache_SystemService')), 'cache.validator_expression_language' => ($container->services['cache.validator_expression_language'] ?? $container->load('getCache_ValidatorExpressionLanguageService'))]); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getCache_SystemService.php b/backend/var/cache/dev/ContainerIP09wnc/getCache_SystemService.php new file mode 100644 index 0000000..ac706d5 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getCache_SystemService.php @@ -0,0 +1,28 @@ +services['cache.system'] = \Symfony\Component\Cache\Adapter\AbstractAdapter::createSystemCache('kyJjiJfYg6', 0, $container->getParameter('container.build_id'), ($container->targetDir.''.'/pools/system'), ($container->privates['logger'] ?? self::getLoggerService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getCache_ValidatorExpressionLanguageService.php b/backend/var/cache/dev/ContainerIP09wnc/getCache_ValidatorExpressionLanguageService.php new file mode 100644 index 0000000..80ef690 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getCache_ValidatorExpressionLanguageService.php @@ -0,0 +1,28 @@ +services['cache.validator_expression_language'] = \Symfony\Component\Cache\Adapter\AbstractAdapter::createSystemCache('cN6MtYyfJl', 0, $container->getParameter('container.build_id'), ($container->targetDir.''.'/pools/system'), ($container->privates['logger'] ?? self::getLoggerService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConfigBuilder_WarmerService.php b/backend/var/cache/dev/ContainerIP09wnc/getConfigBuilder_WarmerService.php new file mode 100644 index 0000000..f8946a6 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConfigBuilder_WarmerService.php @@ -0,0 +1,26 @@ +privates['config_builder.warmer'] = new \Symfony\Bundle\FrameworkBundle\CacheWarmer\ConfigBuilderCacheWarmer(($container->services['kernel'] ?? $container->get('kernel', 1)), ($container->privates['logger'] ?? self::getLoggerService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_CommandLoaderService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_CommandLoaderService.php new file mode 100644 index 0000000..f7872a2 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_CommandLoaderService.php @@ -0,0 +1,146 @@ +services['console.command_loader'] = new \Symfony\Component\Console\CommandLoader\ContainerCommandLoader(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'console.command.about' => ['privates', '.console.command.about.lazy', 'get_Console_Command_About_LazyService', true], + 'console.command.assets_install' => ['privates', '.console.command.assets_install.lazy', 'get_Console_Command_AssetsInstall_LazyService', true], + 'console.command.cache_clear' => ['privates', '.console.command.cache_clear.lazy', 'get_Console_Command_CacheClear_LazyService', true], + 'console.command.cache_pool_clear' => ['privates', '.console.command.cache_pool_clear.lazy', 'get_Console_Command_CachePoolClear_LazyService', true], + 'console.command.cache_pool_prune' => ['privates', '.console.command.cache_pool_prune.lazy', 'get_Console_Command_CachePoolPrune_LazyService', true], + 'console.command.cache_pool_invalidate_tags' => ['privates', '.console.command.cache_pool_invalidate_tags.lazy', 'get_Console_Command_CachePoolInvalidateTags_LazyService', true], + 'console.command.cache_pool_delete' => ['privates', '.console.command.cache_pool_delete.lazy', 'get_Console_Command_CachePoolDelete_LazyService', true], + 'console.command.cache_pool_list' => ['privates', '.console.command.cache_pool_list.lazy', 'get_Console_Command_CachePoolList_LazyService', true], + 'console.command.cache_warmup' => ['privates', '.console.command.cache_warmup.lazy', 'get_Console_Command_CacheWarmup_LazyService', true], + 'console.command.config_debug' => ['privates', '.console.command.config_debug.lazy', 'get_Console_Command_ConfigDebug_LazyService', true], + 'console.command.config_dump_reference' => ['privates', '.console.command.config_dump_reference.lazy', 'get_Console_Command_ConfigDumpReference_LazyService', true], + 'console.command.container_debug' => ['privates', '.console.command.container_debug.lazy', 'get_Console_Command_ContainerDebug_LazyService', true], + 'console.command.container_lint' => ['privates', '.console.command.container_lint.lazy', 'get_Console_Command_ContainerLint_LazyService', true], + 'console.command.debug_autowiring' => ['privates', '.console.command.debug_autowiring.lazy', 'get_Console_Command_DebugAutowiring_LazyService', true], + 'console.command.dotenv_debug' => ['privates', '.console.command.dotenv_debug.lazy', 'get_Console_Command_DotenvDebug_LazyService', true], + 'console.command.event_dispatcher_debug' => ['privates', '.console.command.event_dispatcher_debug.lazy', 'get_Console_Command_EventDispatcherDebug_LazyService', true], + 'console.command.router_debug' => ['privates', '.console.command.router_debug.lazy', 'get_Console_Command_RouterDebug_LazyService', true], + 'console.command.router_match' => ['privates', '.console.command.router_match.lazy', 'get_Console_Command_RouterMatch_LazyService', true], + 'console.command.serializer_debug' => ['privates', '.console.command.serializer_debug.lazy', 'get_Console_Command_SerializerDebug_LazyService', true], + 'console.command.validator_debug' => ['privates', '.console.command.validator_debug.lazy', 'get_Console_Command_ValidatorDebug_LazyService', true], + 'console.command.yaml_lint' => ['privates', '.console.command.yaml_lint.lazy', 'get_Console_Command_YamlLint_LazyService', true], + 'console.command.secrets_set' => ['privates', '.console.command.secrets_set.lazy', 'get_Console_Command_SecretsSet_LazyService', true], + 'console.command.secrets_remove' => ['privates', '.console.command.secrets_remove.lazy', 'get_Console_Command_SecretsRemove_LazyService', true], + 'console.command.secrets_generate_key' => ['privates', '.console.command.secrets_generate_key.lazy', 'get_Console_Command_SecretsGenerateKey_LazyService', true], + 'console.command.secrets_list' => ['privates', '.console.command.secrets_list.lazy', 'get_Console_Command_SecretsList_LazyService', true], + 'console.command.secrets_reveal' => ['privates', '.console.command.secrets_reveal.lazy', 'get_Console_Command_SecretsReveal_LazyService', true], + 'console.command.secrets_decrypt_to_local' => ['privates', '.console.command.secrets_decrypt_to_local.lazy', 'get_Console_Command_SecretsDecryptToLocal_LazyService', true], + 'console.command.secrets_encrypt_from_local' => ['privates', '.console.command.secrets_encrypt_from_local.lazy', 'get_Console_Command_SecretsEncryptFromLocal_LazyService', true], + 'console.command.error_dumper' => ['privates', '.console.command.error_dumper.lazy', 'get_Console_Command_ErrorDumper_LazyService', true], + 'doctrine.database_create_command' => ['privates', 'doctrine.database_create_command', 'getDoctrine_DatabaseCreateCommandService', true], + 'doctrine.database_drop_command' => ['privates', 'doctrine.database_drop_command', 'getDoctrine_DatabaseDropCommandService', true], + 'doctrine.query_sql_command' => ['privates', 'doctrine.query_sql_command', 'getDoctrine_QuerySqlCommandService', true], + 'Doctrine\\DBAL\\Tools\\Console\\Command\\RunSqlCommand' => ['privates', 'Doctrine\\DBAL\\Tools\\Console\\Command\\RunSqlCommand', 'getRunSqlCommandService', true], + 'doctrine.cache_clear_metadata_command' => ['privates', 'doctrine.cache_clear_metadata_command', 'getDoctrine_CacheClearMetadataCommandService', true], + 'doctrine.cache_clear_query_cache_command' => ['privates', 'doctrine.cache_clear_query_cache_command', 'getDoctrine_CacheClearQueryCacheCommandService', true], + 'doctrine.cache_clear_result_command' => ['privates', 'doctrine.cache_clear_result_command', 'getDoctrine_CacheClearResultCommandService', true], + 'doctrine.cache_collection_region_command' => ['privates', 'doctrine.cache_collection_region_command', 'getDoctrine_CacheCollectionRegionCommandService', true], + 'doctrine.schema_create_command' => ['privates', 'doctrine.schema_create_command', 'getDoctrine_SchemaCreateCommandService', true], + 'doctrine.schema_drop_command' => ['privates', 'doctrine.schema_drop_command', 'getDoctrine_SchemaDropCommandService', true], + 'doctrine.clear_entity_region_command' => ['privates', 'doctrine.clear_entity_region_command', 'getDoctrine_ClearEntityRegionCommandService', true], + 'doctrine.mapping_info_command' => ['privates', 'doctrine.mapping_info_command', 'getDoctrine_MappingInfoCommandService', true], + 'doctrine.mapping_describe_command' => ['privates', 'doctrine.mapping_describe_command', 'getDoctrine_MappingDescribeCommandService', true], + 'doctrine.clear_query_region_command' => ['privates', 'doctrine.clear_query_region_command', 'getDoctrine_ClearQueryRegionCommandService', true], + 'doctrine.query_dql_command' => ['privates', 'doctrine.query_dql_command', 'getDoctrine_QueryDqlCommandService', true], + 'doctrine.schema_update_command' => ['privates', 'doctrine.schema_update_command', 'getDoctrine_SchemaUpdateCommandService', true], + 'doctrine.schema_validate_command' => ['privates', 'doctrine.schema_validate_command', 'getDoctrine_SchemaValidateCommandService', true], + 'doctrine_migrations.diff_command' => ['privates', '.doctrine_migrations.diff_command.lazy', 'get_DoctrineMigrations_DiffCommand_LazyService', true], + 'doctrine_migrations.sync_metadata_command' => ['privates', '.doctrine_migrations.sync_metadata_command.lazy', 'get_DoctrineMigrations_SyncMetadataCommand_LazyService', true], + 'doctrine_migrations.versions_command' => ['privates', '.doctrine_migrations.versions_command.lazy', 'get_DoctrineMigrations_VersionsCommand_LazyService', true], + 'doctrine_migrations.current_command' => ['privates', '.doctrine_migrations.current_command.lazy', 'get_DoctrineMigrations_CurrentCommand_LazyService', true], + 'doctrine_migrations.dump_schema_command' => ['privates', '.doctrine_migrations.dump_schema_command.lazy', 'get_DoctrineMigrations_DumpSchemaCommand_LazyService', true], + 'doctrine_migrations.execute_command' => ['privates', '.doctrine_migrations.execute_command.lazy', 'get_DoctrineMigrations_ExecuteCommand_LazyService', true], + 'doctrine_migrations.generate_command' => ['privates', '.doctrine_migrations.generate_command.lazy', 'get_DoctrineMigrations_GenerateCommand_LazyService', true], + 'doctrine_migrations.latest_command' => ['privates', '.doctrine_migrations.latest_command.lazy', 'get_DoctrineMigrations_LatestCommand_LazyService', true], + 'doctrine_migrations.migrate_command' => ['privates', '.doctrine_migrations.migrate_command.lazy', 'get_DoctrineMigrations_MigrateCommand_LazyService', true], + 'doctrine_migrations.rollup_command' => ['privates', '.doctrine_migrations.rollup_command.lazy', 'get_DoctrineMigrations_RollupCommand_LazyService', true], + 'doctrine_migrations.status_command' => ['privates', '.doctrine_migrations.status_command.lazy', 'get_DoctrineMigrations_StatusCommand_LazyService', true], + 'doctrine_migrations.up_to_date_command' => ['privates', '.doctrine_migrations.up_to_date_command.lazy', 'get_DoctrineMigrations_UpToDateCommand_LazyService', true], + 'doctrine_migrations.version_command' => ['privates', '.doctrine_migrations.version_command.lazy', 'get_DoctrineMigrations_VersionCommand_LazyService', true], + ], [ + 'console.command.about' => '?', + 'console.command.assets_install' => '?', + 'console.command.cache_clear' => '?', + 'console.command.cache_pool_clear' => '?', + 'console.command.cache_pool_prune' => '?', + 'console.command.cache_pool_invalidate_tags' => '?', + 'console.command.cache_pool_delete' => '?', + 'console.command.cache_pool_list' => '?', + 'console.command.cache_warmup' => '?', + 'console.command.config_debug' => '?', + 'console.command.config_dump_reference' => '?', + 'console.command.container_debug' => '?', + 'console.command.container_lint' => '?', + 'console.command.debug_autowiring' => '?', + 'console.command.dotenv_debug' => '?', + 'console.command.event_dispatcher_debug' => '?', + 'console.command.router_debug' => '?', + 'console.command.router_match' => '?', + 'console.command.serializer_debug' => '?', + 'console.command.validator_debug' => '?', + 'console.command.yaml_lint' => '?', + 'console.command.secrets_set' => '?', + 'console.command.secrets_remove' => '?', + 'console.command.secrets_generate_key' => '?', + 'console.command.secrets_list' => '?', + 'console.command.secrets_reveal' => '?', + 'console.command.secrets_decrypt_to_local' => '?', + 'console.command.secrets_encrypt_from_local' => '?', + 'console.command.error_dumper' => '?', + 'doctrine.database_create_command' => 'Doctrine\\Bundle\\DoctrineBundle\\Command\\CreateDatabaseDoctrineCommand', + 'doctrine.database_drop_command' => 'Doctrine\\Bundle\\DoctrineBundle\\Command\\DropDatabaseDoctrineCommand', + 'doctrine.query_sql_command' => 'Doctrine\\Bundle\\DoctrineBundle\\Command\\Proxy\\RunSqlDoctrineCommand', + 'Doctrine\\DBAL\\Tools\\Console\\Command\\RunSqlCommand' => 'Doctrine\\DBAL\\Tools\\Console\\Command\\RunSqlCommand', + 'doctrine.cache_clear_metadata_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\ClearCache\\MetadataCommand', + 'doctrine.cache_clear_query_cache_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\ClearCache\\QueryCommand', + 'doctrine.cache_clear_result_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\ClearCache\\ResultCommand', + 'doctrine.cache_collection_region_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\ClearCache\\CollectionRegionCommand', + 'doctrine.schema_create_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\SchemaTool\\CreateCommand', + 'doctrine.schema_drop_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\SchemaTool\\DropCommand', + 'doctrine.clear_entity_region_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\ClearCache\\EntityRegionCommand', + 'doctrine.mapping_info_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\InfoCommand', + 'doctrine.mapping_describe_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\MappingDescribeCommand', + 'doctrine.clear_query_region_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\ClearCache\\QueryRegionCommand', + 'doctrine.query_dql_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\RunDqlCommand', + 'doctrine.schema_update_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\SchemaTool\\UpdateCommand', + 'doctrine.schema_validate_command' => 'Doctrine\\ORM\\Tools\\Console\\Command\\ValidateSchemaCommand', + 'doctrine_migrations.diff_command' => '?', + 'doctrine_migrations.sync_metadata_command' => '?', + 'doctrine_migrations.versions_command' => '?', + 'doctrine_migrations.current_command' => '?', + 'doctrine_migrations.dump_schema_command' => '?', + 'doctrine_migrations.execute_command' => '?', + 'doctrine_migrations.generate_command' => '?', + 'doctrine_migrations.latest_command' => '?', + 'doctrine_migrations.migrate_command' => '?', + 'doctrine_migrations.rollup_command' => '?', + 'doctrine_migrations.status_command' => '?', + 'doctrine_migrations.up_to_date_command' => '?', + 'doctrine_migrations.version_command' => '?', + ]), ['about' => 'console.command.about', 'assets:install' => 'console.command.assets_install', 'cache:clear' => 'console.command.cache_clear', 'cache:pool:clear' => 'console.command.cache_pool_clear', 'cache:pool:prune' => 'console.command.cache_pool_prune', 'cache:pool:invalidate-tags' => 'console.command.cache_pool_invalidate_tags', 'cache:pool:delete' => 'console.command.cache_pool_delete', 'cache:pool:list' => 'console.command.cache_pool_list', 'cache:warmup' => 'console.command.cache_warmup', 'debug:config' => 'console.command.config_debug', 'config:dump-reference' => 'console.command.config_dump_reference', 'debug:container' => 'console.command.container_debug', 'lint:container' => 'console.command.container_lint', 'debug:autowiring' => 'console.command.debug_autowiring', 'debug:dotenv' => 'console.command.dotenv_debug', 'debug:event-dispatcher' => 'console.command.event_dispatcher_debug', 'debug:router' => 'console.command.router_debug', 'router:match' => 'console.command.router_match', 'debug:serializer' => 'console.command.serializer_debug', 'debug:validator' => 'console.command.validator_debug', 'lint:yaml' => 'console.command.yaml_lint', 'secrets:set' => 'console.command.secrets_set', 'secrets:remove' => 'console.command.secrets_remove', 'secrets:generate-keys' => 'console.command.secrets_generate_key', 'secrets:list' => 'console.command.secrets_list', 'secrets:reveal' => 'console.command.secrets_reveal', 'secrets:decrypt-to-local' => 'console.command.secrets_decrypt_to_local', 'secrets:encrypt-from-local' => 'console.command.secrets_encrypt_from_local', 'error:dump' => 'console.command.error_dumper', 'doctrine:database:create' => 'doctrine.database_create_command', 'doctrine:database:drop' => 'doctrine.database_drop_command', 'doctrine:query:sql' => 'doctrine.query_sql_command', 'dbal:run-sql' => 'Doctrine\\DBAL\\Tools\\Console\\Command\\RunSqlCommand', 'doctrine:cache:clear-metadata' => 'doctrine.cache_clear_metadata_command', 'doctrine:cache:clear-query' => 'doctrine.cache_clear_query_cache_command', 'doctrine:cache:clear-result' => 'doctrine.cache_clear_result_command', 'doctrine:cache:clear-collection-region' => 'doctrine.cache_collection_region_command', 'doctrine:schema:create' => 'doctrine.schema_create_command', 'doctrine:schema:drop' => 'doctrine.schema_drop_command', 'doctrine:cache:clear-entity-region' => 'doctrine.clear_entity_region_command', 'doctrine:mapping:info' => 'doctrine.mapping_info_command', 'doctrine:mapping:describe' => 'doctrine.mapping_describe_command', 'doctrine:cache:clear-query-region' => 'doctrine.clear_query_region_command', 'doctrine:query:dql' => 'doctrine.query_dql_command', 'doctrine:schema:update' => 'doctrine.schema_update_command', 'doctrine:schema:validate' => 'doctrine.schema_validate_command', 'doctrine:migrations:diff' => 'doctrine_migrations.diff_command', 'doctrine:migrations:sync-metadata-storage' => 'doctrine_migrations.sync_metadata_command', 'doctrine:migrations:list' => 'doctrine_migrations.versions_command', 'doctrine:migrations:current' => 'doctrine_migrations.current_command', 'doctrine:migrations:dump-schema' => 'doctrine_migrations.dump_schema_command', 'doctrine:migrations:execute' => 'doctrine_migrations.execute_command', 'doctrine:migrations:generate' => 'doctrine_migrations.generate_command', 'doctrine:migrations:latest' => 'doctrine_migrations.latest_command', 'doctrine:migrations:migrate' => 'doctrine_migrations.migrate_command', 'doctrine:migrations:rollup' => 'doctrine_migrations.rollup_command', 'doctrine:migrations:status' => 'doctrine_migrations.status_command', 'doctrine:migrations:up-to-date' => 'doctrine_migrations.up_to_date_command', 'doctrine:migrations:version' => 'doctrine_migrations.version_command']); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_AboutService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_AboutService.php new file mode 100644 index 0000000..e8dab2f --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_AboutService.php @@ -0,0 +1,32 @@ +privates['console.command.about'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\AboutCommand(); + + $instance->setName('about'); + $instance->setDescription('Display information about the current project'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_AssetsInstallService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_AssetsInstallService.php new file mode 100644 index 0000000..069ac09 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_AssetsInstallService.php @@ -0,0 +1,33 @@ +privates['console.command.assets_install'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand(($container->privates['filesystem'] ??= new \Symfony\Component\Filesystem\Filesystem()), \dirname(__DIR__, 4)); + + $instance->setName('assets:install'); + $instance->setDescription('Install bundle\'s web assets under a public directory'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CacheClearService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CacheClearService.php new file mode 100644 index 0000000..537299e --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CacheClearService.php @@ -0,0 +1,35 @@ +privates['console.command.cache_clear'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand(new \Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer(new RewindableGenerator(fn () => new \EmptyIterator(), 0)), ($container->privates['filesystem'] ??= new \Symfony\Component\Filesystem\Filesystem())); + + $instance->setName('cache:clear'); + $instance->setDescription('Clear the cache'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolClearService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolClearService.php new file mode 100644 index 0000000..8befd48 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolClearService.php @@ -0,0 +1,32 @@ +privates['console.command.cache_pool_clear'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand(($container->services['cache.global_clearer'] ?? $container->load('getCache_GlobalClearerService')), ['cache.app', 'cache.system', 'cache.validator', 'cache.serializer', 'cache.property_info', 'cache.validator_expression_language', 'cache.doctrine.orm.default.result', 'cache.doctrine.orm.default.query']); + + $instance->setName('cache:pool:clear'); + $instance->setDescription('Clear cache pools'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolDeleteService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolDeleteService.php new file mode 100644 index 0000000..c616086 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolDeleteService.php @@ -0,0 +1,32 @@ +privates['console.command.cache_pool_delete'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CachePoolDeleteCommand(($container->services['cache.global_clearer'] ?? $container->load('getCache_GlobalClearerService')), ['cache.app', 'cache.system', 'cache.validator', 'cache.serializer', 'cache.property_info', 'cache.validator_expression_language', 'cache.doctrine.orm.default.result', 'cache.doctrine.orm.default.query']); + + $instance->setName('cache:pool:delete'); + $instance->setDescription('Delete an item from a cache pool'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolInvalidateTagsService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolInvalidateTagsService.php new file mode 100644 index 0000000..341a102 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolInvalidateTagsService.php @@ -0,0 +1,36 @@ +privates['console.command.cache_pool_invalidate_tags'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CachePoolInvalidateTagsCommand(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'cache.app' => ['privates', 'cache.app.taggable', 'getCache_App_TaggableService', true], + ], [ + 'cache.app' => 'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapter', + ])); + + $instance->setName('cache:pool:invalidate-tags'); + $instance->setDescription('Invalidate cache tags for all or a specific pool'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolListService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolListService.php new file mode 100644 index 0000000..be01e12 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolListService.php @@ -0,0 +1,32 @@ +privates['console.command.cache_pool_list'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CachePoolListCommand(['cache.app', 'cache.system', 'cache.validator', 'cache.serializer', 'cache.property_info', 'cache.validator_expression_language', 'cache.doctrine.orm.default.result', 'cache.doctrine.orm.default.query']); + + $instance->setName('cache:pool:list'); + $instance->setDescription('List available cache pools'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolPruneService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolPruneService.php new file mode 100644 index 0000000..0b79b5c --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CachePoolPruneService.php @@ -0,0 +1,34 @@ +privates['console.command.cache_pool_prune'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand(new RewindableGenerator(function () use ($container) { + yield 'cache.app' => ($container->services['cache.app'] ?? $container->load('getCache_AppService')); + }, 1)); + + $instance->setName('cache:pool:prune'); + $instance->setDescription('Prune cache pools'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CacheWarmupService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CacheWarmupService.php new file mode 100644 index 0000000..e861214 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_CacheWarmupService.php @@ -0,0 +1,32 @@ +privates['console.command.cache_warmup'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand(($container->services['cache_warmer'] ?? $container->load('getCacheWarmerService'))); + + $instance->setName('cache:warmup'); + $instance->setDescription('Warm up an empty cache'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ConfigDebugService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ConfigDebugService.php new file mode 100644 index 0000000..80f6ebb --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ConfigDebugService.php @@ -0,0 +1,35 @@ +privates['console.command.config_debug'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\ConfigDebugCommand(($container->services['container.env_var_processors_locator'] ?? $container->load('getContainer_EnvVarProcessorsLocatorService'))); + + $instance->setName('debug:config'); + $instance->setDescription('Dump the current configuration for an extension'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ConfigDumpReferenceService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ConfigDumpReferenceService.php new file mode 100644 index 0000000..b29d3a4 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ConfigDumpReferenceService.php @@ -0,0 +1,35 @@ +privates['console.command.config_dump_reference'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\ConfigDumpReferenceCommand(); + + $instance->setName('config:dump-reference'); + $instance->setDescription('Dump the default configuration for an extension'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ContainerDebugService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ContainerDebugService.php new file mode 100644 index 0000000..d5a7d43 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ContainerDebugService.php @@ -0,0 +1,33 @@ +privates['console.command.container_debug'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\ContainerDebugCommand(); + + $instance->setName('debug:container'); + $instance->setDescription('Display current services for an application'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ContainerLintService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ContainerLintService.php new file mode 100644 index 0000000..f2233b3 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ContainerLintService.php @@ -0,0 +1,32 @@ +privates['console.command.container_lint'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\ContainerLintCommand(); + + $instance->setName('lint:container'); + $instance->setDescription('Ensure that arguments injected into services match type declarations'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_DebugAutowiringService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_DebugAutowiringService.php new file mode 100644 index 0000000..b7d1e3f --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_DebugAutowiringService.php @@ -0,0 +1,35 @@ +privates['console.command.debug_autowiring'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\DebugAutowiringCommand(NULL, ($container->privates['debug.file_link_formatter'] ??= new \Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter($container->getEnv('default::SYMFONY_IDE')))); + + $instance->setName('debug:autowiring'); + $instance->setDescription('List classes/interfaces you can use for autowiring'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_DotenvDebugService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_DotenvDebugService.php new file mode 100644 index 0000000..8261f9b --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_DotenvDebugService.php @@ -0,0 +1,32 @@ +privates['console.command.dotenv_debug'] = $instance = new \Symfony\Component\Dotenv\Command\DebugCommand('dev', \dirname(__DIR__, 4)); + + $instance->setName('debug:dotenv'); + $instance->setDescription('List all dotenv files with variables and values'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ErrorDumperService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ErrorDumperService.php new file mode 100644 index 0000000..1f7e962 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ErrorDumperService.php @@ -0,0 +1,33 @@ +privates['console.command.error_dumper'] = $instance = new \Symfony\Component\ErrorHandler\Command\ErrorDumpCommand(($container->privates['filesystem'] ??= new \Symfony\Component\Filesystem\Filesystem()), ($container->privates['error_handler.error_renderer.html'] ?? $container->load('getErrorHandler_ErrorRenderer_HtmlService')), NULL); + + $instance->setName('error:dump'); + $instance->setDescription('Dump error pages to plain HTML files that can be directly served by a web server'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_EventDispatcherDebugService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_EventDispatcherDebugService.php new file mode 100644 index 0000000..4a9b605 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_EventDispatcherDebugService.php @@ -0,0 +1,36 @@ +privates['console.command.event_dispatcher_debug'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'event_dispatcher' => ['services', 'event_dispatcher', 'getEventDispatcherService', false], + ], [ + 'event_dispatcher' => '?', + ])); + + $instance->setName('debug:event-dispatcher'); + $instance->setDescription('Display configured listeners for an application'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_RouterDebugService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_RouterDebugService.php new file mode 100644 index 0000000..d1f2738 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_RouterDebugService.php @@ -0,0 +1,34 @@ +privates['console.command.router_debug'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand(($container->services['router'] ?? self::getRouterService($container)), ($container->privates['debug.file_link_formatter'] ??= new \Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter($container->getEnv('default::SYMFONY_IDE')))); + + $instance->setName('debug:router'); + $instance->setDescription('Display current routes for an application'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_RouterMatchService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_RouterMatchService.php new file mode 100644 index 0000000..b95d187 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_RouterMatchService.php @@ -0,0 +1,32 @@ +privates['console.command.router_match'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand(($container->services['router'] ?? self::getRouterService($container)), new RewindableGenerator(fn () => new \EmptyIterator(), 0)); + + $instance->setName('router:match'); + $instance->setDescription('Help debug routes by simulating a path info match'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsDecryptToLocalService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsDecryptToLocalService.php new file mode 100644 index 0000000..7915b6d --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsDecryptToLocalService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_decrypt_to_local'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsDecryptToLocalCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:decrypt-to-local'); + $instance->setDescription('Decrypt all secrets and stores them in the local vault'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsEncryptFromLocalService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsEncryptFromLocalService.php new file mode 100644 index 0000000..f484f37 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsEncryptFromLocalService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_encrypt_from_local'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsEncryptFromLocalCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:encrypt-from-local'); + $instance->setDescription('Encrypt all local secrets to the vault'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsGenerateKeyService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsGenerateKeyService.php new file mode 100644 index 0000000..f176f62 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsGenerateKeyService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_generate_key'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsGenerateKeysCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:generate-keys'); + $instance->setDescription('Generate new encryption keys'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsListService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsListService.php new file mode 100644 index 0000000..1029276 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsListService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_list'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsListCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:list'); + $instance->setDescription('List all secrets'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsRemoveService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsRemoveService.php new file mode 100644 index 0000000..f5de3af --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsRemoveService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_remove'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsRemoveCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:remove'); + $instance->setDescription('Remove a secret from the vault'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsRevealService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsRevealService.php new file mode 100644 index 0000000..d2edaf3 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsRevealService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_reveal'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsRevealCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:reveal'); + $instance->setDescription('Reveal the value of a secret'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsSetService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsSetService.php new file mode 100644 index 0000000..d5a81b4 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SecretsSetService.php @@ -0,0 +1,34 @@ +privates['console.command.secrets_set'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\SecretsSetCommand(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService')), ($container->privates['secrets.local_vault'] ??= new \Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault((\dirname(__DIR__, 4).'/.env.dev.local')))); + + $instance->setName('secrets:set'); + $instance->setDescription('Set a secret in the vault'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SerializerDebugService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SerializerDebugService.php new file mode 100644 index 0000000..677db13 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_SerializerDebugService.php @@ -0,0 +1,32 @@ +privates['console.command.serializer_debug'] = $instance = new \Symfony\Component\Serializer\Command\DebugCommand(($container->privates['serializer.mapping.class_metadata_factory'] ?? self::getSerializer_Mapping_ClassMetadataFactoryService($container))); + + $instance->setName('debug:serializer'); + $instance->setDescription('Display serialization information for classes'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ValidatorDebugService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ValidatorDebugService.php new file mode 100644 index 0000000..2eb68a0 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_ValidatorDebugService.php @@ -0,0 +1,32 @@ +privates['console.command.validator_debug'] = $instance = new \Symfony\Component\Validator\Command\DebugCommand(($container->privates['validator'] ?? self::getValidatorService($container))); + + $instance->setName('debug:validator'); + $instance->setDescription('Display validation constraints for classes'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_YamlLintService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_YamlLintService.php new file mode 100644 index 0000000..1c97040 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_Command_YamlLintService.php @@ -0,0 +1,33 @@ +privates['console.command.yaml_lint'] = $instance = new \Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand(); + + $instance->setName('lint:yaml'); + $instance->setDescription('Lint a YAML file and outputs encountered errors'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getConsole_ErrorListenerService.php b/backend/var/cache/dev/ContainerIP09wnc/getConsole_ErrorListenerService.php new file mode 100644 index 0000000..495b363 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getConsole_ErrorListenerService.php @@ -0,0 +1,25 @@ +privates['console.error_listener'] = new \Symfony\Component\Console\EventListener\ErrorListener(($container->privates['logger'] ?? self::getLoggerService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getContainer_EnvVarProcessorService.php b/backend/var/cache/dev/ContainerIP09wnc/getContainer_EnvVarProcessorService.php new file mode 100644 index 0000000..136ecb2 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getContainer_EnvVarProcessorService.php @@ -0,0 +1,28 @@ +privates['container.env_var_processor'] = new \Symfony\Component\DependencyInjection\EnvVarProcessor($container, new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['secrets.env_var_loader'] ?? $container->load('getSecrets_EnvVarLoaderService')); + }, 1)); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getContainer_EnvVarProcessorsLocatorService.php b/backend/var/cache/dev/ContainerIP09wnc/getContainer_EnvVarProcessorsLocatorService.php new file mode 100644 index 0000000..4915dac --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getContainer_EnvVarProcessorsLocatorService.php @@ -0,0 +1,67 @@ +services['container.env_var_processors_locator'] = new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'base64' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'bool' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'not' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'const' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'csv' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'file' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'float' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'int' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'json' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'key' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'url' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'query_string' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'resolve' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'default' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'string' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'trim' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'require' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'enum' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'shuffle' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'defined' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + 'urlencode' => ['privates', 'container.env_var_processor', 'getContainer_EnvVarProcessorService', true], + ], [ + 'base64' => '?', + 'bool' => '?', + 'not' => '?', + 'const' => '?', + 'csv' => '?', + 'file' => '?', + 'float' => '?', + 'int' => '?', + 'json' => '?', + 'key' => '?', + 'url' => '?', + 'query_string' => '?', + 'resolve' => '?', + 'default' => '?', + 'string' => '?', + 'trim' => '?', + 'require' => '?', + 'enum' => '?', + 'shuffle' => '?', + 'defined' => '?', + 'urlencode' => '?', + ]); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getContainer_GetRoutingConditionServiceService.php b/backend/var/cache/dev/ContainerIP09wnc/getContainer_GetRoutingConditionServiceService.php new file mode 100644 index 0000000..aa2f1ce --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getContainer_GetRoutingConditionServiceService.php @@ -0,0 +1,23 @@ +services['container.get_routing_condition_service'] = ($container->privates['.service_locator.dpiLQ5O'] ??= new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [], []))->get(...); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDebug_ErrorHandlerConfiguratorService.php b/backend/var/cache/dev/ContainerIP09wnc/getDebug_ErrorHandlerConfiguratorService.php new file mode 100644 index 0000000..3069480 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDebug_ErrorHandlerConfiguratorService.php @@ -0,0 +1,25 @@ +services['debug.error_handler_configurator'] = new \Symfony\Component\HttpKernel\Debug\ErrorHandlerConfigurator(($container->privates['logger'] ?? self::getLoggerService($container)), NULL, -1, true, true, NULL); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_CurrentCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_CurrentCommandService.php new file mode 100644 index 0000000..e695fec --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_CurrentCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.current_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\CurrentCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:current'); + + $instance->setName('doctrine:migrations:current'); + $instance->setDescription('Outputs the current version'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_DiffCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_DiffCommandService.php new file mode 100644 index 0000000..e7b7538 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_DiffCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.diff_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\DiffCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:diff'); + + $instance->setName('doctrine:migrations:diff'); + $instance->setDescription('Generate a migration by comparing your current database to your mapping information.'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_DumpSchemaCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_DumpSchemaCommandService.php new file mode 100644 index 0000000..3dbe599 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_DumpSchemaCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.dump_schema_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\DumpSchemaCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:dump-schema'); + + $instance->setName('doctrine:migrations:dump-schema'); + $instance->setDescription('Dump the schema for your database to a migration.'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_ExecuteCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_ExecuteCommandService.php new file mode 100644 index 0000000..21fb8c1 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_ExecuteCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.execute_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\ExecuteCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:execute'); + + $instance->setName('doctrine:migrations:execute'); + $instance->setDescription('Execute one or more migration versions up or down manually.'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_GenerateCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_GenerateCommandService.php new file mode 100644 index 0000000..c9fccf9 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_GenerateCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.generate_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\GenerateCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:generate'); + + $instance->setName('doctrine:migrations:generate'); + $instance->setDescription('Generate a blank migration class.'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_LatestCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_LatestCommandService.php new file mode 100644 index 0000000..cf52089 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_LatestCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.latest_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\LatestCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:latest'); + + $instance->setName('doctrine:migrations:latest'); + $instance->setDescription('Outputs the latest version'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_MigrateCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_MigrateCommandService.php new file mode 100644 index 0000000..dd39289 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_MigrateCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.migrate_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\MigrateCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:migrate'); + + $instance->setName('doctrine:migrations:migrate'); + $instance->setDescription('Execute a migration to a specified version or the latest available version.'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_RollupCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_RollupCommandService.php new file mode 100644 index 0000000..fbd31bb --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_RollupCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.rollup_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\RollupCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:rollup'); + + $instance->setName('doctrine:migrations:rollup'); + $instance->setDescription('Rollup migrations by deleting all tracked versions and insert the one version that exists.'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_StatusCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_StatusCommandService.php new file mode 100644 index 0000000..718ae7f --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_StatusCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.status_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\StatusCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:status'); + + $instance->setName('doctrine:migrations:status'); + $instance->setDescription('View the status of a set of migrations.'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_SyncMetadataCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_SyncMetadataCommandService.php new file mode 100644 index 0000000..8888c16 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_SyncMetadataCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.sync_metadata_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\SyncMetadataCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:sync-metadata-storage'); + + $instance->setName('doctrine:migrations:sync-metadata-storage'); + $instance->setDescription('Ensures that the metadata storage is at the latest version.'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_UpToDateCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_UpToDateCommandService.php new file mode 100644 index 0000000..b993d27 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_UpToDateCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.up_to_date_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\UpToDateCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:up-to-date'); + + $instance->setName('doctrine:migrations:up-to-date'); + $instance->setDescription('Tells you if your schema is up-to-date.'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_VersionCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_VersionCommandService.php new file mode 100644 index 0000000..da5a741 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_VersionCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.version_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\VersionCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:version'); + + $instance->setName('doctrine:migrations:version'); + $instance->setDescription('Manually add and delete migration versions from the version table.'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_VersionsCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_VersionsCommandService.php new file mode 100644 index 0000000..d40a7a0 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrineMigrations_VersionsCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine_migrations.versions_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\ListCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:versions'); + + $instance->setName('doctrine:migrations:list'); + $instance->setDescription('Display a list of all available migrations and their status.'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheClearMetadataCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheClearMetadataCommandService.php new file mode 100644 index 0000000..b884c8f --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheClearMetadataCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.cache_clear_metadata_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:cache:clear-metadata'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheClearQueryCacheCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheClearQueryCacheCommandService.php new file mode 100644 index 0000000..9b9598a --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheClearQueryCacheCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.cache_clear_query_cache_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:cache:clear-query'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheClearResultCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheClearResultCommandService.php new file mode 100644 index 0000000..2053100 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheClearResultCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.cache_clear_result_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:cache:clear-result'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheCollectionRegionCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheCollectionRegionCommandService.php new file mode 100644 index 0000000..0cda482 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_CacheCollectionRegionCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.cache_collection_region_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\ClearCache\CollectionRegionCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:cache:clear-collection-region'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_ClearEntityRegionCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_ClearEntityRegionCommandService.php new file mode 100644 index 0000000..a1ec4bf --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_ClearEntityRegionCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.clear_entity_region_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\ClearCache\EntityRegionCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:cache:clear-entity-region'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_ClearQueryRegionCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_ClearQueryRegionCommandService.php new file mode 100644 index 0000000..e35c3eb --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_ClearQueryRegionCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.clear_query_region_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryRegionCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:cache:clear-query-region'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_DatabaseCreateCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_DatabaseCreateCommandService.php new file mode 100644 index 0000000..ff4003a --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_DatabaseCreateCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.database_create_command'] = $instance = new \Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand(($container->services['doctrine'] ?? self::getDoctrineService($container))); + + $instance->setName('doctrine:database:create'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_DatabaseDropCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_DatabaseDropCommandService.php new file mode 100644 index 0000000..4763ef4 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_DatabaseDropCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.database_drop_command'] = $instance = new \Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand(($container->services['doctrine'] ?? self::getDoctrineService($container))); + + $instance->setName('doctrine:database:drop'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_MappingDescribeCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_MappingDescribeCommandService.php new file mode 100644 index 0000000..d7052bd --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_MappingDescribeCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.mapping_describe_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\MappingDescribeCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:mapping:describe'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_MappingInfoCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_MappingInfoCommandService.php new file mode 100644 index 0000000..ba5cd28 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_MappingInfoCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.mapping_info_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\InfoCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:mapping:info'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Migrations_DependencyFactoryService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Migrations_DependencyFactoryService.php new file mode 100644 index 0000000..d8465dd --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Migrations_DependencyFactoryService.php @@ -0,0 +1,49 @@ +addMigrationsDirectory('DoctrineMigrations', (\dirname(__DIR__, 4).'/migrations')); + $a->setAllOrNothing(false); + $a->setCheckDatabasePlatform(true); + $a->setTransactional(true); + $a->setMetadataStorageConfiguration(new \Doctrine\Migrations\Metadata\Storage\TableMetadataStorageConfiguration()); + + $instance = \Doctrine\Migrations\DependencyFactory::fromEntityManager(new \Doctrine\Migrations\Configuration\Migration\ExistingConfiguration($a), \Doctrine\Migrations\Configuration\EntityManager\ManagerRegistryEntityManager::withSimpleDefault(($container->services['doctrine'] ?? self::getDoctrineService($container))), ($container->privates['logger'] ?? self::getLoggerService($container))); + + if (isset($container->privates['doctrine.migrations.dependency_factory'])) { + return $container->privates['doctrine.migrations.dependency_factory']; + } + + $container->privates['doctrine.migrations.dependency_factory'] = $instance; + + $instance->setDefinition('Doctrine\\Migrations\\Version\\MigrationFactory', #[\Closure(name: 'doctrine.migrations.migrations_factory', class: 'Doctrine\\Migrations\\Version\\MigrationFactory')] fn () => ($container->privates['doctrine.migrations.migrations_factory'] ?? $container->load('getDoctrine_Migrations_MigrationsFactoryService'))); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Migrations_MigrationsFactoryService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Migrations_MigrationsFactoryService.php new file mode 100644 index 0000000..a487c8a --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Migrations_MigrationsFactoryService.php @@ -0,0 +1,37 @@ +privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')); + + if (isset($container->privates['doctrine.migrations.migrations_factory'])) { + return $container->privates['doctrine.migrations.migrations_factory']; + } + + $instance = $a->getMigrationFactory(); + + if (isset($container->privates['doctrine.migrations.migrations_factory'])) { + return $container->privates['doctrine.migrations.migrations_factory']; + } + + return $container->privates['doctrine.migrations.migrations_factory'] = $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Command_EntityManagerProviderService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Command_EntityManagerProviderService.php new file mode 100644 index 0000000..705465f --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Command_EntityManagerProviderService.php @@ -0,0 +1,26 @@ +privates['doctrine.orm.command.entity_manager_provider'] = new \Doctrine\Bundle\DoctrineBundle\Orm\ManagerRegistryAwareEntityManagerProvider(($container->services['doctrine'] ?? self::getDoctrineService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_DefaultEntityManager_PropertyInfoExtractorService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_DefaultEntityManager_PropertyInfoExtractorService.php new file mode 100644 index 0000000..c289f7a --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_DefaultEntityManager_PropertyInfoExtractorService.php @@ -0,0 +1,25 @@ +privates['doctrine.orm.default_entity_manager.property_info_extractor'] = new \Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor(($container->services['doctrine.orm.default_entity_manager'] ?? self::getDoctrine_Orm_DefaultEntityManagerService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_DefaultListeners_AttachEntityListenersService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_DefaultListeners_AttachEntityListenersService.php new file mode 100644 index 0000000..568911a --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_DefaultListeners_AttachEntityListenersService.php @@ -0,0 +1,25 @@ +privates['doctrine.orm.default_listeners.attach_entity_listeners'] = new \Doctrine\ORM\Tools\AttachEntityListenersListener(); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_DoctrineDbalCacheAdapterSchemaListenerService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_DoctrineDbalCacheAdapterSchemaListenerService.php new file mode 100644 index 0000000..e521f1a --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_DoctrineDbalCacheAdapterSchemaListenerService.php @@ -0,0 +1,26 @@ +privates['doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener'] = new \Symfony\Bridge\Doctrine\SchemaListener\DoctrineDbalCacheAdapterSchemaListener([]); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_DoctrineTokenProviderSchemaListenerService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_DoctrineTokenProviderSchemaListenerService.php new file mode 100644 index 0000000..b2853e6 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_DoctrineTokenProviderSchemaListenerService.php @@ -0,0 +1,26 @@ +privates['doctrine.orm.listeners.doctrine_token_provider_schema_listener'] = new \Symfony\Bridge\Doctrine\SchemaListener\RememberMeTokenProviderDoctrineSchemaListener(new RewindableGenerator(fn () => new \EmptyIterator(), 0)); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_LockStoreSchemaListenerService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_LockStoreSchemaListenerService.php new file mode 100644 index 0000000..06a1b18 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_LockStoreSchemaListenerService.php @@ -0,0 +1,26 @@ +privates['doctrine.orm.listeners.lock_store_schema_listener'] = new \Symfony\Bridge\Doctrine\SchemaListener\LockStoreSchemaListener(new RewindableGenerator(fn () => new \EmptyIterator(), 0)); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_PdoSessionHandlerSchemaListenerService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_PdoSessionHandlerSchemaListenerService.php new file mode 100644 index 0000000..7ab82e4 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Listeners_PdoSessionHandlerSchemaListenerService.php @@ -0,0 +1,26 @@ +privates['doctrine.orm.listeners.pdo_session_handler_schema_listener'] = new \Symfony\Bridge\Doctrine\SchemaListener\PdoSessionHandlerSchemaListener(($container->privates['session.handler.native'] ?? $container->load('getSession_Handler_NativeService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_ProxyCacheWarmerService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_ProxyCacheWarmerService.php new file mode 100644 index 0000000..a10177f --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_ProxyCacheWarmerService.php @@ -0,0 +1,26 @@ +privates['doctrine.orm.proxy_cache_warmer'] = new \Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer(($container->services['doctrine'] ?? self::getDoctrineService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Validator_UniqueService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Validator_UniqueService.php new file mode 100644 index 0000000..115cf65 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_Orm_Validator_UniqueService.php @@ -0,0 +1,27 @@ +privates['doctrine.orm.validator.unique'] = new \Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator(($container->services['doctrine'] ?? self::getDoctrineService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_QueryDqlCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_QueryDqlCommandService.php new file mode 100644 index 0000000..99891de --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_QueryDqlCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.query_dql_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\RunDqlCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:query:dql'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_QuerySqlCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_QuerySqlCommandService.php new file mode 100644 index 0000000..729bd05 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_QuerySqlCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.query_sql_command'] = $instance = new \Doctrine\Bundle\DoctrineBundle\Command\Proxy\RunSqlDoctrineCommand(($container->privates['Doctrine\\Bundle\\DoctrineBundle\\Dbal\\ManagerRegistryAwareConnectionProvider'] ?? $container->load('getManagerRegistryAwareConnectionProviderService'))); + + $instance->setName('doctrine:query:sql'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaCreateCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaCreateCommandService.php new file mode 100644 index 0000000..0ddcae3 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaCreateCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine.schema_create_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:schema:create'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaDropCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaDropCommandService.php new file mode 100644 index 0000000..1825a55 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaDropCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine.schema_drop_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:schema:drop'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaUpdateCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaUpdateCommandService.php new file mode 100644 index 0000000..379f7e8 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaUpdateCommandService.php @@ -0,0 +1,33 @@ +privates['doctrine.schema_update_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:schema:update'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaValidateCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaValidateCommandService.php new file mode 100644 index 0000000..d819771 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_SchemaValidateCommandService.php @@ -0,0 +1,32 @@ +privates['doctrine.schema_validate_command'] = $instance = new \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand(($container->privates['doctrine.orm.command.entity_manager_provider'] ?? $container->load('getDoctrine_Orm_Command_EntityManagerProviderService'))); + + $instance->setName('doctrine:schema:validate'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_UlidGeneratorService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_UlidGeneratorService.php new file mode 100644 index 0000000..07494f2 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_UlidGeneratorService.php @@ -0,0 +1,26 @@ +privates['doctrine.ulid_generator'] = new \Symfony\Bridge\Doctrine\IdGenerator\UlidGenerator(NULL); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_UuidGeneratorService.php b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_UuidGeneratorService.php new file mode 100644 index 0000000..f04dc84 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getDoctrine_UuidGeneratorService.php @@ -0,0 +1,26 @@ +privates['doctrine.uuid_generator'] = new \Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator(NULL); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getErrorControllerService.php b/backend/var/cache/dev/ContainerIP09wnc/getErrorControllerService.php new file mode 100644 index 0000000..dd51f18 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getErrorControllerService.php @@ -0,0 +1,31 @@ +services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()); + + return $container->services['error_controller'] = new \Symfony\Component\HttpKernel\Controller\ErrorController(($container->services['http_kernel'] ?? self::getHttpKernelService($container)), 'error_controller', new \Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer(($container->privates['serializer'] ?? self::getSerializerService($container)), \Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer::getPreferredFormat($a), new class(fn () => \Symfony\Bundle\FrameworkBundle\ErrorHandler\ErrorRenderer\RuntimeModeErrorRendererSelector::select($container->getEnv('bool:default::key:web:default:kernel.runtime_mode:'), #[\Closure(name: 'error_handler.error_renderer.html', class: 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\HtmlErrorRenderer')] fn () => ($container->privates['error_handler.error_renderer.html'] ?? $container->load('getErrorHandler_ErrorRenderer_HtmlService')), #[\Closure(name: 'error_handler.error_renderer.cli', class: 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\CliErrorRenderer')] fn () => ($container->privates['error_handler.error_renderer.cli'] ??= new \Symfony\Component\ErrorHandler\ErrorRenderer\CliErrorRenderer()))) extends \Symfony\Component\DependencyInjection\Argument\LazyClosure implements \Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface { public function render(\Throwable $exception): \Symfony\Component\ErrorHandler\Exception\FlattenException { return $this->service->render(...\func_get_args()); } }, \Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer::isDebug($a, true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getErrorHandler_ErrorRenderer_HtmlService.php b/backend/var/cache/dev/ContainerIP09wnc/getErrorHandler_ErrorRenderer_HtmlService.php new file mode 100644 index 0000000..cbc1e20 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getErrorHandler_ErrorRenderer_HtmlService.php @@ -0,0 +1,29 @@ +services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()); + + return $container->privates['error_handler.error_renderer.html'] = new \Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer(\Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer::isDebug($a, true), 'UTF-8', ($container->privates['debug.file_link_formatter'] ??= new \Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter($container->getEnv('default::SYMFONY_IDE'))), \dirname(__DIR__, 4), \Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer::getAndCleanOutputBuffer($a), ($container->privates['logger'] ?? self::getLoggerService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getLoaderInterfaceService.php b/backend/var/cache/dev/ContainerIP09wnc/getLoaderInterfaceService.php new file mode 100644 index 0000000..d619aa4 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getLoaderInterfaceService.php @@ -0,0 +1,23 @@ +privates['Doctrine\\Bundle\\DoctrineBundle\\Dbal\\ManagerRegistryAwareConnectionProvider'] = new \Doctrine\Bundle\DoctrineBundle\Dbal\ManagerRegistryAwareConnectionProvider(new \Doctrine\Bundle\DoctrineBundle\Registry($container, $container->parameters['doctrine.connections'], $container->parameters['doctrine.entity_managers'], 'default', 'default')); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getPropertyInfo_ConstructorExtractorService.php b/backend/var/cache/dev/ContainerIP09wnc/getPropertyInfo_ConstructorExtractorService.php new file mode 100644 index 0000000..9645a3a --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getPropertyInfo_ConstructorExtractorService.php @@ -0,0 +1,29 @@ +privates['property_info.constructor_extractor'] = new \Symfony\Component\PropertyInfo\Extractor\ConstructorExtractor(new RewindableGenerator(function () use ($container) { + yield 0 => ($container->privates['property_info.phpstan_extractor'] ??= new \Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor()); + yield 1 => ($container->privates['property_info.php_doc_extractor'] ??= new \Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor()); + yield 2 => ($container->privates['property_info.reflection_extractor'] ??= new \Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor()); + }, 3)); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getPropertyInfo_SerializerExtractorService.php b/backend/var/cache/dev/ContainerIP09wnc/getPropertyInfo_SerializerExtractorService.php new file mode 100644 index 0000000..7adb57a --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getPropertyInfo_SerializerExtractorService.php @@ -0,0 +1,25 @@ +privates['property_info.serializer_extractor'] = new \Symfony\Component\PropertyInfo\Extractor\SerializerExtractor(($container->privates['serializer.mapping.class_metadata_factory'] ?? self::getSerializer_Mapping_ClassMetadataFactoryService($container))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getRedirectControllerService.php b/backend/var/cache/dev/ContainerIP09wnc/getRedirectControllerService.php new file mode 100644 index 0000000..c0ca36d --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getRedirectControllerService.php @@ -0,0 +1,27 @@ +privates['router.request_context'] ?? self::getRouter_RequestContextService($container)); + + return $container->services['Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController'] = new \Symfony\Bundle\FrameworkBundle\Controller\RedirectController(($container->services['router'] ?? self::getRouterService($container)), $a->getHttpPort(), $a->getHttpsPort()); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getRouter_CacheWarmerService.php b/backend/var/cache/dev/ContainerIP09wnc/getRouter_CacheWarmerService.php new file mode 100644 index 0000000..b012379 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getRouter_CacheWarmerService.php @@ -0,0 +1,30 @@ +privates['router.cache_warmer'] = new \Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer((new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'router' => ['services', 'router', 'getRouterService', false], + ], [ + 'router' => '?', + ]))->withContext('router.cache_warmer', $container)); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getRouting_LoaderService.php b/backend/var/cache/dev/ContainerIP09wnc/getRouting_LoaderService.php new file mode 100644 index 0000000..03b5369 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getRouting_LoaderService.php @@ -0,0 +1,72 @@ +services['kernel'] ?? $container->get('kernel', 1))); + $c = new \Symfony\Bundle\FrameworkBundle\Routing\AttributeRouteControllerLoader('dev'); + + $a->addLoader(new \Symfony\Component\Routing\Loader\XmlFileLoader($b, 'dev')); + $a->addLoader(new \Symfony\Component\Routing\Loader\YamlFileLoader($b, 'dev')); + $a->addLoader(new \Symfony\Component\Routing\Loader\PhpFileLoader($b, 'dev')); + $a->addLoader(new \Symfony\Component\Routing\Loader\GlobFileLoader($b, 'dev')); + $a->addLoader(new \Symfony\Component\Routing\Loader\DirectoryLoader($b, 'dev')); + $a->addLoader(new \Symfony\Component\Routing\Loader\ContainerLoader(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'kernel' => ['services', 'kernel', 'getKernelService', true], + ], [ + 'kernel' => 'App\\Kernel', + ]), 'dev')); + $a->addLoader($c); + $a->addLoader(new \Symfony\Component\Routing\Loader\AttributeServicesLoader([])); + $a->addLoader(new \Symfony\Component\Routing\Loader\AttributeDirectoryLoader($b, $c)); + $a->addLoader(new \Symfony\Component\Routing\Loader\AttributeFileLoader($b, $c)); + $a->addLoader(new \Symfony\Component\Routing\Loader\Psr4DirectoryLoader($b)); + + return $container->services['routing.loader'] = new \Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader($a, ['utf8' => true], []); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getRunSqlCommandService.php b/backend/var/cache/dev/ContainerIP09wnc/getRunSqlCommandService.php new file mode 100644 index 0000000..d6134e0 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getRunSqlCommandService.php @@ -0,0 +1,31 @@ +privates['Doctrine\\DBAL\\Tools\\Console\\Command\\RunSqlCommand'] = $instance = new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(($container->privates['Doctrine\\Bundle\\DoctrineBundle\\Dbal\\ManagerRegistryAwareConnectionProvider'] ?? $container->load('getManagerRegistryAwareConnectionProviderService'))); + + $instance->setName('dbal:run-sql'); + + return $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getSecrets_EnvVarLoaderService.php b/backend/var/cache/dev/ContainerIP09wnc/getSecrets_EnvVarLoaderService.php new file mode 100644 index 0000000..b294fc9 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getSecrets_EnvVarLoaderService.php @@ -0,0 +1,26 @@ +privates['secrets.env_var_loader'] = new \Symfony\Component\DependencyInjection\StaticEnvVarLoader(($container->privates['secrets.vault'] ?? $container->load('getSecrets_VaultService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getSecrets_VaultService.php b/backend/var/cache/dev/ContainerIP09wnc/getSecrets_VaultService.php new file mode 100644 index 0000000..5017e3d --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getSecrets_VaultService.php @@ -0,0 +1,28 @@ +privates['secrets.vault'] = new \Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault((\dirname(__DIR__, 4).'/config/secrets/'.$container->getEnv('string:default:kernel.environment:APP_RUNTIME_ENV')), \Symfony\Component\String\LazyString::fromCallable($container->getEnv(...), 'base64:default::SYMFONY_DECRYPTION_SECRET'), 'APP_SECRET'); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getSerializer_Mapping_CacheWarmerService.php b/backend/var/cache/dev/ContainerIP09wnc/getSerializer_Mapping_CacheWarmerService.php new file mode 100644 index 0000000..718eeee --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getSerializer_Mapping_CacheWarmerService.php @@ -0,0 +1,27 @@ +privates['serializer.mapping.cache_warmer'] = new \Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer([($container->privates['serializer.mapping.attribute_loader'] ??= new \Symfony\Component\Serializer\Mapping\Loader\AttributeLoader(true, []))], ($container->targetDir.''.'/serialization.php')); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getServicesResetterService.php b/backend/var/cache/dev/ContainerIP09wnc/getServicesResetterService.php new file mode 100644 index 0000000..4a8eae6 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getServicesResetterService.php @@ -0,0 +1,69 @@ +services['services_resetter'] = new \Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter(new RewindableGenerator(function () use ($container) { + if (isset($container->privates['controller.cache_attribute_listener'])) { + yield 'controller.cache_attribute_listener' => ($container->privates['controller.cache_attribute_listener'] ?? null); + } + if (isset($container->services['request_stack'])) { + yield 'request_stack' => ($container->services['request_stack'] ?? null); + } + if (isset($container->privates['container.env_var_processor'])) { + yield 'container.env_var_processor' => ($container->privates['container.env_var_processor'] ?? null); + } + if (isset($container->services['cache.app'])) { + yield 'cache.app' => ($container->services['cache.app'] ?? null); + } + if (isset($container->services['cache.system'])) { + yield 'cache.system' => ($container->services['cache.system'] ?? null); + } + if (false) { + yield 'cache.validator' => null; + } + if (false) { + yield 'cache.serializer' => null; + } + if (false) { + yield 'cache.property_info' => null; + } + if (isset($container->services['debug.stopwatch'])) { + yield 'debug.stopwatch' => ($container->services['debug.stopwatch'] ?? null); + } + if (isset($container->services['event_dispatcher'])) { + yield 'debug.event_dispatcher' => ($container->services['event_dispatcher'] ?? null); + } + if (isset($container->privates['session_listener'])) { + yield 'session_listener' => ($container->privates['session_listener'] ?? null); + } + if (isset($container->services['cache.validator_expression_language'])) { + yield 'cache.validator_expression_language' => ($container->services['cache.validator_expression_language'] ?? null); + } + if (isset($container->services['doctrine'])) { + yield 'doctrine' => ($container->services['doctrine'] ?? null); + } + if (isset($container->privates['doctrine.debug_data_holder'])) { + yield 'doctrine.debug_data_holder' => ($container->privates['doctrine.debug_data_holder'] ?? null); + } + }, fn () => 0 + (int) (isset($container->privates['controller.cache_attribute_listener'])) + (int) (isset($container->services['request_stack'])) + (int) (isset($container->privates['container.env_var_processor'])) + (int) (isset($container->services['cache.app'])) + (int) (isset($container->services['cache.system'])) + (int) (false) + (int) (false) + (int) (false) + (int) (isset($container->services['debug.stopwatch'])) + (int) (isset($container->services['event_dispatcher'])) + (int) (isset($container->privates['session_listener'])) + (int) (isset($container->services['cache.validator_expression_language'])) + (int) (isset($container->services['doctrine'])) + (int) (isset($container->privates['doctrine.debug_data_holder']))), ['controller.cache_attribute_listener' => ['?reset'], 'request_stack' => ['?resetRequestFormats'], 'container.env_var_processor' => ['reset'], 'cache.app' => ['reset'], 'cache.system' => ['reset'], 'cache.validator' => ['reset'], 'cache.serializer' => ['reset'], 'cache.property_info' => ['reset'], 'debug.stopwatch' => ['reset'], 'debug.event_dispatcher' => ['reset'], 'session_listener' => ['reset'], 'cache.validator_expression_language' => ['reset'], 'doctrine' => ['reset'], 'doctrine.debug_data_holder' => ['reset']]); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getSession_FactoryService.php b/backend/var/cache/dev/ContainerIP09wnc/getSession_FactoryService.php new file mode 100644 index 0000000..2d5b5f4 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getSession_FactoryService.php @@ -0,0 +1,42 @@ +privates['session_listener'] ?? self::getSessionListenerService($container)); + + if (isset($container->privates['session.factory'])) { + return $container->privates['session.factory']; + } + + $instance = new \Symfony\Component\HttpFoundation\Session\SessionFactory(($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorageFactory($container->parameters['session.storage.options'], ($container->privates['session.handler.native'] ?? $container->load('getSession_Handler_NativeService')), new \Symfony\Component\HttpFoundation\Session\Storage\MetadataBag('_sf2_meta', 0, NULL), true), [$a, 'onSessionUsage']); + + if (isset($container->privates['session.factory'])) { + return $container->privates['session.factory']; + } + + return $container->privates['session.factory'] = $instance; + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getSession_Handler_NativeService.php b/backend/var/cache/dev/ContainerIP09wnc/getSession_Handler_NativeService.php new file mode 100644 index 0000000..02007b7 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getSession_Handler_NativeService.php @@ -0,0 +1,26 @@ +privates['session.handler.native'] = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler(new \SessionHandler()); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getTemplateControllerService.php b/backend/var/cache/dev/ContainerIP09wnc/getTemplateControllerService.php new file mode 100644 index 0000000..04fb252 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getTemplateControllerService.php @@ -0,0 +1,25 @@ +services['Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController'] = new \Symfony\Bundle\FrameworkBundle\Controller\TemplateController(NULL); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getValidator_EmailService.php b/backend/var/cache/dev/ContainerIP09wnc/getValidator_EmailService.php new file mode 100644 index 0000000..ff69498 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getValidator_EmailService.php @@ -0,0 +1,27 @@ +privates['validator.email'] = new \Symfony\Component\Validator\Constraints\EmailValidator('html5'); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getValidator_ExpressionService.php b/backend/var/cache/dev/ContainerIP09wnc/getValidator_ExpressionService.php new file mode 100644 index 0000000..d81d871 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getValidator_ExpressionService.php @@ -0,0 +1,27 @@ +privates['validator.expression'] = new \Symfony\Component\Validator\Constraints\ExpressionValidator(NULL); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getValidator_Mapping_CacheWarmerService.php b/backend/var/cache/dev/ContainerIP09wnc/getValidator_Mapping_CacheWarmerService.php new file mode 100644 index 0000000..80eab39 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getValidator_Mapping_CacheWarmerService.php @@ -0,0 +1,27 @@ +privates['validator.mapping.cache_warmer'] = new \Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer(($container->privates['validator.builder'] ?? self::getValidator_BuilderService($container)), ($container->targetDir.''.'/validation.php')); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getValidator_NoSuspiciousCharactersService.php b/backend/var/cache/dev/ContainerIP09wnc/getValidator_NoSuspiciousCharactersService.php new file mode 100644 index 0000000..5efbce6 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getValidator_NoSuspiciousCharactersService.php @@ -0,0 +1,27 @@ +privates['validator.no_suspicious_characters'] = new \Symfony\Component\Validator\Constraints\NoSuspiciousCharactersValidator([]); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getValidator_NotCompromisedPasswordService.php b/backend/var/cache/dev/ContainerIP09wnc/getValidator_NotCompromisedPasswordService.php new file mode 100644 index 0000000..316d4bf --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getValidator_NotCompromisedPasswordService.php @@ -0,0 +1,27 @@ +privates['validator.not_compromised_password'] = new \Symfony\Component\Validator\Constraints\NotCompromisedPasswordValidator(NULL, 'UTF-8', true, NULL); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/getValidator_WhenService.php b/backend/var/cache/dev/ContainerIP09wnc/getValidator_WhenService.php new file mode 100644 index 0000000..72ce396 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/getValidator_WhenService.php @@ -0,0 +1,27 @@ +privates['validator.when'] = new \Symfony\Component\Validator\Constraints\WhenValidator(NULL); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_About_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_About_LazyService.php new file mode 100644 index 0000000..9983753 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_About_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.about.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('about', [], 'Display information about the current project', false, #[\Closure(name: 'console.command.about', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\AboutCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\AboutCommand => ($container->privates['console.command.about'] ?? $container->load('getConsole_Command_AboutService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_AssetsInstall_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_AssetsInstall_LazyService.php new file mode 100644 index 0000000..628d6a1 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_AssetsInstall_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.assets_install.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('assets:install', [], 'Install bundle\'s web assets under a public directory', false, #[\Closure(name: 'console.command.assets_install', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\AssetsInstallCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand => ($container->privates['console.command.assets_install'] ?? $container->load('getConsole_Command_AssetsInstallService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CacheClear_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CacheClear_LazyService.php new file mode 100644 index 0000000..8487d47 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CacheClear_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_clear.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:clear', [], 'Clear the cache', false, #[\Closure(name: 'console.command.cache_clear', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand => ($container->privates['console.command.cache_clear'] ?? $container->load('getConsole_Command_CacheClearService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolClear_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolClear_LazyService.php new file mode 100644 index 0000000..a6e7623 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolClear_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_pool_clear.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:pool:clear', [], 'Clear cache pools', false, #[\Closure(name: 'console.command.cache_pool_clear', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolClearCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand => ($container->privates['console.command.cache_pool_clear'] ?? $container->load('getConsole_Command_CachePoolClearService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolDelete_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolDelete_LazyService.php new file mode 100644 index 0000000..3646f05 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolDelete_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_pool_delete.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:pool:delete', [], 'Delete an item from a cache pool', false, #[\Closure(name: 'console.command.cache_pool_delete', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolDeleteCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CachePoolDeleteCommand => ($container->privates['console.command.cache_pool_delete'] ?? $container->load('getConsole_Command_CachePoolDeleteService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolInvalidateTags_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolInvalidateTags_LazyService.php new file mode 100644 index 0000000..cebc625 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolInvalidateTags_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_pool_invalidate_tags.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:pool:invalidate-tags', [], 'Invalidate cache tags for all or a specific pool', false, #[\Closure(name: 'console.command.cache_pool_invalidate_tags', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolInvalidateTagsCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CachePoolInvalidateTagsCommand => ($container->privates['console.command.cache_pool_invalidate_tags'] ?? $container->load('getConsole_Command_CachePoolInvalidateTagsService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolList_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolList_LazyService.php new file mode 100644 index 0000000..fd5c1ef --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolList_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_pool_list.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:pool:list', [], 'List available cache pools', false, #[\Closure(name: 'console.command.cache_pool_list', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolListCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CachePoolListCommand => ($container->privates['console.command.cache_pool_list'] ?? $container->load('getConsole_Command_CachePoolListService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolPrune_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolPrune_LazyService.php new file mode 100644 index 0000000..adf194c --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CachePoolPrune_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_pool_prune.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:pool:prune', [], 'Prune cache pools', false, #[\Closure(name: 'console.command.cache_pool_prune', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolPruneCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand => ($container->privates['console.command.cache_pool_prune'] ?? $container->load('getConsole_Command_CachePoolPruneService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CacheWarmup_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CacheWarmup_LazyService.php new file mode 100644 index 0000000..7d16d72 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_CacheWarmup_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.cache_warmup.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('cache:warmup', [], 'Warm up an empty cache', false, #[\Closure(name: 'console.command.cache_warmup', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheWarmupCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand => ($container->privates['console.command.cache_warmup'] ?? $container->load('getConsole_Command_CacheWarmupService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ConfigDebug_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ConfigDebug_LazyService.php new file mode 100644 index 0000000..de3ad8d --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ConfigDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.config_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:config', [], 'Dump the current configuration for an extension', false, #[\Closure(name: 'console.command.config_debug', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDebugCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\ConfigDebugCommand => ($container->privates['console.command.config_debug'] ?? $container->load('getConsole_Command_ConfigDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ConfigDumpReference_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ConfigDumpReference_LazyService.php new file mode 100644 index 0000000..1531dc0 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ConfigDumpReference_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.config_dump_reference.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('config:dump-reference', [], 'Dump the default configuration for an extension', false, #[\Closure(name: 'console.command.config_dump_reference', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDumpReferenceCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\ConfigDumpReferenceCommand => ($container->privates['console.command.config_dump_reference'] ?? $container->load('getConsole_Command_ConfigDumpReferenceService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ContainerDebug_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ContainerDebug_LazyService.php new file mode 100644 index 0000000..79b94a3 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ContainerDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.container_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:container', [], 'Display current services for an application', false, #[\Closure(name: 'console.command.container_debug', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerDebugCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\ContainerDebugCommand => ($container->privates['console.command.container_debug'] ?? $container->load('getConsole_Command_ContainerDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ContainerLint_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ContainerLint_LazyService.php new file mode 100644 index 0000000..43f6eb3 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ContainerLint_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.container_lint.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('lint:container', [], 'Ensure that arguments injected into services match type declarations', false, #[\Closure(name: 'console.command.container_lint', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerLintCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\ContainerLintCommand => ($container->privates['console.command.container_lint'] ?? $container->load('getConsole_Command_ContainerLintService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_DebugAutowiring_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_DebugAutowiring_LazyService.php new file mode 100644 index 0000000..9d9a161 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_DebugAutowiring_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.debug_autowiring.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:autowiring', [], 'List classes/interfaces you can use for autowiring', false, #[\Closure(name: 'console.command.debug_autowiring', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\DebugAutowiringCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\DebugAutowiringCommand => ($container->privates['console.command.debug_autowiring'] ?? $container->load('getConsole_Command_DebugAutowiringService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_DotenvDebug_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_DotenvDebug_LazyService.php new file mode 100644 index 0000000..e27a7a5 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_DotenvDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.dotenv_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:dotenv', [], 'List all dotenv files with variables and values', false, #[\Closure(name: 'console.command.dotenv_debug', class: 'Symfony\\Component\\Dotenv\\Command\\DebugCommand')] fn (): \Symfony\Component\Dotenv\Command\DebugCommand => ($container->privates['console.command.dotenv_debug'] ?? $container->load('getConsole_Command_DotenvDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ErrorDumper_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ErrorDumper_LazyService.php new file mode 100644 index 0000000..9cdb14c --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ErrorDumper_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.error_dumper.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('error:dump', [], 'Dump error pages to plain HTML files that can be directly served by a web server', false, #[\Closure(name: 'console.command.error_dumper', class: 'Symfony\\Component\\ErrorHandler\\Command\\ErrorDumpCommand')] fn (): \Symfony\Component\ErrorHandler\Command\ErrorDumpCommand => ($container->privates['console.command.error_dumper'] ?? $container->load('getConsole_Command_ErrorDumperService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_EventDispatcherDebug_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_EventDispatcherDebug_LazyService.php new file mode 100644 index 0000000..fc6ab23 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_EventDispatcherDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.event_dispatcher_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:event-dispatcher', [], 'Display configured listeners for an application', false, #[\Closure(name: 'console.command.event_dispatcher_debug', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\EventDispatcherDebugCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand => ($container->privates['console.command.event_dispatcher_debug'] ?? $container->load('getConsole_Command_EventDispatcherDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_RouterDebug_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_RouterDebug_LazyService.php new file mode 100644 index 0000000..c6206b6 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_RouterDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.router_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:router', [], 'Display current routes for an application', false, #[\Closure(name: 'console.command.router_debug', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterDebugCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand => ($container->privates['console.command.router_debug'] ?? $container->load('getConsole_Command_RouterDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_RouterMatch_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_RouterMatch_LazyService.php new file mode 100644 index 0000000..298961c --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_RouterMatch_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.router_match.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('router:match', [], 'Help debug routes by simulating a path info match', false, #[\Closure(name: 'console.command.router_match', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterMatchCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand => ($container->privates['console.command.router_match'] ?? $container->load('getConsole_Command_RouterMatchService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsDecryptToLocal_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsDecryptToLocal_LazyService.php new file mode 100644 index 0000000..b0a958c --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsDecryptToLocal_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_decrypt_to_local.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:decrypt-to-local', [], 'Decrypt all secrets and stores them in the local vault', false, #[\Closure(name: 'console.command.secrets_decrypt_to_local', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsDecryptToLocalCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsDecryptToLocalCommand => ($container->privates['console.command.secrets_decrypt_to_local'] ?? $container->load('getConsole_Command_SecretsDecryptToLocalService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsEncryptFromLocal_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsEncryptFromLocal_LazyService.php new file mode 100644 index 0000000..e37e79c --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsEncryptFromLocal_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_encrypt_from_local.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:encrypt-from-local', [], 'Encrypt all local secrets to the vault', false, #[\Closure(name: 'console.command.secrets_encrypt_from_local', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsEncryptFromLocalCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsEncryptFromLocalCommand => ($container->privates['console.command.secrets_encrypt_from_local'] ?? $container->load('getConsole_Command_SecretsEncryptFromLocalService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsGenerateKey_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsGenerateKey_LazyService.php new file mode 100644 index 0000000..892c686 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsGenerateKey_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_generate_key.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:generate-keys', [], 'Generate new encryption keys', false, #[\Closure(name: 'console.command.secrets_generate_key', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsGenerateKeysCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsGenerateKeysCommand => ($container->privates['console.command.secrets_generate_key'] ?? $container->load('getConsole_Command_SecretsGenerateKeyService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsList_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsList_LazyService.php new file mode 100644 index 0000000..e16f681 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsList_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_list.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:list', [], 'List all secrets', false, #[\Closure(name: 'console.command.secrets_list', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsListCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsListCommand => ($container->privates['console.command.secrets_list'] ?? $container->load('getConsole_Command_SecretsListService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsRemove_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsRemove_LazyService.php new file mode 100644 index 0000000..09d003c --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsRemove_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_remove.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:remove', [], 'Remove a secret from the vault', false, #[\Closure(name: 'console.command.secrets_remove', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsRemoveCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsRemoveCommand => ($container->privates['console.command.secrets_remove'] ?? $container->load('getConsole_Command_SecretsRemoveService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsReveal_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsReveal_LazyService.php new file mode 100644 index 0000000..04ac555 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsReveal_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_reveal.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:reveal', [], 'Reveal the value of a secret', false, #[\Closure(name: 'console.command.secrets_reveal', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsRevealCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsRevealCommand => ($container->privates['console.command.secrets_reveal'] ?? $container->load('getConsole_Command_SecretsRevealService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsSet_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsSet_LazyService.php new file mode 100644 index 0000000..91cd468 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SecretsSet_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.secrets_set.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('secrets:set', [], 'Set a secret in the vault', false, #[\Closure(name: 'console.command.secrets_set', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsSetCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\SecretsSetCommand => ($container->privates['console.command.secrets_set'] ?? $container->load('getConsole_Command_SecretsSetService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SerializerDebug_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SerializerDebug_LazyService.php new file mode 100644 index 0000000..947747d --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_SerializerDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.serializer_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:serializer', [], 'Display serialization information for classes', false, #[\Closure(name: 'console.command.serializer_debug', class: 'Symfony\\Component\\Serializer\\Command\\DebugCommand')] fn (): \Symfony\Component\Serializer\Command\DebugCommand => ($container->privates['console.command.serializer_debug'] ?? $container->load('getConsole_Command_SerializerDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ValidatorDebug_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ValidatorDebug_LazyService.php new file mode 100644 index 0000000..333b10a --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_ValidatorDebug_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.validator_debug.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('debug:validator', [], 'Display validation constraints for classes', false, #[\Closure(name: 'console.command.validator_debug', class: 'Symfony\\Component\\Validator\\Command\\DebugCommand')] fn (): \Symfony\Component\Validator\Command\DebugCommand => ($container->privates['console.command.validator_debug'] ?? $container->load('getConsole_Command_ValidatorDebugService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_YamlLint_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_YamlLint_LazyService.php new file mode 100644 index 0000000..5e44db5 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Console_Command_YamlLint_LazyService.php @@ -0,0 +1,27 @@ +privates['.console.command.yaml_lint.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('lint:yaml', [], 'Lint a YAML file and outputs encountered errors', false, #[\Closure(name: 'console.command.yaml_lint', class: 'Symfony\\Bundle\\FrameworkBundle\\Command\\YamlLintCommand')] fn (): \Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand => ($container->privates['console.command.yaml_lint'] ?? $container->load('getConsole_Command_YamlLintService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_BackedEnumResolverService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_BackedEnumResolverService.php new file mode 100644 index 0000000..ca94c52 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_BackedEnumResolverService.php @@ -0,0 +1,27 @@ +privates['.debug.value_resolver.argument_resolver.backed_enum_resolver'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\BackedEnumValueResolver(), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_DatetimeService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_DatetimeService.php new file mode 100644 index 0000000..fe98a57 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_DatetimeService.php @@ -0,0 +1,27 @@ +privates['.debug.value_resolver.argument_resolver.datetime'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\DateTimeValueResolver(NULL), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_DefaultService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_DefaultService.php new file mode 100644 index 0000000..4ad7aef --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_DefaultService.php @@ -0,0 +1,27 @@ +privates['.debug.value_resolver.argument_resolver.default'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver(), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_NotTaggedControllerService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_NotTaggedControllerService.php new file mode 100644 index 0000000..2238a2b --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_NotTaggedControllerService.php @@ -0,0 +1,27 @@ +privates['.debug.value_resolver.argument_resolver.not_tagged_controller'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\NotTaggedControllerValueResolver(($container->privates['.service_locator.8JS6QTA'] ?? $container->load('get_ServiceLocator_8JS6QTAService'))), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_QueryParameterValueResolverService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_QueryParameterValueResolverService.php new file mode 100644 index 0000000..941aa02 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_QueryParameterValueResolverService.php @@ -0,0 +1,27 @@ +privates['.debug.value_resolver.argument_resolver.query_parameter_value_resolver'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\QueryParameterValueResolver(), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestAttributeService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestAttributeService.php new file mode 100644 index 0000000..b66de82 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestAttributeService.php @@ -0,0 +1,27 @@ +privates['.debug.value_resolver.argument_resolver.request_attribute'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver(), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestPayloadService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestPayloadService.php new file mode 100644 index 0000000..a420af3 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestPayloadService.php @@ -0,0 +1,26 @@ +privates['.debug.value_resolver.argument_resolver.request_payload'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(($container->privates['argument_resolver.request_payload'] ?? self::getArgumentResolver_RequestPayloadService($container)), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestService.php new file mode 100644 index 0000000..c760081 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_RequestService.php @@ -0,0 +1,27 @@ +privates['.debug.value_resolver.argument_resolver.request'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver(), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_ServiceService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_ServiceService.php new file mode 100644 index 0000000..a2a1aa3 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_ServiceService.php @@ -0,0 +1,27 @@ +privates['.debug.value_resolver.argument_resolver.service'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\ServiceValueResolver(($container->privates['.service_locator.8JS6QTA'] ?? $container->load('get_ServiceLocator_8JS6QTAService'))), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_SessionService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_SessionService.php new file mode 100644 index 0000000..3bea956 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_SessionService.php @@ -0,0 +1,27 @@ +privates['.debug.value_resolver.argument_resolver.session'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver(), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_VariadicService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_VariadicService.php new file mode 100644 index 0000000..1ea8989 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_ArgumentResolver_VariadicService.php @@ -0,0 +1,27 @@ +privates['.debug.value_resolver.argument_resolver.variadic'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver(), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_Doctrine_Orm_EntityValueResolverService.php b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_Doctrine_Orm_EntityValueResolverService.php new file mode 100644 index 0000000..860de5c --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_Debug_ValueResolver_Doctrine_Orm_EntityValueResolverService.php @@ -0,0 +1,29 @@ +privates['.debug.value_resolver.doctrine.orm.entity_value_resolver'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver(new \Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver(($container->services['doctrine'] ?? self::getDoctrineService($container)), NULL, new \Symfony\Bridge\Doctrine\Attribute\MapEntity(NULL, NULL, NULL, [], NULL, NULL, NULL, NULL, false), []), ($container->services['debug.stopwatch'] ??= new \Symfony\Component\Stopwatch\Stopwatch(true))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_CurrentCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_CurrentCommand_LazyService.php new file mode 100644 index 0000000..a892b47 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_CurrentCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.current_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:current', [], 'Outputs the current version', false, #[\Closure(name: 'doctrine_migrations.current_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\CurrentCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\CurrentCommand => ($container->privates['doctrine_migrations.current_command'] ?? $container->load('getDoctrineMigrations_CurrentCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_DiffCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_DiffCommand_LazyService.php new file mode 100644 index 0000000..482aead --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_DiffCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.diff_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:diff', [], 'Generate a migration by comparing your current database to your mapping information.', false, #[\Closure(name: 'doctrine_migrations.diff_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\DiffCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\DiffCommand => ($container->privates['doctrine_migrations.diff_command'] ?? $container->load('getDoctrineMigrations_DiffCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_DumpSchemaCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_DumpSchemaCommand_LazyService.php new file mode 100644 index 0000000..b775a88 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_DumpSchemaCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.dump_schema_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:dump-schema', [], 'Dump the schema for your database to a migration.', false, #[\Closure(name: 'doctrine_migrations.dump_schema_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\DumpSchemaCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\DumpSchemaCommand => ($container->privates['doctrine_migrations.dump_schema_command'] ?? $container->load('getDoctrineMigrations_DumpSchemaCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_ExecuteCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_ExecuteCommand_LazyService.php new file mode 100644 index 0000000..a6a85f1 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_ExecuteCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.execute_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:execute', [], 'Execute one or more migration versions up or down manually.', false, #[\Closure(name: 'doctrine_migrations.execute_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\ExecuteCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\ExecuteCommand => ($container->privates['doctrine_migrations.execute_command'] ?? $container->load('getDoctrineMigrations_ExecuteCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_GenerateCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_GenerateCommand_LazyService.php new file mode 100644 index 0000000..b083981 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_GenerateCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.generate_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:generate', [], 'Generate a blank migration class.', false, #[\Closure(name: 'doctrine_migrations.generate_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\GenerateCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\GenerateCommand => ($container->privates['doctrine_migrations.generate_command'] ?? $container->load('getDoctrineMigrations_GenerateCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_LatestCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_LatestCommand_LazyService.php new file mode 100644 index 0000000..7c73852 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_LatestCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.latest_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:latest', [], 'Outputs the latest version', false, #[\Closure(name: 'doctrine_migrations.latest_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\LatestCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\LatestCommand => ($container->privates['doctrine_migrations.latest_command'] ?? $container->load('getDoctrineMigrations_LatestCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_MigrateCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_MigrateCommand_LazyService.php new file mode 100644 index 0000000..42a9685 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_MigrateCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.migrate_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:migrate', [], 'Execute a migration to a specified version or the latest available version.', false, #[\Closure(name: 'doctrine_migrations.migrate_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\MigrateCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\MigrateCommand => ($container->privates['doctrine_migrations.migrate_command'] ?? $container->load('getDoctrineMigrations_MigrateCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_RollupCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_RollupCommand_LazyService.php new file mode 100644 index 0000000..34e0ce8 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_RollupCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.rollup_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:rollup', [], 'Rollup migrations by deleting all tracked versions and insert the one version that exists.', false, #[\Closure(name: 'doctrine_migrations.rollup_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\RollupCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\RollupCommand => ($container->privates['doctrine_migrations.rollup_command'] ?? $container->load('getDoctrineMigrations_RollupCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_StatusCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_StatusCommand_LazyService.php new file mode 100644 index 0000000..88461ed --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_StatusCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.status_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:status', [], 'View the status of a set of migrations.', false, #[\Closure(name: 'doctrine_migrations.status_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\StatusCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\StatusCommand => ($container->privates['doctrine_migrations.status_command'] ?? $container->load('getDoctrineMigrations_StatusCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_SyncMetadataCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_SyncMetadataCommand_LazyService.php new file mode 100644 index 0000000..67b735f --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_SyncMetadataCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.sync_metadata_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:sync-metadata-storage', [], 'Ensures that the metadata storage is at the latest version.', false, #[\Closure(name: 'doctrine_migrations.sync_metadata_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\SyncMetadataCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\SyncMetadataCommand => ($container->privates['doctrine_migrations.sync_metadata_command'] ?? $container->load('getDoctrineMigrations_SyncMetadataCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_UpToDateCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_UpToDateCommand_LazyService.php new file mode 100644 index 0000000..4153ccf --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_UpToDateCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.up_to_date_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:up-to-date', [], 'Tells you if your schema is up-to-date.', false, #[\Closure(name: 'doctrine_migrations.up_to_date_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\UpToDateCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\UpToDateCommand => ($container->privates['doctrine_migrations.up_to_date_command'] ?? $container->load('getDoctrineMigrations_UpToDateCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_VersionCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_VersionCommand_LazyService.php new file mode 100644 index 0000000..f9b9ab9 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_VersionCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.version_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:version', [], 'Manually add and delete migration versions from the version table.', false, #[\Closure(name: 'doctrine_migrations.version_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\VersionCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\VersionCommand => ($container->privates['doctrine_migrations.version_command'] ?? $container->load('getDoctrineMigrations_VersionCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_VersionsCommand_LazyService.php b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_VersionsCommand_LazyService.php new file mode 100644 index 0000000..33b4270 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_DoctrineMigrations_VersionsCommand_LazyService.php @@ -0,0 +1,27 @@ +privates['.doctrine_migrations.versions_command.lazy'] = new \Symfony\Component\Console\Command\LazyCommand('doctrine:migrations:list', [], 'Display a list of all available migrations and their status.', false, #[\Closure(name: 'doctrine_migrations.versions_command', class: 'Doctrine\\Migrations\\Tools\\Console\\Command\\ListCommand')] fn (): \Doctrine\Migrations\Tools\Console\Command\ListCommand => ($container->privates['doctrine_migrations.versions_command'] ?? $container->load('getDoctrineMigrations_VersionsCommandService'))); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_1vYpZ1BService.php b/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_1vYpZ1BService.php new file mode 100644 index 0000000..793ddeb --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_1vYpZ1BService.php @@ -0,0 +1,27 @@ +privates['.service_locator.1vYpZ1B'] = new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'loader' => ['privates', '.errored..service_locator.1vYpZ1B.Symfony\\Component\\Config\\Loader\\LoaderInterface', NULL, 'Cannot autowire service ".service_locator.1vYpZ1B": it needs an instance of "Symfony\\Component\\Config\\Loader\\LoaderInterface" but this type has been excluded from autowiring.'], + ], [ + 'loader' => 'Symfony\\Component\\Config\\Loader\\LoaderInterface', + ]); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_1vYpZ1B_KernelloadRoutesService.php b/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_1vYpZ1B_KernelloadRoutesService.php new file mode 100644 index 0000000..107bcfb --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_1vYpZ1B_KernelloadRoutesService.php @@ -0,0 +1,23 @@ +privates['.service_locator.1vYpZ1B.kernel::loadRoutes()'] = ($container->privates['.service_locator.1vYpZ1B'] ?? $container->load('get_ServiceLocator_1vYpZ1BService'))->withContext('kernel::loadRoutes()', $container); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService.php b/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService.php new file mode 100644 index 0000000..5a759bd --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService.php @@ -0,0 +1,23 @@ +privates['.service_locator.1vYpZ1B.kernel::registerContainerConfiguration()'] = ($container->privates['.service_locator.1vYpZ1B'] ?? $container->load('get_ServiceLocator_1vYpZ1BService'))->withContext('kernel::registerContainerConfiguration()', $container); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_8JS6QTAService.php b/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_8JS6QTAService.php new file mode 100644 index 0000000..2b89823 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/get_ServiceLocator_8JS6QTAService.php @@ -0,0 +1,37 @@ +privates['.service_locator.8JS6QTA'] = new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService ??= $container->getService(...), [ + 'kernel::registerContainerConfiguration' => ['privates', '.service_locator.1vYpZ1B.kernel::registerContainerConfiguration()', 'get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService', true], + 'App\\Kernel::registerContainerConfiguration' => ['privates', '.service_locator.1vYpZ1B.kernel::registerContainerConfiguration()', 'get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService', true], + 'kernel::loadRoutes' => ['privates', '.service_locator.1vYpZ1B.kernel::loadRoutes()', 'get_ServiceLocator_1vYpZ1B_KernelloadRoutesService', true], + 'App\\Kernel::loadRoutes' => ['privates', '.service_locator.1vYpZ1B.kernel::loadRoutes()', 'get_ServiceLocator_1vYpZ1B_KernelloadRoutesService', true], + 'kernel:registerContainerConfiguration' => ['privates', '.service_locator.1vYpZ1B.kernel::registerContainerConfiguration()', 'get_ServiceLocator_1vYpZ1B_KernelregisterContainerConfigurationService', true], + 'kernel:loadRoutes' => ['privates', '.service_locator.1vYpZ1B.kernel::loadRoutes()', 'get_ServiceLocator_1vYpZ1B_KernelloadRoutesService', true], + ], [ + 'kernel::registerContainerConfiguration' => '?', + 'App\\Kernel::registerContainerConfiguration' => '?', + 'kernel::loadRoutes' => '?', + 'App\\Kernel::loadRoutes' => '?', + 'kernel:registerContainerConfiguration' => '?', + 'kernel:loadRoutes' => '?', + ]); + } +} diff --git a/backend/var/cache/dev/ContainerIP09wnc/removed-ids.php b/backend/var/cache/dev/ContainerIP09wnc/removed-ids.php new file mode 100644 index 0000000..1999fe8 --- /dev/null +++ b/backend/var/cache/dev/ContainerIP09wnc/removed-ids.php @@ -0,0 +1,454 @@ + true, + 'Doctrine\\Bundle\\DoctrineBundle\\Dbal\\ManagerRegistryAwareConnectionProvider' => true, + 'Doctrine\\Common\\Persistence\\ManagerRegistry' => true, + 'Doctrine\\DBAL\\Connection' => true, + 'Doctrine\\DBAL\\Connection $defaultConnection' => true, + 'Doctrine\\DBAL\\Tools\\Console\\Command\\RunSqlCommand' => true, + 'Doctrine\\ORM\\EntityManagerInterface' => true, + 'Doctrine\\ORM\\EntityManagerInterface $defaultEntityManager' => true, + 'Doctrine\\Persistence\\ManagerRegistry' => true, + 'Psr\\Cache\\CacheItemPoolInterface' => true, + 'Psr\\Container\\ContainerInterface $parameterBag' => true, + 'Psr\\EventDispatcher\\EventDispatcherInterface' => true, + 'Psr\\Log\\LoggerInterface' => true, + 'SessionHandlerInterface' => true, + 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerHelper' => true, + 'Symfony\\Component\\Config\\Loader\\LoaderInterface' => true, + 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBagInterface' => true, + 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBagInterface' => true, + 'Symfony\\Component\\DependencyInjection\\ReverseContainer' => true, + 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\FileLinkFormatter' => true, + 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => true, + 'Symfony\\Component\\Filesystem\\Filesystem' => true, + 'Symfony\\Component\\HttpFoundation\\Request' => true, + 'Symfony\\Component\\HttpFoundation\\RequestStack' => true, + 'Symfony\\Component\\HttpFoundation\\Response' => true, + 'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface' => true, + 'Symfony\\Component\\HttpFoundation\\UriSigner' => true, + 'Symfony\\Component\\HttpFoundation\\UrlHelper' => true, + 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' => true, + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ServicesResetterInterface' => true, + 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentUriGeneratorInterface' => true, + 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => true, + 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => true, + 'Symfony\\Component\\HttpKernel\\KernelInterface' => true, + 'Symfony\\Component\\PropertyAccess\\PropertyAccessorInterface' => true, + 'Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface' => true, + 'Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface' => true, + 'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractorInterface' => true, + 'Symfony\\Component\\PropertyInfo\\PropertyInitializableExtractorInterface' => true, + 'Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface' => true, + 'Symfony\\Component\\PropertyInfo\\PropertyReadInfoExtractorInterface' => true, + 'Symfony\\Component\\PropertyInfo\\PropertyTypeExtractorInterface' => true, + 'Symfony\\Component\\PropertyInfo\\PropertyWriteInfoExtractorInterface' => true, + 'Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface' => true, + 'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface' => true, + 'Symfony\\Component\\Routing\\RequestContext' => true, + 'Symfony\\Component\\Routing\\RequestContextAwareInterface' => true, + 'Symfony\\Component\\Routing\\RouterInterface' => true, + 'Symfony\\Component\\Serializer\\Encoder\\DecoderInterface' => true, + 'Symfony\\Component\\Serializer\\Encoder\\EncoderInterface' => true, + 'Symfony\\Component\\Serializer\\Mapping\\ClassDiscriminatorResolverInterface' => true, + 'Symfony\\Component\\Serializer\\Mapping\\Factory\\ClassMetadataFactoryInterface' => true, + 'Symfony\\Component\\Serializer\\Normalizer\\DenormalizerInterface' => true, + 'Symfony\\Component\\Serializer\\Normalizer\\NormalizerInterface' => true, + 'Symfony\\Component\\Serializer\\SerializerInterface' => true, + 'Symfony\\Component\\Stopwatch\\Stopwatch' => true, + 'Symfony\\Component\\String\\Slugger\\SluggerInterface' => true, + 'Symfony\\Component\\TypeInfo\\TypeResolver\\TypeResolverInterface' => true, + 'Symfony\\Component\\Validator\\Constraints\\AllValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\AtLeastOneOfValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\BicValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\BlankValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\CallbackValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\CardSchemeValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\CharsetValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\ChoiceValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\CidrValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\CollectionValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\CompoundValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\CountValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\CountryValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\CssColorValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\CurrencyValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\DateTimeValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\DateValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\DivisibleByValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\EmailValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\EqualToValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\ExpressionSyntaxValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\ExpressionValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\FileValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqualValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\GreaterThanValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\HostnameValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\IbanValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\IdenticalToValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\ImageValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\IpValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\IsFalseValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\IsNullValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\IsTrueValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\IsbnValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\IsinValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\IssnValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\JsonValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\LanguageValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\LengthValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\LessThanOrEqualValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\LessThanValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\LocaleValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\LuhnValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\MacAddressValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\NoSuspiciousCharactersValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\NotBlankValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\NotCompromisedPasswordValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\NotEqualToValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\NotIdenticalToValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\NotNullValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\PasswordStrengthValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\RangeValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\RegexValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\SequentiallyValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\TimeValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\TimezoneValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\TypeValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\UlidValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\UniqueValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\UrlValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\UuidValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\ValidValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\VideoValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\WeekValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\WhenValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\WordCountValidator' => true, + 'Symfony\\Component\\Validator\\Constraints\\YamlValidator' => true, + 'Symfony\\Component\\Validator\\Validator\\ValidatorInterface' => true, + 'Symfony\\Contracts\\Cache\\CacheInterface' => true, + 'Symfony\\Contracts\\Cache\\NamespacedPoolInterface' => true, + 'Symfony\\Contracts\\Cache\\TagAwareCacheInterface' => true, + 'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => true, + 'argument_metadata_factory' => true, + 'argument_resolver' => true, + 'argument_resolver.backed_enum_resolver' => true, + 'argument_resolver.controller_locator' => true, + 'argument_resolver.datetime' => true, + 'argument_resolver.default' => true, + 'argument_resolver.not_tagged_controller' => true, + 'argument_resolver.query_parameter_value_resolver' => true, + 'argument_resolver.request' => true, + 'argument_resolver.request_attribute' => true, + 'argument_resolver.request_payload' => true, + 'argument_resolver.service' => true, + 'argument_resolver.session' => true, + 'argument_resolver.variadic' => true, + 'cache.adapter.apcu' => true, + 'cache.adapter.array' => true, + 'cache.adapter.doctrine_dbal' => true, + 'cache.adapter.filesystem' => true, + 'cache.adapter.memcached' => true, + 'cache.adapter.pdo' => true, + 'cache.adapter.psr6' => true, + 'cache.adapter.redis' => true, + 'cache.adapter.redis_tag_aware' => true, + 'cache.adapter.system' => true, + 'cache.adapter.valkey' => true, + 'cache.adapter.valkey_tag_aware' => true, + 'cache.app.taggable' => true, + 'cache.default_clearer' => true, + 'cache.default_doctrine_dbal_provider' => true, + 'cache.default_marshaller' => true, + 'cache.default_memcached_provider' => true, + 'cache.default_redis_provider' => true, + 'cache.default_valkey_provider' => true, + 'cache.doctrine.orm.default.metadata' => true, + 'cache.doctrine.orm.default.query' => true, + 'cache.doctrine.orm.default.result' => true, + 'cache.early_expiration_handler' => true, + 'cache.property_access' => true, + 'cache.property_info' => true, + 'cache.serializer' => true, + 'cache.validator' => true, + 'cache_clearer' => true, + 'config.resource.self_checking_resource_checker' => true, + 'config_builder.warmer' => true, + 'config_cache_factory' => true, + 'console.command.about' => true, + 'console.command.assets_install' => true, + 'console.command.cache_clear' => true, + 'console.command.cache_pool_clear' => true, + 'console.command.cache_pool_delete' => true, + 'console.command.cache_pool_invalidate_tags' => true, + 'console.command.cache_pool_list' => true, + 'console.command.cache_pool_prune' => true, + 'console.command.cache_warmup' => true, + 'console.command.config_debug' => true, + 'console.command.config_dump_reference' => true, + 'console.command.container_debug' => true, + 'console.command.container_lint' => true, + 'console.command.debug_autowiring' => true, + 'console.command.dotenv_debug' => true, + 'console.command.error_dumper' => true, + 'console.command.event_dispatcher_debug' => true, + 'console.command.router_debug' => true, + 'console.command.router_match' => true, + 'console.command.secrets_decrypt_to_local' => true, + 'console.command.secrets_encrypt_from_local' => true, + 'console.command.secrets_generate_key' => true, + 'console.command.secrets_list' => true, + 'console.command.secrets_remove' => true, + 'console.command.secrets_reveal' => true, + 'console.command.secrets_set' => true, + 'console.command.serializer_debug' => true, + 'console.command.validator_debug' => true, + 'console.command.yaml_lint' => true, + 'console.error_listener' => true, + 'console.messenger.application' => true, + 'console.messenger.execute_command_handler' => true, + 'console.suggest_missing_package_subscriber' => true, + 'container.env' => true, + 'container.env_var_processor' => true, + 'container.getenv' => true, + 'controller.cache_attribute_listener' => true, + 'controller.helper' => true, + 'controller.is_signature_valid_attribute_listener' => true, + 'controller_resolver' => true, + 'data_collector.doctrine' => true, + 'debug.argument_resolver' => true, + 'debug.argument_resolver.inner' => true, + 'debug.controller_resolver' => true, + 'debug.controller_resolver.inner' => true, + 'debug.debug_handlers_listener' => true, + 'debug.event_dispatcher' => true, + 'debug.event_dispatcher.inner' => true, + 'debug.file_link_formatter' => true, + 'dependency_injection.config.container_parameters_resource_checker' => true, + 'disallow_search_engine_index_response_listener' => true, + 'doctrine.cache_clear_metadata_command' => true, + 'doctrine.cache_clear_query_cache_command' => true, + 'doctrine.cache_clear_result_command' => true, + 'doctrine.cache_collection_region_command' => true, + 'doctrine.clear_entity_region_command' => true, + 'doctrine.clear_query_region_command' => true, + 'doctrine.database_create_command' => true, + 'doctrine.database_drop_command' => true, + 'doctrine.dbal.connection' => true, + 'doctrine.dbal.connection.configuration' => true, + 'doctrine.dbal.connection.event_manager' => true, + 'doctrine.dbal.connection_expiries' => true, + 'doctrine.dbal.connection_factory' => true, + 'doctrine.dbal.connection_factory.dsn_parser' => true, + 'doctrine.dbal.debug_middleware' => true, + 'doctrine.dbal.debug_middleware.default' => true, + 'doctrine.dbal.default_connection.configuration' => true, + 'doctrine.dbal.default_connection.event_manager' => true, + 'doctrine.dbal.default_schema_asset_filter_manager' => true, + 'doctrine.dbal.default_schema_manager_factory' => true, + 'doctrine.dbal.event_manager' => true, + 'doctrine.dbal.idle_connection_listener' => true, + 'doctrine.dbal.idle_connection_middleware' => true, + 'doctrine.dbal.idle_connection_middleware.default' => true, + 'doctrine.dbal.logging_middleware' => true, + 'doctrine.dbal.schema_asset_filter_manager' => true, + 'doctrine.dbal.well_known_schema_asset_filter' => true, + 'doctrine.debug_data_holder' => true, + 'doctrine.id_generator_locator' => true, + 'doctrine.mapping_describe_command' => true, + 'doctrine.mapping_info_command' => true, + 'doctrine.migrations.configuration' => true, + 'doctrine.migrations.configuration_loader' => true, + 'doctrine.migrations.connection_loader' => true, + 'doctrine.migrations.connection_registry_loader' => true, + 'doctrine.migrations.dependency_factory' => true, + 'doctrine.migrations.em_loader' => true, + 'doctrine.migrations.entity_manager_registry_loader' => true, + 'doctrine.migrations.metadata_storage' => true, + 'doctrine.migrations.migrations_factory' => true, + 'doctrine.migrations.storage.table_storage' => true, + 'doctrine.orm.command.entity_manager_provider' => true, + 'doctrine.orm.configuration' => true, + 'doctrine.orm.container_repository_factory' => true, + 'doctrine.orm.default_attribute_metadata_driver' => true, + 'doctrine.orm.default_configuration' => true, + 'doctrine.orm.default_entity_listener_resolver' => true, + 'doctrine.orm.default_entity_manager.event_manager' => true, + 'doctrine.orm.default_entity_manager.property_info_extractor' => true, + 'doctrine.orm.default_entity_manager.validator_loader' => true, + 'doctrine.orm.default_listeners.attach_entity_listeners' => true, + 'doctrine.orm.default_manager_configurator' => true, + 'doctrine.orm.default_metadata_cache' => true, + 'doctrine.orm.default_metadata_driver' => true, + 'doctrine.orm.default_query_cache' => true, + 'doctrine.orm.default_result_cache' => true, + 'doctrine.orm.entity_manager.abstract' => true, + 'doctrine.orm.entity_value_resolver' => true, + 'doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener' => true, + 'doctrine.orm.listeners.doctrine_token_provider_schema_listener' => true, + 'doctrine.orm.listeners.lock_store_schema_listener' => true, + 'doctrine.orm.listeners.pdo_session_handler_schema_listener' => true, + 'doctrine.orm.listeners.resolve_target_entity' => true, + 'doctrine.orm.manager_configurator.abstract' => true, + 'doctrine.orm.naming_strategy.default' => true, + 'doctrine.orm.naming_strategy.underscore' => true, + 'doctrine.orm.naming_strategy.underscore_number_aware' => true, + 'doctrine.orm.proxy_cache_warmer' => true, + 'doctrine.orm.quote_strategy.ansi' => true, + 'doctrine.orm.quote_strategy.default' => true, + 'doctrine.orm.security.user.provider' => true, + 'doctrine.orm.typed_field_mapper.default' => true, + 'doctrine.orm.validator.unique' => true, + 'doctrine.orm.validator_initializer' => true, + 'doctrine.query_dql_command' => true, + 'doctrine.query_sql_command' => true, + 'doctrine.schema_create_command' => true, + 'doctrine.schema_drop_command' => true, + 'doctrine.schema_update_command' => true, + 'doctrine.schema_validate_command' => true, + 'doctrine.twig.doctrine_extension' => true, + 'doctrine.ulid_generator' => true, + 'doctrine.uuid_generator' => true, + 'doctrine_migrations.current_command' => true, + 'doctrine_migrations.diff_command' => true, + 'doctrine_migrations.dump_schema_command' => true, + 'doctrine_migrations.execute_command' => true, + 'doctrine_migrations.generate_command' => true, + 'doctrine_migrations.latest_command' => true, + 'doctrine_migrations.migrate_command' => true, + 'doctrine_migrations.rollup_command' => true, + 'doctrine_migrations.schema_filter_listener' => true, + 'doctrine_migrations.status_command' => true, + 'doctrine_migrations.sync_metadata_command' => true, + 'doctrine_migrations.up_to_date_command' => true, + 'doctrine_migrations.version_command' => true, + 'doctrine_migrations.versions_command' => true, + 'error_handler.error_renderer.cli' => true, + 'error_handler.error_renderer.default' => true, + 'error_handler.error_renderer.html' => true, + 'error_handler.error_renderer.serializer' => true, + 'error_renderer' => true, + 'error_renderer.cli' => true, + 'error_renderer.default' => true, + 'error_renderer.html' => true, + 'error_renderer.serializer' => true, + 'exception_listener' => true, + 'file_locator' => true, + 'filesystem' => true, + 'form.type.entity' => true, + 'form.type_guesser.doctrine' => true, + 'fragment.handler' => true, + 'fragment.renderer.inline' => true, + 'fragment.uri_generator' => true, + 'http_cache' => true, + 'http_cache.store' => true, + 'locale_aware_listener' => true, + 'locale_listener' => true, + 'logger' => true, + 'nelmio_cors.cacheable_response_vary_listener' => true, + 'nelmio_cors.cors_listener' => true, + 'nelmio_cors.options_provider.config' => true, + 'nelmio_cors.options_resolver' => true, + 'parameter_bag' => true, + 'property_accessor' => true, + 'property_info' => true, + 'property_info.constructor_extractor' => true, + 'property_info.php_doc_extractor' => true, + 'property_info.phpstan_extractor' => true, + 'property_info.reflection_extractor' => true, + 'property_info.serializer_extractor' => true, + 'response_listener' => true, + 'reverse_container' => true, + 'router.cache_warmer' => true, + 'router.default' => true, + 'router.request_context' => true, + 'router_listener' => true, + 'routing.loader.attribute' => true, + 'routing.loader.attribute.directory' => true, + 'routing.loader.attribute.file' => true, + 'routing.loader.attribute.services' => true, + 'routing.loader.container' => true, + 'routing.loader.directory' => true, + 'routing.loader.glob' => true, + 'routing.loader.php' => true, + 'routing.loader.psr4' => true, + 'routing.loader.xml' => true, + 'routing.loader.yml' => true, + 'routing.resolver' => true, + 'secrets.decryption_key' => true, + 'secrets.env_var_loader' => true, + 'secrets.local_vault' => true, + 'secrets.vault' => true, + 'serializer' => true, + 'serializer.denormalizer.array' => true, + 'serializer.denormalizer.unwrapping' => true, + 'serializer.encoder.csv' => true, + 'serializer.encoder.json' => true, + 'serializer.encoder.xml' => true, + 'serializer.encoder.yaml' => true, + 'serializer.mapping.attribute_loader' => true, + 'serializer.mapping.cache.symfony' => true, + 'serializer.mapping.cache_warmer' => true, + 'serializer.mapping.chain_loader' => true, + 'serializer.mapping.class_discriminator_resolver' => true, + 'serializer.mapping.class_metadata_factory' => true, + 'serializer.name_converter.camel_case_to_snake_case' => true, + 'serializer.name_converter.metadata_aware' => true, + 'serializer.name_converter.metadata_aware.abstract' => true, + 'serializer.name_converter.snake_case_to_camel_case' => true, + 'serializer.normalizer.backed_enum' => true, + 'serializer.normalizer.constraint_violation_list' => true, + 'serializer.normalizer.data_uri' => true, + 'serializer.normalizer.dateinterval' => true, + 'serializer.normalizer.datetime' => true, + 'serializer.normalizer.datetimezone' => true, + 'serializer.normalizer.form_error' => true, + 'serializer.normalizer.json_serializable' => true, + 'serializer.normalizer.number' => true, + 'serializer.normalizer.object' => true, + 'serializer.normalizer.problem' => true, + 'serializer.normalizer.property' => true, + 'serializer.normalizer.uid' => true, + 'serializer.property_accessor' => true, + 'session.abstract_handler' => true, + 'session.factory' => true, + 'session.handler' => true, + 'session.handler.native' => true, + 'session.handler.native_file' => true, + 'session.marshaller' => true, + 'session.marshalling_handler' => true, + 'session.storage.factory' => true, + 'session.storage.factory.mock_file' => true, + 'session.storage.factory.native' => true, + 'session.storage.factory.php_bridge' => true, + 'session_listener' => true, + 'slugger' => true, + 'type_info.resolver' => true, + 'type_info.resolver.reflection_parameter' => true, + 'type_info.resolver.reflection_parameter.phpdoc_aware' => true, + 'type_info.resolver.reflection_property' => true, + 'type_info.resolver.reflection_property.phpdoc_aware' => true, + 'type_info.resolver.reflection_return' => true, + 'type_info.resolver.reflection_return.phpdoc_aware' => true, + 'type_info.resolver.reflection_type' => true, + 'type_info.resolver.string' => true, + 'type_info.type_context_factory' => true, + 'uri_signer' => true, + 'url_helper' => true, + 'validate_request_listener' => true, + 'validator' => true, + 'validator.builder' => true, + 'validator.email' => true, + 'validator.expression' => true, + 'validator.mapping.cache.adapter' => true, + 'validator.mapping.cache_warmer' => true, + 'validator.mapping.class_metadata_factory' => true, + 'validator.no_suspicious_characters' => true, + 'validator.not_compromised_password' => true, + 'validator.property_info_loader' => true, + 'validator.validator_factory' => true, + 'validator.when' => true, +]; diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/ConnectionConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/ConnectionConfig.php new file mode 100644 index 0000000..7688c6c --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/ConnectionConfig.php @@ -0,0 +1,1276 @@ +_usedProperties['url'] = true; + $this->url = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function dbname($value): static + { + $this->_usedProperties['dbname'] = true; + $this->dbname = $value; + + return $this; + } + + /** + * Defaults to "localhost" at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function host($value): static + { + $this->_usedProperties['host'] = true; + $this->host = $value; + + return $this; + } + + /** + * Defaults to null at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function port($value): static + { + $this->_usedProperties['port'] = true; + $this->port = $value; + + return $this; + } + + /** + * Defaults to "root" at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function user($value): static + { + $this->_usedProperties['user'] = true; + $this->user = $value; + + return $this; + } + + /** + * Defaults to null at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function password($value): static + { + $this->_usedProperties['password'] = true; + $this->password = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @deprecated Since doctrine/doctrine-bundle 2.4: The "doctrine.dbal.override_url" configuration key is deprecated. + * @return $this + */ + public function overrideUrl($value): static + { + $this->_usedProperties['overrideUrl'] = true; + $this->overrideUrl = $value; + + return $this; + } + + /** + * Adds the given suffix to the configured database name, this option has no effects for the SQLite platform + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function dbnameSuffix($value): static + { + $this->_usedProperties['dbnameSuffix'] = true; + $this->dbnameSuffix = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function applicationName($value): static + { + $this->_usedProperties['applicationName'] = true; + $this->applicationName = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function charset($value): static + { + $this->_usedProperties['charset'] = true; + $this->charset = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function path($value): static + { + $this->_usedProperties['path'] = true; + $this->path = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function memory($value): static + { + $this->_usedProperties['memory'] = true; + $this->memory = $value; + + return $this; + } + + /** + * The unix socket to use for MySQL + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function unixSocket($value): static + { + $this->_usedProperties['unixSocket'] = true; + $this->unixSocket = $value; + + return $this; + } + + /** + * True to use as persistent connection for the ibm_db2 driver + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function persistent($value): static + { + $this->_usedProperties['persistent'] = true; + $this->persistent = $value; + + return $this; + } + + /** + * The protocol to use for the ibm_db2 driver (default to TCPIP if omitted) + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function protocol($value): static + { + $this->_usedProperties['protocol'] = true; + $this->protocol = $value; + + return $this; + } + + /** + * True to use SERVICE_NAME as connection parameter instead of SID for Oracle + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function service($value): static + { + $this->_usedProperties['service'] = true; + $this->service = $value; + + return $this; + } + + /** + * Overrules dbname parameter if given and used as SERVICE_NAME or SID connection parameter for Oracle depending on the service parameter. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function servicename($value): static + { + $this->_usedProperties['servicename'] = true; + $this->servicename = $value; + + return $this; + } + + /** + * The session mode to use for the oci8 driver + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sessionMode($value): static + { + $this->_usedProperties['sessionMode'] = true; + $this->sessionMode = $value; + + return $this; + } + + /** + * The name of a running database server to connect to for SQL Anywhere. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function server($value): static + { + $this->_usedProperties['server'] = true; + $this->server = $value; + + return $this; + } + + /** + * Override the default database (postgres) to connect to for PostgreSQL connexion. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultDbname($value): static + { + $this->_usedProperties['defaultDbname'] = true; + $this->defaultDbname = $value; + + return $this; + } + + /** + * Determines whether or with what priority a SSL TCP/IP connection will be negotiated with the server for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslmode($value): static + { + $this->_usedProperties['sslmode'] = true; + $this->sslmode = $value; + + return $this; + } + + /** + * The name of a file containing SSL certificate authority (CA) certificate(s). If the file exists, the server's certificate will be verified to be signed by one of these authorities. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslrootcert($value): static + { + $this->_usedProperties['sslrootcert'] = true; + $this->sslrootcert = $value; + + return $this; + } + + /** + * The path to the SSL client certificate file for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslcert($value): static + { + $this->_usedProperties['sslcert'] = true; + $this->sslcert = $value; + + return $this; + } + + /** + * The path to the SSL client key file for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslkey($value): static + { + $this->_usedProperties['sslkey'] = true; + $this->sslkey = $value; + + return $this; + } + + /** + * The file name of the SSL certificate revocation list for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslcrl($value): static + { + $this->_usedProperties['sslcrl'] = true; + $this->sslcrl = $value; + + return $this; + } + + /** + * True to use a pooled server with the oci8/pdo_oracle driver + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function pooled($value): static + { + $this->_usedProperties['pooled'] = true; + $this->pooled = $value; + + return $this; + } + + /** + * Configuring MultipleActiveResultSets for the pdo_sqlsrv driver + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function multipleActiveResultSets($value): static + { + $this->_usedProperties['multipleActiveResultSets'] = true; + $this->multipleActiveResultSets = $value; + + return $this; + } + + /** + * Use savepoints for nested transactions + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function useSavepoints($value): static + { + $this->_usedProperties['useSavepoints'] = true; + $this->useSavepoints = $value; + + return $this; + } + + /** + * Optional parameter, complete whether to add the INSTANCE_NAME parameter in the connection. It is generally used to connect to an Oracle RAC server to select the name of a particular instance. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function instancename($value): static + { + $this->_usedProperties['instancename'] = true; + $this->instancename = $value; + + return $this; + } + + /** + * Complete Easy Connect connection descriptor, see https://docs.oracle.com/database/121/NETAG/naming.htm.When using this option, you will still need to provide the user and password parameters, but the other parameters will no longer be used. Note that when using this parameter, the getHost and getPort methods from Doctrine\DBAL\Connection will no longer function as expected. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function connectstring($value): static + { + $this->_usedProperties['connectstring'] = true; + $this->connectstring = $value; + + return $this; + } + + /** + * @default 'pdo_mysql' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function driver($value): static + { + $this->_usedProperties['driver'] = true; + $this->driver = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @deprecated Since doctrine/doctrine-bundle 2.9: The "platform_service" configuration key is deprecated since doctrine-bundle 2.9. DBAL 4 will not support setting a custom platform via connection params anymore. + * @return $this + */ + public function platformService($value): static + { + $this->_usedProperties['platformService'] = true; + $this->platformService = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function autoCommit($value): static + { + $this->_usedProperties['autoCommit'] = true; + $this->autoCommit = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function schemaFilter($value): static + { + $this->_usedProperties['schemaFilter'] = true; + $this->schemaFilter = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function logging($value): static + { + $this->_usedProperties['logging'] = true; + $this->logging = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function profiling($value): static + { + $this->_usedProperties['profiling'] = true; + $this->profiling = $value; + + return $this; + } + + /** + * Enables collecting backtraces when profiling is enabled + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function profilingCollectBacktrace($value): static + { + $this->_usedProperties['profilingCollectBacktrace'] = true; + $this->profilingCollectBacktrace = $value; + + return $this; + } + + /** + * Enables collecting schema errors when profiling is enabled + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function profilingCollectSchemaErrors($value): static + { + $this->_usedProperties['profilingCollectSchemaErrors'] = true; + $this->profilingCollectSchemaErrors = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function disableTypeComments($value): static + { + $this->_usedProperties['disableTypeComments'] = true; + $this->disableTypeComments = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function serverVersion($value): static + { + $this->_usedProperties['serverVersion'] = true; + $this->serverVersion = $value; + + return $this; + } + + /** + * @default 600 + * @param ParamConfigurator|int $value + * @return $this + */ + public function idleConnectionTtl($value): static + { + $this->_usedProperties['idleConnectionTtl'] = true; + $this->idleConnectionTtl = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function driverClass($value): static + { + $this->_usedProperties['driverClass'] = true; + $this->driverClass = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function wrapperClass($value): static + { + $this->_usedProperties['wrapperClass'] = true; + $this->wrapperClass = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @deprecated Since doctrine/doctrine-bundle 2.2: The "keep_slave" configuration key is deprecated since doctrine-bundle 2.2. Use the "keep_replica" configuration key instead. + * @return $this + */ + public function keepSlave($value): static + { + $this->_usedProperties['keepSlave'] = true; + $this->keepSlave = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function keepReplica($value): static + { + $this->_usedProperties['keepReplica'] = true; + $this->keepReplica = $value; + + return $this; + } + + /** + * @return $this + */ + public function option(string $key, mixed $value): static + { + $this->_usedProperties['options'] = true; + $this->options[$key] = $value; + + return $this; + } + + /** + * @return $this + */ + public function mappingType(string $name, mixed $value): static + { + $this->_usedProperties['mappingTypes'] = true; + $this->mappingTypes[$name] = $value; + + return $this; + } + + /** + * @return $this + */ + public function defaultTableOption(string $name, mixed $value): static + { + $this->_usedProperties['defaultTableOptions'] = true; + $this->defaultTableOptions[$name] = $value; + + return $this; + } + + /** + * @default 'doctrine.dbal.default_schema_manager_factory' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function schemaManagerFactory($value): static + { + $this->_usedProperties['schemaManagerFactory'] = true; + $this->schemaManagerFactory = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function resultCache($value): static + { + $this->_usedProperties['resultCache'] = true; + $this->resultCache = $value; + + return $this; + } + + /** + * @template TValue of mixed + * @param TValue $value + * @deprecated Since doctrine/doctrine-bundle 2.2: The "slaves" configuration key will be renamed to "replicas" in doctrine-bundle 3.0. "slaves" is deprecated since doctrine-bundle 2.2. + * @return \Symfony\Config\Doctrine\Dbal\ConnectionConfig\SlaveConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Dbal\ConnectionConfig\SlaveConfig : static) + */ + public function slave(string $name, mixed $value = []): \Symfony\Config\Doctrine\Dbal\ConnectionConfig\SlaveConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['slaves'] = true; + $this->slaves[$name] = $value; + + return $this; + } + + if (!isset($this->slaves[$name]) || !$this->slaves[$name] instanceof \Symfony\Config\Doctrine\Dbal\ConnectionConfig\SlaveConfig) { + $this->_usedProperties['slaves'] = true; + $this->slaves[$name] = new \Symfony\Config\Doctrine\Dbal\ConnectionConfig\SlaveConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "slave()" has already been initialized. You cannot pass values the second time you call slave().'); + } + + return $this->slaves[$name]; + } + + /** + * @template TValue of mixed + * @param TValue $value + * @return \Symfony\Config\Doctrine\Dbal\ConnectionConfig\ReplicaConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Dbal\ConnectionConfig\ReplicaConfig : static) + */ + public function replica(string $name, mixed $value = []): \Symfony\Config\Doctrine\Dbal\ConnectionConfig\ReplicaConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['replicas'] = true; + $this->replicas[$name] = $value; + + return $this; + } + + if (!isset($this->replicas[$name]) || !$this->replicas[$name] instanceof \Symfony\Config\Doctrine\Dbal\ConnectionConfig\ReplicaConfig) { + $this->_usedProperties['replicas'] = true; + $this->replicas[$name] = new \Symfony\Config\Doctrine\Dbal\ConnectionConfig\ReplicaConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "replica()" has already been initialized. You cannot pass values the second time you call replica().'); + } + + return $this->replicas[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('url', $config)) { + $this->_usedProperties['url'] = true; + $this->url = $config['url']; + unset($config['url']); + } + + if (array_key_exists('dbname', $config)) { + $this->_usedProperties['dbname'] = true; + $this->dbname = $config['dbname']; + unset($config['dbname']); + } + + if (array_key_exists('host', $config)) { + $this->_usedProperties['host'] = true; + $this->host = $config['host']; + unset($config['host']); + } + + if (array_key_exists('port', $config)) { + $this->_usedProperties['port'] = true; + $this->port = $config['port']; + unset($config['port']); + } + + if (array_key_exists('user', $config)) { + $this->_usedProperties['user'] = true; + $this->user = $config['user']; + unset($config['user']); + } + + if (array_key_exists('password', $config)) { + $this->_usedProperties['password'] = true; + $this->password = $config['password']; + unset($config['password']); + } + + if (array_key_exists('override_url', $config)) { + $this->_usedProperties['overrideUrl'] = true; + $this->overrideUrl = $config['override_url']; + unset($config['override_url']); + } + + if (array_key_exists('dbname_suffix', $config)) { + $this->_usedProperties['dbnameSuffix'] = true; + $this->dbnameSuffix = $config['dbname_suffix']; + unset($config['dbname_suffix']); + } + + if (array_key_exists('application_name', $config)) { + $this->_usedProperties['applicationName'] = true; + $this->applicationName = $config['application_name']; + unset($config['application_name']); + } + + if (array_key_exists('charset', $config)) { + $this->_usedProperties['charset'] = true; + $this->charset = $config['charset']; + unset($config['charset']); + } + + if (array_key_exists('path', $config)) { + $this->_usedProperties['path'] = true; + $this->path = $config['path']; + unset($config['path']); + } + + if (array_key_exists('memory', $config)) { + $this->_usedProperties['memory'] = true; + $this->memory = $config['memory']; + unset($config['memory']); + } + + if (array_key_exists('unix_socket', $config)) { + $this->_usedProperties['unixSocket'] = true; + $this->unixSocket = $config['unix_socket']; + unset($config['unix_socket']); + } + + if (array_key_exists('persistent', $config)) { + $this->_usedProperties['persistent'] = true; + $this->persistent = $config['persistent']; + unset($config['persistent']); + } + + if (array_key_exists('protocol', $config)) { + $this->_usedProperties['protocol'] = true; + $this->protocol = $config['protocol']; + unset($config['protocol']); + } + + if (array_key_exists('service', $config)) { + $this->_usedProperties['service'] = true; + $this->service = $config['service']; + unset($config['service']); + } + + if (array_key_exists('servicename', $config)) { + $this->_usedProperties['servicename'] = true; + $this->servicename = $config['servicename']; + unset($config['servicename']); + } + + if (array_key_exists('sessionMode', $config)) { + $this->_usedProperties['sessionMode'] = true; + $this->sessionMode = $config['sessionMode']; + unset($config['sessionMode']); + } + + if (array_key_exists('server', $config)) { + $this->_usedProperties['server'] = true; + $this->server = $config['server']; + unset($config['server']); + } + + if (array_key_exists('default_dbname', $config)) { + $this->_usedProperties['defaultDbname'] = true; + $this->defaultDbname = $config['default_dbname']; + unset($config['default_dbname']); + } + + if (array_key_exists('sslmode', $config)) { + $this->_usedProperties['sslmode'] = true; + $this->sslmode = $config['sslmode']; + unset($config['sslmode']); + } + + if (array_key_exists('sslrootcert', $config)) { + $this->_usedProperties['sslrootcert'] = true; + $this->sslrootcert = $config['sslrootcert']; + unset($config['sslrootcert']); + } + + if (array_key_exists('sslcert', $config)) { + $this->_usedProperties['sslcert'] = true; + $this->sslcert = $config['sslcert']; + unset($config['sslcert']); + } + + if (array_key_exists('sslkey', $config)) { + $this->_usedProperties['sslkey'] = true; + $this->sslkey = $config['sslkey']; + unset($config['sslkey']); + } + + if (array_key_exists('sslcrl', $config)) { + $this->_usedProperties['sslcrl'] = true; + $this->sslcrl = $config['sslcrl']; + unset($config['sslcrl']); + } + + if (array_key_exists('pooled', $config)) { + $this->_usedProperties['pooled'] = true; + $this->pooled = $config['pooled']; + unset($config['pooled']); + } + + if (array_key_exists('MultipleActiveResultSets', $config)) { + $this->_usedProperties['multipleActiveResultSets'] = true; + $this->multipleActiveResultSets = $config['MultipleActiveResultSets']; + unset($config['MultipleActiveResultSets']); + } + + if (array_key_exists('use_savepoints', $config)) { + $this->_usedProperties['useSavepoints'] = true; + $this->useSavepoints = $config['use_savepoints']; + unset($config['use_savepoints']); + } + + if (array_key_exists('instancename', $config)) { + $this->_usedProperties['instancename'] = true; + $this->instancename = $config['instancename']; + unset($config['instancename']); + } + + if (array_key_exists('connectstring', $config)) { + $this->_usedProperties['connectstring'] = true; + $this->connectstring = $config['connectstring']; + unset($config['connectstring']); + } + + if (array_key_exists('driver', $config)) { + $this->_usedProperties['driver'] = true; + $this->driver = $config['driver']; + unset($config['driver']); + } + + if (array_key_exists('platform_service', $config)) { + $this->_usedProperties['platformService'] = true; + $this->platformService = $config['platform_service']; + unset($config['platform_service']); + } + + if (array_key_exists('auto_commit', $config)) { + $this->_usedProperties['autoCommit'] = true; + $this->autoCommit = $config['auto_commit']; + unset($config['auto_commit']); + } + + if (array_key_exists('schema_filter', $config)) { + $this->_usedProperties['schemaFilter'] = true; + $this->schemaFilter = $config['schema_filter']; + unset($config['schema_filter']); + } + + if (array_key_exists('logging', $config)) { + $this->_usedProperties['logging'] = true; + $this->logging = $config['logging']; + unset($config['logging']); + } + + if (array_key_exists('profiling', $config)) { + $this->_usedProperties['profiling'] = true; + $this->profiling = $config['profiling']; + unset($config['profiling']); + } + + if (array_key_exists('profiling_collect_backtrace', $config)) { + $this->_usedProperties['profilingCollectBacktrace'] = true; + $this->profilingCollectBacktrace = $config['profiling_collect_backtrace']; + unset($config['profiling_collect_backtrace']); + } + + if (array_key_exists('profiling_collect_schema_errors', $config)) { + $this->_usedProperties['profilingCollectSchemaErrors'] = true; + $this->profilingCollectSchemaErrors = $config['profiling_collect_schema_errors']; + unset($config['profiling_collect_schema_errors']); + } + + if (array_key_exists('disable_type_comments', $config)) { + $this->_usedProperties['disableTypeComments'] = true; + $this->disableTypeComments = $config['disable_type_comments']; + unset($config['disable_type_comments']); + } + + if (array_key_exists('server_version', $config)) { + $this->_usedProperties['serverVersion'] = true; + $this->serverVersion = $config['server_version']; + unset($config['server_version']); + } + + if (array_key_exists('idle_connection_ttl', $config)) { + $this->_usedProperties['idleConnectionTtl'] = true; + $this->idleConnectionTtl = $config['idle_connection_ttl']; + unset($config['idle_connection_ttl']); + } + + if (array_key_exists('driver_class', $config)) { + $this->_usedProperties['driverClass'] = true; + $this->driverClass = $config['driver_class']; + unset($config['driver_class']); + } + + if (array_key_exists('wrapper_class', $config)) { + $this->_usedProperties['wrapperClass'] = true; + $this->wrapperClass = $config['wrapper_class']; + unset($config['wrapper_class']); + } + + if (array_key_exists('keep_slave', $config)) { + $this->_usedProperties['keepSlave'] = true; + $this->keepSlave = $config['keep_slave']; + unset($config['keep_slave']); + } + + if (array_key_exists('keep_replica', $config)) { + $this->_usedProperties['keepReplica'] = true; + $this->keepReplica = $config['keep_replica']; + unset($config['keep_replica']); + } + + if (array_key_exists('options', $config)) { + $this->_usedProperties['options'] = true; + $this->options = $config['options']; + unset($config['options']); + } + + if (array_key_exists('mapping_types', $config)) { + $this->_usedProperties['mappingTypes'] = true; + $this->mappingTypes = $config['mapping_types']; + unset($config['mapping_types']); + } + + if (array_key_exists('default_table_options', $config)) { + $this->_usedProperties['defaultTableOptions'] = true; + $this->defaultTableOptions = $config['default_table_options']; + unset($config['default_table_options']); + } + + if (array_key_exists('schema_manager_factory', $config)) { + $this->_usedProperties['schemaManagerFactory'] = true; + $this->schemaManagerFactory = $config['schema_manager_factory']; + unset($config['schema_manager_factory']); + } + + if (array_key_exists('result_cache', $config)) { + $this->_usedProperties['resultCache'] = true; + $this->resultCache = $config['result_cache']; + unset($config['result_cache']); + } + + if (array_key_exists('slaves', $config)) { + $this->_usedProperties['slaves'] = true; + $this->slaves = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Doctrine\Dbal\ConnectionConfig\SlaveConfig($v) : $v, $config['slaves']); + unset($config['slaves']); + } + + if (array_key_exists('replicas', $config)) { + $this->_usedProperties['replicas'] = true; + $this->replicas = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Doctrine\Dbal\ConnectionConfig\ReplicaConfig($v) : $v, $config['replicas']); + unset($config['replicas']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['url'])) { + $output['url'] = $this->url; + } + if (isset($this->_usedProperties['dbname'])) { + $output['dbname'] = $this->dbname; + } + if (isset($this->_usedProperties['host'])) { + $output['host'] = $this->host; + } + if (isset($this->_usedProperties['port'])) { + $output['port'] = $this->port; + } + if (isset($this->_usedProperties['user'])) { + $output['user'] = $this->user; + } + if (isset($this->_usedProperties['password'])) { + $output['password'] = $this->password; + } + if (isset($this->_usedProperties['overrideUrl'])) { + $output['override_url'] = $this->overrideUrl; + } + if (isset($this->_usedProperties['dbnameSuffix'])) { + $output['dbname_suffix'] = $this->dbnameSuffix; + } + if (isset($this->_usedProperties['applicationName'])) { + $output['application_name'] = $this->applicationName; + } + if (isset($this->_usedProperties['charset'])) { + $output['charset'] = $this->charset; + } + if (isset($this->_usedProperties['path'])) { + $output['path'] = $this->path; + } + if (isset($this->_usedProperties['memory'])) { + $output['memory'] = $this->memory; + } + if (isset($this->_usedProperties['unixSocket'])) { + $output['unix_socket'] = $this->unixSocket; + } + if (isset($this->_usedProperties['persistent'])) { + $output['persistent'] = $this->persistent; + } + if (isset($this->_usedProperties['protocol'])) { + $output['protocol'] = $this->protocol; + } + if (isset($this->_usedProperties['service'])) { + $output['service'] = $this->service; + } + if (isset($this->_usedProperties['servicename'])) { + $output['servicename'] = $this->servicename; + } + if (isset($this->_usedProperties['sessionMode'])) { + $output['sessionMode'] = $this->sessionMode; + } + if (isset($this->_usedProperties['server'])) { + $output['server'] = $this->server; + } + if (isset($this->_usedProperties['defaultDbname'])) { + $output['default_dbname'] = $this->defaultDbname; + } + if (isset($this->_usedProperties['sslmode'])) { + $output['sslmode'] = $this->sslmode; + } + if (isset($this->_usedProperties['sslrootcert'])) { + $output['sslrootcert'] = $this->sslrootcert; + } + if (isset($this->_usedProperties['sslcert'])) { + $output['sslcert'] = $this->sslcert; + } + if (isset($this->_usedProperties['sslkey'])) { + $output['sslkey'] = $this->sslkey; + } + if (isset($this->_usedProperties['sslcrl'])) { + $output['sslcrl'] = $this->sslcrl; + } + if (isset($this->_usedProperties['pooled'])) { + $output['pooled'] = $this->pooled; + } + if (isset($this->_usedProperties['multipleActiveResultSets'])) { + $output['MultipleActiveResultSets'] = $this->multipleActiveResultSets; + } + if (isset($this->_usedProperties['useSavepoints'])) { + $output['use_savepoints'] = $this->useSavepoints; + } + if (isset($this->_usedProperties['instancename'])) { + $output['instancename'] = $this->instancename; + } + if (isset($this->_usedProperties['connectstring'])) { + $output['connectstring'] = $this->connectstring; + } + if (isset($this->_usedProperties['driver'])) { + $output['driver'] = $this->driver; + } + if (isset($this->_usedProperties['platformService'])) { + $output['platform_service'] = $this->platformService; + } + if (isset($this->_usedProperties['autoCommit'])) { + $output['auto_commit'] = $this->autoCommit; + } + if (isset($this->_usedProperties['schemaFilter'])) { + $output['schema_filter'] = $this->schemaFilter; + } + if (isset($this->_usedProperties['logging'])) { + $output['logging'] = $this->logging; + } + if (isset($this->_usedProperties['profiling'])) { + $output['profiling'] = $this->profiling; + } + if (isset($this->_usedProperties['profilingCollectBacktrace'])) { + $output['profiling_collect_backtrace'] = $this->profilingCollectBacktrace; + } + if (isset($this->_usedProperties['profilingCollectSchemaErrors'])) { + $output['profiling_collect_schema_errors'] = $this->profilingCollectSchemaErrors; + } + if (isset($this->_usedProperties['disableTypeComments'])) { + $output['disable_type_comments'] = $this->disableTypeComments; + } + if (isset($this->_usedProperties['serverVersion'])) { + $output['server_version'] = $this->serverVersion; + } + if (isset($this->_usedProperties['idleConnectionTtl'])) { + $output['idle_connection_ttl'] = $this->idleConnectionTtl; + } + if (isset($this->_usedProperties['driverClass'])) { + $output['driver_class'] = $this->driverClass; + } + if (isset($this->_usedProperties['wrapperClass'])) { + $output['wrapper_class'] = $this->wrapperClass; + } + if (isset($this->_usedProperties['keepSlave'])) { + $output['keep_slave'] = $this->keepSlave; + } + if (isset($this->_usedProperties['keepReplica'])) { + $output['keep_replica'] = $this->keepReplica; + } + if (isset($this->_usedProperties['options'])) { + $output['options'] = $this->options; + } + if (isset($this->_usedProperties['mappingTypes'])) { + $output['mapping_types'] = $this->mappingTypes; + } + if (isset($this->_usedProperties['defaultTableOptions'])) { + $output['default_table_options'] = $this->defaultTableOptions; + } + if (isset($this->_usedProperties['schemaManagerFactory'])) { + $output['schema_manager_factory'] = $this->schemaManagerFactory; + } + if (isset($this->_usedProperties['resultCache'])) { + $output['result_cache'] = $this->resultCache; + } + if (isset($this->_usedProperties['slaves'])) { + $output['slaves'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Doctrine\Dbal\ConnectionConfig\SlaveConfig ? $v->toArray() : $v, $this->slaves); + } + if (isset($this->_usedProperties['replicas'])) { + $output['replicas'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Doctrine\Dbal\ConnectionConfig\ReplicaConfig ? $v->toArray() : $v, $this->replicas); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/ConnectionConfig/ReplicaConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/ConnectionConfig/ReplicaConfig.php new file mode 100644 index 0000000..a13316c --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/ConnectionConfig/ReplicaConfig.php @@ -0,0 +1,744 @@ +_usedProperties['url'] = true; + $this->url = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function dbname($value): static + { + $this->_usedProperties['dbname'] = true; + $this->dbname = $value; + + return $this; + } + + /** + * Defaults to "localhost" at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function host($value): static + { + $this->_usedProperties['host'] = true; + $this->host = $value; + + return $this; + } + + /** + * Defaults to null at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function port($value): static + { + $this->_usedProperties['port'] = true; + $this->port = $value; + + return $this; + } + + /** + * Defaults to "root" at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function user($value): static + { + $this->_usedProperties['user'] = true; + $this->user = $value; + + return $this; + } + + /** + * Defaults to null at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function password($value): static + { + $this->_usedProperties['password'] = true; + $this->password = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @deprecated Since doctrine/doctrine-bundle 2.4: The "doctrine.dbal.override_url" configuration key is deprecated. + * @return $this + */ + public function overrideUrl($value): static + { + $this->_usedProperties['overrideUrl'] = true; + $this->overrideUrl = $value; + + return $this; + } + + /** + * Adds the given suffix to the configured database name, this option has no effects for the SQLite platform + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function dbnameSuffix($value): static + { + $this->_usedProperties['dbnameSuffix'] = true; + $this->dbnameSuffix = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function applicationName($value): static + { + $this->_usedProperties['applicationName'] = true; + $this->applicationName = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function charset($value): static + { + $this->_usedProperties['charset'] = true; + $this->charset = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function path($value): static + { + $this->_usedProperties['path'] = true; + $this->path = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function memory($value): static + { + $this->_usedProperties['memory'] = true; + $this->memory = $value; + + return $this; + } + + /** + * The unix socket to use for MySQL + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function unixSocket($value): static + { + $this->_usedProperties['unixSocket'] = true; + $this->unixSocket = $value; + + return $this; + } + + /** + * True to use as persistent connection for the ibm_db2 driver + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function persistent($value): static + { + $this->_usedProperties['persistent'] = true; + $this->persistent = $value; + + return $this; + } + + /** + * The protocol to use for the ibm_db2 driver (default to TCPIP if omitted) + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function protocol($value): static + { + $this->_usedProperties['protocol'] = true; + $this->protocol = $value; + + return $this; + } + + /** + * True to use SERVICE_NAME as connection parameter instead of SID for Oracle + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function service($value): static + { + $this->_usedProperties['service'] = true; + $this->service = $value; + + return $this; + } + + /** + * Overrules dbname parameter if given and used as SERVICE_NAME or SID connection parameter for Oracle depending on the service parameter. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function servicename($value): static + { + $this->_usedProperties['servicename'] = true; + $this->servicename = $value; + + return $this; + } + + /** + * The session mode to use for the oci8 driver + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sessionMode($value): static + { + $this->_usedProperties['sessionMode'] = true; + $this->sessionMode = $value; + + return $this; + } + + /** + * The name of a running database server to connect to for SQL Anywhere. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function server($value): static + { + $this->_usedProperties['server'] = true; + $this->server = $value; + + return $this; + } + + /** + * Override the default database (postgres) to connect to for PostgreSQL connexion. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultDbname($value): static + { + $this->_usedProperties['defaultDbname'] = true; + $this->defaultDbname = $value; + + return $this; + } + + /** + * Determines whether or with what priority a SSL TCP/IP connection will be negotiated with the server for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslmode($value): static + { + $this->_usedProperties['sslmode'] = true; + $this->sslmode = $value; + + return $this; + } + + /** + * The name of a file containing SSL certificate authority (CA) certificate(s). If the file exists, the server's certificate will be verified to be signed by one of these authorities. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslrootcert($value): static + { + $this->_usedProperties['sslrootcert'] = true; + $this->sslrootcert = $value; + + return $this; + } + + /** + * The path to the SSL client certificate file for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslcert($value): static + { + $this->_usedProperties['sslcert'] = true; + $this->sslcert = $value; + + return $this; + } + + /** + * The path to the SSL client key file for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslkey($value): static + { + $this->_usedProperties['sslkey'] = true; + $this->sslkey = $value; + + return $this; + } + + /** + * The file name of the SSL certificate revocation list for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslcrl($value): static + { + $this->_usedProperties['sslcrl'] = true; + $this->sslcrl = $value; + + return $this; + } + + /** + * True to use a pooled server with the oci8/pdo_oracle driver + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function pooled($value): static + { + $this->_usedProperties['pooled'] = true; + $this->pooled = $value; + + return $this; + } + + /** + * Configuring MultipleActiveResultSets for the pdo_sqlsrv driver + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function multipleActiveResultSets($value): static + { + $this->_usedProperties['multipleActiveResultSets'] = true; + $this->multipleActiveResultSets = $value; + + return $this; + } + + /** + * Use savepoints for nested transactions + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function useSavepoints($value): static + { + $this->_usedProperties['useSavepoints'] = true; + $this->useSavepoints = $value; + + return $this; + } + + /** + * Optional parameter, complete whether to add the INSTANCE_NAME parameter in the connection. It is generally used to connect to an Oracle RAC server to select the name of a particular instance. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function instancename($value): static + { + $this->_usedProperties['instancename'] = true; + $this->instancename = $value; + + return $this; + } + + /** + * Complete Easy Connect connection descriptor, see https://docs.oracle.com/database/121/NETAG/naming.htm.When using this option, you will still need to provide the user and password parameters, but the other parameters will no longer be used. Note that when using this parameter, the getHost and getPort methods from Doctrine\DBAL\Connection will no longer function as expected. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function connectstring($value): static + { + $this->_usedProperties['connectstring'] = true; + $this->connectstring = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('url', $config)) { + $this->_usedProperties['url'] = true; + $this->url = $config['url']; + unset($config['url']); + } + + if (array_key_exists('dbname', $config)) { + $this->_usedProperties['dbname'] = true; + $this->dbname = $config['dbname']; + unset($config['dbname']); + } + + if (array_key_exists('host', $config)) { + $this->_usedProperties['host'] = true; + $this->host = $config['host']; + unset($config['host']); + } + + if (array_key_exists('port', $config)) { + $this->_usedProperties['port'] = true; + $this->port = $config['port']; + unset($config['port']); + } + + if (array_key_exists('user', $config)) { + $this->_usedProperties['user'] = true; + $this->user = $config['user']; + unset($config['user']); + } + + if (array_key_exists('password', $config)) { + $this->_usedProperties['password'] = true; + $this->password = $config['password']; + unset($config['password']); + } + + if (array_key_exists('override_url', $config)) { + $this->_usedProperties['overrideUrl'] = true; + $this->overrideUrl = $config['override_url']; + unset($config['override_url']); + } + + if (array_key_exists('dbname_suffix', $config)) { + $this->_usedProperties['dbnameSuffix'] = true; + $this->dbnameSuffix = $config['dbname_suffix']; + unset($config['dbname_suffix']); + } + + if (array_key_exists('application_name', $config)) { + $this->_usedProperties['applicationName'] = true; + $this->applicationName = $config['application_name']; + unset($config['application_name']); + } + + if (array_key_exists('charset', $config)) { + $this->_usedProperties['charset'] = true; + $this->charset = $config['charset']; + unset($config['charset']); + } + + if (array_key_exists('path', $config)) { + $this->_usedProperties['path'] = true; + $this->path = $config['path']; + unset($config['path']); + } + + if (array_key_exists('memory', $config)) { + $this->_usedProperties['memory'] = true; + $this->memory = $config['memory']; + unset($config['memory']); + } + + if (array_key_exists('unix_socket', $config)) { + $this->_usedProperties['unixSocket'] = true; + $this->unixSocket = $config['unix_socket']; + unset($config['unix_socket']); + } + + if (array_key_exists('persistent', $config)) { + $this->_usedProperties['persistent'] = true; + $this->persistent = $config['persistent']; + unset($config['persistent']); + } + + if (array_key_exists('protocol', $config)) { + $this->_usedProperties['protocol'] = true; + $this->protocol = $config['protocol']; + unset($config['protocol']); + } + + if (array_key_exists('service', $config)) { + $this->_usedProperties['service'] = true; + $this->service = $config['service']; + unset($config['service']); + } + + if (array_key_exists('servicename', $config)) { + $this->_usedProperties['servicename'] = true; + $this->servicename = $config['servicename']; + unset($config['servicename']); + } + + if (array_key_exists('sessionMode', $config)) { + $this->_usedProperties['sessionMode'] = true; + $this->sessionMode = $config['sessionMode']; + unset($config['sessionMode']); + } + + if (array_key_exists('server', $config)) { + $this->_usedProperties['server'] = true; + $this->server = $config['server']; + unset($config['server']); + } + + if (array_key_exists('default_dbname', $config)) { + $this->_usedProperties['defaultDbname'] = true; + $this->defaultDbname = $config['default_dbname']; + unset($config['default_dbname']); + } + + if (array_key_exists('sslmode', $config)) { + $this->_usedProperties['sslmode'] = true; + $this->sslmode = $config['sslmode']; + unset($config['sslmode']); + } + + if (array_key_exists('sslrootcert', $config)) { + $this->_usedProperties['sslrootcert'] = true; + $this->sslrootcert = $config['sslrootcert']; + unset($config['sslrootcert']); + } + + if (array_key_exists('sslcert', $config)) { + $this->_usedProperties['sslcert'] = true; + $this->sslcert = $config['sslcert']; + unset($config['sslcert']); + } + + if (array_key_exists('sslkey', $config)) { + $this->_usedProperties['sslkey'] = true; + $this->sslkey = $config['sslkey']; + unset($config['sslkey']); + } + + if (array_key_exists('sslcrl', $config)) { + $this->_usedProperties['sslcrl'] = true; + $this->sslcrl = $config['sslcrl']; + unset($config['sslcrl']); + } + + if (array_key_exists('pooled', $config)) { + $this->_usedProperties['pooled'] = true; + $this->pooled = $config['pooled']; + unset($config['pooled']); + } + + if (array_key_exists('MultipleActiveResultSets', $config)) { + $this->_usedProperties['multipleActiveResultSets'] = true; + $this->multipleActiveResultSets = $config['MultipleActiveResultSets']; + unset($config['MultipleActiveResultSets']); + } + + if (array_key_exists('use_savepoints', $config)) { + $this->_usedProperties['useSavepoints'] = true; + $this->useSavepoints = $config['use_savepoints']; + unset($config['use_savepoints']); + } + + if (array_key_exists('instancename', $config)) { + $this->_usedProperties['instancename'] = true; + $this->instancename = $config['instancename']; + unset($config['instancename']); + } + + if (array_key_exists('connectstring', $config)) { + $this->_usedProperties['connectstring'] = true; + $this->connectstring = $config['connectstring']; + unset($config['connectstring']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['url'])) { + $output['url'] = $this->url; + } + if (isset($this->_usedProperties['dbname'])) { + $output['dbname'] = $this->dbname; + } + if (isset($this->_usedProperties['host'])) { + $output['host'] = $this->host; + } + if (isset($this->_usedProperties['port'])) { + $output['port'] = $this->port; + } + if (isset($this->_usedProperties['user'])) { + $output['user'] = $this->user; + } + if (isset($this->_usedProperties['password'])) { + $output['password'] = $this->password; + } + if (isset($this->_usedProperties['overrideUrl'])) { + $output['override_url'] = $this->overrideUrl; + } + if (isset($this->_usedProperties['dbnameSuffix'])) { + $output['dbname_suffix'] = $this->dbnameSuffix; + } + if (isset($this->_usedProperties['applicationName'])) { + $output['application_name'] = $this->applicationName; + } + if (isset($this->_usedProperties['charset'])) { + $output['charset'] = $this->charset; + } + if (isset($this->_usedProperties['path'])) { + $output['path'] = $this->path; + } + if (isset($this->_usedProperties['memory'])) { + $output['memory'] = $this->memory; + } + if (isset($this->_usedProperties['unixSocket'])) { + $output['unix_socket'] = $this->unixSocket; + } + if (isset($this->_usedProperties['persistent'])) { + $output['persistent'] = $this->persistent; + } + if (isset($this->_usedProperties['protocol'])) { + $output['protocol'] = $this->protocol; + } + if (isset($this->_usedProperties['service'])) { + $output['service'] = $this->service; + } + if (isset($this->_usedProperties['servicename'])) { + $output['servicename'] = $this->servicename; + } + if (isset($this->_usedProperties['sessionMode'])) { + $output['sessionMode'] = $this->sessionMode; + } + if (isset($this->_usedProperties['server'])) { + $output['server'] = $this->server; + } + if (isset($this->_usedProperties['defaultDbname'])) { + $output['default_dbname'] = $this->defaultDbname; + } + if (isset($this->_usedProperties['sslmode'])) { + $output['sslmode'] = $this->sslmode; + } + if (isset($this->_usedProperties['sslrootcert'])) { + $output['sslrootcert'] = $this->sslrootcert; + } + if (isset($this->_usedProperties['sslcert'])) { + $output['sslcert'] = $this->sslcert; + } + if (isset($this->_usedProperties['sslkey'])) { + $output['sslkey'] = $this->sslkey; + } + if (isset($this->_usedProperties['sslcrl'])) { + $output['sslcrl'] = $this->sslcrl; + } + if (isset($this->_usedProperties['pooled'])) { + $output['pooled'] = $this->pooled; + } + if (isset($this->_usedProperties['multipleActiveResultSets'])) { + $output['MultipleActiveResultSets'] = $this->multipleActiveResultSets; + } + if (isset($this->_usedProperties['useSavepoints'])) { + $output['use_savepoints'] = $this->useSavepoints; + } + if (isset($this->_usedProperties['instancename'])) { + $output['instancename'] = $this->instancename; + } + if (isset($this->_usedProperties['connectstring'])) { + $output['connectstring'] = $this->connectstring; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/ConnectionConfig/SlaveConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/ConnectionConfig/SlaveConfig.php new file mode 100644 index 0000000..9e21698 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/ConnectionConfig/SlaveConfig.php @@ -0,0 +1,744 @@ +_usedProperties['url'] = true; + $this->url = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function dbname($value): static + { + $this->_usedProperties['dbname'] = true; + $this->dbname = $value; + + return $this; + } + + /** + * Defaults to "localhost" at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function host($value): static + { + $this->_usedProperties['host'] = true; + $this->host = $value; + + return $this; + } + + /** + * Defaults to null at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function port($value): static + { + $this->_usedProperties['port'] = true; + $this->port = $value; + + return $this; + } + + /** + * Defaults to "root" at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function user($value): static + { + $this->_usedProperties['user'] = true; + $this->user = $value; + + return $this; + } + + /** + * Defaults to null at runtime. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function password($value): static + { + $this->_usedProperties['password'] = true; + $this->password = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @deprecated Since doctrine/doctrine-bundle 2.4: The "doctrine.dbal.override_url" configuration key is deprecated. + * @return $this + */ + public function overrideUrl($value): static + { + $this->_usedProperties['overrideUrl'] = true; + $this->overrideUrl = $value; + + return $this; + } + + /** + * Adds the given suffix to the configured database name, this option has no effects for the SQLite platform + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function dbnameSuffix($value): static + { + $this->_usedProperties['dbnameSuffix'] = true; + $this->dbnameSuffix = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function applicationName($value): static + { + $this->_usedProperties['applicationName'] = true; + $this->applicationName = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function charset($value): static + { + $this->_usedProperties['charset'] = true; + $this->charset = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function path($value): static + { + $this->_usedProperties['path'] = true; + $this->path = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function memory($value): static + { + $this->_usedProperties['memory'] = true; + $this->memory = $value; + + return $this; + } + + /** + * The unix socket to use for MySQL + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function unixSocket($value): static + { + $this->_usedProperties['unixSocket'] = true; + $this->unixSocket = $value; + + return $this; + } + + /** + * True to use as persistent connection for the ibm_db2 driver + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function persistent($value): static + { + $this->_usedProperties['persistent'] = true; + $this->persistent = $value; + + return $this; + } + + /** + * The protocol to use for the ibm_db2 driver (default to TCPIP if omitted) + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function protocol($value): static + { + $this->_usedProperties['protocol'] = true; + $this->protocol = $value; + + return $this; + } + + /** + * True to use SERVICE_NAME as connection parameter instead of SID for Oracle + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function service($value): static + { + $this->_usedProperties['service'] = true; + $this->service = $value; + + return $this; + } + + /** + * Overrules dbname parameter if given and used as SERVICE_NAME or SID connection parameter for Oracle depending on the service parameter. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function servicename($value): static + { + $this->_usedProperties['servicename'] = true; + $this->servicename = $value; + + return $this; + } + + /** + * The session mode to use for the oci8 driver + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sessionMode($value): static + { + $this->_usedProperties['sessionMode'] = true; + $this->sessionMode = $value; + + return $this; + } + + /** + * The name of a running database server to connect to for SQL Anywhere. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function server($value): static + { + $this->_usedProperties['server'] = true; + $this->server = $value; + + return $this; + } + + /** + * Override the default database (postgres) to connect to for PostgreSQL connexion. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultDbname($value): static + { + $this->_usedProperties['defaultDbname'] = true; + $this->defaultDbname = $value; + + return $this; + } + + /** + * Determines whether or with what priority a SSL TCP/IP connection will be negotiated with the server for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslmode($value): static + { + $this->_usedProperties['sslmode'] = true; + $this->sslmode = $value; + + return $this; + } + + /** + * The name of a file containing SSL certificate authority (CA) certificate(s). If the file exists, the server's certificate will be verified to be signed by one of these authorities. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslrootcert($value): static + { + $this->_usedProperties['sslrootcert'] = true; + $this->sslrootcert = $value; + + return $this; + } + + /** + * The path to the SSL client certificate file for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslcert($value): static + { + $this->_usedProperties['sslcert'] = true; + $this->sslcert = $value; + + return $this; + } + + /** + * The path to the SSL client key file for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslkey($value): static + { + $this->_usedProperties['sslkey'] = true; + $this->sslkey = $value; + + return $this; + } + + /** + * The file name of the SSL certificate revocation list for PostgreSQL. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function sslcrl($value): static + { + $this->_usedProperties['sslcrl'] = true; + $this->sslcrl = $value; + + return $this; + } + + /** + * True to use a pooled server with the oci8/pdo_oracle driver + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function pooled($value): static + { + $this->_usedProperties['pooled'] = true; + $this->pooled = $value; + + return $this; + } + + /** + * Configuring MultipleActiveResultSets for the pdo_sqlsrv driver + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function multipleActiveResultSets($value): static + { + $this->_usedProperties['multipleActiveResultSets'] = true; + $this->multipleActiveResultSets = $value; + + return $this; + } + + /** + * Use savepoints for nested transactions + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function useSavepoints($value): static + { + $this->_usedProperties['useSavepoints'] = true; + $this->useSavepoints = $value; + + return $this; + } + + /** + * Optional parameter, complete whether to add the INSTANCE_NAME parameter in the connection. It is generally used to connect to an Oracle RAC server to select the name of a particular instance. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function instancename($value): static + { + $this->_usedProperties['instancename'] = true; + $this->instancename = $value; + + return $this; + } + + /** + * Complete Easy Connect connection descriptor, see https://docs.oracle.com/database/121/NETAG/naming.htm.When using this option, you will still need to provide the user and password parameters, but the other parameters will no longer be used. Note that when using this parameter, the getHost and getPort methods from Doctrine\DBAL\Connection will no longer function as expected. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function connectstring($value): static + { + $this->_usedProperties['connectstring'] = true; + $this->connectstring = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('url', $config)) { + $this->_usedProperties['url'] = true; + $this->url = $config['url']; + unset($config['url']); + } + + if (array_key_exists('dbname', $config)) { + $this->_usedProperties['dbname'] = true; + $this->dbname = $config['dbname']; + unset($config['dbname']); + } + + if (array_key_exists('host', $config)) { + $this->_usedProperties['host'] = true; + $this->host = $config['host']; + unset($config['host']); + } + + if (array_key_exists('port', $config)) { + $this->_usedProperties['port'] = true; + $this->port = $config['port']; + unset($config['port']); + } + + if (array_key_exists('user', $config)) { + $this->_usedProperties['user'] = true; + $this->user = $config['user']; + unset($config['user']); + } + + if (array_key_exists('password', $config)) { + $this->_usedProperties['password'] = true; + $this->password = $config['password']; + unset($config['password']); + } + + if (array_key_exists('override_url', $config)) { + $this->_usedProperties['overrideUrl'] = true; + $this->overrideUrl = $config['override_url']; + unset($config['override_url']); + } + + if (array_key_exists('dbname_suffix', $config)) { + $this->_usedProperties['dbnameSuffix'] = true; + $this->dbnameSuffix = $config['dbname_suffix']; + unset($config['dbname_suffix']); + } + + if (array_key_exists('application_name', $config)) { + $this->_usedProperties['applicationName'] = true; + $this->applicationName = $config['application_name']; + unset($config['application_name']); + } + + if (array_key_exists('charset', $config)) { + $this->_usedProperties['charset'] = true; + $this->charset = $config['charset']; + unset($config['charset']); + } + + if (array_key_exists('path', $config)) { + $this->_usedProperties['path'] = true; + $this->path = $config['path']; + unset($config['path']); + } + + if (array_key_exists('memory', $config)) { + $this->_usedProperties['memory'] = true; + $this->memory = $config['memory']; + unset($config['memory']); + } + + if (array_key_exists('unix_socket', $config)) { + $this->_usedProperties['unixSocket'] = true; + $this->unixSocket = $config['unix_socket']; + unset($config['unix_socket']); + } + + if (array_key_exists('persistent', $config)) { + $this->_usedProperties['persistent'] = true; + $this->persistent = $config['persistent']; + unset($config['persistent']); + } + + if (array_key_exists('protocol', $config)) { + $this->_usedProperties['protocol'] = true; + $this->protocol = $config['protocol']; + unset($config['protocol']); + } + + if (array_key_exists('service', $config)) { + $this->_usedProperties['service'] = true; + $this->service = $config['service']; + unset($config['service']); + } + + if (array_key_exists('servicename', $config)) { + $this->_usedProperties['servicename'] = true; + $this->servicename = $config['servicename']; + unset($config['servicename']); + } + + if (array_key_exists('sessionMode', $config)) { + $this->_usedProperties['sessionMode'] = true; + $this->sessionMode = $config['sessionMode']; + unset($config['sessionMode']); + } + + if (array_key_exists('server', $config)) { + $this->_usedProperties['server'] = true; + $this->server = $config['server']; + unset($config['server']); + } + + if (array_key_exists('default_dbname', $config)) { + $this->_usedProperties['defaultDbname'] = true; + $this->defaultDbname = $config['default_dbname']; + unset($config['default_dbname']); + } + + if (array_key_exists('sslmode', $config)) { + $this->_usedProperties['sslmode'] = true; + $this->sslmode = $config['sslmode']; + unset($config['sslmode']); + } + + if (array_key_exists('sslrootcert', $config)) { + $this->_usedProperties['sslrootcert'] = true; + $this->sslrootcert = $config['sslrootcert']; + unset($config['sslrootcert']); + } + + if (array_key_exists('sslcert', $config)) { + $this->_usedProperties['sslcert'] = true; + $this->sslcert = $config['sslcert']; + unset($config['sslcert']); + } + + if (array_key_exists('sslkey', $config)) { + $this->_usedProperties['sslkey'] = true; + $this->sslkey = $config['sslkey']; + unset($config['sslkey']); + } + + if (array_key_exists('sslcrl', $config)) { + $this->_usedProperties['sslcrl'] = true; + $this->sslcrl = $config['sslcrl']; + unset($config['sslcrl']); + } + + if (array_key_exists('pooled', $config)) { + $this->_usedProperties['pooled'] = true; + $this->pooled = $config['pooled']; + unset($config['pooled']); + } + + if (array_key_exists('MultipleActiveResultSets', $config)) { + $this->_usedProperties['multipleActiveResultSets'] = true; + $this->multipleActiveResultSets = $config['MultipleActiveResultSets']; + unset($config['MultipleActiveResultSets']); + } + + if (array_key_exists('use_savepoints', $config)) { + $this->_usedProperties['useSavepoints'] = true; + $this->useSavepoints = $config['use_savepoints']; + unset($config['use_savepoints']); + } + + if (array_key_exists('instancename', $config)) { + $this->_usedProperties['instancename'] = true; + $this->instancename = $config['instancename']; + unset($config['instancename']); + } + + if (array_key_exists('connectstring', $config)) { + $this->_usedProperties['connectstring'] = true; + $this->connectstring = $config['connectstring']; + unset($config['connectstring']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['url'])) { + $output['url'] = $this->url; + } + if (isset($this->_usedProperties['dbname'])) { + $output['dbname'] = $this->dbname; + } + if (isset($this->_usedProperties['host'])) { + $output['host'] = $this->host; + } + if (isset($this->_usedProperties['port'])) { + $output['port'] = $this->port; + } + if (isset($this->_usedProperties['user'])) { + $output['user'] = $this->user; + } + if (isset($this->_usedProperties['password'])) { + $output['password'] = $this->password; + } + if (isset($this->_usedProperties['overrideUrl'])) { + $output['override_url'] = $this->overrideUrl; + } + if (isset($this->_usedProperties['dbnameSuffix'])) { + $output['dbname_suffix'] = $this->dbnameSuffix; + } + if (isset($this->_usedProperties['applicationName'])) { + $output['application_name'] = $this->applicationName; + } + if (isset($this->_usedProperties['charset'])) { + $output['charset'] = $this->charset; + } + if (isset($this->_usedProperties['path'])) { + $output['path'] = $this->path; + } + if (isset($this->_usedProperties['memory'])) { + $output['memory'] = $this->memory; + } + if (isset($this->_usedProperties['unixSocket'])) { + $output['unix_socket'] = $this->unixSocket; + } + if (isset($this->_usedProperties['persistent'])) { + $output['persistent'] = $this->persistent; + } + if (isset($this->_usedProperties['protocol'])) { + $output['protocol'] = $this->protocol; + } + if (isset($this->_usedProperties['service'])) { + $output['service'] = $this->service; + } + if (isset($this->_usedProperties['servicename'])) { + $output['servicename'] = $this->servicename; + } + if (isset($this->_usedProperties['sessionMode'])) { + $output['sessionMode'] = $this->sessionMode; + } + if (isset($this->_usedProperties['server'])) { + $output['server'] = $this->server; + } + if (isset($this->_usedProperties['defaultDbname'])) { + $output['default_dbname'] = $this->defaultDbname; + } + if (isset($this->_usedProperties['sslmode'])) { + $output['sslmode'] = $this->sslmode; + } + if (isset($this->_usedProperties['sslrootcert'])) { + $output['sslrootcert'] = $this->sslrootcert; + } + if (isset($this->_usedProperties['sslcert'])) { + $output['sslcert'] = $this->sslcert; + } + if (isset($this->_usedProperties['sslkey'])) { + $output['sslkey'] = $this->sslkey; + } + if (isset($this->_usedProperties['sslcrl'])) { + $output['sslcrl'] = $this->sslcrl; + } + if (isset($this->_usedProperties['pooled'])) { + $output['pooled'] = $this->pooled; + } + if (isset($this->_usedProperties['multipleActiveResultSets'])) { + $output['MultipleActiveResultSets'] = $this->multipleActiveResultSets; + } + if (isset($this->_usedProperties['useSavepoints'])) { + $output['use_savepoints'] = $this->useSavepoints; + } + if (isset($this->_usedProperties['instancename'])) { + $output['instancename'] = $this->instancename; + } + if (isset($this->_usedProperties['connectstring'])) { + $output['connectstring'] = $this->connectstring; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/TypeConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/TypeConfig.php new file mode 100644 index 0000000..643c02a --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Dbal/TypeConfig.php @@ -0,0 +1,76 @@ +_usedProperties['class'] = true; + $this->class = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @deprecated Since doctrine/doctrine-bundle 2.0: The doctrine-bundle type commenting features were removed; the corresponding config parameter was deprecated in 2.0 and will be dropped in 3.0. + * @return $this + */ + public function commented($value): static + { + $this->_usedProperties['commented'] = true; + $this->commented = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('class', $config)) { + $this->_usedProperties['class'] = true; + $this->class = $config['class']; + unset($config['class']); + } + + if (array_key_exists('commented', $config)) { + $this->_usedProperties['commented'] = true; + $this->commented = $config['commented']; + unset($config['commented']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['class'])) { + $output['class'] = $this->class; + } + if (isset($this->_usedProperties['commented'])) { + $output['commented'] = $this->commented; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/DbalConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/DbalConfig.php new file mode 100644 index 0000000..0fe2a6d --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/DbalConfig.php @@ -0,0 +1,146 @@ +_usedProperties['defaultConnection'] = true; + $this->defaultConnection = $value; + + return $this; + } + + /** + * @template TValue of string|array + * @param TValue $value + * @return \Symfony\Config\Doctrine\Dbal\TypeConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Dbal\TypeConfig : static) + */ + public function type(string $name, string|array $value = []): \Symfony\Config\Doctrine\Dbal\TypeConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['types'] = true; + $this->types[$name] = $value; + + return $this; + } + + if (!isset($this->types[$name]) || !$this->types[$name] instanceof \Symfony\Config\Doctrine\Dbal\TypeConfig) { + $this->_usedProperties['types'] = true; + $this->types[$name] = new \Symfony\Config\Doctrine\Dbal\TypeConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "type()" has already been initialized. You cannot pass values the second time you call type().'); + } + + return $this->types[$name]; + } + + /** + * @return $this + */ + public function driverScheme(string $scheme, mixed $value): static + { + $this->_usedProperties['driverSchemes'] = true; + $this->driverSchemes[$scheme] = $value; + + return $this; + } + + /** + * @template TValue of mixed + * @param TValue $value + * @return \Symfony\Config\Doctrine\Dbal\ConnectionConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Dbal\ConnectionConfig : static) + */ + public function connection(string $name, mixed $value = []): \Symfony\Config\Doctrine\Dbal\ConnectionConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['connections'] = true; + $this->connections[$name] = $value; + + return $this; + } + + if (!isset($this->connections[$name]) || !$this->connections[$name] instanceof \Symfony\Config\Doctrine\Dbal\ConnectionConfig) { + $this->_usedProperties['connections'] = true; + $this->connections[$name] = new \Symfony\Config\Doctrine\Dbal\ConnectionConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "connection()" has already been initialized. You cannot pass values the second time you call connection().'); + } + + return $this->connections[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('default_connection', $config)) { + $this->_usedProperties['defaultConnection'] = true; + $this->defaultConnection = $config['default_connection']; + unset($config['default_connection']); + } + + if (array_key_exists('types', $config)) { + $this->_usedProperties['types'] = true; + $this->types = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Doctrine\Dbal\TypeConfig($v) : $v, $config['types']); + unset($config['types']); + } + + if (array_key_exists('driver_schemes', $config)) { + $this->_usedProperties['driverSchemes'] = true; + $this->driverSchemes = $config['driver_schemes']; + unset($config['driver_schemes']); + } + + if (array_key_exists('connections', $config)) { + $this->_usedProperties['connections'] = true; + $this->connections = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Doctrine\Dbal\ConnectionConfig($v) : $v, $config['connections']); + unset($config['connections']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['defaultConnection'])) { + $output['default_connection'] = $this->defaultConnection; + } + if (isset($this->_usedProperties['types'])) { + $output['types'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Doctrine\Dbal\TypeConfig ? $v->toArray() : $v, $this->types); + } + if (isset($this->_usedProperties['driverSchemes'])) { + $output['driver_schemes'] = $this->driverSchemes; + } + if (isset($this->_usedProperties['connections'])) { + $output['connections'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Doctrine\Dbal\ConnectionConfig ? $v->toArray() : $v, $this->connections); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/ControllerResolverConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/ControllerResolverConfig.php new file mode 100644 index 0000000..e1ac932 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/ControllerResolverConfig.php @@ -0,0 +1,100 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * Set to false to disable using route placeholders as lookup criteria when the primary key doesn't match the argument name + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function autoMapping($value): static + { + $this->_usedProperties['autoMapping'] = true; + $this->autoMapping = $value; + + return $this; + } + + /** + * Set to true to fetch the entity from the database instead of using the cache, if any + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function evictCache($value): static + { + $this->_usedProperties['evictCache'] = true; + $this->evictCache = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('auto_mapping', $config)) { + $this->_usedProperties['autoMapping'] = true; + $this->autoMapping = $config['auto_mapping']; + unset($config['auto_mapping']); + } + + if (array_key_exists('evict_cache', $config)) { + $this->_usedProperties['evictCache'] = true; + $this->evictCache = $config['evict_cache']; + unset($config['evict_cache']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['autoMapping'])) { + $output['auto_mapping'] = $this->autoMapping; + } + if (isset($this->_usedProperties['evictCache'])) { + $output['evict_cache'] = $this->evictCache; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig.php new file mode 100644 index 0000000..ebe59f8 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig.php @@ -0,0 +1,638 @@ +_usedProperties['queryCacheDriver'] = true; + $this->queryCacheDriver = $value; + + return $this; + } + + if (!$this->queryCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\QueryCacheDriverConfig) { + $this->_usedProperties['queryCacheDriver'] = true; + $this->queryCacheDriver = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\QueryCacheDriverConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "queryCacheDriver()" has already been initialized. You cannot pass values the second time you call queryCacheDriver().'); + } + + return $this->queryCacheDriver; + } + + /** + * @template TValue of string|array + * @param TValue $value + * @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig : static) + */ + public function metadataCacheDriver(string|array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['metadataCacheDriver'] = true; + $this->metadataCacheDriver = $value; + + return $this; + } + + if (!$this->metadataCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig) { + $this->_usedProperties['metadataCacheDriver'] = true; + $this->metadataCacheDriver = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "metadataCacheDriver()" has already been initialized. You cannot pass values the second time you call metadataCacheDriver().'); + } + + return $this->metadataCacheDriver; + } + + /** + * @template TValue of string|array + * @param TValue $value + * @default {"type":null} + * @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig : static) + */ + public function resultCacheDriver(string|array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['resultCacheDriver'] = true; + $this->resultCacheDriver = $value; + + return $this; + } + + if (!$this->resultCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig) { + $this->_usedProperties['resultCacheDriver'] = true; + $this->resultCacheDriver = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "resultCacheDriver()" has already been initialized. You cannot pass values the second time you call resultCacheDriver().'); + } + + return $this->resultCacheDriver; + } + + /** + * @template TValue of mixed + * @param TValue $value + * @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig : static) + */ + public function entityListeners(mixed $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['entityListeners'] = true; + $this->entityListeners = $value; + + return $this; + } + + if (!$this->entityListeners instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig) { + $this->_usedProperties['entityListeners'] = true; + $this->entityListeners = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "entityListeners()" has already been initialized. You cannot pass values the second time you call entityListeners().'); + } + + return $this->entityListeners; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function connection($value): static + { + $this->_usedProperties['connection'] = true; + $this->connection = $value; + + return $this; + } + + /** + * @default 'Doctrine\\ORM\\Mapping\\ClassMetadataFactory' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function classMetadataFactoryName($value): static + { + $this->_usedProperties['classMetadataFactoryName'] = true; + $this->classMetadataFactoryName = $value; + + return $this; + } + + /** + * @default 'Doctrine\\ORM\\EntityRepository' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultRepositoryClass($value): static + { + $this->_usedProperties['defaultRepositoryClass'] = true; + $this->defaultRepositoryClass = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function autoMapping($value): static + { + $this->_usedProperties['autoMapping'] = true; + $this->autoMapping = $value; + + return $this; + } + + /** + * @default 'doctrine.orm.naming_strategy.default' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function namingStrategy($value): static + { + $this->_usedProperties['namingStrategy'] = true; + $this->namingStrategy = $value; + + return $this; + } + + /** + * @default 'doctrine.orm.quote_strategy.default' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function quoteStrategy($value): static + { + $this->_usedProperties['quoteStrategy'] = true; + $this->quoteStrategy = $value; + + return $this; + } + + /** + * @default 'doctrine.orm.typed_field_mapper.default' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function typedFieldMapper($value): static + { + $this->_usedProperties['typedFieldMapper'] = true; + $this->typedFieldMapper = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function entityListenerResolver($value): static + { + $this->_usedProperties['entityListenerResolver'] = true; + $this->entityListenerResolver = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function fetchModeSubselectBatchSize($value): static + { + $this->_usedProperties['fetchModeSubselectBatchSize'] = true; + $this->fetchModeSubselectBatchSize = $value; + + return $this; + } + + /** + * @default 'doctrine.orm.container_repository_factory' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function repositoryFactory($value): static + { + $this->_usedProperties['repositoryFactory'] = true; + $this->repositoryFactory = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function schemaIgnoreClasses(ParamConfigurator|array $value): static + { + $this->_usedProperties['schemaIgnoreClasses'] = true; + $this->schemaIgnoreClasses = $value; + + return $this; + } + + /** + * Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.16 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/10455. + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function reportFieldsWhereDeclared($value): static + { + $this->_usedProperties['reportFieldsWhereDeclared'] = true; + $this->reportFieldsWhereDeclared = $value; + + return $this; + } + + /** + * Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.14. See https://github.com/doctrine/orm/pull/6728. + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function validateXmlMapping($value): static + { + $this->_usedProperties['validateXmlMapping'] = true; + $this->validateXmlMapping = $value; + + return $this; + } + + public function secondLevelCache(array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCacheConfig + { + if (null === $this->secondLevelCache) { + $this->_usedProperties['secondLevelCache'] = true; + $this->secondLevelCache = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCacheConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "secondLevelCache()" has already been initialized. You cannot pass values the second time you call secondLevelCache().'); + } + + return $this->secondLevelCache; + } + + /** + * @return $this + */ + public function hydrator(string $name, mixed $value): static + { + $this->_usedProperties['hydrators'] = true; + $this->hydrators[$name] = $value; + + return $this; + } + + /** + * @template TValue of string|array|bool + * @param TValue $value + * @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig : static) + */ + public function mapping(string $name, string|array|bool $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['mappings'] = true; + $this->mappings[$name] = $value; + + return $this; + } + + if (!isset($this->mappings[$name]) || !$this->mappings[$name] instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig) { + $this->_usedProperties['mappings'] = true; + $this->mappings[$name] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "mapping()" has already been initialized. You cannot pass values the second time you call mapping().'); + } + + return $this->mappings[$name]; + } + + public function dql(array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\DqlConfig + { + if (null === $this->dql) { + $this->_usedProperties['dql'] = true; + $this->dql = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\DqlConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "dql()" has already been initialized. You cannot pass values the second time you call dql().'); + } + + return $this->dql; + } + + /** + * @template TValue of mixed + * @param TValue $value + * Register SQL Filters in the entity manager + * @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig : static) + */ + public function filter(string $name, mixed $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['filters'] = true; + $this->filters[$name] = $value; + + return $this; + } + + if (!isset($this->filters[$name]) || !$this->filters[$name] instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig) { + $this->_usedProperties['filters'] = true; + $this->filters[$name] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "filter()" has already been initialized. You cannot pass values the second time you call filter().'); + } + + return $this->filters[$name]; + } + + /** + * @return $this + */ + public function identityGenerationPreference(string $platform, mixed $value): static + { + $this->_usedProperties['identityGenerationPreferences'] = true; + $this->identityGenerationPreferences[$platform] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('query_cache_driver', $config)) { + $this->_usedProperties['queryCacheDriver'] = true; + $this->queryCacheDriver = \is_array($config['query_cache_driver']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\QueryCacheDriverConfig($config['query_cache_driver']) : $config['query_cache_driver']; + unset($config['query_cache_driver']); + } + + if (array_key_exists('metadata_cache_driver', $config)) { + $this->_usedProperties['metadataCacheDriver'] = true; + $this->metadataCacheDriver = \is_array($config['metadata_cache_driver']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig($config['metadata_cache_driver']) : $config['metadata_cache_driver']; + unset($config['metadata_cache_driver']); + } + + if (array_key_exists('result_cache_driver', $config)) { + $this->_usedProperties['resultCacheDriver'] = true; + $this->resultCacheDriver = \is_array($config['result_cache_driver']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig($config['result_cache_driver']) : $config['result_cache_driver']; + unset($config['result_cache_driver']); + } + + if (array_key_exists('entity_listeners', $config)) { + $this->_usedProperties['entityListeners'] = true; + $this->entityListeners = \is_array($config['entity_listeners']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig($config['entity_listeners']) : $config['entity_listeners']; + unset($config['entity_listeners']); + } + + if (array_key_exists('connection', $config)) { + $this->_usedProperties['connection'] = true; + $this->connection = $config['connection']; + unset($config['connection']); + } + + if (array_key_exists('class_metadata_factory_name', $config)) { + $this->_usedProperties['classMetadataFactoryName'] = true; + $this->classMetadataFactoryName = $config['class_metadata_factory_name']; + unset($config['class_metadata_factory_name']); + } + + if (array_key_exists('default_repository_class', $config)) { + $this->_usedProperties['defaultRepositoryClass'] = true; + $this->defaultRepositoryClass = $config['default_repository_class']; + unset($config['default_repository_class']); + } + + if (array_key_exists('auto_mapping', $config)) { + $this->_usedProperties['autoMapping'] = true; + $this->autoMapping = $config['auto_mapping']; + unset($config['auto_mapping']); + } + + if (array_key_exists('naming_strategy', $config)) { + $this->_usedProperties['namingStrategy'] = true; + $this->namingStrategy = $config['naming_strategy']; + unset($config['naming_strategy']); + } + + if (array_key_exists('quote_strategy', $config)) { + $this->_usedProperties['quoteStrategy'] = true; + $this->quoteStrategy = $config['quote_strategy']; + unset($config['quote_strategy']); + } + + if (array_key_exists('typed_field_mapper', $config)) { + $this->_usedProperties['typedFieldMapper'] = true; + $this->typedFieldMapper = $config['typed_field_mapper']; + unset($config['typed_field_mapper']); + } + + if (array_key_exists('entity_listener_resolver', $config)) { + $this->_usedProperties['entityListenerResolver'] = true; + $this->entityListenerResolver = $config['entity_listener_resolver']; + unset($config['entity_listener_resolver']); + } + + if (array_key_exists('fetch_mode_subselect_batch_size', $config)) { + $this->_usedProperties['fetchModeSubselectBatchSize'] = true; + $this->fetchModeSubselectBatchSize = $config['fetch_mode_subselect_batch_size']; + unset($config['fetch_mode_subselect_batch_size']); + } + + if (array_key_exists('repository_factory', $config)) { + $this->_usedProperties['repositoryFactory'] = true; + $this->repositoryFactory = $config['repository_factory']; + unset($config['repository_factory']); + } + + if (array_key_exists('schema_ignore_classes', $config)) { + $this->_usedProperties['schemaIgnoreClasses'] = true; + $this->schemaIgnoreClasses = $config['schema_ignore_classes']; + unset($config['schema_ignore_classes']); + } + + if (array_key_exists('report_fields_where_declared', $config)) { + $this->_usedProperties['reportFieldsWhereDeclared'] = true; + $this->reportFieldsWhereDeclared = $config['report_fields_where_declared']; + unset($config['report_fields_where_declared']); + } + + if (array_key_exists('validate_xml_mapping', $config)) { + $this->_usedProperties['validateXmlMapping'] = true; + $this->validateXmlMapping = $config['validate_xml_mapping']; + unset($config['validate_xml_mapping']); + } + + if (array_key_exists('second_level_cache', $config)) { + $this->_usedProperties['secondLevelCache'] = true; + $this->secondLevelCache = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCacheConfig($config['second_level_cache']); + unset($config['second_level_cache']); + } + + if (array_key_exists('hydrators', $config)) { + $this->_usedProperties['hydrators'] = true; + $this->hydrators = $config['hydrators']; + unset($config['hydrators']); + } + + if (array_key_exists('mappings', $config)) { + $this->_usedProperties['mappings'] = true; + $this->mappings = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig($v) : $v, $config['mappings']); + unset($config['mappings']); + } + + if (array_key_exists('dql', $config)) { + $this->_usedProperties['dql'] = true; + $this->dql = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\DqlConfig($config['dql']); + unset($config['dql']); + } + + if (array_key_exists('filters', $config)) { + $this->_usedProperties['filters'] = true; + $this->filters = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig($v) : $v, $config['filters']); + unset($config['filters']); + } + + if (array_key_exists('identity_generation_preferences', $config)) { + $this->_usedProperties['identityGenerationPreferences'] = true; + $this->identityGenerationPreferences = $config['identity_generation_preferences']; + unset($config['identity_generation_preferences']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['queryCacheDriver'])) { + $output['query_cache_driver'] = $this->queryCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\QueryCacheDriverConfig ? $this->queryCacheDriver->toArray() : $this->queryCacheDriver; + } + if (isset($this->_usedProperties['metadataCacheDriver'])) { + $output['metadata_cache_driver'] = $this->metadataCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig ? $this->metadataCacheDriver->toArray() : $this->metadataCacheDriver; + } + if (isset($this->_usedProperties['resultCacheDriver'])) { + $output['result_cache_driver'] = $this->resultCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig ? $this->resultCacheDriver->toArray() : $this->resultCacheDriver; + } + if (isset($this->_usedProperties['entityListeners'])) { + $output['entity_listeners'] = $this->entityListeners instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig ? $this->entityListeners->toArray() : $this->entityListeners; + } + if (isset($this->_usedProperties['connection'])) { + $output['connection'] = $this->connection; + } + if (isset($this->_usedProperties['classMetadataFactoryName'])) { + $output['class_metadata_factory_name'] = $this->classMetadataFactoryName; + } + if (isset($this->_usedProperties['defaultRepositoryClass'])) { + $output['default_repository_class'] = $this->defaultRepositoryClass; + } + if (isset($this->_usedProperties['autoMapping'])) { + $output['auto_mapping'] = $this->autoMapping; + } + if (isset($this->_usedProperties['namingStrategy'])) { + $output['naming_strategy'] = $this->namingStrategy; + } + if (isset($this->_usedProperties['quoteStrategy'])) { + $output['quote_strategy'] = $this->quoteStrategy; + } + if (isset($this->_usedProperties['typedFieldMapper'])) { + $output['typed_field_mapper'] = $this->typedFieldMapper; + } + if (isset($this->_usedProperties['entityListenerResolver'])) { + $output['entity_listener_resolver'] = $this->entityListenerResolver; + } + if (isset($this->_usedProperties['fetchModeSubselectBatchSize'])) { + $output['fetch_mode_subselect_batch_size'] = $this->fetchModeSubselectBatchSize; + } + if (isset($this->_usedProperties['repositoryFactory'])) { + $output['repository_factory'] = $this->repositoryFactory; + } + if (isset($this->_usedProperties['schemaIgnoreClasses'])) { + $output['schema_ignore_classes'] = $this->schemaIgnoreClasses; + } + if (isset($this->_usedProperties['reportFieldsWhereDeclared'])) { + $output['report_fields_where_declared'] = $this->reportFieldsWhereDeclared; + } + if (isset($this->_usedProperties['validateXmlMapping'])) { + $output['validate_xml_mapping'] = $this->validateXmlMapping; + } + if (isset($this->_usedProperties['secondLevelCache'])) { + $output['second_level_cache'] = $this->secondLevelCache->toArray(); + } + if (isset($this->_usedProperties['hydrators'])) { + $output['hydrators'] = $this->hydrators; + } + if (isset($this->_usedProperties['mappings'])) { + $output['mappings'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig ? $v->toArray() : $v, $this->mappings); + } + if (isset($this->_usedProperties['dql'])) { + $output['dql'] = $this->dql->toArray(); + } + if (isset($this->_usedProperties['filters'])) { + $output['filters'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig ? $v->toArray() : $v, $this->filters); + } + if (isset($this->_usedProperties['identityGenerationPreferences'])) { + $output['identity_generation_preferences'] = $this->identityGenerationPreferences; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/DqlConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/DqlConfig.php new file mode 100644 index 0000000..1c0b309 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/DqlConfig.php @@ -0,0 +1,92 @@ +_usedProperties['stringFunctions'] = true; + $this->stringFunctions[$name] = $value; + + return $this; + } + + /** + * @return $this + */ + public function numericFunction(string $name, mixed $value): static + { + $this->_usedProperties['numericFunctions'] = true; + $this->numericFunctions[$name] = $value; + + return $this; + } + + /** + * @return $this + */ + public function datetimeFunction(string $name, mixed $value): static + { + $this->_usedProperties['datetimeFunctions'] = true; + $this->datetimeFunctions[$name] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('string_functions', $config)) { + $this->_usedProperties['stringFunctions'] = true; + $this->stringFunctions = $config['string_functions']; + unset($config['string_functions']); + } + + if (array_key_exists('numeric_functions', $config)) { + $this->_usedProperties['numericFunctions'] = true; + $this->numericFunctions = $config['numeric_functions']; + unset($config['numeric_functions']); + } + + if (array_key_exists('datetime_functions', $config)) { + $this->_usedProperties['datetimeFunctions'] = true; + $this->datetimeFunctions = $config['datetime_functions']; + unset($config['datetime_functions']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['stringFunctions'])) { + $output['string_functions'] = $this->stringFunctions; + } + if (isset($this->_usedProperties['numericFunctions'])) { + $output['numeric_functions'] = $this->numericFunctions; + } + if (isset($this->_usedProperties['datetimeFunctions'])) { + $output['datetime_functions'] = $this->datetimeFunctions; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListeners/EntityConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListeners/EntityConfig.php new file mode 100644 index 0000000..7c495ce --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListeners/EntityConfig.php @@ -0,0 +1,52 @@ +listeners[$class])) { + $this->_usedProperties['listeners'] = true; + $this->listeners[$class] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig\ListenerConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "listener()" has already been initialized. You cannot pass values the second time you call listener().'); + } + + return $this->listeners[$class]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('listeners', $config)) { + $this->_usedProperties['listeners'] = true; + $this->listeners = array_map(fn ($v) => new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig\ListenerConfig($v), $config['listeners']); + unset($config['listeners']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['listeners'])) { + $output['listeners'] = array_map(fn ($v) => $v->toArray(), $this->listeners); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListeners/EntityConfig/ListenerConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListeners/EntityConfig/ListenerConfig.php new file mode 100644 index 0000000..ad709f0 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListeners/EntityConfig/ListenerConfig.php @@ -0,0 +1,47 @@ +_usedProperties['events'] = true; + + return $this->events[] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig\ListenerConfig\EventConfig($value); + } + + public function __construct(array $config = []) + { + if (array_key_exists('events', $config)) { + $this->_usedProperties['events'] = true; + $this->events = array_map(fn ($v) => new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig\ListenerConfig\EventConfig($v), $config['events']); + unset($config['events']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['events'])) { + $output['events'] = array_map(fn ($v) => $v->toArray(), $this->events); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListeners/EntityConfig/ListenerConfig/EventConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListeners/EntityConfig/ListenerConfig/EventConfig.php new file mode 100644 index 0000000..53a28b3 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListeners/EntityConfig/ListenerConfig/EventConfig.php @@ -0,0 +1,75 @@ +_usedProperties['type'] = true; + $this->type = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function method($value): static + { + $this->_usedProperties['method'] = true; + $this->method = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('type', $config)) { + $this->_usedProperties['type'] = true; + $this->type = $config['type']; + unset($config['type']); + } + + if (array_key_exists('method', $config)) { + $this->_usedProperties['method'] = true; + $this->method = $config['method']; + unset($config['method']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['type'])) { + $output['type'] = $this->type; + } + if (isset($this->_usedProperties['method'])) { + $output['method'] = $this->method; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListenersConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListenersConfig.php new file mode 100644 index 0000000..b7e4967 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/EntityListenersConfig.php @@ -0,0 +1,52 @@ +entities[$class])) { + $this->_usedProperties['entities'] = true; + $this->entities[$class] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "entity()" has already been initialized. You cannot pass values the second time you call entity().'); + } + + return $this->entities[$class]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('entities', $config)) { + $this->_usedProperties['entities'] = true; + $this->entities = array_map(fn ($v) => new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig($v), $config['entities']); + unset($config['entities']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['entities'])) { + $output['entities'] = array_map(fn ($v) => $v->toArray(), $this->entities); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/FilterConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/FilterConfig.php new file mode 100644 index 0000000..b8e2ffb --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/FilterConfig.php @@ -0,0 +1,96 @@ +_usedProperties['class'] = true; + $this->class = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function enabled($value): static + { + $this->_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @return $this + */ + public function parameter(string $name, mixed $value): static + { + $this->_usedProperties['parameters'] = true; + $this->parameters[$name] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('class', $config)) { + $this->_usedProperties['class'] = true; + $this->class = $config['class']; + unset($config['class']); + } + + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('parameters', $config)) { + $this->_usedProperties['parameters'] = true; + $this->parameters = $config['parameters']; + unset($config['parameters']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['class'])) { + $output['class'] = $this->class; + } + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['parameters'])) { + $output['parameters'] = $this->parameters; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/MappingConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/MappingConfig.php new file mode 100644 index 0000000..2cebb9d --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/MappingConfig.php @@ -0,0 +1,167 @@ +_usedProperties['mapping'] = true; + $this->mapping = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function type($value): static + { + $this->_usedProperties['type'] = true; + $this->type = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function dir($value): static + { + $this->_usedProperties['dir'] = true; + $this->dir = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function alias($value): static + { + $this->_usedProperties['alias'] = true; + $this->alias = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function prefix($value): static + { + $this->_usedProperties['prefix'] = true; + $this->prefix = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function isBundle($value): static + { + $this->_usedProperties['isBundle'] = true; + $this->isBundle = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('mapping', $config)) { + $this->_usedProperties['mapping'] = true; + $this->mapping = $config['mapping']; + unset($config['mapping']); + } + + if (array_key_exists('type', $config)) { + $this->_usedProperties['type'] = true; + $this->type = $config['type']; + unset($config['type']); + } + + if (array_key_exists('dir', $config)) { + $this->_usedProperties['dir'] = true; + $this->dir = $config['dir']; + unset($config['dir']); + } + + if (array_key_exists('alias', $config)) { + $this->_usedProperties['alias'] = true; + $this->alias = $config['alias']; + unset($config['alias']); + } + + if (array_key_exists('prefix', $config)) { + $this->_usedProperties['prefix'] = true; + $this->prefix = $config['prefix']; + unset($config['prefix']); + } + + if (array_key_exists('is_bundle', $config)) { + $this->_usedProperties['isBundle'] = true; + $this->isBundle = $config['is_bundle']; + unset($config['is_bundle']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['mapping'])) { + $output['mapping'] = $this->mapping; + } + if (isset($this->_usedProperties['type'])) { + $output['type'] = $this->type; + } + if (isset($this->_usedProperties['dir'])) { + $output['dir'] = $this->dir; + } + if (isset($this->_usedProperties['alias'])) { + $output['alias'] = $this->alias; + } + if (isset($this->_usedProperties['prefix'])) { + $output['prefix'] = $this->prefix; + } + if (isset($this->_usedProperties['isBundle'])) { + $output['is_bundle'] = $this->isBundle; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/MetadataCacheDriverConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/MetadataCacheDriverConfig.php new file mode 100644 index 0000000..3c711ed --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/MetadataCacheDriverConfig.php @@ -0,0 +1,98 @@ +_usedProperties['type'] = true; + $this->type = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function id($value): static + { + $this->_usedProperties['id'] = true; + $this->id = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function pool($value): static + { + $this->_usedProperties['pool'] = true; + $this->pool = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('type', $config)) { + $this->_usedProperties['type'] = true; + $this->type = $config['type']; + unset($config['type']); + } + + if (array_key_exists('id', $config)) { + $this->_usedProperties['id'] = true; + $this->id = $config['id']; + unset($config['id']); + } + + if (array_key_exists('pool', $config)) { + $this->_usedProperties['pool'] = true; + $this->pool = $config['pool']; + unset($config['pool']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['type'])) { + $output['type'] = $this->type; + } + if (isset($this->_usedProperties['id'])) { + $output['id'] = $this->id; + } + if (isset($this->_usedProperties['pool'])) { + $output['pool'] = $this->pool; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/QueryCacheDriverConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/QueryCacheDriverConfig.php new file mode 100644 index 0000000..b15ed1b --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/QueryCacheDriverConfig.php @@ -0,0 +1,98 @@ +_usedProperties['type'] = true; + $this->type = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function id($value): static + { + $this->_usedProperties['id'] = true; + $this->id = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function pool($value): static + { + $this->_usedProperties['pool'] = true; + $this->pool = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('type', $config)) { + $this->_usedProperties['type'] = true; + $this->type = $config['type']; + unset($config['type']); + } + + if (array_key_exists('id', $config)) { + $this->_usedProperties['id'] = true; + $this->id = $config['id']; + unset($config['id']); + } + + if (array_key_exists('pool', $config)) { + $this->_usedProperties['pool'] = true; + $this->pool = $config['pool']; + unset($config['pool']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['type'])) { + $output['type'] = $this->type; + } + if (isset($this->_usedProperties['id'])) { + $output['id'] = $this->id; + } + if (isset($this->_usedProperties['pool'])) { + $output['pool'] = $this->pool; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/ResultCacheDriverConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/ResultCacheDriverConfig.php new file mode 100644 index 0000000..0fd3532 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/ResultCacheDriverConfig.php @@ -0,0 +1,98 @@ +_usedProperties['type'] = true; + $this->type = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function id($value): static + { + $this->_usedProperties['id'] = true; + $this->id = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function pool($value): static + { + $this->_usedProperties['pool'] = true; + $this->pool = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('type', $config)) { + $this->_usedProperties['type'] = true; + $this->type = $config['type']; + unset($config['type']); + } + + if (array_key_exists('id', $config)) { + $this->_usedProperties['id'] = true; + $this->id = $config['id']; + unset($config['id']); + } + + if (array_key_exists('pool', $config)) { + $this->_usedProperties['pool'] = true; + $this->pool = $config['pool']; + unset($config['pool']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['type'])) { + $output['type'] = $this->type; + } + if (isset($this->_usedProperties['id'])) { + $output['id'] = $this->id; + } + if (isset($this->_usedProperties['pool'])) { + $output['pool'] = $this->pool; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/LoggerConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/LoggerConfig.php new file mode 100644 index 0000000..8e17a02 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/LoggerConfig.php @@ -0,0 +1,75 @@ +_usedProperties['name'] = true; + $this->name = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function service($value): static + { + $this->_usedProperties['service'] = true; + $this->service = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('name', $config)) { + $this->_usedProperties['name'] = true; + $this->name = $config['name']; + unset($config['name']); + } + + if (array_key_exists('service', $config)) { + $this->_usedProperties['service'] = true; + $this->service = $config['service']; + unset($config['service']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['name'])) { + $output['name'] = $this->name; + } + if (isset($this->_usedProperties['service'])) { + $output['service'] = $this->service; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/RegionCacheDriverConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/RegionCacheDriverConfig.php new file mode 100644 index 0000000..c48dde4 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/RegionCacheDriverConfig.php @@ -0,0 +1,98 @@ +_usedProperties['type'] = true; + $this->type = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function id($value): static + { + $this->_usedProperties['id'] = true; + $this->id = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function pool($value): static + { + $this->_usedProperties['pool'] = true; + $this->pool = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('type', $config)) { + $this->_usedProperties['type'] = true; + $this->type = $config['type']; + unset($config['type']); + } + + if (array_key_exists('id', $config)) { + $this->_usedProperties['id'] = true; + $this->id = $config['id']; + unset($config['id']); + } + + if (array_key_exists('pool', $config)) { + $this->_usedProperties['pool'] = true; + $this->pool = $config['pool']; + unset($config['pool']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['type'])) { + $output['type'] = $this->type; + } + if (isset($this->_usedProperties['id'])) { + $output['id'] = $this->id; + } + if (isset($this->_usedProperties['pool'])) { + $output['pool'] = $this->pool; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/RegionConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/RegionConfig.php new file mode 100644 index 0000000..8725441 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/RegionConfig.php @@ -0,0 +1,205 @@ +_usedProperties['cacheDriver'] = true; + $this->cacheDriver = $value; + + return $this; + } + + if (!$this->cacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig\CacheDriverConfig) { + $this->_usedProperties['cacheDriver'] = true; + $this->cacheDriver = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig\CacheDriverConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "cacheDriver()" has already been initialized. You cannot pass values the second time you call cacheDriver().'); + } + + return $this->cacheDriver; + } + + /** + * @default '%kernel.cache_dir%/doctrine/orm/slc/filelock' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function lockPath($value): static + { + $this->_usedProperties['lockPath'] = true; + $this->lockPath = $value; + + return $this; + } + + /** + * @default 60 + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function lockLifetime($value): static + { + $this->_usedProperties['lockLifetime'] = true; + $this->lockLifetime = $value; + + return $this; + } + + /** + * @default 'default' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function type($value): static + { + $this->_usedProperties['type'] = true; + $this->type = $value; + + return $this; + } + + /** + * @default 0 + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function lifetime($value): static + { + $this->_usedProperties['lifetime'] = true; + $this->lifetime = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function service($value): static + { + $this->_usedProperties['service'] = true; + $this->service = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function name($value): static + { + $this->_usedProperties['name'] = true; + $this->name = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('cache_driver', $config)) { + $this->_usedProperties['cacheDriver'] = true; + $this->cacheDriver = \is_array($config['cache_driver']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig\CacheDriverConfig($config['cache_driver']) : $config['cache_driver']; + unset($config['cache_driver']); + } + + if (array_key_exists('lock_path', $config)) { + $this->_usedProperties['lockPath'] = true; + $this->lockPath = $config['lock_path']; + unset($config['lock_path']); + } + + if (array_key_exists('lock_lifetime', $config)) { + $this->_usedProperties['lockLifetime'] = true; + $this->lockLifetime = $config['lock_lifetime']; + unset($config['lock_lifetime']); + } + + if (array_key_exists('type', $config)) { + $this->_usedProperties['type'] = true; + $this->type = $config['type']; + unset($config['type']); + } + + if (array_key_exists('lifetime', $config)) { + $this->_usedProperties['lifetime'] = true; + $this->lifetime = $config['lifetime']; + unset($config['lifetime']); + } + + if (array_key_exists('service', $config)) { + $this->_usedProperties['service'] = true; + $this->service = $config['service']; + unset($config['service']); + } + + if (array_key_exists('name', $config)) { + $this->_usedProperties['name'] = true; + $this->name = $config['name']; + unset($config['name']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['cacheDriver'])) { + $output['cache_driver'] = $this->cacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig\CacheDriverConfig ? $this->cacheDriver->toArray() : $this->cacheDriver; + } + if (isset($this->_usedProperties['lockPath'])) { + $output['lock_path'] = $this->lockPath; + } + if (isset($this->_usedProperties['lockLifetime'])) { + $output['lock_lifetime'] = $this->lockLifetime; + } + if (isset($this->_usedProperties['type'])) { + $output['type'] = $this->type; + } + if (isset($this->_usedProperties['lifetime'])) { + $output['lifetime'] = $this->lifetime; + } + if (isset($this->_usedProperties['service'])) { + $output['service'] = $this->service; + } + if (isset($this->_usedProperties['name'])) { + $output['name'] = $this->name; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/RegionConfig/CacheDriverConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/RegionConfig/CacheDriverConfig.php new file mode 100644 index 0000000..a194763 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCache/RegionConfig/CacheDriverConfig.php @@ -0,0 +1,98 @@ +_usedProperties['type'] = true; + $this->type = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function id($value): static + { + $this->_usedProperties['id'] = true; + $this->id = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function pool($value): static + { + $this->_usedProperties['pool'] = true; + $this->pool = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('type', $config)) { + $this->_usedProperties['type'] = true; + $this->type = $config['type']; + unset($config['type']); + } + + if (array_key_exists('id', $config)) { + $this->_usedProperties['id'] = true; + $this->id = $config['id']; + unset($config['id']); + } + + if (array_key_exists('pool', $config)) { + $this->_usedProperties['pool'] = true; + $this->pool = $config['pool']; + unset($config['pool']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['type'])) { + $output['type'] = $this->type; + } + if (isset($this->_usedProperties['id'])) { + $output['id'] = $this->id; + } + if (isset($this->_usedProperties['pool'])) { + $output['pool'] = $this->pool; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCacheConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCacheConfig.php new file mode 100644 index 0000000..c274d1f --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/Orm/EntityManagerConfig/SecondLevelCacheConfig.php @@ -0,0 +1,228 @@ +_usedProperties['regionCacheDriver'] = true; + $this->regionCacheDriver = $value; + + return $this; + } + + if (!$this->regionCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionCacheDriverConfig) { + $this->_usedProperties['regionCacheDriver'] = true; + $this->regionCacheDriver = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionCacheDriverConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "regionCacheDriver()" has already been initialized. You cannot pass values the second time you call regionCacheDriver().'); + } + + return $this->regionCacheDriver; + } + + /** + * @default 60 + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function regionLockLifetime($value): static + { + $this->_usedProperties['regionLockLifetime'] = true; + $this->regionLockLifetime = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function logEnabled($value): static + { + $this->_usedProperties['logEnabled'] = true; + $this->logEnabled = $value; + + return $this; + } + + /** + * @default 3600 + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function regionLifetime($value): static + { + $this->_usedProperties['regionLifetime'] = true; + $this->regionLifetime = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function enabled($value): static + { + $this->_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function factory($value): static + { + $this->_usedProperties['factory'] = true; + $this->factory = $value; + + return $this; + } + + public function region(string $name, array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig + { + if (!isset($this->regions[$name])) { + $this->_usedProperties['regions'] = true; + $this->regions[$name] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "region()" has already been initialized. You cannot pass values the second time you call region().'); + } + + return $this->regions[$name]; + } + + public function logger(string $name, array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\LoggerConfig + { + if (!isset($this->loggers[$name])) { + $this->_usedProperties['loggers'] = true; + $this->loggers[$name] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\LoggerConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "logger()" has already been initialized. You cannot pass values the second time you call logger().'); + } + + return $this->loggers[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('region_cache_driver', $config)) { + $this->_usedProperties['regionCacheDriver'] = true; + $this->regionCacheDriver = \is_array($config['region_cache_driver']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionCacheDriverConfig($config['region_cache_driver']) : $config['region_cache_driver']; + unset($config['region_cache_driver']); + } + + if (array_key_exists('region_lock_lifetime', $config)) { + $this->_usedProperties['regionLockLifetime'] = true; + $this->regionLockLifetime = $config['region_lock_lifetime']; + unset($config['region_lock_lifetime']); + } + + if (array_key_exists('log_enabled', $config)) { + $this->_usedProperties['logEnabled'] = true; + $this->logEnabled = $config['log_enabled']; + unset($config['log_enabled']); + } + + if (array_key_exists('region_lifetime', $config)) { + $this->_usedProperties['regionLifetime'] = true; + $this->regionLifetime = $config['region_lifetime']; + unset($config['region_lifetime']); + } + + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('factory', $config)) { + $this->_usedProperties['factory'] = true; + $this->factory = $config['factory']; + unset($config['factory']); + } + + if (array_key_exists('regions', $config)) { + $this->_usedProperties['regions'] = true; + $this->regions = array_map(fn ($v) => new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig($v), $config['regions']); + unset($config['regions']); + } + + if (array_key_exists('loggers', $config)) { + $this->_usedProperties['loggers'] = true; + $this->loggers = array_map(fn ($v) => new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\LoggerConfig($v), $config['loggers']); + unset($config['loggers']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['regionCacheDriver'])) { + $output['region_cache_driver'] = $this->regionCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionCacheDriverConfig ? $this->regionCacheDriver->toArray() : $this->regionCacheDriver; + } + if (isset($this->_usedProperties['regionLockLifetime'])) { + $output['region_lock_lifetime'] = $this->regionLockLifetime; + } + if (isset($this->_usedProperties['logEnabled'])) { + $output['log_enabled'] = $this->logEnabled; + } + if (isset($this->_usedProperties['regionLifetime'])) { + $output['region_lifetime'] = $this->regionLifetime; + } + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['factory'])) { + $output['factory'] = $this->factory; + } + if (isset($this->_usedProperties['regions'])) { + $output['regions'] = array_map(fn ($v) => $v->toArray(), $this->regions); + } + if (isset($this->_usedProperties['loggers'])) { + $output['loggers'] = array_map(fn ($v) => $v->toArray(), $this->loggers); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Doctrine/OrmConfig.php b/backend/var/cache/dev/Symfony/Config/Doctrine/OrmConfig.php new file mode 100644 index 0000000..702d5bb --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Doctrine/OrmConfig.php @@ -0,0 +1,254 @@ +_usedProperties['defaultEntityManager'] = true; + $this->defaultEntityManager = $value; + + return $this; + } + + /** + * Auto generate mode possible values are: "NEVER", "ALWAYS", "FILE_NOT_EXISTS", "EVAL", "FILE_NOT_EXISTS_OR_CHANGED", this option is ignored when the "enable_native_lazy_objects" option is true + * @default false + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function autoGenerateProxyClasses($value): static + { + $this->_usedProperties['autoGenerateProxyClasses'] = true; + $this->autoGenerateProxyClasses = $value; + + return $this; + } + + /** + * Enables the new implementation of proxies based on lazy ghosts instead of using the legacy implementation + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function enableLazyGhostObjects($value): static + { + $this->_usedProperties['enableLazyGhostObjects'] = true; + $this->enableLazyGhostObjects = $value; + + return $this; + } + + /** + * Enables the new native implementation of PHP lazy objects instead of generated proxies + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function enableNativeLazyObjects($value): static + { + $this->_usedProperties['enableNativeLazyObjects'] = true; + $this->enableNativeLazyObjects = $value; + + return $this; + } + + /** + * Configures the path where generated proxy classes are saved when using non-native lazy objects, this option is ignored when the "enable_native_lazy_objects" option is true + * @default '%kernel.build_dir%/doctrine/orm/Proxies' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function proxyDir($value): static + { + $this->_usedProperties['proxyDir'] = true; + $this->proxyDir = $value; + + return $this; + } + + /** + * Defines the root namespace for generated proxy classes when using non-native lazy objects, this option is ignored when the "enable_native_lazy_objects" option is true + * @default 'Proxies' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function proxyNamespace($value): static + { + $this->_usedProperties['proxyNamespace'] = true; + $this->proxyNamespace = $value; + + return $this; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * @default {"enabled":true,"auto_mapping":null,"evict_cache":false} + * @return \Symfony\Config\Doctrine\Orm\ControllerResolverConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\ControllerResolverConfig : static) + */ + public function controllerResolver(array|bool $value = []): \Symfony\Config\Doctrine\Orm\ControllerResolverConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['controllerResolver'] = true; + $this->controllerResolver = $value; + + return $this; + } + + if (!$this->controllerResolver instanceof \Symfony\Config\Doctrine\Orm\ControllerResolverConfig) { + $this->_usedProperties['controllerResolver'] = true; + $this->controllerResolver = new \Symfony\Config\Doctrine\Orm\ControllerResolverConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "controllerResolver()" has already been initialized. You cannot pass values the second time you call controllerResolver().'); + } + + return $this->controllerResolver; + } + + public function entityManager(string $name, array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig + { + if (!isset($this->entityManagers[$name])) { + $this->_usedProperties['entityManagers'] = true; + $this->entityManagers[$name] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "entityManager()" has already been initialized. You cannot pass values the second time you call entityManager().'); + } + + return $this->entityManagers[$name]; + } + + /** + * @return $this + */ + public function resolveTargetEntity(string $interface, mixed $value): static + { + $this->_usedProperties['resolveTargetEntities'] = true; + $this->resolveTargetEntities[$interface] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('default_entity_manager', $config)) { + $this->_usedProperties['defaultEntityManager'] = true; + $this->defaultEntityManager = $config['default_entity_manager']; + unset($config['default_entity_manager']); + } + + if (array_key_exists('auto_generate_proxy_classes', $config)) { + $this->_usedProperties['autoGenerateProxyClasses'] = true; + $this->autoGenerateProxyClasses = $config['auto_generate_proxy_classes']; + unset($config['auto_generate_proxy_classes']); + } + + if (array_key_exists('enable_lazy_ghost_objects', $config)) { + $this->_usedProperties['enableLazyGhostObjects'] = true; + $this->enableLazyGhostObjects = $config['enable_lazy_ghost_objects']; + unset($config['enable_lazy_ghost_objects']); + } + + if (array_key_exists('enable_native_lazy_objects', $config)) { + $this->_usedProperties['enableNativeLazyObjects'] = true; + $this->enableNativeLazyObjects = $config['enable_native_lazy_objects']; + unset($config['enable_native_lazy_objects']); + } + + if (array_key_exists('proxy_dir', $config)) { + $this->_usedProperties['proxyDir'] = true; + $this->proxyDir = $config['proxy_dir']; + unset($config['proxy_dir']); + } + + if (array_key_exists('proxy_namespace', $config)) { + $this->_usedProperties['proxyNamespace'] = true; + $this->proxyNamespace = $config['proxy_namespace']; + unset($config['proxy_namespace']); + } + + if (array_key_exists('controller_resolver', $config)) { + $this->_usedProperties['controllerResolver'] = true; + $this->controllerResolver = \is_array($config['controller_resolver']) ? new \Symfony\Config\Doctrine\Orm\ControllerResolverConfig($config['controller_resolver']) : $config['controller_resolver']; + unset($config['controller_resolver']); + } + + if (array_key_exists('entity_managers', $config)) { + $this->_usedProperties['entityManagers'] = true; + $this->entityManagers = array_map(fn ($v) => new \Symfony\Config\Doctrine\Orm\EntityManagerConfig($v), $config['entity_managers']); + unset($config['entity_managers']); + } + + if (array_key_exists('resolve_target_entities', $config)) { + $this->_usedProperties['resolveTargetEntities'] = true; + $this->resolveTargetEntities = $config['resolve_target_entities']; + unset($config['resolve_target_entities']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['defaultEntityManager'])) { + $output['default_entity_manager'] = $this->defaultEntityManager; + } + if (isset($this->_usedProperties['autoGenerateProxyClasses'])) { + $output['auto_generate_proxy_classes'] = $this->autoGenerateProxyClasses; + } + if (isset($this->_usedProperties['enableLazyGhostObjects'])) { + $output['enable_lazy_ghost_objects'] = $this->enableLazyGhostObjects; + } + if (isset($this->_usedProperties['enableNativeLazyObjects'])) { + $output['enable_native_lazy_objects'] = $this->enableNativeLazyObjects; + } + if (isset($this->_usedProperties['proxyDir'])) { + $output['proxy_dir'] = $this->proxyDir; + } + if (isset($this->_usedProperties['proxyNamespace'])) { + $output['proxy_namespace'] = $this->proxyNamespace; + } + if (isset($this->_usedProperties['controllerResolver'])) { + $output['controller_resolver'] = $this->controllerResolver instanceof \Symfony\Config\Doctrine\Orm\ControllerResolverConfig ? $this->controllerResolver->toArray() : $this->controllerResolver; + } + if (isset($this->_usedProperties['entityManagers'])) { + $output['entity_managers'] = array_map(fn ($v) => $v->toArray(), $this->entityManagers); + } + if (isset($this->_usedProperties['resolveTargetEntities'])) { + $output['resolve_target_entities'] = $this->resolveTargetEntities; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/DoctrineConfig.php b/backend/var/cache/dev/Symfony/Config/DoctrineConfig.php new file mode 100644 index 0000000..9fd337e --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/DoctrineConfig.php @@ -0,0 +1,114 @@ +_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['dbal'] = true; + $this->dbal = $value; + + return $this; + } + + if (!$this->dbal instanceof \Symfony\Config\Doctrine\DbalConfig) { + $this->_usedProperties['dbal'] = true; + $this->dbal = new \Symfony\Config\Doctrine\DbalConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "dbal()" has already been initialized. You cannot pass values the second time you call dbal().'); + } + + return $this->dbal; + } + + /** + * @template TValue of mixed + * @param TValue $value + * @return \Symfony\Config\Doctrine\OrmConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Doctrine\OrmConfig : static) + * @deprecated since Symfony 7.4 + */ + public function orm(mixed $value = []): \Symfony\Config\Doctrine\OrmConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['orm'] = true; + $this->orm = $value; + + return $this; + } + + if (!$this->orm instanceof \Symfony\Config\Doctrine\OrmConfig) { + $this->_usedProperties['orm'] = true; + $this->orm = new \Symfony\Config\Doctrine\OrmConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "orm()" has already been initialized. You cannot pass values the second time you call orm().'); + } + + return $this->orm; + } + + public function getExtensionAlias(): string + { + return 'doctrine'; + } + + public function __construct(array $config = []) + { + if (array_key_exists('dbal', $config)) { + $this->_usedProperties['dbal'] = true; + $this->dbal = \is_array($config['dbal']) ? new \Symfony\Config\Doctrine\DbalConfig($config['dbal']) : $config['dbal']; + unset($config['dbal']); + } + + if (array_key_exists('orm', $config)) { + $this->_usedProperties['orm'] = true; + $this->orm = \is_array($config['orm']) ? new \Symfony\Config\Doctrine\OrmConfig($config['orm']) : $config['orm']; + unset($config['orm']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['dbal'])) { + $output['dbal'] = $this->dbal instanceof \Symfony\Config\Doctrine\DbalConfig ? $this->dbal->toArray() : $this->dbal; + } + if (isset($this->_usedProperties['orm'])) { + $output['orm'] = $this->orm instanceof \Symfony\Config\Doctrine\OrmConfig ? $this->orm->toArray() : $this->orm; + } + if ($this->_hasDeprecatedCalls) { + trigger_deprecation('symfony/config', '7.4', 'Calling any fluent method on "%s" is deprecated; pass the configuration to the constructor instead.', $this::class); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/DoctrineMigrations/Storage/TableStorageConfig.php b/backend/var/cache/dev/Symfony/Config/DoctrineMigrations/Storage/TableStorageConfig.php new file mode 100644 index 0000000..f15585a --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/DoctrineMigrations/Storage/TableStorageConfig.php @@ -0,0 +1,144 @@ +_usedProperties['tableName'] = true; + $this->tableName = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function versionColumnName($value): static + { + $this->_usedProperties['versionColumnName'] = true; + $this->versionColumnName = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function versionColumnLength($value): static + { + $this->_usedProperties['versionColumnLength'] = true; + $this->versionColumnLength = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function executedAtColumnName($value): static + { + $this->_usedProperties['executedAtColumnName'] = true; + $this->executedAtColumnName = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function executionTimeColumnName($value): static + { + $this->_usedProperties['executionTimeColumnName'] = true; + $this->executionTimeColumnName = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('table_name', $config)) { + $this->_usedProperties['tableName'] = true; + $this->tableName = $config['table_name']; + unset($config['table_name']); + } + + if (array_key_exists('version_column_name', $config)) { + $this->_usedProperties['versionColumnName'] = true; + $this->versionColumnName = $config['version_column_name']; + unset($config['version_column_name']); + } + + if (array_key_exists('version_column_length', $config)) { + $this->_usedProperties['versionColumnLength'] = true; + $this->versionColumnLength = $config['version_column_length']; + unset($config['version_column_length']); + } + + if (array_key_exists('executed_at_column_name', $config)) { + $this->_usedProperties['executedAtColumnName'] = true; + $this->executedAtColumnName = $config['executed_at_column_name']; + unset($config['executed_at_column_name']); + } + + if (array_key_exists('execution_time_column_name', $config)) { + $this->_usedProperties['executionTimeColumnName'] = true; + $this->executionTimeColumnName = $config['execution_time_column_name']; + unset($config['execution_time_column_name']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['tableName'])) { + $output['table_name'] = $this->tableName; + } + if (isset($this->_usedProperties['versionColumnName'])) { + $output['version_column_name'] = $this->versionColumnName; + } + if (isset($this->_usedProperties['versionColumnLength'])) { + $output['version_column_length'] = $this->versionColumnLength; + } + if (isset($this->_usedProperties['executedAtColumnName'])) { + $output['executed_at_column_name'] = $this->executedAtColumnName; + } + if (isset($this->_usedProperties['executionTimeColumnName'])) { + $output['execution_time_column_name'] = $this->executionTimeColumnName; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/DoctrineMigrations/StorageConfig.php b/backend/var/cache/dev/Symfony/Config/DoctrineMigrations/StorageConfig.php new file mode 100644 index 0000000..eff482c --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/DoctrineMigrations/StorageConfig.php @@ -0,0 +1,56 @@ +tableStorage) { + $this->_usedProperties['tableStorage'] = true; + $this->tableStorage = new \Symfony\Config\DoctrineMigrations\Storage\TableStorageConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "tableStorage()" has already been initialized. You cannot pass values the second time you call tableStorage().'); + } + + return $this->tableStorage; + } + + public function __construct(array $config = []) + { + if (array_key_exists('table_storage', $config)) { + $this->_usedProperties['tableStorage'] = true; + $this->tableStorage = new \Symfony\Config\DoctrineMigrations\Storage\TableStorageConfig($config['table_storage']); + unset($config['table_storage']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['tableStorage'])) { + $output['table_storage'] = $this->tableStorage->toArray(); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/DoctrineMigrationsConfig.php b/backend/var/cache/dev/Symfony/Config/DoctrineMigrationsConfig.php new file mode 100644 index 0000000..0c6b108 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/DoctrineMigrationsConfig.php @@ -0,0 +1,396 @@ +_hasDeprecatedCalls = true; + $this->_usedProperties['enableServiceMigrations'] = true; + $this->enableServiceMigrations = $value; + + return $this; + } + + /** + * @return $this + * @deprecated since Symfony 7.4 + */ + public function migrationsPath(string $namespace, mixed $value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['migrationsPaths'] = true; + $this->migrationsPaths[$namespace] = $value; + + return $this; + } + + /** + * @return $this + * @deprecated since Symfony 7.4 + */ + public function services(string $service, mixed $value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['services'] = true; + $this->services[$service] = $value; + + return $this; + } + + /** + * @return $this + * @deprecated since Symfony 7.4 + */ + public function factories(string $factory, mixed $value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['factories'] = true; + $this->factories[$factory] = $value; + + return $this; + } + + /** + * Storage to use for migration status metadata. + * @default {"table_storage":{"table_name":null,"version_column_name":null,"version_column_length":null,"executed_at_column_name":null,"execution_time_column_name":null}} + * @deprecated since Symfony 7.4 + */ + public function storage(array $value = []): \Symfony\Config\DoctrineMigrations\StorageConfig + { + $this->_hasDeprecatedCalls = true; + if (null === $this->storage) { + $this->_usedProperties['storage'] = true; + $this->storage = new \Symfony\Config\DoctrineMigrations\StorageConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "storage()" has already been initialized. You cannot pass values the second time you call storage().'); + } + + return $this->storage; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + * @deprecated since Symfony 7.4 + */ + public function migrations(ParamConfigurator|array $value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['migrations'] = true; + $this->migrations = $value; + + return $this; + } + + /** + * Connection name to use for the migrations database. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function connection($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['connection'] = true; + $this->connection = $value; + + return $this; + } + + /** + * Entity manager name to use for the migrations database (available when doctrine/orm is installed). + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function em($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['em'] = true; + $this->em = $value; + + return $this; + } + + /** + * Run all migrations in a transaction. + * @default false + * @param ParamConfigurator|mixed $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function allOrNothing($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['allOrNothing'] = true; + $this->allOrNothing = $value; + + return $this; + } + + /** + * Adds an extra check in the generated migrations to allow execution only on the same platform as they were initially generated on. + * @default true + * @param ParamConfigurator|mixed $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function checkDatabasePlatform($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['checkDatabasePlatform'] = true; + $this->checkDatabasePlatform = $value; + + return $this; + } + + /** + * Custom template path for generated migration classes. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function customTemplate($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['customTemplate'] = true; + $this->customTemplate = $value; + + return $this; + } + + /** + * Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false + * @default false + * @param ParamConfigurator|mixed $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function organizeMigrations($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['organizeMigrations'] = true; + $this->organizeMigrations = $value; + + return $this; + } + + /** + * Whether or not to enable the profiler collector to calculate and visualize migration status. This adds some queries overhead. + * @default false + * @param ParamConfigurator|bool $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function enableProfiler($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['enableProfiler'] = true; + $this->enableProfiler = $value; + + return $this; + } + + /** + * Whether or not to wrap migrations in a single transaction. + * @default true + * @param ParamConfigurator|bool $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function transactional($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['transactional'] = true; + $this->transactional = $value; + + return $this; + } + + public function getExtensionAlias(): string + { + return 'doctrine_migrations'; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enable_service_migrations', $config)) { + $this->_usedProperties['enableServiceMigrations'] = true; + $this->enableServiceMigrations = $config['enable_service_migrations']; + unset($config['enable_service_migrations']); + } + + if (array_key_exists('migrations_paths', $config)) { + $this->_usedProperties['migrationsPaths'] = true; + $this->migrationsPaths = $config['migrations_paths']; + unset($config['migrations_paths']); + } + + if (array_key_exists('services', $config)) { + $this->_usedProperties['services'] = true; + $this->services = $config['services']; + unset($config['services']); + } + + if (array_key_exists('factories', $config)) { + $this->_usedProperties['factories'] = true; + $this->factories = $config['factories']; + unset($config['factories']); + } + + if (array_key_exists('storage', $config)) { + $this->_usedProperties['storage'] = true; + $this->storage = new \Symfony\Config\DoctrineMigrations\StorageConfig($config['storage']); + unset($config['storage']); + } + + if (array_key_exists('migrations', $config)) { + $this->_usedProperties['migrations'] = true; + $this->migrations = $config['migrations']; + unset($config['migrations']); + } + + if (array_key_exists('connection', $config)) { + $this->_usedProperties['connection'] = true; + $this->connection = $config['connection']; + unset($config['connection']); + } + + if (array_key_exists('em', $config)) { + $this->_usedProperties['em'] = true; + $this->em = $config['em']; + unset($config['em']); + } + + if (array_key_exists('all_or_nothing', $config)) { + $this->_usedProperties['allOrNothing'] = true; + $this->allOrNothing = $config['all_or_nothing']; + unset($config['all_or_nothing']); + } + + if (array_key_exists('check_database_platform', $config)) { + $this->_usedProperties['checkDatabasePlatform'] = true; + $this->checkDatabasePlatform = $config['check_database_platform']; + unset($config['check_database_platform']); + } + + if (array_key_exists('custom_template', $config)) { + $this->_usedProperties['customTemplate'] = true; + $this->customTemplate = $config['custom_template']; + unset($config['custom_template']); + } + + if (array_key_exists('organize_migrations', $config)) { + $this->_usedProperties['organizeMigrations'] = true; + $this->organizeMigrations = $config['organize_migrations']; + unset($config['organize_migrations']); + } + + if (array_key_exists('enable_profiler', $config)) { + $this->_usedProperties['enableProfiler'] = true; + $this->enableProfiler = $config['enable_profiler']; + unset($config['enable_profiler']); + } + + if (array_key_exists('transactional', $config)) { + $this->_usedProperties['transactional'] = true; + $this->transactional = $config['transactional']; + unset($config['transactional']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enableServiceMigrations'])) { + $output['enable_service_migrations'] = $this->enableServiceMigrations; + } + if (isset($this->_usedProperties['migrationsPaths'])) { + $output['migrations_paths'] = $this->migrationsPaths; + } + if (isset($this->_usedProperties['services'])) { + $output['services'] = $this->services; + } + if (isset($this->_usedProperties['factories'])) { + $output['factories'] = $this->factories; + } + if (isset($this->_usedProperties['storage'])) { + $output['storage'] = $this->storage->toArray(); + } + if (isset($this->_usedProperties['migrations'])) { + $output['migrations'] = $this->migrations; + } + if (isset($this->_usedProperties['connection'])) { + $output['connection'] = $this->connection; + } + if (isset($this->_usedProperties['em'])) { + $output['em'] = $this->em; + } + if (isset($this->_usedProperties['allOrNothing'])) { + $output['all_or_nothing'] = $this->allOrNothing; + } + if (isset($this->_usedProperties['checkDatabasePlatform'])) { + $output['check_database_platform'] = $this->checkDatabasePlatform; + } + if (isset($this->_usedProperties['customTemplate'])) { + $output['custom_template'] = $this->customTemplate; + } + if (isset($this->_usedProperties['organizeMigrations'])) { + $output['organize_migrations'] = $this->organizeMigrations; + } + if (isset($this->_usedProperties['enableProfiler'])) { + $output['enable_profiler'] = $this->enableProfiler; + } + if (isset($this->_usedProperties['transactional'])) { + $output['transactional'] = $this->transactional; + } + if ($this->_hasDeprecatedCalls) { + trigger_deprecation('symfony/config', '7.4', 'Calling any fluent method on "%s" is deprecated; pass the configuration to the constructor instead.', $this::class); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/AnnotationsConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/AnnotationsConfig.php new file mode 100644 index 0000000..84fe22f --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/AnnotationsConfig.php @@ -0,0 +1,52 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/AssetMapper/PrecompressConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/AssetMapper/PrecompressConfig.php new file mode 100644 index 0000000..3208064 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/AssetMapper/PrecompressConfig.php @@ -0,0 +1,98 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function formats(ParamConfigurator|array $value): static + { + $this->_usedProperties['formats'] = true; + $this->formats = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function extensions(ParamConfigurator|array $value): static + { + $this->_usedProperties['extensions'] = true; + $this->extensions = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('formats', $config)) { + $this->_usedProperties['formats'] = true; + $this->formats = $config['formats']; + unset($config['formats']); + } + + if (array_key_exists('extensions', $config)) { + $this->_usedProperties['extensions'] = true; + $this->extensions = $config['extensions']; + unset($config['extensions']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['formats'])) { + $output['formats'] = $this->formats; + } + if (isset($this->_usedProperties['extensions'])) { + $output['extensions'] = $this->extensions; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/AssetMapperConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/AssetMapperConfig.php new file mode 100644 index 0000000..e206362 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/AssetMapperConfig.php @@ -0,0 +1,345 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @return $this + */ + public function path(string $namespace, mixed $value): static + { + $this->_usedProperties['paths'] = true; + $this->paths[$namespace] = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function excludedPatterns(ParamConfigurator|array $value): static + { + $this->_usedProperties['excludedPatterns'] = true; + $this->excludedPatterns = $value; + + return $this; + } + + /** + * If true, any files starting with "." will be excluded from the asset mapper. + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function excludeDotfiles($value): static + { + $this->_usedProperties['excludeDotfiles'] = true; + $this->excludeDotfiles = $value; + + return $this; + } + + /** + * If true, a "dev server" will return the assets from the public directory (true in "debug" mode only by default). + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function server($value): static + { + $this->_usedProperties['server'] = true; + $this->server = $value; + + return $this; + } + + /** + * The public path where the assets will be written to (and served from when "server" is true). + * @default '/assets/' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function publicPrefix($value): static + { + $this->_usedProperties['publicPrefix'] = true; + $this->publicPrefix = $value; + + return $this; + } + + /** + * Behavior if an asset cannot be found when imported from JavaScript or CSS files - e.g. "import './non-existent.js'". "strict" means an exception is thrown, "warn" means a warning is logged, "ignore" means the import is left as-is. + * @default 'warn' + * @param ParamConfigurator|'strict'|'warn'|'ignore' $value + * @return $this + */ + public function missingImportMode($value): static + { + $this->_usedProperties['missingImportMode'] = true; + $this->missingImportMode = $value; + + return $this; + } + + /** + * @return $this + */ + public function extension(string $extension, mixed $value): static + { + $this->_usedProperties['extensions'] = true; + $this->extensions[$extension] = $value; + + return $this; + } + + /** + * The path of the importmap.php file. + * @default '%kernel.project_dir%/importmap.php' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function importmapPath($value): static + { + $this->_usedProperties['importmapPath'] = true; + $this->importmapPath = $value; + + return $this; + } + + /** + * The importmap name that will be used to load the polyfill. Set to false to disable. + * @default 'es-module-shims' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function importmapPolyfill($value): static + { + $this->_usedProperties['importmapPolyfill'] = true; + $this->importmapPolyfill = $value; + + return $this; + } + + /** + * @return $this + */ + public function importmapScriptAttribute(string $key, mixed $value): static + { + $this->_usedProperties['importmapScriptAttributes'] = true; + $this->importmapScriptAttributes[$key] = $value; + + return $this; + } + + /** + * The directory to store JavaScript vendors. + * @default '%kernel.project_dir%/assets/vendor' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function vendorDir($value): static + { + $this->_usedProperties['vendorDir'] = true; + $this->vendorDir = $value; + + return $this; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Precompress assets with Brotli, Zstandard and gzip. + * @default {"enabled":false,"formats":[],"extensions":[]} + * @return \Symfony\Config\Framework\AssetMapper\PrecompressConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\AssetMapper\PrecompressConfig : static) + */ + public function precompress(array|bool $value = []): \Symfony\Config\Framework\AssetMapper\PrecompressConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['precompress'] = true; + $this->precompress = $value; + + return $this; + } + + if (!$this->precompress instanceof \Symfony\Config\Framework\AssetMapper\PrecompressConfig) { + $this->_usedProperties['precompress'] = true; + $this->precompress = new \Symfony\Config\Framework\AssetMapper\PrecompressConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "precompress()" has already been initialized. You cannot pass values the second time you call precompress().'); + } + + return $this->precompress; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('paths', $config)) { + $this->_usedProperties['paths'] = true; + $this->paths = $config['paths']; + unset($config['paths']); + } + + if (array_key_exists('excluded_patterns', $config)) { + $this->_usedProperties['excludedPatterns'] = true; + $this->excludedPatterns = $config['excluded_patterns']; + unset($config['excluded_patterns']); + } + + if (array_key_exists('exclude_dotfiles', $config)) { + $this->_usedProperties['excludeDotfiles'] = true; + $this->excludeDotfiles = $config['exclude_dotfiles']; + unset($config['exclude_dotfiles']); + } + + if (array_key_exists('server', $config)) { + $this->_usedProperties['server'] = true; + $this->server = $config['server']; + unset($config['server']); + } + + if (array_key_exists('public_prefix', $config)) { + $this->_usedProperties['publicPrefix'] = true; + $this->publicPrefix = $config['public_prefix']; + unset($config['public_prefix']); + } + + if (array_key_exists('missing_import_mode', $config)) { + $this->_usedProperties['missingImportMode'] = true; + $this->missingImportMode = $config['missing_import_mode']; + unset($config['missing_import_mode']); + } + + if (array_key_exists('extensions', $config)) { + $this->_usedProperties['extensions'] = true; + $this->extensions = $config['extensions']; + unset($config['extensions']); + } + + if (array_key_exists('importmap_path', $config)) { + $this->_usedProperties['importmapPath'] = true; + $this->importmapPath = $config['importmap_path']; + unset($config['importmap_path']); + } + + if (array_key_exists('importmap_polyfill', $config)) { + $this->_usedProperties['importmapPolyfill'] = true; + $this->importmapPolyfill = $config['importmap_polyfill']; + unset($config['importmap_polyfill']); + } + + if (array_key_exists('importmap_script_attributes', $config)) { + $this->_usedProperties['importmapScriptAttributes'] = true; + $this->importmapScriptAttributes = $config['importmap_script_attributes']; + unset($config['importmap_script_attributes']); + } + + if (array_key_exists('vendor_dir', $config)) { + $this->_usedProperties['vendorDir'] = true; + $this->vendorDir = $config['vendor_dir']; + unset($config['vendor_dir']); + } + + if (array_key_exists('precompress', $config)) { + $this->_usedProperties['precompress'] = true; + $this->precompress = \is_array($config['precompress']) ? new \Symfony\Config\Framework\AssetMapper\PrecompressConfig($config['precompress']) : $config['precompress']; + unset($config['precompress']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['paths'])) { + $output['paths'] = $this->paths; + } + if (isset($this->_usedProperties['excludedPatterns'])) { + $output['excluded_patterns'] = $this->excludedPatterns; + } + if (isset($this->_usedProperties['excludeDotfiles'])) { + $output['exclude_dotfiles'] = $this->excludeDotfiles; + } + if (isset($this->_usedProperties['server'])) { + $output['server'] = $this->server; + } + if (isset($this->_usedProperties['publicPrefix'])) { + $output['public_prefix'] = $this->publicPrefix; + } + if (isset($this->_usedProperties['missingImportMode'])) { + $output['missing_import_mode'] = $this->missingImportMode; + } + if (isset($this->_usedProperties['extensions'])) { + $output['extensions'] = $this->extensions; + } + if (isset($this->_usedProperties['importmapPath'])) { + $output['importmap_path'] = $this->importmapPath; + } + if (isset($this->_usedProperties['importmapPolyfill'])) { + $output['importmap_polyfill'] = $this->importmapPolyfill; + } + if (isset($this->_usedProperties['importmapScriptAttributes'])) { + $output['importmap_script_attributes'] = $this->importmapScriptAttributes; + } + if (isset($this->_usedProperties['vendorDir'])) { + $output['vendor_dir'] = $this->vendorDir; + } + if (isset($this->_usedProperties['precompress'])) { + $output['precompress'] = $this->precompress instanceof \Symfony\Config\Framework\AssetMapper\PrecompressConfig ? $this->precompress->toArray() : $this->precompress; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Assets/PackageConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Assets/PackageConfig.php new file mode 100644 index 0000000..65d5531 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Assets/PackageConfig.php @@ -0,0 +1,190 @@ +_usedProperties['strictMode'] = true; + $this->strictMode = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function versionStrategy($value): static + { + $this->_usedProperties['versionStrategy'] = true; + $this->versionStrategy = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function version($value): static + { + $this->_usedProperties['version'] = true; + $this->version = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function versionFormat($value): static + { + $this->_usedProperties['versionFormat'] = true; + $this->versionFormat = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function jsonManifestPath($value): static + { + $this->_usedProperties['jsonManifestPath'] = true; + $this->jsonManifestPath = $value; + + return $this; + } + + /** + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function basePath($value): static + { + $this->_usedProperties['basePath'] = true; + $this->basePath = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function baseUrls(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['baseUrls'] = true; + $this->baseUrls = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('strict_mode', $config)) { + $this->_usedProperties['strictMode'] = true; + $this->strictMode = $config['strict_mode']; + unset($config['strict_mode']); + } + + if (array_key_exists('version_strategy', $config)) { + $this->_usedProperties['versionStrategy'] = true; + $this->versionStrategy = $config['version_strategy']; + unset($config['version_strategy']); + } + + if (array_key_exists('version', $config)) { + $this->_usedProperties['version'] = true; + $this->version = $config['version']; + unset($config['version']); + } + + if (array_key_exists('version_format', $config)) { + $this->_usedProperties['versionFormat'] = true; + $this->versionFormat = $config['version_format']; + unset($config['version_format']); + } + + if (array_key_exists('json_manifest_path', $config)) { + $this->_usedProperties['jsonManifestPath'] = true; + $this->jsonManifestPath = $config['json_manifest_path']; + unset($config['json_manifest_path']); + } + + if (array_key_exists('base_path', $config)) { + $this->_usedProperties['basePath'] = true; + $this->basePath = $config['base_path']; + unset($config['base_path']); + } + + if (array_key_exists('base_urls', $config)) { + $this->_usedProperties['baseUrls'] = true; + $this->baseUrls = $config['base_urls']; + unset($config['base_urls']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['strictMode'])) { + $output['strict_mode'] = $this->strictMode; + } + if (isset($this->_usedProperties['versionStrategy'])) { + $output['version_strategy'] = $this->versionStrategy; + } + if (isset($this->_usedProperties['version'])) { + $output['version'] = $this->version; + } + if (isset($this->_usedProperties['versionFormat'])) { + $output['version_format'] = $this->versionFormat; + } + if (isset($this->_usedProperties['jsonManifestPath'])) { + $output['json_manifest_path'] = $this->jsonManifestPath; + } + if (isset($this->_usedProperties['basePath'])) { + $output['base_path'] = $this->basePath; + } + if (isset($this->_usedProperties['baseUrls'])) { + $output['base_urls'] = $this->baseUrls; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/AssetsConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/AssetsConfig.php new file mode 100644 index 0000000..53ac77e --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/AssetsConfig.php @@ -0,0 +1,237 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * Throw an exception if an entry is missing from the manifest.json. + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function strictMode($value): static + { + $this->_usedProperties['strictMode'] = true; + $this->strictMode = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function versionStrategy($value): static + { + $this->_usedProperties['versionStrategy'] = true; + $this->versionStrategy = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function version($value): static + { + $this->_usedProperties['version'] = true; + $this->version = $value; + + return $this; + } + + /** + * @default '%%s?%%s' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function versionFormat($value): static + { + $this->_usedProperties['versionFormat'] = true; + $this->versionFormat = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function jsonManifestPath($value): static + { + $this->_usedProperties['jsonManifestPath'] = true; + $this->jsonManifestPath = $value; + + return $this; + } + + /** + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function basePath($value): static + { + $this->_usedProperties['basePath'] = true; + $this->basePath = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function baseUrls(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['baseUrls'] = true; + $this->baseUrls = $value; + + return $this; + } + + public function package(string $name, array $value = []): \Symfony\Config\Framework\Assets\PackageConfig + { + if (!isset($this->packages[$name])) { + $this->_usedProperties['packages'] = true; + $this->packages[$name] = new \Symfony\Config\Framework\Assets\PackageConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "package()" has already been initialized. You cannot pass values the second time you call package().'); + } + + return $this->packages[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('strict_mode', $config)) { + $this->_usedProperties['strictMode'] = true; + $this->strictMode = $config['strict_mode']; + unset($config['strict_mode']); + } + + if (array_key_exists('version_strategy', $config)) { + $this->_usedProperties['versionStrategy'] = true; + $this->versionStrategy = $config['version_strategy']; + unset($config['version_strategy']); + } + + if (array_key_exists('version', $config)) { + $this->_usedProperties['version'] = true; + $this->version = $config['version']; + unset($config['version']); + } + + if (array_key_exists('version_format', $config)) { + $this->_usedProperties['versionFormat'] = true; + $this->versionFormat = $config['version_format']; + unset($config['version_format']); + } + + if (array_key_exists('json_manifest_path', $config)) { + $this->_usedProperties['jsonManifestPath'] = true; + $this->jsonManifestPath = $config['json_manifest_path']; + unset($config['json_manifest_path']); + } + + if (array_key_exists('base_path', $config)) { + $this->_usedProperties['basePath'] = true; + $this->basePath = $config['base_path']; + unset($config['base_path']); + } + + if (array_key_exists('base_urls', $config)) { + $this->_usedProperties['baseUrls'] = true; + $this->baseUrls = $config['base_urls']; + unset($config['base_urls']); + } + + if (array_key_exists('packages', $config)) { + $this->_usedProperties['packages'] = true; + $this->packages = array_map(fn ($v) => new \Symfony\Config\Framework\Assets\PackageConfig($v), $config['packages']); + unset($config['packages']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['strictMode'])) { + $output['strict_mode'] = $this->strictMode; + } + if (isset($this->_usedProperties['versionStrategy'])) { + $output['version_strategy'] = $this->versionStrategy; + } + if (isset($this->_usedProperties['version'])) { + $output['version'] = $this->version; + } + if (isset($this->_usedProperties['versionFormat'])) { + $output['version_format'] = $this->versionFormat; + } + if (isset($this->_usedProperties['jsonManifestPath'])) { + $output['json_manifest_path'] = $this->jsonManifestPath; + } + if (isset($this->_usedProperties['basePath'])) { + $output['base_path'] = $this->basePath; + } + if (isset($this->_usedProperties['baseUrls'])) { + $output['base_urls'] = $this->baseUrls; + } + if (isset($this->_usedProperties['packages'])) { + $output['packages'] = array_map(fn ($v) => $v->toArray(), $this->packages); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Cache/PoolConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Cache/PoolConfig.php new file mode 100644 index 0000000..438e388 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Cache/PoolConfig.php @@ -0,0 +1,194 @@ +|string $value + * + * @return $this + */ + public function adapters(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['adapters'] = true; + $this->adapters = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function tags($value): static + { + $this->_usedProperties['tags'] = true; + $this->tags = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function public($value): static + { + $this->_usedProperties['public'] = true; + $this->public = $value; + + return $this; + } + + /** + * Default lifetime of the pool. + * @example "300" for 5 minutes expressed in seconds, "PT5M" for five minutes expressed as ISO 8601 time interval, or "5 minutes" as a date expression + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultLifetime($value): static + { + $this->_usedProperties['defaultLifetime'] = true; + $this->defaultLifetime = $value; + + return $this; + } + + /** + * Overwrite the setting from the default provider for this adapter. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function provider($value): static + { + $this->_usedProperties['provider'] = true; + $this->provider = $value; + + return $this; + } + + /** + * @example "messenger.default_bus" to send early expiration events to the default Messenger bus. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function earlyExpirationMessageBus($value): static + { + $this->_usedProperties['earlyExpirationMessageBus'] = true; + $this->earlyExpirationMessageBus = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function clearer($value): static + { + $this->_usedProperties['clearer'] = true; + $this->clearer = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('adapters', $config)) { + $this->_usedProperties['adapters'] = true; + $this->adapters = $config['adapters']; + unset($config['adapters']); + } + + if (array_key_exists('tags', $config)) { + $this->_usedProperties['tags'] = true; + $this->tags = $config['tags']; + unset($config['tags']); + } + + if (array_key_exists('public', $config)) { + $this->_usedProperties['public'] = true; + $this->public = $config['public']; + unset($config['public']); + } + + if (array_key_exists('default_lifetime', $config)) { + $this->_usedProperties['defaultLifetime'] = true; + $this->defaultLifetime = $config['default_lifetime']; + unset($config['default_lifetime']); + } + + if (array_key_exists('provider', $config)) { + $this->_usedProperties['provider'] = true; + $this->provider = $config['provider']; + unset($config['provider']); + } + + if (array_key_exists('early_expiration_message_bus', $config)) { + $this->_usedProperties['earlyExpirationMessageBus'] = true; + $this->earlyExpirationMessageBus = $config['early_expiration_message_bus']; + unset($config['early_expiration_message_bus']); + } + + if (array_key_exists('clearer', $config)) { + $this->_usedProperties['clearer'] = true; + $this->clearer = $config['clearer']; + unset($config['clearer']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['adapters'])) { + $output['adapters'] = $this->adapters; + } + if (isset($this->_usedProperties['tags'])) { + $output['tags'] = $this->tags; + } + if (isset($this->_usedProperties['public'])) { + $output['public'] = $this->public; + } + if (isset($this->_usedProperties['defaultLifetime'])) { + $output['default_lifetime'] = $this->defaultLifetime; + } + if (isset($this->_usedProperties['provider'])) { + $output['provider'] = $this->provider; + } + if (isset($this->_usedProperties['earlyExpirationMessageBus'])) { + $output['early_expiration_message_bus'] = $this->earlyExpirationMessageBus; + } + if (isset($this->_usedProperties['clearer'])) { + $output['clearer'] = $this->clearer; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/CacheConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/CacheConfig.php new file mode 100644 index 0000000..d417f8b --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/CacheConfig.php @@ -0,0 +1,287 @@ +_usedProperties['prefixSeed'] = true; + $this->prefixSeed = $value; + + return $this; + } + + /** + * App related cache pools configuration. + * @default 'cache.adapter.filesystem' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function app($value): static + { + $this->_usedProperties['app'] = true; + $this->app = $value; + + return $this; + } + + /** + * System related cache pools configuration. + * @default 'cache.adapter.system' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function system($value): static + { + $this->_usedProperties['system'] = true; + $this->system = $value; + + return $this; + } + + /** + * @default '%kernel.share_dir%/pools/app' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function directory($value): static + { + $this->_usedProperties['directory'] = true; + $this->directory = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultPsr6Provider($value): static + { + $this->_usedProperties['defaultPsr6Provider'] = true; + $this->defaultPsr6Provider = $value; + + return $this; + } + + /** + * @default 'redis://localhost' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultRedisProvider($value): static + { + $this->_usedProperties['defaultRedisProvider'] = true; + $this->defaultRedisProvider = $value; + + return $this; + } + + /** + * @default 'valkey://localhost' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultValkeyProvider($value): static + { + $this->_usedProperties['defaultValkeyProvider'] = true; + $this->defaultValkeyProvider = $value; + + return $this; + } + + /** + * @default 'memcached://localhost' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultMemcachedProvider($value): static + { + $this->_usedProperties['defaultMemcachedProvider'] = true; + $this->defaultMemcachedProvider = $value; + + return $this; + } + + /** + * @default 'database_connection' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultDoctrineDbalProvider($value): static + { + $this->_usedProperties['defaultDoctrineDbalProvider'] = true; + $this->defaultDoctrineDbalProvider = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultPdoProvider($value): static + { + $this->_usedProperties['defaultPdoProvider'] = true; + $this->defaultPdoProvider = $value; + + return $this; + } + + public function pool(string $name, array $value = []): \Symfony\Config\Framework\Cache\PoolConfig + { + if (!isset($this->pools[$name])) { + $this->_usedProperties['pools'] = true; + $this->pools[$name] = new \Symfony\Config\Framework\Cache\PoolConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "pool()" has already been initialized. You cannot pass values the second time you call pool().'); + } + + return $this->pools[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('prefix_seed', $config)) { + $this->_usedProperties['prefixSeed'] = true; + $this->prefixSeed = $config['prefix_seed']; + unset($config['prefix_seed']); + } + + if (array_key_exists('app', $config)) { + $this->_usedProperties['app'] = true; + $this->app = $config['app']; + unset($config['app']); + } + + if (array_key_exists('system', $config)) { + $this->_usedProperties['system'] = true; + $this->system = $config['system']; + unset($config['system']); + } + + if (array_key_exists('directory', $config)) { + $this->_usedProperties['directory'] = true; + $this->directory = $config['directory']; + unset($config['directory']); + } + + if (array_key_exists('default_psr6_provider', $config)) { + $this->_usedProperties['defaultPsr6Provider'] = true; + $this->defaultPsr6Provider = $config['default_psr6_provider']; + unset($config['default_psr6_provider']); + } + + if (array_key_exists('default_redis_provider', $config)) { + $this->_usedProperties['defaultRedisProvider'] = true; + $this->defaultRedisProvider = $config['default_redis_provider']; + unset($config['default_redis_provider']); + } + + if (array_key_exists('default_valkey_provider', $config)) { + $this->_usedProperties['defaultValkeyProvider'] = true; + $this->defaultValkeyProvider = $config['default_valkey_provider']; + unset($config['default_valkey_provider']); + } + + if (array_key_exists('default_memcached_provider', $config)) { + $this->_usedProperties['defaultMemcachedProvider'] = true; + $this->defaultMemcachedProvider = $config['default_memcached_provider']; + unset($config['default_memcached_provider']); + } + + if (array_key_exists('default_doctrine_dbal_provider', $config)) { + $this->_usedProperties['defaultDoctrineDbalProvider'] = true; + $this->defaultDoctrineDbalProvider = $config['default_doctrine_dbal_provider']; + unset($config['default_doctrine_dbal_provider']); + } + + if (array_key_exists('default_pdo_provider', $config)) { + $this->_usedProperties['defaultPdoProvider'] = true; + $this->defaultPdoProvider = $config['default_pdo_provider']; + unset($config['default_pdo_provider']); + } + + if (array_key_exists('pools', $config)) { + $this->_usedProperties['pools'] = true; + $this->pools = array_map(fn ($v) => new \Symfony\Config\Framework\Cache\PoolConfig($v), $config['pools']); + unset($config['pools']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['prefixSeed'])) { + $output['prefix_seed'] = $this->prefixSeed; + } + if (isset($this->_usedProperties['app'])) { + $output['app'] = $this->app; + } + if (isset($this->_usedProperties['system'])) { + $output['system'] = $this->system; + } + if (isset($this->_usedProperties['directory'])) { + $output['directory'] = $this->directory; + } + if (isset($this->_usedProperties['defaultPsr6Provider'])) { + $output['default_psr6_provider'] = $this->defaultPsr6Provider; + } + if (isset($this->_usedProperties['defaultRedisProvider'])) { + $output['default_redis_provider'] = $this->defaultRedisProvider; + } + if (isset($this->_usedProperties['defaultValkeyProvider'])) { + $output['default_valkey_provider'] = $this->defaultValkeyProvider; + } + if (isset($this->_usedProperties['defaultMemcachedProvider'])) { + $output['default_memcached_provider'] = $this->defaultMemcachedProvider; + } + if (isset($this->_usedProperties['defaultDoctrineDbalProvider'])) { + $output['default_doctrine_dbal_provider'] = $this->defaultDoctrineDbalProvider; + } + if (isset($this->_usedProperties['defaultPdoProvider'])) { + $output['default_pdo_provider'] = $this->defaultPdoProvider; + } + if (isset($this->_usedProperties['pools'])) { + $output['pools'] = array_map(fn ($v) => $v->toArray(), $this->pools); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/CsrfProtectionConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/CsrfProtectionConfig.php new file mode 100644 index 0000000..c28a856 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/CsrfProtectionConfig.php @@ -0,0 +1,123 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function statelessTokenIds(ParamConfigurator|array $value): static + { + $this->_usedProperties['statelessTokenIds'] = true; + $this->statelessTokenIds = $value; + + return $this; + } + + /** + * Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. + * @default false + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function checkHeader($value): static + { + $this->_usedProperties['checkHeader'] = true; + $this->checkHeader = $value; + + return $this; + } + + /** + * The name of the cookie to use when using stateless protection. + * @default 'csrf-token' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cookieName($value): static + { + $this->_usedProperties['cookieName'] = true; + $this->cookieName = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('stateless_token_ids', $config)) { + $this->_usedProperties['statelessTokenIds'] = true; + $this->statelessTokenIds = $config['stateless_token_ids']; + unset($config['stateless_token_ids']); + } + + if (array_key_exists('check_header', $config)) { + $this->_usedProperties['checkHeader'] = true; + $this->checkHeader = $config['check_header']; + unset($config['check_header']); + } + + if (array_key_exists('cookie_name', $config)) { + $this->_usedProperties['cookieName'] = true; + $this->cookieName = $config['cookie_name']; + unset($config['cookie_name']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['statelessTokenIds'])) { + $output['stateless_token_ids'] = $this->statelessTokenIds; + } + if (isset($this->_usedProperties['checkHeader'])) { + $output['check_header'] = $this->checkHeader; + } + if (isset($this->_usedProperties['cookieName'])) { + $output['cookie_name'] = $this->cookieName; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/EsiConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/EsiConfig.php new file mode 100644 index 0000000..654dcd1 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/EsiConfig.php @@ -0,0 +1,52 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/ExceptionConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/ExceptionConfig.php new file mode 100644 index 0000000..5f0bbb2 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/ExceptionConfig.php @@ -0,0 +1,101 @@ +_usedProperties['logLevel'] = true; + $this->logLevel = $value; + + return $this; + } + + /** + * The status code of the response. Null or 0 to let Symfony decide. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function statusCode($value): static + { + $this->_usedProperties['statusCode'] = true; + $this->statusCode = $value; + + return $this; + } + + /** + * The channel of log message. Null to let Symfony decide. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function logChannel($value): static + { + $this->_usedProperties['logChannel'] = true; + $this->logChannel = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('log_level', $config)) { + $this->_usedProperties['logLevel'] = true; + $this->logLevel = $config['log_level']; + unset($config['log_level']); + } + + if (array_key_exists('status_code', $config)) { + $this->_usedProperties['statusCode'] = true; + $this->statusCode = $config['status_code']; + unset($config['status_code']); + } + + if (array_key_exists('log_channel', $config)) { + $this->_usedProperties['logChannel'] = true; + $this->logChannel = $config['log_channel']; + unset($config['log_channel']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['logLevel'])) { + $output['log_level'] = $this->logLevel; + } + if (isset($this->_usedProperties['statusCode'])) { + $output['status_code'] = $this->statusCode; + } + if (isset($this->_usedProperties['logChannel'])) { + $output['log_channel'] = $this->logChannel; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Form/CsrfProtectionConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Form/CsrfProtectionConfig.php new file mode 100644 index 0000000..fe1de18 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Form/CsrfProtectionConfig.php @@ -0,0 +1,119 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function tokenId($value): static + { + $this->_usedProperties['tokenId'] = true; + $this->tokenId = $value; + + return $this; + } + + /** + * @default '_token' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function fieldName($value): static + { + $this->_usedProperties['fieldName'] = true; + $this->fieldName = $value; + + return $this; + } + + /** + * @return $this + */ + public function fieldAttr(string $name, mixed $value): static + { + $this->_usedProperties['fieldAttr'] = true; + $this->fieldAttr[$name] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('token_id', $config)) { + $this->_usedProperties['tokenId'] = true; + $this->tokenId = $config['token_id']; + unset($config['token_id']); + } + + if (array_key_exists('field_name', $config)) { + $this->_usedProperties['fieldName'] = true; + $this->fieldName = $config['field_name']; + unset($config['field_name']); + } + + if (array_key_exists('field_attr', $config)) { + $this->_usedProperties['fieldAttr'] = true; + $this->fieldAttr = $config['field_attr']; + unset($config['field_attr']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['tokenId'])) { + $output['token_id'] = $this->tokenId; + } + if (isset($this->_usedProperties['fieldName'])) { + $output['field_name'] = $this->fieldName; + } + if (isset($this->_usedProperties['fieldAttr'])) { + $output['field_attr'] = $this->fieldAttr; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/FormConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/FormConfig.php new file mode 100644 index 0000000..4cf0636 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/FormConfig.php @@ -0,0 +1,90 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * @default {"enabled":null,"token_id":null,"field_name":"_token","field_attr":{"data-controller":"csrf-protection"}} + * @return \Symfony\Config\Framework\Form\CsrfProtectionConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Form\CsrfProtectionConfig : static) + */ + public function csrfProtection(array|bool $value = []): \Symfony\Config\Framework\Form\CsrfProtectionConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['csrfProtection'] = true; + $this->csrfProtection = $value; + + return $this; + } + + if (!$this->csrfProtection instanceof \Symfony\Config\Framework\Form\CsrfProtectionConfig) { + $this->_usedProperties['csrfProtection'] = true; + $this->csrfProtection = new \Symfony\Config\Framework\Form\CsrfProtectionConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "csrfProtection()" has already been initialized. You cannot pass values the second time you call csrfProtection().'); + } + + return $this->csrfProtection; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('csrf_protection', $config)) { + $this->_usedProperties['csrfProtection'] = true; + $this->csrfProtection = \is_array($config['csrf_protection']) ? new \Symfony\Config\Framework\Form\CsrfProtectionConfig($config['csrf_protection']) : $config['csrf_protection']; + unset($config['csrf_protection']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['csrfProtection'])) { + $output['csrf_protection'] = $this->csrfProtection instanceof \Symfony\Config\Framework\Form\CsrfProtectionConfig ? $this->csrfProtection->toArray() : $this->csrfProtection; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/FragmentsConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/FragmentsConfig.php new file mode 100644 index 0000000..558ab27 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/FragmentsConfig.php @@ -0,0 +1,98 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function hincludeDefaultTemplate($value): static + { + $this->_usedProperties['hincludeDefaultTemplate'] = true; + $this->hincludeDefaultTemplate = $value; + + return $this; + } + + /** + * @default '/_fragment' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function path($value): static + { + $this->_usedProperties['path'] = true; + $this->path = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('hinclude_default_template', $config)) { + $this->_usedProperties['hincludeDefaultTemplate'] = true; + $this->hincludeDefaultTemplate = $config['hinclude_default_template']; + unset($config['hinclude_default_template']); + } + + if (array_key_exists('path', $config)) { + $this->_usedProperties['path'] = true; + $this->path = $config['path']; + unset($config['path']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['hincludeDefaultTemplate'])) { + $output['hinclude_default_template'] = $this->hincludeDefaultTemplate; + } + if (isset($this->_usedProperties['path'])) { + $output['path'] = $this->path; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HtmlSanitizer/SanitizerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HtmlSanitizer/SanitizerConfig.php new file mode 100644 index 0000000..b9cbf8c --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HtmlSanitizer/SanitizerConfig.php @@ -0,0 +1,441 @@ +_usedProperties['allowSafeElements'] = true; + $this->allowSafeElements = $value; + + return $this; + } + + /** + * Allows all static elements and attributes from the W3C Sanitizer API standard. + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function allowStaticElements($value): static + { + $this->_usedProperties['allowStaticElements'] = true; + $this->allowStaticElements = $value; + + return $this; + } + + /** + * @return $this + */ + public function allowElement(string $name, mixed $value): static + { + $this->_usedProperties['allowElements'] = true; + $this->allowElements[$name] = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function blockElements(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['blockElements'] = true; + $this->blockElements = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function dropElements(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['dropElements'] = true; + $this->dropElements = $value; + + return $this; + } + + /** + * @return $this + */ + public function allowAttribute(string $name, mixed $value): static + { + $this->_usedProperties['allowAttributes'] = true; + $this->allowAttributes[$name] = $value; + + return $this; + } + + /** + * @return $this + */ + public function dropAttribute(string $name, mixed $value): static + { + $this->_usedProperties['dropAttributes'] = true; + $this->dropAttributes[$name] = $value; + + return $this; + } + + /** + * @return $this + */ + public function forceAttribute(string $name, ParamConfigurator|array $value): static + { + $this->_usedProperties['forceAttributes'] = true; + $this->forceAttributes[$name] = $value; + + return $this; + } + + /** + * Transforms URLs using the HTTP scheme to use the HTTPS scheme instead. + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function forceHttpsUrls($value): static + { + $this->_usedProperties['forceHttpsUrls'] = true; + $this->forceHttpsUrls = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function allowedLinkSchemes(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['allowedLinkSchemes'] = true; + $this->allowedLinkSchemes = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function allowedLinkHosts(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['allowedLinkHosts'] = true; + $this->allowedLinkHosts = $value; + + return $this; + } + + /** + * Allows relative URLs to be used in links href attributes. + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function allowRelativeLinks($value): static + { + $this->_usedProperties['allowRelativeLinks'] = true; + $this->allowRelativeLinks = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function allowedMediaSchemes(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['allowedMediaSchemes'] = true; + $this->allowedMediaSchemes = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function allowedMediaHosts(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['allowedMediaHosts'] = true; + $this->allowedMediaHosts = $value; + + return $this; + } + + /** + * Allows relative URLs to be used in media source attributes (img, audio, video, ...). + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function allowRelativeMedias($value): static + { + $this->_usedProperties['allowRelativeMedias'] = true; + $this->allowRelativeMedias = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function withAttributeSanitizers(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['withAttributeSanitizers'] = true; + $this->withAttributeSanitizers = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function withoutAttributeSanitizers(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['withoutAttributeSanitizers'] = true; + $this->withoutAttributeSanitizers = $value; + + return $this; + } + + /** + * The maximum length allowed for the sanitized input. + * @default 0 + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxInputLength($value): static + { + $this->_usedProperties['maxInputLength'] = true; + $this->maxInputLength = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('allow_safe_elements', $config)) { + $this->_usedProperties['allowSafeElements'] = true; + $this->allowSafeElements = $config['allow_safe_elements']; + unset($config['allow_safe_elements']); + } + + if (array_key_exists('allow_static_elements', $config)) { + $this->_usedProperties['allowStaticElements'] = true; + $this->allowStaticElements = $config['allow_static_elements']; + unset($config['allow_static_elements']); + } + + if (array_key_exists('allow_elements', $config)) { + $this->_usedProperties['allowElements'] = true; + $this->allowElements = $config['allow_elements']; + unset($config['allow_elements']); + } + + if (array_key_exists('block_elements', $config)) { + $this->_usedProperties['blockElements'] = true; + $this->blockElements = $config['block_elements']; + unset($config['block_elements']); + } + + if (array_key_exists('drop_elements', $config)) { + $this->_usedProperties['dropElements'] = true; + $this->dropElements = $config['drop_elements']; + unset($config['drop_elements']); + } + + if (array_key_exists('allow_attributes', $config)) { + $this->_usedProperties['allowAttributes'] = true; + $this->allowAttributes = $config['allow_attributes']; + unset($config['allow_attributes']); + } + + if (array_key_exists('drop_attributes', $config)) { + $this->_usedProperties['dropAttributes'] = true; + $this->dropAttributes = $config['drop_attributes']; + unset($config['drop_attributes']); + } + + if (array_key_exists('force_attributes', $config)) { + $this->_usedProperties['forceAttributes'] = true; + $this->forceAttributes = $config['force_attributes']; + unset($config['force_attributes']); + } + + if (array_key_exists('force_https_urls', $config)) { + $this->_usedProperties['forceHttpsUrls'] = true; + $this->forceHttpsUrls = $config['force_https_urls']; + unset($config['force_https_urls']); + } + + if (array_key_exists('allowed_link_schemes', $config)) { + $this->_usedProperties['allowedLinkSchemes'] = true; + $this->allowedLinkSchemes = $config['allowed_link_schemes']; + unset($config['allowed_link_schemes']); + } + + if (array_key_exists('allowed_link_hosts', $config)) { + $this->_usedProperties['allowedLinkHosts'] = true; + $this->allowedLinkHosts = $config['allowed_link_hosts']; + unset($config['allowed_link_hosts']); + } + + if (array_key_exists('allow_relative_links', $config)) { + $this->_usedProperties['allowRelativeLinks'] = true; + $this->allowRelativeLinks = $config['allow_relative_links']; + unset($config['allow_relative_links']); + } + + if (array_key_exists('allowed_media_schemes', $config)) { + $this->_usedProperties['allowedMediaSchemes'] = true; + $this->allowedMediaSchemes = $config['allowed_media_schemes']; + unset($config['allowed_media_schemes']); + } + + if (array_key_exists('allowed_media_hosts', $config)) { + $this->_usedProperties['allowedMediaHosts'] = true; + $this->allowedMediaHosts = $config['allowed_media_hosts']; + unset($config['allowed_media_hosts']); + } + + if (array_key_exists('allow_relative_medias', $config)) { + $this->_usedProperties['allowRelativeMedias'] = true; + $this->allowRelativeMedias = $config['allow_relative_medias']; + unset($config['allow_relative_medias']); + } + + if (array_key_exists('with_attribute_sanitizers', $config)) { + $this->_usedProperties['withAttributeSanitizers'] = true; + $this->withAttributeSanitizers = $config['with_attribute_sanitizers']; + unset($config['with_attribute_sanitizers']); + } + + if (array_key_exists('without_attribute_sanitizers', $config)) { + $this->_usedProperties['withoutAttributeSanitizers'] = true; + $this->withoutAttributeSanitizers = $config['without_attribute_sanitizers']; + unset($config['without_attribute_sanitizers']); + } + + if (array_key_exists('max_input_length', $config)) { + $this->_usedProperties['maxInputLength'] = true; + $this->maxInputLength = $config['max_input_length']; + unset($config['max_input_length']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['allowSafeElements'])) { + $output['allow_safe_elements'] = $this->allowSafeElements; + } + if (isset($this->_usedProperties['allowStaticElements'])) { + $output['allow_static_elements'] = $this->allowStaticElements; + } + if (isset($this->_usedProperties['allowElements'])) { + $output['allow_elements'] = $this->allowElements; + } + if (isset($this->_usedProperties['blockElements'])) { + $output['block_elements'] = $this->blockElements; + } + if (isset($this->_usedProperties['dropElements'])) { + $output['drop_elements'] = $this->dropElements; + } + if (isset($this->_usedProperties['allowAttributes'])) { + $output['allow_attributes'] = $this->allowAttributes; + } + if (isset($this->_usedProperties['dropAttributes'])) { + $output['drop_attributes'] = $this->dropAttributes; + } + if (isset($this->_usedProperties['forceAttributes'])) { + $output['force_attributes'] = $this->forceAttributes; + } + if (isset($this->_usedProperties['forceHttpsUrls'])) { + $output['force_https_urls'] = $this->forceHttpsUrls; + } + if (isset($this->_usedProperties['allowedLinkSchemes'])) { + $output['allowed_link_schemes'] = $this->allowedLinkSchemes; + } + if (isset($this->_usedProperties['allowedLinkHosts'])) { + $output['allowed_link_hosts'] = $this->allowedLinkHosts; + } + if (isset($this->_usedProperties['allowRelativeLinks'])) { + $output['allow_relative_links'] = $this->allowRelativeLinks; + } + if (isset($this->_usedProperties['allowedMediaSchemes'])) { + $output['allowed_media_schemes'] = $this->allowedMediaSchemes; + } + if (isset($this->_usedProperties['allowedMediaHosts'])) { + $output['allowed_media_hosts'] = $this->allowedMediaHosts; + } + if (isset($this->_usedProperties['allowRelativeMedias'])) { + $output['allow_relative_medias'] = $this->allowRelativeMedias; + } + if (isset($this->_usedProperties['withAttributeSanitizers'])) { + $output['with_attribute_sanitizers'] = $this->withAttributeSanitizers; + } + if (isset($this->_usedProperties['withoutAttributeSanitizers'])) { + $output['without_attribute_sanitizers'] = $this->withoutAttributeSanitizers; + } + if (isset($this->_usedProperties['maxInputLength'])) { + $output['max_input_length'] = $this->maxInputLength; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HtmlSanitizerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HtmlSanitizerConfig.php new file mode 100644 index 0000000..e7eee27 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HtmlSanitizerConfig.php @@ -0,0 +1,76 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + public function sanitizer(string $name, array $value = []): \Symfony\Config\Framework\HtmlSanitizer\SanitizerConfig + { + if (!isset($this->sanitizers[$name])) { + $this->_usedProperties['sanitizers'] = true; + $this->sanitizers[$name] = new \Symfony\Config\Framework\HtmlSanitizer\SanitizerConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "sanitizer()" has already been initialized. You cannot pass values the second time you call sanitizer().'); + } + + return $this->sanitizers[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('sanitizers', $config)) { + $this->_usedProperties['sanitizers'] = true; + $this->sanitizers = array_map(fn ($v) => new \Symfony\Config\Framework\HtmlSanitizer\SanitizerConfig($v), $config['sanitizers']); + unset($config['sanitizers']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['sanitizers'])) { + $output['sanitizers'] = array_map(fn ($v) => $v->toArray(), $this->sanitizers); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpCacheConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpCacheConfig.php new file mode 100644 index 0000000..b6d85d0 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpCacheConfig.php @@ -0,0 +1,305 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default '%kernel.debug%' + * @param ParamConfigurator|bool $value + * @return $this + */ + public function debug($value): static + { + $this->_usedProperties['debug'] = true; + $this->debug = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|'none'|'short'|'full' $value + * @return $this + */ + public function traceLevel($value): static + { + $this->_usedProperties['traceLevel'] = true; + $this->traceLevel = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function traceHeader($value): static + { + $this->_usedProperties['traceHeader'] = true; + $this->traceHeader = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|int $value + * @return $this + */ + public function defaultTtl($value): static + { + $this->_usedProperties['defaultTtl'] = true; + $this->defaultTtl = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function privateHeaders(ParamConfigurator|array $value): static + { + $this->_usedProperties['privateHeaders'] = true; + $this->privateHeaders = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function skipResponseHeaders(ParamConfigurator|array $value): static + { + $this->_usedProperties['skipResponseHeaders'] = true; + $this->skipResponseHeaders = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function allowReload($value): static + { + $this->_usedProperties['allowReload'] = true; + $this->allowReload = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function allowRevalidate($value): static + { + $this->_usedProperties['allowRevalidate'] = true; + $this->allowRevalidate = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|int $value + * @return $this + */ + public function staleWhileRevalidate($value): static + { + $this->_usedProperties['staleWhileRevalidate'] = true; + $this->staleWhileRevalidate = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|int $value + * @return $this + */ + public function staleIfError($value): static + { + $this->_usedProperties['staleIfError'] = true; + $this->staleIfError = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function terminateOnCacheHit($value): static + { + $this->_usedProperties['terminateOnCacheHit'] = true; + $this->terminateOnCacheHit = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('debug', $config)) { + $this->_usedProperties['debug'] = true; + $this->debug = $config['debug']; + unset($config['debug']); + } + + if (array_key_exists('trace_level', $config)) { + $this->_usedProperties['traceLevel'] = true; + $this->traceLevel = $config['trace_level']; + unset($config['trace_level']); + } + + if (array_key_exists('trace_header', $config)) { + $this->_usedProperties['traceHeader'] = true; + $this->traceHeader = $config['trace_header']; + unset($config['trace_header']); + } + + if (array_key_exists('default_ttl', $config)) { + $this->_usedProperties['defaultTtl'] = true; + $this->defaultTtl = $config['default_ttl']; + unset($config['default_ttl']); + } + + if (array_key_exists('private_headers', $config)) { + $this->_usedProperties['privateHeaders'] = true; + $this->privateHeaders = $config['private_headers']; + unset($config['private_headers']); + } + + if (array_key_exists('skip_response_headers', $config)) { + $this->_usedProperties['skipResponseHeaders'] = true; + $this->skipResponseHeaders = $config['skip_response_headers']; + unset($config['skip_response_headers']); + } + + if (array_key_exists('allow_reload', $config)) { + $this->_usedProperties['allowReload'] = true; + $this->allowReload = $config['allow_reload']; + unset($config['allow_reload']); + } + + if (array_key_exists('allow_revalidate', $config)) { + $this->_usedProperties['allowRevalidate'] = true; + $this->allowRevalidate = $config['allow_revalidate']; + unset($config['allow_revalidate']); + } + + if (array_key_exists('stale_while_revalidate', $config)) { + $this->_usedProperties['staleWhileRevalidate'] = true; + $this->staleWhileRevalidate = $config['stale_while_revalidate']; + unset($config['stale_while_revalidate']); + } + + if (array_key_exists('stale_if_error', $config)) { + $this->_usedProperties['staleIfError'] = true; + $this->staleIfError = $config['stale_if_error']; + unset($config['stale_if_error']); + } + + if (array_key_exists('terminate_on_cache_hit', $config)) { + $this->_usedProperties['terminateOnCacheHit'] = true; + $this->terminateOnCacheHit = $config['terminate_on_cache_hit']; + unset($config['terminate_on_cache_hit']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['debug'])) { + $output['debug'] = $this->debug; + } + if (isset($this->_usedProperties['traceLevel'])) { + $output['trace_level'] = $this->traceLevel; + } + if (isset($this->_usedProperties['traceHeader'])) { + $output['trace_header'] = $this->traceHeader; + } + if (isset($this->_usedProperties['defaultTtl'])) { + $output['default_ttl'] = $this->defaultTtl; + } + if (isset($this->_usedProperties['privateHeaders'])) { + $output['private_headers'] = $this->privateHeaders; + } + if (isset($this->_usedProperties['skipResponseHeaders'])) { + $output['skip_response_headers'] = $this->skipResponseHeaders; + } + if (isset($this->_usedProperties['allowReload'])) { + $output['allow_reload'] = $this->allowReload; + } + if (isset($this->_usedProperties['allowRevalidate'])) { + $output['allow_revalidate'] = $this->allowRevalidate; + } + if (isset($this->_usedProperties['staleWhileRevalidate'])) { + $output['stale_while_revalidate'] = $this->staleWhileRevalidate; + } + if (isset($this->_usedProperties['staleIfError'])) { + $output['stale_if_error'] = $this->staleIfError; + } + if (isset($this->_usedProperties['terminateOnCacheHit'])) { + $output['terminate_on_cache_hit'] = $this->terminateOnCacheHit; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/CachingConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/CachingConfig.php new file mode 100644 index 0000000..b682270 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/CachingConfig.php @@ -0,0 +1,124 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * The taggable cache pool to use for storing the responses. + * @default 'cache.http_client' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cachePool($value): static + { + $this->_usedProperties['cachePool'] = true; + $this->cachePool = $value; + + return $this; + } + + /** + * Indicates whether the cache is shared (public) or private. + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function shared($value): static + { + $this->_usedProperties['shared'] = true; + $this->shared = $value; + + return $this; + } + + /** + * The maximum TTL (in seconds) allowed for cached responses. Null means no cap. + * @default null + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxTtl($value): static + { + $this->_usedProperties['maxTtl'] = true; + $this->maxTtl = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('cache_pool', $config)) { + $this->_usedProperties['cachePool'] = true; + $this->cachePool = $config['cache_pool']; + unset($config['cache_pool']); + } + + if (array_key_exists('shared', $config)) { + $this->_usedProperties['shared'] = true; + $this->shared = $config['shared']; + unset($config['shared']); + } + + if (array_key_exists('max_ttl', $config)) { + $this->_usedProperties['maxTtl'] = true; + $this->maxTtl = $config['max_ttl']; + unset($config['max_ttl']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['cachePool'])) { + $output['cache_pool'] = $this->cachePool; + } + if (isset($this->_usedProperties['shared'])) { + $output['shared'] = $this->shared; + } + if (isset($this->_usedProperties['maxTtl'])) { + $output['max_ttl'] = $this->maxTtl; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/PeerFingerprintConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/PeerFingerprintConfig.php new file mode 100644 index 0000000..b916461 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/PeerFingerprintConfig.php @@ -0,0 +1,101 @@ +_usedProperties['sha1'] = true; + $this->sha1 = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * + * @return $this + */ + public function pinsha256(mixed $value): static + { + $this->_usedProperties['pinsha256'] = true; + $this->pinsha256 = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * + * @return $this + */ + public function md5(mixed $value): static + { + $this->_usedProperties['md5'] = true; + $this->md5 = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('sha1', $config)) { + $this->_usedProperties['sha1'] = true; + $this->sha1 = $config['sha1']; + unset($config['sha1']); + } + + if (array_key_exists('pin-sha256', $config)) { + $this->_usedProperties['pinsha256'] = true; + $this->pinsha256 = $config['pin-sha256']; + unset($config['pin-sha256']); + } + + if (array_key_exists('md5', $config)) { + $this->_usedProperties['md5'] = true; + $this->md5 = $config['md5']; + unset($config['md5']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['sha1'])) { + $output['sha1'] = $this->sha1; + } + if (isset($this->_usedProperties['pinsha256'])) { + $output['pin-sha256'] = $this->pinsha256; + } + if (isset($this->_usedProperties['md5'])) { + $output['md5'] = $this->md5; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/RetryFailed/HttpCodeConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/RetryFailed/HttpCodeConfig.php new file mode 100644 index 0000000..b5c26af --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/RetryFailed/HttpCodeConfig.php @@ -0,0 +1,75 @@ +_usedProperties['code'] = true; + $this->code = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function methods(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['methods'] = true; + $this->methods = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('code', $config)) { + $this->_usedProperties['code'] = true; + $this->code = $config['code']; + unset($config['code']); + } + + if (array_key_exists('methods', $config)) { + $this->_usedProperties['methods'] = true; + $this->methods = $config['methods']; + unset($config['methods']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['code'])) { + $output['code'] = $this->code; + } + if (isset($this->_usedProperties['methods'])) { + $output['methods'] = $this->methods; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/RetryFailedConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/RetryFailedConfig.php new file mode 100644 index 0000000..f3d39ea --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptions/RetryFailedConfig.php @@ -0,0 +1,222 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * service id to override the retry strategy. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function retryStrategy($value): static + { + $this->_usedProperties['retryStrategy'] = true; + $this->retryStrategy = $value; + + return $this; + } + + /** + * A list of HTTP status code that triggers a retry. + */ + public function httpCode(string $code, array $value = []): \Symfony\Config\Framework\HttpClient\DefaultOptions\RetryFailed\HttpCodeConfig + { + if (!isset($this->httpCodes[$code])) { + $this->_usedProperties['httpCodes'] = true; + $this->httpCodes[$code] = new \Symfony\Config\Framework\HttpClient\DefaultOptions\RetryFailed\HttpCodeConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "httpCode()" has already been initialized. You cannot pass values the second time you call httpCode().'); + } + + return $this->httpCodes[$code]; + } + + /** + * @default 3 + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxRetries($value): static + { + $this->_usedProperties['maxRetries'] = true; + $this->maxRetries = $value; + + return $this; + } + + /** + * Time in ms to delay (or the initial value when multiplier is used). + * @default 1000 + * @param ParamConfigurator|int $value + * @return $this + */ + public function delay($value): static + { + $this->_usedProperties['delay'] = true; + $this->delay = $value; + + return $this; + } + + /** + * If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). + * @default 2 + * @param ParamConfigurator|float $value + * @return $this + */ + public function multiplier($value): static + { + $this->_usedProperties['multiplier'] = true; + $this->multiplier = $value; + + return $this; + } + + /** + * Max time in ms that a retry should ever be delayed (0 = infinite). + * @default 0 + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxDelay($value): static + { + $this->_usedProperties['maxDelay'] = true; + $this->maxDelay = $value; + + return $this; + } + + /** + * Randomness in percent (between 0 and 1) to apply to the delay. + * @default 0.1 + * @param ParamConfigurator|float $value + * @return $this + */ + public function jitter($value): static + { + $this->_usedProperties['jitter'] = true; + $this->jitter = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('retry_strategy', $config)) { + $this->_usedProperties['retryStrategy'] = true; + $this->retryStrategy = $config['retry_strategy']; + unset($config['retry_strategy']); + } + + if (array_key_exists('http_codes', $config)) { + $this->_usedProperties['httpCodes'] = true; + $this->httpCodes = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\HttpClient\DefaultOptions\RetryFailed\HttpCodeConfig($v) : $v, $config['http_codes']); + unset($config['http_codes']); + } + + if (array_key_exists('max_retries', $config)) { + $this->_usedProperties['maxRetries'] = true; + $this->maxRetries = $config['max_retries']; + unset($config['max_retries']); + } + + if (array_key_exists('delay', $config)) { + $this->_usedProperties['delay'] = true; + $this->delay = $config['delay']; + unset($config['delay']); + } + + if (array_key_exists('multiplier', $config)) { + $this->_usedProperties['multiplier'] = true; + $this->multiplier = $config['multiplier']; + unset($config['multiplier']); + } + + if (array_key_exists('max_delay', $config)) { + $this->_usedProperties['maxDelay'] = true; + $this->maxDelay = $config['max_delay']; + unset($config['max_delay']); + } + + if (array_key_exists('jitter', $config)) { + $this->_usedProperties['jitter'] = true; + $this->jitter = $config['jitter']; + unset($config['jitter']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['retryStrategy'])) { + $output['retry_strategy'] = $this->retryStrategy; + } + if (isset($this->_usedProperties['httpCodes'])) { + $output['http_codes'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\HttpClient\DefaultOptions\RetryFailed\HttpCodeConfig ? $v->toArray() : $v, $this->httpCodes); + } + if (isset($this->_usedProperties['maxRetries'])) { + $output['max_retries'] = $this->maxRetries; + } + if (isset($this->_usedProperties['delay'])) { + $output['delay'] = $this->delay; + } + if (isset($this->_usedProperties['multiplier'])) { + $output['multiplier'] = $this->multiplier; + } + if (isset($this->_usedProperties['maxDelay'])) { + $output['max_delay'] = $this->maxDelay; + } + if (isset($this->_usedProperties['jitter'])) { + $output['jitter'] = $this->jitter; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptionsConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptionsConfig.php new file mode 100644 index 0000000..1d763be --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/DefaultOptionsConfig.php @@ -0,0 +1,623 @@ +_usedProperties['headers'] = true; + $this->headers[$name] = $value; + + return $this; + } + + /** + * @return $this + */ + public function var(string $name, mixed $value): static + { + $this->_usedProperties['vars'] = true; + $this->vars[$name] = $value; + + return $this; + } + + /** + * The maximum number of redirects to follow. + * @default null + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxRedirects($value): static + { + $this->_usedProperties['maxRedirects'] = true; + $this->maxRedirects = $value; + + return $this; + } + + /** + * The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function httpVersion($value): static + { + $this->_usedProperties['httpVersion'] = true; + $this->httpVersion = $value; + + return $this; + } + + /** + * @return $this + */ + public function resolve(string $host, mixed $value): static + { + $this->_usedProperties['resolve'] = true; + $this->resolve[$host] = $value; + + return $this; + } + + /** + * The URL of the proxy to pass requests through or null for automatic detection. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function proxy($value): static + { + $this->_usedProperties['proxy'] = true; + $this->proxy = $value; + + return $this; + } + + /** + * A comma separated list of hosts that do not require a proxy to be reached. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function noProxy($value): static + { + $this->_usedProperties['noProxy'] = true; + $this->noProxy = $value; + + return $this; + } + + /** + * The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * @default null + * @param ParamConfigurator|float $value + * @return $this + */ + public function timeout($value): static + { + $this->_usedProperties['timeout'] = true; + $this->timeout = $value; + + return $this; + } + + /** + * The maximum execution time for the request+response as a whole. + * @default null + * @param ParamConfigurator|float $value + * @return $this + */ + public function maxDuration($value): static + { + $this->_usedProperties['maxDuration'] = true; + $this->maxDuration = $value; + + return $this; + } + + /** + * A network interface name, IP address, a host name or a UNIX socket to bind to. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function bindto($value): static + { + $this->_usedProperties['bindto'] = true; + $this->bindto = $value; + + return $this; + } + + /** + * Indicates if the peer should be verified in a TLS context. + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function verifyPeer($value): static + { + $this->_usedProperties['verifyPeer'] = true; + $this->verifyPeer = $value; + + return $this; + } + + /** + * Indicates if the host should exist as a certificate common name. + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function verifyHost($value): static + { + $this->_usedProperties['verifyHost'] = true; + $this->verifyHost = $value; + + return $this; + } + + /** + * A certificate authority file. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cafile($value): static + { + $this->_usedProperties['cafile'] = true; + $this->cafile = $value; + + return $this; + } + + /** + * A directory that contains multiple certificate authority files. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function capath($value): static + { + $this->_usedProperties['capath'] = true; + $this->capath = $value; + + return $this; + } + + /** + * A PEM formatted certificate file. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function localCert($value): static + { + $this->_usedProperties['localCert'] = true; + $this->localCert = $value; + + return $this; + } + + /** + * A private key file. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function localPk($value): static + { + $this->_usedProperties['localPk'] = true; + $this->localPk = $value; + + return $this; + } + + /** + * The passphrase used to encrypt the "local_pk" file. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function passphrase($value): static + { + $this->_usedProperties['passphrase'] = true; + $this->passphrase = $value; + + return $this; + } + + /** + * A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...) + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function ciphers($value): static + { + $this->_usedProperties['ciphers'] = true; + $this->ciphers = $value; + + return $this; + } + + /** + * Associative array: hashing algorithm => hash(es). + */ + public function peerFingerprint(array $value = []): \Symfony\Config\Framework\HttpClient\DefaultOptions\PeerFingerprintConfig + { + if (null === $this->peerFingerprint) { + $this->_usedProperties['peerFingerprint'] = true; + $this->peerFingerprint = new \Symfony\Config\Framework\HttpClient\DefaultOptions\PeerFingerprintConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "peerFingerprint()" has already been initialized. You cannot pass values the second time you call peerFingerprint().'); + } + + return $this->peerFingerprint; + } + + /** + * The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cryptoMethod($value): static + { + $this->_usedProperties['cryptoMethod'] = true; + $this->cryptoMethod = $value; + + return $this; + } + + /** + * @return $this + */ + public function extra(string $name, mixed $value): static + { + $this->_usedProperties['extra'] = true; + $this->extra[$name] = $value; + + return $this; + } + + /** + * Rate limiter name to use for throttling requests. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function rateLimiter($value): static + { + $this->_usedProperties['rateLimiter'] = true; + $this->rateLimiter = $value; + + return $this; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Caching configuration. + * @default {"enabled":false,"cache_pool":"cache.http_client","shared":true,"max_ttl":null} + * @return \Symfony\Config\Framework\HttpClient\DefaultOptions\CachingConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\HttpClient\DefaultOptions\CachingConfig : static) + */ + public function caching(array|bool $value = []): \Symfony\Config\Framework\HttpClient\DefaultOptions\CachingConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['caching'] = true; + $this->caching = $value; + + return $this; + } + + if (!$this->caching instanceof \Symfony\Config\Framework\HttpClient\DefaultOptions\CachingConfig) { + $this->_usedProperties['caching'] = true; + $this->caching = new \Symfony\Config\Framework\HttpClient\DefaultOptions\CachingConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "caching()" has already been initialized. You cannot pass values the second time you call caching().'); + } + + return $this->caching; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * @default {"enabled":false,"retry_strategy":null,"http_codes":[],"max_retries":3,"delay":1000,"multiplier":2,"max_delay":0,"jitter":0.1} + * @return \Symfony\Config\Framework\HttpClient\DefaultOptions\RetryFailedConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\HttpClient\DefaultOptions\RetryFailedConfig : static) + */ + public function retryFailed(array|bool $value = []): \Symfony\Config\Framework\HttpClient\DefaultOptions\RetryFailedConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['retryFailed'] = true; + $this->retryFailed = $value; + + return $this; + } + + if (!$this->retryFailed instanceof \Symfony\Config\Framework\HttpClient\DefaultOptions\RetryFailedConfig) { + $this->_usedProperties['retryFailed'] = true; + $this->retryFailed = new \Symfony\Config\Framework\HttpClient\DefaultOptions\RetryFailedConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "retryFailed()" has already been initialized. You cannot pass values the second time you call retryFailed().'); + } + + return $this->retryFailed; + } + + public function __construct(array $config = []) + { + if (array_key_exists('headers', $config)) { + $this->_usedProperties['headers'] = true; + $this->headers = $config['headers']; + unset($config['headers']); + } + + if (array_key_exists('vars', $config)) { + $this->_usedProperties['vars'] = true; + $this->vars = $config['vars']; + unset($config['vars']); + } + + if (array_key_exists('max_redirects', $config)) { + $this->_usedProperties['maxRedirects'] = true; + $this->maxRedirects = $config['max_redirects']; + unset($config['max_redirects']); + } + + if (array_key_exists('http_version', $config)) { + $this->_usedProperties['httpVersion'] = true; + $this->httpVersion = $config['http_version']; + unset($config['http_version']); + } + + if (array_key_exists('resolve', $config)) { + $this->_usedProperties['resolve'] = true; + $this->resolve = $config['resolve']; + unset($config['resolve']); + } + + if (array_key_exists('proxy', $config)) { + $this->_usedProperties['proxy'] = true; + $this->proxy = $config['proxy']; + unset($config['proxy']); + } + + if (array_key_exists('no_proxy', $config)) { + $this->_usedProperties['noProxy'] = true; + $this->noProxy = $config['no_proxy']; + unset($config['no_proxy']); + } + + if (array_key_exists('timeout', $config)) { + $this->_usedProperties['timeout'] = true; + $this->timeout = $config['timeout']; + unset($config['timeout']); + } + + if (array_key_exists('max_duration', $config)) { + $this->_usedProperties['maxDuration'] = true; + $this->maxDuration = $config['max_duration']; + unset($config['max_duration']); + } + + if (array_key_exists('bindto', $config)) { + $this->_usedProperties['bindto'] = true; + $this->bindto = $config['bindto']; + unset($config['bindto']); + } + + if (array_key_exists('verify_peer', $config)) { + $this->_usedProperties['verifyPeer'] = true; + $this->verifyPeer = $config['verify_peer']; + unset($config['verify_peer']); + } + + if (array_key_exists('verify_host', $config)) { + $this->_usedProperties['verifyHost'] = true; + $this->verifyHost = $config['verify_host']; + unset($config['verify_host']); + } + + if (array_key_exists('cafile', $config)) { + $this->_usedProperties['cafile'] = true; + $this->cafile = $config['cafile']; + unset($config['cafile']); + } + + if (array_key_exists('capath', $config)) { + $this->_usedProperties['capath'] = true; + $this->capath = $config['capath']; + unset($config['capath']); + } + + if (array_key_exists('local_cert', $config)) { + $this->_usedProperties['localCert'] = true; + $this->localCert = $config['local_cert']; + unset($config['local_cert']); + } + + if (array_key_exists('local_pk', $config)) { + $this->_usedProperties['localPk'] = true; + $this->localPk = $config['local_pk']; + unset($config['local_pk']); + } + + if (array_key_exists('passphrase', $config)) { + $this->_usedProperties['passphrase'] = true; + $this->passphrase = $config['passphrase']; + unset($config['passphrase']); + } + + if (array_key_exists('ciphers', $config)) { + $this->_usedProperties['ciphers'] = true; + $this->ciphers = $config['ciphers']; + unset($config['ciphers']); + } + + if (array_key_exists('peer_fingerprint', $config)) { + $this->_usedProperties['peerFingerprint'] = true; + $this->peerFingerprint = new \Symfony\Config\Framework\HttpClient\DefaultOptions\PeerFingerprintConfig($config['peer_fingerprint']); + unset($config['peer_fingerprint']); + } + + if (array_key_exists('crypto_method', $config)) { + $this->_usedProperties['cryptoMethod'] = true; + $this->cryptoMethod = $config['crypto_method']; + unset($config['crypto_method']); + } + + if (array_key_exists('extra', $config)) { + $this->_usedProperties['extra'] = true; + $this->extra = $config['extra']; + unset($config['extra']); + } + + if (array_key_exists('rate_limiter', $config)) { + $this->_usedProperties['rateLimiter'] = true; + $this->rateLimiter = $config['rate_limiter']; + unset($config['rate_limiter']); + } + + if (array_key_exists('caching', $config)) { + $this->_usedProperties['caching'] = true; + $this->caching = \is_array($config['caching']) ? new \Symfony\Config\Framework\HttpClient\DefaultOptions\CachingConfig($config['caching']) : $config['caching']; + unset($config['caching']); + } + + if (array_key_exists('retry_failed', $config)) { + $this->_usedProperties['retryFailed'] = true; + $this->retryFailed = \is_array($config['retry_failed']) ? new \Symfony\Config\Framework\HttpClient\DefaultOptions\RetryFailedConfig($config['retry_failed']) : $config['retry_failed']; + unset($config['retry_failed']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['headers'])) { + $output['headers'] = $this->headers; + } + if (isset($this->_usedProperties['vars'])) { + $output['vars'] = $this->vars; + } + if (isset($this->_usedProperties['maxRedirects'])) { + $output['max_redirects'] = $this->maxRedirects; + } + if (isset($this->_usedProperties['httpVersion'])) { + $output['http_version'] = $this->httpVersion; + } + if (isset($this->_usedProperties['resolve'])) { + $output['resolve'] = $this->resolve; + } + if (isset($this->_usedProperties['proxy'])) { + $output['proxy'] = $this->proxy; + } + if (isset($this->_usedProperties['noProxy'])) { + $output['no_proxy'] = $this->noProxy; + } + if (isset($this->_usedProperties['timeout'])) { + $output['timeout'] = $this->timeout; + } + if (isset($this->_usedProperties['maxDuration'])) { + $output['max_duration'] = $this->maxDuration; + } + if (isset($this->_usedProperties['bindto'])) { + $output['bindto'] = $this->bindto; + } + if (isset($this->_usedProperties['verifyPeer'])) { + $output['verify_peer'] = $this->verifyPeer; + } + if (isset($this->_usedProperties['verifyHost'])) { + $output['verify_host'] = $this->verifyHost; + } + if (isset($this->_usedProperties['cafile'])) { + $output['cafile'] = $this->cafile; + } + if (isset($this->_usedProperties['capath'])) { + $output['capath'] = $this->capath; + } + if (isset($this->_usedProperties['localCert'])) { + $output['local_cert'] = $this->localCert; + } + if (isset($this->_usedProperties['localPk'])) { + $output['local_pk'] = $this->localPk; + } + if (isset($this->_usedProperties['passphrase'])) { + $output['passphrase'] = $this->passphrase; + } + if (isset($this->_usedProperties['ciphers'])) { + $output['ciphers'] = $this->ciphers; + } + if (isset($this->_usedProperties['peerFingerprint'])) { + $output['peer_fingerprint'] = $this->peerFingerprint->toArray(); + } + if (isset($this->_usedProperties['cryptoMethod'])) { + $output['crypto_method'] = $this->cryptoMethod; + } + if (isset($this->_usedProperties['extra'])) { + $output['extra'] = $this->extra; + } + if (isset($this->_usedProperties['rateLimiter'])) { + $output['rate_limiter'] = $this->rateLimiter; + } + if (isset($this->_usedProperties['caching'])) { + $output['caching'] = $this->caching instanceof \Symfony\Config\Framework\HttpClient\DefaultOptions\CachingConfig ? $this->caching->toArray() : $this->caching; + } + if (isset($this->_usedProperties['retryFailed'])) { + $output['retry_failed'] = $this->retryFailed instanceof \Symfony\Config\Framework\HttpClient\DefaultOptions\RetryFailedConfig ? $this->retryFailed->toArray() : $this->retryFailed; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig.php new file mode 100644 index 0000000..81fa798 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig.php @@ -0,0 +1,743 @@ +_usedProperties['scope'] = true; + $this->scope = $value; + + return $this; + } + + /** + * The URI to resolve relative URLs, following rules in RFC 3985, section 2. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function baseUri($value): static + { + $this->_usedProperties['baseUri'] = true; + $this->baseUri = $value; + + return $this; + } + + /** + * An HTTP Basic authentication "username:password". + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function authBasic($value): static + { + $this->_usedProperties['authBasic'] = true; + $this->authBasic = $value; + + return $this; + } + + /** + * A token enabling HTTP Bearer authorization. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function authBearer($value): static + { + $this->_usedProperties['authBearer'] = true; + $this->authBearer = $value; + + return $this; + } + + /** + * A "username:password" pair to use Microsoft NTLM authentication (requires the cURL extension). + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function authNtlm($value): static + { + $this->_usedProperties['authNtlm'] = true; + $this->authNtlm = $value; + + return $this; + } + + /** + * @return $this + */ + public function query(string $key, mixed $value): static + { + $this->_usedProperties['query'] = true; + $this->query[$key] = $value; + + return $this; + } + + /** + * @return $this + */ + public function header(string $name, mixed $value): static + { + $this->_usedProperties['headers'] = true; + $this->headers[$name] = $value; + + return $this; + } + + /** + * The maximum number of redirects to follow. + * @default null + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxRedirects($value): static + { + $this->_usedProperties['maxRedirects'] = true; + $this->maxRedirects = $value; + + return $this; + } + + /** + * The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function httpVersion($value): static + { + $this->_usedProperties['httpVersion'] = true; + $this->httpVersion = $value; + + return $this; + } + + /** + * @return $this + */ + public function resolve(string $host, mixed $value): static + { + $this->_usedProperties['resolve'] = true; + $this->resolve[$host] = $value; + + return $this; + } + + /** + * The URL of the proxy to pass requests through or null for automatic detection. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function proxy($value): static + { + $this->_usedProperties['proxy'] = true; + $this->proxy = $value; + + return $this; + } + + /** + * A comma separated list of hosts that do not require a proxy to be reached. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function noProxy($value): static + { + $this->_usedProperties['noProxy'] = true; + $this->noProxy = $value; + + return $this; + } + + /** + * The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * @default null + * @param ParamConfigurator|float $value + * @return $this + */ + public function timeout($value): static + { + $this->_usedProperties['timeout'] = true; + $this->timeout = $value; + + return $this; + } + + /** + * The maximum execution time for the request+response as a whole. + * @default null + * @param ParamConfigurator|float $value + * @return $this + */ + public function maxDuration($value): static + { + $this->_usedProperties['maxDuration'] = true; + $this->maxDuration = $value; + + return $this; + } + + /** + * A network interface name, IP address, a host name or a UNIX socket to bind to. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function bindto($value): static + { + $this->_usedProperties['bindto'] = true; + $this->bindto = $value; + + return $this; + } + + /** + * Indicates if the peer should be verified in a TLS context. + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function verifyPeer($value): static + { + $this->_usedProperties['verifyPeer'] = true; + $this->verifyPeer = $value; + + return $this; + } + + /** + * Indicates if the host should exist as a certificate common name. + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function verifyHost($value): static + { + $this->_usedProperties['verifyHost'] = true; + $this->verifyHost = $value; + + return $this; + } + + /** + * A certificate authority file. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cafile($value): static + { + $this->_usedProperties['cafile'] = true; + $this->cafile = $value; + + return $this; + } + + /** + * A directory that contains multiple certificate authority files. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function capath($value): static + { + $this->_usedProperties['capath'] = true; + $this->capath = $value; + + return $this; + } + + /** + * A PEM formatted certificate file. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function localCert($value): static + { + $this->_usedProperties['localCert'] = true; + $this->localCert = $value; + + return $this; + } + + /** + * A private key file. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function localPk($value): static + { + $this->_usedProperties['localPk'] = true; + $this->localPk = $value; + + return $this; + } + + /** + * The passphrase used to encrypt the "local_pk" file. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function passphrase($value): static + { + $this->_usedProperties['passphrase'] = true; + $this->passphrase = $value; + + return $this; + } + + /** + * A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...). + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function ciphers($value): static + { + $this->_usedProperties['ciphers'] = true; + $this->ciphers = $value; + + return $this; + } + + /** + * Associative array: hashing algorithm => hash(es). + */ + public function peerFingerprint(array $value = []): \Symfony\Config\Framework\HttpClient\ScopedClientConfig\PeerFingerprintConfig + { + if (null === $this->peerFingerprint) { + $this->_usedProperties['peerFingerprint'] = true; + $this->peerFingerprint = new \Symfony\Config\Framework\HttpClient\ScopedClientConfig\PeerFingerprintConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "peerFingerprint()" has already been initialized. You cannot pass values the second time you call peerFingerprint().'); + } + + return $this->peerFingerprint; + } + + /** + * The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cryptoMethod($value): static + { + $this->_usedProperties['cryptoMethod'] = true; + $this->cryptoMethod = $value; + + return $this; + } + + /** + * @return $this + */ + public function extra(string $name, mixed $value): static + { + $this->_usedProperties['extra'] = true; + $this->extra[$name] = $value; + + return $this; + } + + /** + * Rate limiter name to use for throttling requests. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function rateLimiter($value): static + { + $this->_usedProperties['rateLimiter'] = true; + $this->rateLimiter = $value; + + return $this; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Caching configuration. + * @default {"enabled":false,"cache_pool":"cache.http_client","shared":true,"max_ttl":null} + * @return \Symfony\Config\Framework\HttpClient\ScopedClientConfig\CachingConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\HttpClient\ScopedClientConfig\CachingConfig : static) + */ + public function caching(array|bool $value = []): \Symfony\Config\Framework\HttpClient\ScopedClientConfig\CachingConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['caching'] = true; + $this->caching = $value; + + return $this; + } + + if (!$this->caching instanceof \Symfony\Config\Framework\HttpClient\ScopedClientConfig\CachingConfig) { + $this->_usedProperties['caching'] = true; + $this->caching = new \Symfony\Config\Framework\HttpClient\ScopedClientConfig\CachingConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "caching()" has already been initialized. You cannot pass values the second time you call caching().'); + } + + return $this->caching; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * @default {"enabled":false,"retry_strategy":null,"http_codes":[],"max_retries":3,"delay":1000,"multiplier":2,"max_delay":0,"jitter":0.1} + * @return \Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailedConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailedConfig : static) + */ + public function retryFailed(array|bool $value = []): \Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailedConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['retryFailed'] = true; + $this->retryFailed = $value; + + return $this; + } + + if (!$this->retryFailed instanceof \Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailedConfig) { + $this->_usedProperties['retryFailed'] = true; + $this->retryFailed = new \Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailedConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "retryFailed()" has already been initialized. You cannot pass values the second time you call retryFailed().'); + } + + return $this->retryFailed; + } + + public function __construct(array $config = []) + { + if (array_key_exists('scope', $config)) { + $this->_usedProperties['scope'] = true; + $this->scope = $config['scope']; + unset($config['scope']); + } + + if (array_key_exists('base_uri', $config)) { + $this->_usedProperties['baseUri'] = true; + $this->baseUri = $config['base_uri']; + unset($config['base_uri']); + } + + if (array_key_exists('auth_basic', $config)) { + $this->_usedProperties['authBasic'] = true; + $this->authBasic = $config['auth_basic']; + unset($config['auth_basic']); + } + + if (array_key_exists('auth_bearer', $config)) { + $this->_usedProperties['authBearer'] = true; + $this->authBearer = $config['auth_bearer']; + unset($config['auth_bearer']); + } + + if (array_key_exists('auth_ntlm', $config)) { + $this->_usedProperties['authNtlm'] = true; + $this->authNtlm = $config['auth_ntlm']; + unset($config['auth_ntlm']); + } + + if (array_key_exists('query', $config)) { + $this->_usedProperties['query'] = true; + $this->query = $config['query']; + unset($config['query']); + } + + if (array_key_exists('headers', $config)) { + $this->_usedProperties['headers'] = true; + $this->headers = $config['headers']; + unset($config['headers']); + } + + if (array_key_exists('max_redirects', $config)) { + $this->_usedProperties['maxRedirects'] = true; + $this->maxRedirects = $config['max_redirects']; + unset($config['max_redirects']); + } + + if (array_key_exists('http_version', $config)) { + $this->_usedProperties['httpVersion'] = true; + $this->httpVersion = $config['http_version']; + unset($config['http_version']); + } + + if (array_key_exists('resolve', $config)) { + $this->_usedProperties['resolve'] = true; + $this->resolve = $config['resolve']; + unset($config['resolve']); + } + + if (array_key_exists('proxy', $config)) { + $this->_usedProperties['proxy'] = true; + $this->proxy = $config['proxy']; + unset($config['proxy']); + } + + if (array_key_exists('no_proxy', $config)) { + $this->_usedProperties['noProxy'] = true; + $this->noProxy = $config['no_proxy']; + unset($config['no_proxy']); + } + + if (array_key_exists('timeout', $config)) { + $this->_usedProperties['timeout'] = true; + $this->timeout = $config['timeout']; + unset($config['timeout']); + } + + if (array_key_exists('max_duration', $config)) { + $this->_usedProperties['maxDuration'] = true; + $this->maxDuration = $config['max_duration']; + unset($config['max_duration']); + } + + if (array_key_exists('bindto', $config)) { + $this->_usedProperties['bindto'] = true; + $this->bindto = $config['bindto']; + unset($config['bindto']); + } + + if (array_key_exists('verify_peer', $config)) { + $this->_usedProperties['verifyPeer'] = true; + $this->verifyPeer = $config['verify_peer']; + unset($config['verify_peer']); + } + + if (array_key_exists('verify_host', $config)) { + $this->_usedProperties['verifyHost'] = true; + $this->verifyHost = $config['verify_host']; + unset($config['verify_host']); + } + + if (array_key_exists('cafile', $config)) { + $this->_usedProperties['cafile'] = true; + $this->cafile = $config['cafile']; + unset($config['cafile']); + } + + if (array_key_exists('capath', $config)) { + $this->_usedProperties['capath'] = true; + $this->capath = $config['capath']; + unset($config['capath']); + } + + if (array_key_exists('local_cert', $config)) { + $this->_usedProperties['localCert'] = true; + $this->localCert = $config['local_cert']; + unset($config['local_cert']); + } + + if (array_key_exists('local_pk', $config)) { + $this->_usedProperties['localPk'] = true; + $this->localPk = $config['local_pk']; + unset($config['local_pk']); + } + + if (array_key_exists('passphrase', $config)) { + $this->_usedProperties['passphrase'] = true; + $this->passphrase = $config['passphrase']; + unset($config['passphrase']); + } + + if (array_key_exists('ciphers', $config)) { + $this->_usedProperties['ciphers'] = true; + $this->ciphers = $config['ciphers']; + unset($config['ciphers']); + } + + if (array_key_exists('peer_fingerprint', $config)) { + $this->_usedProperties['peerFingerprint'] = true; + $this->peerFingerprint = new \Symfony\Config\Framework\HttpClient\ScopedClientConfig\PeerFingerprintConfig($config['peer_fingerprint']); + unset($config['peer_fingerprint']); + } + + if (array_key_exists('crypto_method', $config)) { + $this->_usedProperties['cryptoMethod'] = true; + $this->cryptoMethod = $config['crypto_method']; + unset($config['crypto_method']); + } + + if (array_key_exists('extra', $config)) { + $this->_usedProperties['extra'] = true; + $this->extra = $config['extra']; + unset($config['extra']); + } + + if (array_key_exists('rate_limiter', $config)) { + $this->_usedProperties['rateLimiter'] = true; + $this->rateLimiter = $config['rate_limiter']; + unset($config['rate_limiter']); + } + + if (array_key_exists('caching', $config)) { + $this->_usedProperties['caching'] = true; + $this->caching = \is_array($config['caching']) ? new \Symfony\Config\Framework\HttpClient\ScopedClientConfig\CachingConfig($config['caching']) : $config['caching']; + unset($config['caching']); + } + + if (array_key_exists('retry_failed', $config)) { + $this->_usedProperties['retryFailed'] = true; + $this->retryFailed = \is_array($config['retry_failed']) ? new \Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailedConfig($config['retry_failed']) : $config['retry_failed']; + unset($config['retry_failed']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['scope'])) { + $output['scope'] = $this->scope; + } + if (isset($this->_usedProperties['baseUri'])) { + $output['base_uri'] = $this->baseUri; + } + if (isset($this->_usedProperties['authBasic'])) { + $output['auth_basic'] = $this->authBasic; + } + if (isset($this->_usedProperties['authBearer'])) { + $output['auth_bearer'] = $this->authBearer; + } + if (isset($this->_usedProperties['authNtlm'])) { + $output['auth_ntlm'] = $this->authNtlm; + } + if (isset($this->_usedProperties['query'])) { + $output['query'] = $this->query; + } + if (isset($this->_usedProperties['headers'])) { + $output['headers'] = $this->headers; + } + if (isset($this->_usedProperties['maxRedirects'])) { + $output['max_redirects'] = $this->maxRedirects; + } + if (isset($this->_usedProperties['httpVersion'])) { + $output['http_version'] = $this->httpVersion; + } + if (isset($this->_usedProperties['resolve'])) { + $output['resolve'] = $this->resolve; + } + if (isset($this->_usedProperties['proxy'])) { + $output['proxy'] = $this->proxy; + } + if (isset($this->_usedProperties['noProxy'])) { + $output['no_proxy'] = $this->noProxy; + } + if (isset($this->_usedProperties['timeout'])) { + $output['timeout'] = $this->timeout; + } + if (isset($this->_usedProperties['maxDuration'])) { + $output['max_duration'] = $this->maxDuration; + } + if (isset($this->_usedProperties['bindto'])) { + $output['bindto'] = $this->bindto; + } + if (isset($this->_usedProperties['verifyPeer'])) { + $output['verify_peer'] = $this->verifyPeer; + } + if (isset($this->_usedProperties['verifyHost'])) { + $output['verify_host'] = $this->verifyHost; + } + if (isset($this->_usedProperties['cafile'])) { + $output['cafile'] = $this->cafile; + } + if (isset($this->_usedProperties['capath'])) { + $output['capath'] = $this->capath; + } + if (isset($this->_usedProperties['localCert'])) { + $output['local_cert'] = $this->localCert; + } + if (isset($this->_usedProperties['localPk'])) { + $output['local_pk'] = $this->localPk; + } + if (isset($this->_usedProperties['passphrase'])) { + $output['passphrase'] = $this->passphrase; + } + if (isset($this->_usedProperties['ciphers'])) { + $output['ciphers'] = $this->ciphers; + } + if (isset($this->_usedProperties['peerFingerprint'])) { + $output['peer_fingerprint'] = $this->peerFingerprint->toArray(); + } + if (isset($this->_usedProperties['cryptoMethod'])) { + $output['crypto_method'] = $this->cryptoMethod; + } + if (isset($this->_usedProperties['extra'])) { + $output['extra'] = $this->extra; + } + if (isset($this->_usedProperties['rateLimiter'])) { + $output['rate_limiter'] = $this->rateLimiter; + } + if (isset($this->_usedProperties['caching'])) { + $output['caching'] = $this->caching instanceof \Symfony\Config\Framework\HttpClient\ScopedClientConfig\CachingConfig ? $this->caching->toArray() : $this->caching; + } + if (isset($this->_usedProperties['retryFailed'])) { + $output['retry_failed'] = $this->retryFailed instanceof \Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailedConfig ? $this->retryFailed->toArray() : $this->retryFailed; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/CachingConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/CachingConfig.php new file mode 100644 index 0000000..6ec58d9 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/CachingConfig.php @@ -0,0 +1,124 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * The taggable cache pool to use for storing the responses. + * @default 'cache.http_client' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cachePool($value): static + { + $this->_usedProperties['cachePool'] = true; + $this->cachePool = $value; + + return $this; + } + + /** + * Indicates whether the cache is shared (public) or private. + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function shared($value): static + { + $this->_usedProperties['shared'] = true; + $this->shared = $value; + + return $this; + } + + /** + * The maximum TTL (in seconds) allowed for cached responses. Null means no cap. + * @default null + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxTtl($value): static + { + $this->_usedProperties['maxTtl'] = true; + $this->maxTtl = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('cache_pool', $config)) { + $this->_usedProperties['cachePool'] = true; + $this->cachePool = $config['cache_pool']; + unset($config['cache_pool']); + } + + if (array_key_exists('shared', $config)) { + $this->_usedProperties['shared'] = true; + $this->shared = $config['shared']; + unset($config['shared']); + } + + if (array_key_exists('max_ttl', $config)) { + $this->_usedProperties['maxTtl'] = true; + $this->maxTtl = $config['max_ttl']; + unset($config['max_ttl']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['cachePool'])) { + $output['cache_pool'] = $this->cachePool; + } + if (isset($this->_usedProperties['shared'])) { + $output['shared'] = $this->shared; + } + if (isset($this->_usedProperties['maxTtl'])) { + $output['max_ttl'] = $this->maxTtl; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/PeerFingerprintConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/PeerFingerprintConfig.php new file mode 100644 index 0000000..05e64a5 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/PeerFingerprintConfig.php @@ -0,0 +1,101 @@ +_usedProperties['sha1'] = true; + $this->sha1 = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * + * @return $this + */ + public function pinsha256(mixed $value): static + { + $this->_usedProperties['pinsha256'] = true; + $this->pinsha256 = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * + * @return $this + */ + public function md5(mixed $value): static + { + $this->_usedProperties['md5'] = true; + $this->md5 = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('sha1', $config)) { + $this->_usedProperties['sha1'] = true; + $this->sha1 = $config['sha1']; + unset($config['sha1']); + } + + if (array_key_exists('pin-sha256', $config)) { + $this->_usedProperties['pinsha256'] = true; + $this->pinsha256 = $config['pin-sha256']; + unset($config['pin-sha256']); + } + + if (array_key_exists('md5', $config)) { + $this->_usedProperties['md5'] = true; + $this->md5 = $config['md5']; + unset($config['md5']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['sha1'])) { + $output['sha1'] = $this->sha1; + } + if (isset($this->_usedProperties['pinsha256'])) { + $output['pin-sha256'] = $this->pinsha256; + } + if (isset($this->_usedProperties['md5'])) { + $output['md5'] = $this->md5; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/RetryFailed/HttpCodeConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/RetryFailed/HttpCodeConfig.php new file mode 100644 index 0000000..6ab9246 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/RetryFailed/HttpCodeConfig.php @@ -0,0 +1,75 @@ +_usedProperties['code'] = true; + $this->code = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function methods(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['methods'] = true; + $this->methods = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('code', $config)) { + $this->_usedProperties['code'] = true; + $this->code = $config['code']; + unset($config['code']); + } + + if (array_key_exists('methods', $config)) { + $this->_usedProperties['methods'] = true; + $this->methods = $config['methods']; + unset($config['methods']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['code'])) { + $output['code'] = $this->code; + } + if (isset($this->_usedProperties['methods'])) { + $output['methods'] = $this->methods; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/RetryFailedConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/RetryFailedConfig.php new file mode 100644 index 0000000..9c19a5e --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpClient/ScopedClientConfig/RetryFailedConfig.php @@ -0,0 +1,222 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * service id to override the retry strategy. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function retryStrategy($value): static + { + $this->_usedProperties['retryStrategy'] = true; + $this->retryStrategy = $value; + + return $this; + } + + /** + * A list of HTTP status code that triggers a retry. + */ + public function httpCode(string $code, array $value = []): \Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailed\HttpCodeConfig + { + if (!isset($this->httpCodes[$code])) { + $this->_usedProperties['httpCodes'] = true; + $this->httpCodes[$code] = new \Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailed\HttpCodeConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "httpCode()" has already been initialized. You cannot pass values the second time you call httpCode().'); + } + + return $this->httpCodes[$code]; + } + + /** + * @default 3 + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxRetries($value): static + { + $this->_usedProperties['maxRetries'] = true; + $this->maxRetries = $value; + + return $this; + } + + /** + * Time in ms to delay (or the initial value when multiplier is used). + * @default 1000 + * @param ParamConfigurator|int $value + * @return $this + */ + public function delay($value): static + { + $this->_usedProperties['delay'] = true; + $this->delay = $value; + + return $this; + } + + /** + * If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). + * @default 2 + * @param ParamConfigurator|float $value + * @return $this + */ + public function multiplier($value): static + { + $this->_usedProperties['multiplier'] = true; + $this->multiplier = $value; + + return $this; + } + + /** + * Max time in ms that a retry should ever be delayed (0 = infinite). + * @default 0 + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxDelay($value): static + { + $this->_usedProperties['maxDelay'] = true; + $this->maxDelay = $value; + + return $this; + } + + /** + * Randomness in percent (between 0 and 1) to apply to the delay. + * @default 0.1 + * @param ParamConfigurator|float $value + * @return $this + */ + public function jitter($value): static + { + $this->_usedProperties['jitter'] = true; + $this->jitter = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('retry_strategy', $config)) { + $this->_usedProperties['retryStrategy'] = true; + $this->retryStrategy = $config['retry_strategy']; + unset($config['retry_strategy']); + } + + if (array_key_exists('http_codes', $config)) { + $this->_usedProperties['httpCodes'] = true; + $this->httpCodes = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailed\HttpCodeConfig($v) : $v, $config['http_codes']); + unset($config['http_codes']); + } + + if (array_key_exists('max_retries', $config)) { + $this->_usedProperties['maxRetries'] = true; + $this->maxRetries = $config['max_retries']; + unset($config['max_retries']); + } + + if (array_key_exists('delay', $config)) { + $this->_usedProperties['delay'] = true; + $this->delay = $config['delay']; + unset($config['delay']); + } + + if (array_key_exists('multiplier', $config)) { + $this->_usedProperties['multiplier'] = true; + $this->multiplier = $config['multiplier']; + unset($config['multiplier']); + } + + if (array_key_exists('max_delay', $config)) { + $this->_usedProperties['maxDelay'] = true; + $this->maxDelay = $config['max_delay']; + unset($config['max_delay']); + } + + if (array_key_exists('jitter', $config)) { + $this->_usedProperties['jitter'] = true; + $this->jitter = $config['jitter']; + unset($config['jitter']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['retryStrategy'])) { + $output['retry_strategy'] = $this->retryStrategy; + } + if (isset($this->_usedProperties['httpCodes'])) { + $output['http_codes'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailed\HttpCodeConfig ? $v->toArray() : $v, $this->httpCodes); + } + if (isset($this->_usedProperties['maxRetries'])) { + $output['max_retries'] = $this->maxRetries; + } + if (isset($this->_usedProperties['delay'])) { + $output['delay'] = $this->delay; + } + if (isset($this->_usedProperties['multiplier'])) { + $output['multiplier'] = $this->multiplier; + } + if (isset($this->_usedProperties['maxDelay'])) { + $output['max_delay'] = $this->maxDelay; + } + if (isset($this->_usedProperties['jitter'])) { + $output['jitter'] = $this->jitter; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/HttpClientConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/HttpClientConfig.php new file mode 100644 index 0000000..f3c1793 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/HttpClientConfig.php @@ -0,0 +1,160 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * The maximum number of connections to a single host. + * @default null + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxHostConnections($value): static + { + $this->_usedProperties['maxHostConnections'] = true; + $this->maxHostConnections = $value; + + return $this; + } + + public function defaultOptions(array $value = []): \Symfony\Config\Framework\HttpClient\DefaultOptionsConfig + { + if (null === $this->defaultOptions) { + $this->_usedProperties['defaultOptions'] = true; + $this->defaultOptions = new \Symfony\Config\Framework\HttpClient\DefaultOptionsConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "defaultOptions()" has already been initialized. You cannot pass values the second time you call defaultOptions().'); + } + + return $this->defaultOptions; + } + + /** + * The id of the service that should generate mock responses. It should be either an invokable or an iterable. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function mockResponseFactory($value): static + { + $this->_usedProperties['mockResponseFactory'] = true; + $this->mockResponseFactory = $value; + + return $this; + } + + /** + * @template TValue of string|array + * @param TValue $value + * @return \Symfony\Config\Framework\HttpClient\ScopedClientConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\HttpClient\ScopedClientConfig : static) + */ + public function scopedClient(string $name, string|array $value = []): \Symfony\Config\Framework\HttpClient\ScopedClientConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['scopedClients'] = true; + $this->scopedClients[$name] = $value; + + return $this; + } + + if (!isset($this->scopedClients[$name]) || !$this->scopedClients[$name] instanceof \Symfony\Config\Framework\HttpClient\ScopedClientConfig) { + $this->_usedProperties['scopedClients'] = true; + $this->scopedClients[$name] = new \Symfony\Config\Framework\HttpClient\ScopedClientConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "scopedClient()" has already been initialized. You cannot pass values the second time you call scopedClient().'); + } + + return $this->scopedClients[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('max_host_connections', $config)) { + $this->_usedProperties['maxHostConnections'] = true; + $this->maxHostConnections = $config['max_host_connections']; + unset($config['max_host_connections']); + } + + if (array_key_exists('default_options', $config)) { + $this->_usedProperties['defaultOptions'] = true; + $this->defaultOptions = new \Symfony\Config\Framework\HttpClient\DefaultOptionsConfig($config['default_options']); + unset($config['default_options']); + } + + if (array_key_exists('mock_response_factory', $config)) { + $this->_usedProperties['mockResponseFactory'] = true; + $this->mockResponseFactory = $config['mock_response_factory']; + unset($config['mock_response_factory']); + } + + if (array_key_exists('scoped_clients', $config)) { + $this->_usedProperties['scopedClients'] = true; + $this->scopedClients = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\HttpClient\ScopedClientConfig($v) : $v, $config['scoped_clients']); + unset($config['scoped_clients']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['maxHostConnections'])) { + $output['max_host_connections'] = $this->maxHostConnections; + } + if (isset($this->_usedProperties['defaultOptions'])) { + $output['default_options'] = $this->defaultOptions->toArray(); + } + if (isset($this->_usedProperties['mockResponseFactory'])) { + $output['mock_response_factory'] = $this->mockResponseFactory; + } + if (isset($this->_usedProperties['scopedClients'])) { + $output['scoped_clients'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\HttpClient\ScopedClientConfig ? $v->toArray() : $v, $this->scopedClients); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/JsonStreamerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/JsonStreamerConfig.php new file mode 100644 index 0000000..aa2d478 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/JsonStreamerConfig.php @@ -0,0 +1,52 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/LockConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/LockConfig.php new file mode 100644 index 0000000..dcc86d6 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/LockConfig.php @@ -0,0 +1,73 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @return $this + */ + public function resource(string $name, ParamConfigurator|string|array $value): static + { + $this->_usedProperties['resources'] = true; + $this->resources[$name] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('resources', $config)) { + $this->_usedProperties['resources'] = true; + $this->resources = $config['resources']; + unset($config['resources']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['resources'])) { + $output['resources'] = $this->resources; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Mailer/DkimSignerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Mailer/DkimSignerConfig.php new file mode 100644 index 0000000..7a57c97 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Mailer/DkimSignerConfig.php @@ -0,0 +1,163 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * Key content, or path to key (in PEM format with the `file://` prefix) + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function key($value): static + { + $this->_usedProperties['key'] = true; + $this->key = $value; + + return $this; + } + + /** + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function domain($value): static + { + $this->_usedProperties['domain'] = true; + $this->domain = $value; + + return $this; + } + + /** + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function select($value): static + { + $this->_usedProperties['select'] = true; + $this->select = $value; + + return $this; + } + + /** + * The private key passphrase + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function passphrase($value): static + { + $this->_usedProperties['passphrase'] = true; + $this->passphrase = $value; + + return $this; + } + + /** + * @return $this + */ + public function option(string $name, mixed $value): static + { + $this->_usedProperties['options'] = true; + $this->options[$name] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('key', $config)) { + $this->_usedProperties['key'] = true; + $this->key = $config['key']; + unset($config['key']); + } + + if (array_key_exists('domain', $config)) { + $this->_usedProperties['domain'] = true; + $this->domain = $config['domain']; + unset($config['domain']); + } + + if (array_key_exists('select', $config)) { + $this->_usedProperties['select'] = true; + $this->select = $config['select']; + unset($config['select']); + } + + if (array_key_exists('passphrase', $config)) { + $this->_usedProperties['passphrase'] = true; + $this->passphrase = $config['passphrase']; + unset($config['passphrase']); + } + + if (array_key_exists('options', $config)) { + $this->_usedProperties['options'] = true; + $this->options = $config['options']; + unset($config['options']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['key'])) { + $output['key'] = $this->key; + } + if (isset($this->_usedProperties['domain'])) { + $output['domain'] = $this->domain; + } + if (isset($this->_usedProperties['select'])) { + $output['select'] = $this->select; + } + if (isset($this->_usedProperties['passphrase'])) { + $output['passphrase'] = $this->passphrase; + } + if (isset($this->_usedProperties['options'])) { + $output['options'] = $this->options; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Mailer/EnvelopeConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Mailer/EnvelopeConfig.php new file mode 100644 index 0000000..5ed403b --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Mailer/EnvelopeConfig.php @@ -0,0 +1,98 @@ +_usedProperties['sender'] = true; + $this->sender = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function recipients(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['recipients'] = true; + $this->recipients = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function allowedRecipients(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['allowedRecipients'] = true; + $this->allowedRecipients = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('sender', $config)) { + $this->_usedProperties['sender'] = true; + $this->sender = $config['sender']; + unset($config['sender']); + } + + if (array_key_exists('recipients', $config)) { + $this->_usedProperties['recipients'] = true; + $this->recipients = $config['recipients']; + unset($config['recipients']); + } + + if (array_key_exists('allowed_recipients', $config)) { + $this->_usedProperties['allowedRecipients'] = true; + $this->allowedRecipients = $config['allowed_recipients']; + unset($config['allowed_recipients']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['sender'])) { + $output['sender'] = $this->sender; + } + if (isset($this->_usedProperties['recipients'])) { + $output['recipients'] = $this->recipients; + } + if (isset($this->_usedProperties['allowedRecipients'])) { + $output['allowed_recipients'] = $this->allowedRecipients; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Mailer/HeaderConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Mailer/HeaderConfig.php new file mode 100644 index 0000000..2621dd4 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Mailer/HeaderConfig.php @@ -0,0 +1,53 @@ +_usedProperties['value'] = true; + $this->value = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('value', $config)) { + $this->_usedProperties['value'] = true; + $this->value = $config['value']; + unset($config['value']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['value'])) { + $output['value'] = $this->value; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Mailer/SmimeEncrypterConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Mailer/SmimeEncrypterConfig.php new file mode 100644 index 0000000..d6fb411 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Mailer/SmimeEncrypterConfig.php @@ -0,0 +1,99 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function repository($value): static + { + $this->_usedProperties['repository'] = true; + $this->repository = $value; + + return $this; + } + + /** + * A set of algorithms used to encrypt the message + * @default null + * @param ParamConfigurator|int $value + * @return $this + */ + public function cipher($value): static + { + $this->_usedProperties['cipher'] = true; + $this->cipher = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('repository', $config)) { + $this->_usedProperties['repository'] = true; + $this->repository = $config['repository']; + unset($config['repository']); + } + + if (array_key_exists('cipher', $config)) { + $this->_usedProperties['cipher'] = true; + $this->cipher = $config['cipher']; + unset($config['cipher']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['repository'])) { + $output['repository'] = $this->repository; + } + if (isset($this->_usedProperties['cipher'])) { + $output['cipher'] = $this->cipher; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Mailer/SmimeSignerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Mailer/SmimeSignerConfig.php new file mode 100644 index 0000000..854a259 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Mailer/SmimeSignerConfig.php @@ -0,0 +1,168 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * Path to key (in PEM format) + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function key($value): static + { + $this->_usedProperties['key'] = true; + $this->key = $value; + + return $this; + } + + /** + * Path to certificate (in PEM format without the `file://` prefix) + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function certificate($value): static + { + $this->_usedProperties['certificate'] = true; + $this->certificate = $value; + + return $this; + } + + /** + * The private key passphrase + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function passphrase($value): static + { + $this->_usedProperties['passphrase'] = true; + $this->passphrase = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function extraCertificates($value): static + { + $this->_usedProperties['extraCertificates'] = true; + $this->extraCertificates = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|int $value + * @return $this + */ + public function signOptions($value): static + { + $this->_usedProperties['signOptions'] = true; + $this->signOptions = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('key', $config)) { + $this->_usedProperties['key'] = true; + $this->key = $config['key']; + unset($config['key']); + } + + if (array_key_exists('certificate', $config)) { + $this->_usedProperties['certificate'] = true; + $this->certificate = $config['certificate']; + unset($config['certificate']); + } + + if (array_key_exists('passphrase', $config)) { + $this->_usedProperties['passphrase'] = true; + $this->passphrase = $config['passphrase']; + unset($config['passphrase']); + } + + if (array_key_exists('extra_certificates', $config)) { + $this->_usedProperties['extraCertificates'] = true; + $this->extraCertificates = $config['extra_certificates']; + unset($config['extra_certificates']); + } + + if (array_key_exists('sign_options', $config)) { + $this->_usedProperties['signOptions'] = true; + $this->signOptions = $config['sign_options']; + unset($config['sign_options']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['key'])) { + $output['key'] = $this->key; + } + if (isset($this->_usedProperties['certificate'])) { + $output['certificate'] = $this->certificate; + } + if (isset($this->_usedProperties['passphrase'])) { + $output['passphrase'] = $this->passphrase; + } + if (isset($this->_usedProperties['extraCertificates'])) { + $output['extra_certificates'] = $this->extraCertificates; + } + if (isset($this->_usedProperties['signOptions'])) { + $output['sign_options'] = $this->signOptions; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/MailerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/MailerConfig.php new file mode 100644 index 0000000..fc30513 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/MailerConfig.php @@ -0,0 +1,297 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * The message bus to use. Defaults to the default bus if the Messenger component is installed. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function messageBus($value): static + { + $this->_usedProperties['messageBus'] = true; + $this->messageBus = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function dsn($value): static + { + $this->_usedProperties['dsn'] = true; + $this->dsn = $value; + + return $this; + } + + /** + * @return $this + */ + public function transport(string $name, mixed $value): static + { + $this->_usedProperties['transports'] = true; + $this->transports[$name] = $value; + + return $this; + } + + /** + * Mailer Envelope configuration + */ + public function envelope(array $value = []): \Symfony\Config\Framework\Mailer\EnvelopeConfig + { + if (null === $this->envelope) { + $this->_usedProperties['envelope'] = true; + $this->envelope = new \Symfony\Config\Framework\Mailer\EnvelopeConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "envelope()" has already been initialized. You cannot pass values the second time you call envelope().'); + } + + return $this->envelope; + } + + /** + * @template TValue of string|array + * @param TValue $value + * @return \Symfony\Config\Framework\Mailer\HeaderConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Mailer\HeaderConfig : static) + */ + public function header(string $name, string|array $value = []): \Symfony\Config\Framework\Mailer\HeaderConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['headers'] = true; + $this->headers[$name] = $value; + + return $this; + } + + if (!isset($this->headers[$name]) || !$this->headers[$name] instanceof \Symfony\Config\Framework\Mailer\HeaderConfig) { + $this->_usedProperties['headers'] = true; + $this->headers[$name] = new \Symfony\Config\Framework\Mailer\HeaderConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "header()" has already been initialized. You cannot pass values the second time you call header().'); + } + + return $this->headers[$name]; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * DKIM signer configuration + * @default {"enabled":false,"key":"","domain":"","select":"","passphrase":"","options":[]} + * @return \Symfony\Config\Framework\Mailer\DkimSignerConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Mailer\DkimSignerConfig : static) + */ + public function dkimSigner(array|bool $value = []): \Symfony\Config\Framework\Mailer\DkimSignerConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['dkimSigner'] = true; + $this->dkimSigner = $value; + + return $this; + } + + if (!$this->dkimSigner instanceof \Symfony\Config\Framework\Mailer\DkimSignerConfig) { + $this->_usedProperties['dkimSigner'] = true; + $this->dkimSigner = new \Symfony\Config\Framework\Mailer\DkimSignerConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "dkimSigner()" has already been initialized. You cannot pass values the second time you call dkimSigner().'); + } + + return $this->dkimSigner; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * S/MIME signer configuration + * @default {"enabled":false,"key":"","certificate":"","passphrase":null,"extra_certificates":null,"sign_options":null} + * @return \Symfony\Config\Framework\Mailer\SmimeSignerConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Mailer\SmimeSignerConfig : static) + */ + public function smimeSigner(array|bool $value = []): \Symfony\Config\Framework\Mailer\SmimeSignerConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['smimeSigner'] = true; + $this->smimeSigner = $value; + + return $this; + } + + if (!$this->smimeSigner instanceof \Symfony\Config\Framework\Mailer\SmimeSignerConfig) { + $this->_usedProperties['smimeSigner'] = true; + $this->smimeSigner = new \Symfony\Config\Framework\Mailer\SmimeSignerConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "smimeSigner()" has already been initialized. You cannot pass values the second time you call smimeSigner().'); + } + + return $this->smimeSigner; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * S/MIME encrypter configuration + * @default {"enabled":false,"repository":"","cipher":null} + * @return \Symfony\Config\Framework\Mailer\SmimeEncrypterConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Mailer\SmimeEncrypterConfig : static) + */ + public function smimeEncrypter(array|bool $value = []): \Symfony\Config\Framework\Mailer\SmimeEncrypterConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['smimeEncrypter'] = true; + $this->smimeEncrypter = $value; + + return $this; + } + + if (!$this->smimeEncrypter instanceof \Symfony\Config\Framework\Mailer\SmimeEncrypterConfig) { + $this->_usedProperties['smimeEncrypter'] = true; + $this->smimeEncrypter = new \Symfony\Config\Framework\Mailer\SmimeEncrypterConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "smimeEncrypter()" has already been initialized. You cannot pass values the second time you call smimeEncrypter().'); + } + + return $this->smimeEncrypter; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('message_bus', $config)) { + $this->_usedProperties['messageBus'] = true; + $this->messageBus = $config['message_bus']; + unset($config['message_bus']); + } + + if (array_key_exists('dsn', $config)) { + $this->_usedProperties['dsn'] = true; + $this->dsn = $config['dsn']; + unset($config['dsn']); + } + + if (array_key_exists('transports', $config)) { + $this->_usedProperties['transports'] = true; + $this->transports = $config['transports']; + unset($config['transports']); + } + + if (array_key_exists('envelope', $config)) { + $this->_usedProperties['envelope'] = true; + $this->envelope = new \Symfony\Config\Framework\Mailer\EnvelopeConfig($config['envelope']); + unset($config['envelope']); + } + + if (array_key_exists('headers', $config)) { + $this->_usedProperties['headers'] = true; + $this->headers = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\Mailer\HeaderConfig($v) : $v, $config['headers']); + unset($config['headers']); + } + + if (array_key_exists('dkim_signer', $config)) { + $this->_usedProperties['dkimSigner'] = true; + $this->dkimSigner = \is_array($config['dkim_signer']) ? new \Symfony\Config\Framework\Mailer\DkimSignerConfig($config['dkim_signer']) : $config['dkim_signer']; + unset($config['dkim_signer']); + } + + if (array_key_exists('smime_signer', $config)) { + $this->_usedProperties['smimeSigner'] = true; + $this->smimeSigner = \is_array($config['smime_signer']) ? new \Symfony\Config\Framework\Mailer\SmimeSignerConfig($config['smime_signer']) : $config['smime_signer']; + unset($config['smime_signer']); + } + + if (array_key_exists('smime_encrypter', $config)) { + $this->_usedProperties['smimeEncrypter'] = true; + $this->smimeEncrypter = \is_array($config['smime_encrypter']) ? new \Symfony\Config\Framework\Mailer\SmimeEncrypterConfig($config['smime_encrypter']) : $config['smime_encrypter']; + unset($config['smime_encrypter']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['messageBus'])) { + $output['message_bus'] = $this->messageBus; + } + if (isset($this->_usedProperties['dsn'])) { + $output['dsn'] = $this->dsn; + } + if (isset($this->_usedProperties['transports'])) { + $output['transports'] = $this->transports; + } + if (isset($this->_usedProperties['envelope'])) { + $output['envelope'] = $this->envelope->toArray(); + } + if (isset($this->_usedProperties['headers'])) { + $output['headers'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\Mailer\HeaderConfig ? $v->toArray() : $v, $this->headers); + } + if (isset($this->_usedProperties['dkimSigner'])) { + $output['dkim_signer'] = $this->dkimSigner instanceof \Symfony\Config\Framework\Mailer\DkimSignerConfig ? $this->dkimSigner->toArray() : $this->dkimSigner; + } + if (isset($this->_usedProperties['smimeSigner'])) { + $output['smime_signer'] = $this->smimeSigner instanceof \Symfony\Config\Framework\Mailer\SmimeSignerConfig ? $this->smimeSigner->toArray() : $this->smimeSigner; + } + if (isset($this->_usedProperties['smimeEncrypter'])) { + $output['smime_encrypter'] = $this->smimeEncrypter instanceof \Symfony\Config\Framework\Mailer\SmimeEncrypterConfig ? $this->smimeEncrypter->toArray() : $this->smimeEncrypter; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Messenger/BusConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/BusConfig.php new file mode 100644 index 0000000..64644d4 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/BusConfig.php @@ -0,0 +1,95 @@ +_usedProperties['defaultMiddleware'] = true; + $this->defaultMiddleware = $value; + + return $this; + } + + if (!$this->defaultMiddleware instanceof \Symfony\Config\Framework\Messenger\BusConfig\DefaultMiddlewareConfig) { + $this->_usedProperties['defaultMiddleware'] = true; + $this->defaultMiddleware = new \Symfony\Config\Framework\Messenger\BusConfig\DefaultMiddlewareConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "defaultMiddleware()" has already been initialized. You cannot pass values the second time you call defaultMiddleware().'); + } + + return $this->defaultMiddleware; + } + + /** + * @template TValue of string|array + * @param TValue $value + * @return \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig : static) + */ + public function middleware(string|array $value = []): \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig|static + { + $this->_usedProperties['middleware'] = true; + if (!\is_array($value)) { + $this->middleware[] = $value; + + return $this; + } + + return $this->middleware[] = new \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig($value); + } + + public function __construct(array $config = []) + { + if (array_key_exists('default_middleware', $config)) { + $this->_usedProperties['defaultMiddleware'] = true; + $this->defaultMiddleware = \is_array($config['default_middleware']) ? new \Symfony\Config\Framework\Messenger\BusConfig\DefaultMiddlewareConfig($config['default_middleware']) : $config['default_middleware']; + unset($config['default_middleware']); + } + + if (array_key_exists('middleware', $config)) { + $this->_usedProperties['middleware'] = true; + $this->middleware = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig($v) : $v, $config['middleware']); + unset($config['middleware']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['defaultMiddleware'])) { + $output['default_middleware'] = $this->defaultMiddleware instanceof \Symfony\Config\Framework\Messenger\BusConfig\DefaultMiddlewareConfig ? $this->defaultMiddleware->toArray() : $this->defaultMiddleware; + } + if (isset($this->_usedProperties['middleware'])) { + $output['middleware'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig ? $v->toArray() : $v, $this->middleware); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Messenger/BusConfig/DefaultMiddlewareConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/BusConfig/DefaultMiddlewareConfig.php new file mode 100644 index 0000000..fc8ebc6 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/BusConfig/DefaultMiddlewareConfig.php @@ -0,0 +1,98 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function allowNoHandlers($value): static + { + $this->_usedProperties['allowNoHandlers'] = true; + $this->allowNoHandlers = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function allowNoSenders($value): static + { + $this->_usedProperties['allowNoSenders'] = true; + $this->allowNoSenders = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('allow_no_handlers', $config)) { + $this->_usedProperties['allowNoHandlers'] = true; + $this->allowNoHandlers = $config['allow_no_handlers']; + unset($config['allow_no_handlers']); + } + + if (array_key_exists('allow_no_senders', $config)) { + $this->_usedProperties['allowNoSenders'] = true; + $this->allowNoSenders = $config['allow_no_senders']; + unset($config['allow_no_senders']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['allowNoHandlers'])) { + $output['allow_no_handlers'] = $this->allowNoHandlers; + } + if (isset($this->_usedProperties['allowNoSenders'])) { + $output['allow_no_senders'] = $this->allowNoSenders; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Messenger/BusConfig/MiddlewareConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/BusConfig/MiddlewareConfig.php new file mode 100644 index 0000000..1941737 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/BusConfig/MiddlewareConfig.php @@ -0,0 +1,75 @@ +_usedProperties['id'] = true; + $this->id = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function arguments(ParamConfigurator|array $value): static + { + $this->_usedProperties['arguments'] = true; + $this->arguments = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('id', $config)) { + $this->_usedProperties['id'] = true; + $this->id = $config['id']; + unset($config['id']); + } + + if (array_key_exists('arguments', $config)) { + $this->_usedProperties['arguments'] = true; + $this->arguments = $config['arguments']; + unset($config['arguments']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['id'])) { + $output['id'] = $this->id; + } + if (isset($this->_usedProperties['arguments'])) { + $output['arguments'] = $this->arguments; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Messenger/RoutingConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/RoutingConfig.php new file mode 100644 index 0000000..04f6584 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/RoutingConfig.php @@ -0,0 +1,52 @@ + $value + * + * @return $this + */ + public function senders(ParamConfigurator|array $value): static + { + $this->_usedProperties['senders'] = true; + $this->senders = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('senders', $config)) { + $this->_usedProperties['senders'] = true; + $this->senders = $config['senders']; + unset($config['senders']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['senders'])) { + $output['senders'] = $this->senders; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Messenger/Serializer/SymfonySerializerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/Serializer/SymfonySerializerConfig.php new file mode 100644 index 0000000..17a73cc --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/Serializer/SymfonySerializerConfig.php @@ -0,0 +1,74 @@ +_usedProperties['format'] = true; + $this->format = $value; + + return $this; + } + + /** + * @return $this + */ + public function context(string $name, mixed $value): static + { + $this->_usedProperties['context'] = true; + $this->context[$name] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('format', $config)) { + $this->_usedProperties['format'] = true; + $this->format = $config['format']; + unset($config['format']); + } + + if (array_key_exists('context', $config)) { + $this->_usedProperties['context'] = true; + $this->context = $config['context']; + unset($config['context']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['format'])) { + $output['format'] = $this->format; + } + if (isset($this->_usedProperties['context'])) { + $output['context'] = $this->context; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Messenger/SerializerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/SerializerConfig.php new file mode 100644 index 0000000..bdcc3a7 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/SerializerConfig.php @@ -0,0 +1,80 @@ +_usedProperties['defaultSerializer'] = true; + $this->defaultSerializer = $value; + + return $this; + } + + /** + * @default {"format":"json","context":[]} + */ + public function symfonySerializer(array $value = []): \Symfony\Config\Framework\Messenger\Serializer\SymfonySerializerConfig + { + if (null === $this->symfonySerializer) { + $this->_usedProperties['symfonySerializer'] = true; + $this->symfonySerializer = new \Symfony\Config\Framework\Messenger\Serializer\SymfonySerializerConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "symfonySerializer()" has already been initialized. You cannot pass values the second time you call symfonySerializer().'); + } + + return $this->symfonySerializer; + } + + public function __construct(array $config = []) + { + if (array_key_exists('default_serializer', $config)) { + $this->_usedProperties['defaultSerializer'] = true; + $this->defaultSerializer = $config['default_serializer']; + unset($config['default_serializer']); + } + + if (array_key_exists('symfony_serializer', $config)) { + $this->_usedProperties['symfonySerializer'] = true; + $this->symfonySerializer = new \Symfony\Config\Framework\Messenger\Serializer\SymfonySerializerConfig($config['symfony_serializer']); + unset($config['symfony_serializer']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['defaultSerializer'])) { + $output['default_serializer'] = $this->defaultSerializer; + } + if (isset($this->_usedProperties['symfonySerializer'])) { + $output['symfony_serializer'] = $this->symfonySerializer->toArray(); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Messenger/TransportConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/TransportConfig.php new file mode 100644 index 0000000..cfd8dcd --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/TransportConfig.php @@ -0,0 +1,183 @@ +_usedProperties['dsn'] = true; + $this->dsn = $value; + + return $this; + } + + /** + * Service id of a custom serializer to use. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function serializer($value): static + { + $this->_usedProperties['serializer'] = true; + $this->serializer = $value; + + return $this; + } + + /** + * @return $this + */ + public function option(string $key, mixed $value): static + { + $this->_usedProperties['options'] = true; + $this->options[$key] = $value; + + return $this; + } + + /** + * Transport name to send failed messages to (after all retries have failed). + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function failureTransport($value): static + { + $this->_usedProperties['failureTransport'] = true; + $this->failureTransport = $value; + + return $this; + } + + /** + * @template TValue of string|array + * @param TValue $value + * @default {"service":null,"max_retries":3,"delay":1000,"multiplier":2,"max_delay":0,"jitter":0.1} + * @return \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig : static) + */ + public function retryStrategy(string|array $value = []): \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['retryStrategy'] = true; + $this->retryStrategy = $value; + + return $this; + } + + if (!$this->retryStrategy instanceof \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig) { + $this->_usedProperties['retryStrategy'] = true; + $this->retryStrategy = new \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "retryStrategy()" has already been initialized. You cannot pass values the second time you call retryStrategy().'); + } + + return $this->retryStrategy; + } + + /** + * Rate limiter name to use when processing messages. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function rateLimiter($value): static + { + $this->_usedProperties['rateLimiter'] = true; + $this->rateLimiter = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('dsn', $config)) { + $this->_usedProperties['dsn'] = true; + $this->dsn = $config['dsn']; + unset($config['dsn']); + } + + if (array_key_exists('serializer', $config)) { + $this->_usedProperties['serializer'] = true; + $this->serializer = $config['serializer']; + unset($config['serializer']); + } + + if (array_key_exists('options', $config)) { + $this->_usedProperties['options'] = true; + $this->options = $config['options']; + unset($config['options']); + } + + if (array_key_exists('failure_transport', $config)) { + $this->_usedProperties['failureTransport'] = true; + $this->failureTransport = $config['failure_transport']; + unset($config['failure_transport']); + } + + if (array_key_exists('retry_strategy', $config)) { + $this->_usedProperties['retryStrategy'] = true; + $this->retryStrategy = \is_array($config['retry_strategy']) ? new \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig($config['retry_strategy']) : $config['retry_strategy']; + unset($config['retry_strategy']); + } + + if (array_key_exists('rate_limiter', $config)) { + $this->_usedProperties['rateLimiter'] = true; + $this->rateLimiter = $config['rate_limiter']; + unset($config['rate_limiter']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['dsn'])) { + $output['dsn'] = $this->dsn; + } + if (isset($this->_usedProperties['serializer'])) { + $output['serializer'] = $this->serializer; + } + if (isset($this->_usedProperties['options'])) { + $output['options'] = $this->options; + } + if (isset($this->_usedProperties['failureTransport'])) { + $output['failure_transport'] = $this->failureTransport; + } + if (isset($this->_usedProperties['retryStrategy'])) { + $output['retry_strategy'] = $this->retryStrategy instanceof \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig ? $this->retryStrategy->toArray() : $this->retryStrategy; + } + if (isset($this->_usedProperties['rateLimiter'])) { + $output['rate_limiter'] = $this->rateLimiter; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Messenger/TransportConfig/RetryStrategyConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/TransportConfig/RetryStrategyConfig.php new file mode 100644 index 0000000..35107ae --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Messenger/TransportConfig/RetryStrategyConfig.php @@ -0,0 +1,172 @@ +_usedProperties['service'] = true; + $this->service = $value; + + return $this; + } + + /** + * @default 3 + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxRetries($value): static + { + $this->_usedProperties['maxRetries'] = true; + $this->maxRetries = $value; + + return $this; + } + + /** + * Time in ms to delay (or the initial value when multiplier is used). + * @default 1000 + * @param ParamConfigurator|int $value + * @return $this + */ + public function delay($value): static + { + $this->_usedProperties['delay'] = true; + $this->delay = $value; + + return $this; + } + + /** + * If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)). + * @default 2 + * @param ParamConfigurator|float $value + * @return $this + */ + public function multiplier($value): static + { + $this->_usedProperties['multiplier'] = true; + $this->multiplier = $value; + + return $this; + } + + /** + * Max time in ms that a retry should ever be delayed (0 = infinite). + * @default 0 + * @param ParamConfigurator|int $value + * @return $this + */ + public function maxDelay($value): static + { + $this->_usedProperties['maxDelay'] = true; + $this->maxDelay = $value; + + return $this; + } + + /** + * Randomness to apply to the delay (between 0 and 1). + * @default 0.1 + * @param ParamConfigurator|float $value + * @return $this + */ + public function jitter($value): static + { + $this->_usedProperties['jitter'] = true; + $this->jitter = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('service', $config)) { + $this->_usedProperties['service'] = true; + $this->service = $config['service']; + unset($config['service']); + } + + if (array_key_exists('max_retries', $config)) { + $this->_usedProperties['maxRetries'] = true; + $this->maxRetries = $config['max_retries']; + unset($config['max_retries']); + } + + if (array_key_exists('delay', $config)) { + $this->_usedProperties['delay'] = true; + $this->delay = $config['delay']; + unset($config['delay']); + } + + if (array_key_exists('multiplier', $config)) { + $this->_usedProperties['multiplier'] = true; + $this->multiplier = $config['multiplier']; + unset($config['multiplier']); + } + + if (array_key_exists('max_delay', $config)) { + $this->_usedProperties['maxDelay'] = true; + $this->maxDelay = $config['max_delay']; + unset($config['max_delay']); + } + + if (array_key_exists('jitter', $config)) { + $this->_usedProperties['jitter'] = true; + $this->jitter = $config['jitter']; + unset($config['jitter']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['service'])) { + $output['service'] = $this->service; + } + if (isset($this->_usedProperties['maxRetries'])) { + $output['max_retries'] = $this->maxRetries; + } + if (isset($this->_usedProperties['delay'])) { + $output['delay'] = $this->delay; + } + if (isset($this->_usedProperties['multiplier'])) { + $output['multiplier'] = $this->multiplier; + } + if (isset($this->_usedProperties['maxDelay'])) { + $output['max_delay'] = $this->maxDelay; + } + if (isset($this->_usedProperties['jitter'])) { + $output['jitter'] = $this->jitter; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/MessengerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/MessengerConfig.php new file mode 100644 index 0000000..32f0a34 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/MessengerConfig.php @@ -0,0 +1,247 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @template TValue of string|array + * @param TValue $value + * @return \Symfony\Config\Framework\Messenger\RoutingConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Messenger\RoutingConfig : static) + */ + public function routing(string $message_class, string|array $value = []): \Symfony\Config\Framework\Messenger\RoutingConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['routing'] = true; + $this->routing[$message_class] = $value; + + return $this; + } + + if (!isset($this->routing[$message_class]) || !$this->routing[$message_class] instanceof \Symfony\Config\Framework\Messenger\RoutingConfig) { + $this->_usedProperties['routing'] = true; + $this->routing[$message_class] = new \Symfony\Config\Framework\Messenger\RoutingConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "routing()" has already been initialized. You cannot pass values the second time you call routing().'); + } + + return $this->routing[$message_class]; + } + + /** + * @default {"default_serializer":"messenger.transport.native_php_serializer","symfony_serializer":{"format":"json","context":[]}} + */ + public function serializer(array $value = []): \Symfony\Config\Framework\Messenger\SerializerConfig + { + if (null === $this->serializer) { + $this->_usedProperties['serializer'] = true; + $this->serializer = new \Symfony\Config\Framework\Messenger\SerializerConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "serializer()" has already been initialized. You cannot pass values the second time you call serializer().'); + } + + return $this->serializer; + } + + /** + * @template TValue of string|array + * @param TValue $value + * @return \Symfony\Config\Framework\Messenger\TransportConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Messenger\TransportConfig : static) + */ + public function transport(string $name, string|array $value = []): \Symfony\Config\Framework\Messenger\TransportConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['transports'] = true; + $this->transports[$name] = $value; + + return $this; + } + + if (!isset($this->transports[$name]) || !$this->transports[$name] instanceof \Symfony\Config\Framework\Messenger\TransportConfig) { + $this->_usedProperties['transports'] = true; + $this->transports[$name] = new \Symfony\Config\Framework\Messenger\TransportConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "transport()" has already been initialized. You cannot pass values the second time you call transport().'); + } + + return $this->transports[$name]; + } + + /** + * Transport name to send failed messages to (after all retries have failed). + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function failureTransport($value): static + { + $this->_usedProperties['failureTransport'] = true; + $this->failureTransport = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|int|string $value + * + * @return $this + */ + public function stopWorkerOnSignals(ParamConfigurator|int|string|array $value): static + { + $this->_usedProperties['stopWorkerOnSignals'] = true; + $this->stopWorkerOnSignals = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultBus($value): static + { + $this->_usedProperties['defaultBus'] = true; + $this->defaultBus = $value; + + return $this; + } + + /** + * @default {"messenger.bus.default":{"default_middleware":{"enabled":true,"allow_no_handlers":false,"allow_no_senders":true},"middleware":[]}} + */ + public function bus(string $name, array $value = []): \Symfony\Config\Framework\Messenger\BusConfig + { + if (!isset($this->buses[$name])) { + $this->_usedProperties['buses'] = true; + $this->buses[$name] = new \Symfony\Config\Framework\Messenger\BusConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "bus()" has already been initialized. You cannot pass values the second time you call bus().'); + } + + return $this->buses[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('routing', $config)) { + $this->_usedProperties['routing'] = true; + $this->routing = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\Messenger\RoutingConfig($v) : $v, $config['routing']); + unset($config['routing']); + } + + if (array_key_exists('serializer', $config)) { + $this->_usedProperties['serializer'] = true; + $this->serializer = new \Symfony\Config\Framework\Messenger\SerializerConfig($config['serializer']); + unset($config['serializer']); + } + + if (array_key_exists('transports', $config)) { + $this->_usedProperties['transports'] = true; + $this->transports = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\Messenger\TransportConfig($v) : $v, $config['transports']); + unset($config['transports']); + } + + if (array_key_exists('failure_transport', $config)) { + $this->_usedProperties['failureTransport'] = true; + $this->failureTransport = $config['failure_transport']; + unset($config['failure_transport']); + } + + if (array_key_exists('stop_worker_on_signals', $config)) { + $this->_usedProperties['stopWorkerOnSignals'] = true; + $this->stopWorkerOnSignals = $config['stop_worker_on_signals']; + unset($config['stop_worker_on_signals']); + } + + if (array_key_exists('default_bus', $config)) { + $this->_usedProperties['defaultBus'] = true; + $this->defaultBus = $config['default_bus']; + unset($config['default_bus']); + } + + if (array_key_exists('buses', $config)) { + $this->_usedProperties['buses'] = true; + $this->buses = array_map(fn ($v) => new \Symfony\Config\Framework\Messenger\BusConfig($v), $config['buses']); + unset($config['buses']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['routing'])) { + $output['routing'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\Messenger\RoutingConfig ? $v->toArray() : $v, $this->routing); + } + if (isset($this->_usedProperties['serializer'])) { + $output['serializer'] = $this->serializer->toArray(); + } + if (isset($this->_usedProperties['transports'])) { + $output['transports'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\Messenger\TransportConfig ? $v->toArray() : $v, $this->transports); + } + if (isset($this->_usedProperties['failureTransport'])) { + $output['failure_transport'] = $this->failureTransport; + } + if (isset($this->_usedProperties['stopWorkerOnSignals'])) { + $output['stop_worker_on_signals'] = $this->stopWorkerOnSignals; + } + if (isset($this->_usedProperties['defaultBus'])) { + $output['default_bus'] = $this->defaultBus; + } + if (isset($this->_usedProperties['buses'])) { + $output['buses'] = array_map(fn ($v) => $v->toArray(), $this->buses); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Notifier/AdminRecipientConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Notifier/AdminRecipientConfig.php new file mode 100644 index 0000000..ce6e61f --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Notifier/AdminRecipientConfig.php @@ -0,0 +1,74 @@ +_usedProperties['email'] = true; + $this->email = $value; + + return $this; + } + + /** + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function phone($value): static + { + $this->_usedProperties['phone'] = true; + $this->phone = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('email', $config)) { + $this->_usedProperties['email'] = true; + $this->email = $config['email']; + unset($config['email']); + } + + if (array_key_exists('phone', $config)) { + $this->_usedProperties['phone'] = true; + $this->phone = $config['phone']; + unset($config['phone']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['email'])) { + $output['email'] = $this->email; + } + if (isset($this->_usedProperties['phone'])) { + $output['phone'] = $this->phone; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/NotifierConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/NotifierConfig.php new file mode 100644 index 0000000..96e6237 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/NotifierConfig.php @@ -0,0 +1,181 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * The message bus to use. Defaults to the default bus if the Messenger component is installed. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function messageBus($value): static + { + $this->_usedProperties['messageBus'] = true; + $this->messageBus = $value; + + return $this; + } + + /** + * @return $this + */ + public function chatterTransport(string $name, mixed $value): static + { + $this->_usedProperties['chatterTransports'] = true; + $this->chatterTransports[$name] = $value; + + return $this; + } + + /** + * @return $this + */ + public function texterTransport(string $name, mixed $value): static + { + $this->_usedProperties['texterTransports'] = true; + $this->texterTransports[$name] = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function notificationOnFailedMessages($value): static + { + $this->_usedProperties['notificationOnFailedMessages'] = true; + $this->notificationOnFailedMessages = $value; + + return $this; + } + + /** + * @return $this + */ + public function channelPolicy(string $name, ParamConfigurator|string|array $value): static + { + $this->_usedProperties['channelPolicy'] = true; + $this->channelPolicy[$name] = $value; + + return $this; + } + + public function adminRecipient(array $value = []): \Symfony\Config\Framework\Notifier\AdminRecipientConfig + { + $this->_usedProperties['adminRecipients'] = true; + + return $this->adminRecipients[] = new \Symfony\Config\Framework\Notifier\AdminRecipientConfig($value); + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('message_bus', $config)) { + $this->_usedProperties['messageBus'] = true; + $this->messageBus = $config['message_bus']; + unset($config['message_bus']); + } + + if (array_key_exists('chatter_transports', $config)) { + $this->_usedProperties['chatterTransports'] = true; + $this->chatterTransports = $config['chatter_transports']; + unset($config['chatter_transports']); + } + + if (array_key_exists('texter_transports', $config)) { + $this->_usedProperties['texterTransports'] = true; + $this->texterTransports = $config['texter_transports']; + unset($config['texter_transports']); + } + + if (array_key_exists('notification_on_failed_messages', $config)) { + $this->_usedProperties['notificationOnFailedMessages'] = true; + $this->notificationOnFailedMessages = $config['notification_on_failed_messages']; + unset($config['notification_on_failed_messages']); + } + + if (array_key_exists('channel_policy', $config)) { + $this->_usedProperties['channelPolicy'] = true; + $this->channelPolicy = $config['channel_policy']; + unset($config['channel_policy']); + } + + if (array_key_exists('admin_recipients', $config)) { + $this->_usedProperties['adminRecipients'] = true; + $this->adminRecipients = array_map(fn ($v) => new \Symfony\Config\Framework\Notifier\AdminRecipientConfig($v), $config['admin_recipients']); + unset($config['admin_recipients']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['messageBus'])) { + $output['message_bus'] = $this->messageBus; + } + if (isset($this->_usedProperties['chatterTransports'])) { + $output['chatter_transports'] = $this->chatterTransports; + } + if (isset($this->_usedProperties['texterTransports'])) { + $output['texter_transports'] = $this->texterTransports; + } + if (isset($this->_usedProperties['notificationOnFailedMessages'])) { + $output['notification_on_failed_messages'] = $this->notificationOnFailedMessages; + } + if (isset($this->_usedProperties['channelPolicy'])) { + $output['channel_policy'] = $this->channelPolicy; + } + if (isset($this->_usedProperties['adminRecipients'])) { + $output['admin_recipients'] = array_map(fn ($v) => $v->toArray(), $this->adminRecipients); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/PhpErrorsConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/PhpErrorsConfig.php new file mode 100644 index 0000000..a551820 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/PhpErrorsConfig.php @@ -0,0 +1,79 @@ +_usedProperties['log'] = true; + $this->log = $value; + + return $this; + } + + /** + * Throw PHP errors as \ErrorException instances. + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function throw($value): static + { + $this->_usedProperties['throw'] = true; + $this->throw = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('log', $config)) { + $this->_usedProperties['log'] = true; + $this->log = $config['log']; + unset($config['log']); + } + + if (array_key_exists('throw', $config)) { + $this->_usedProperties['throw'] = true; + $this->throw = $config['throw']; + unset($config['throw']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['log'])) { + $output['log'] = $this->log; + } + if (isset($this->_usedProperties['throw'])) { + $output['throw'] = $this->throw; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/ProfilerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/ProfilerConfig.php new file mode 100644 index 0000000..ad9a260 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/ProfilerConfig.php @@ -0,0 +1,192 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function collect($value): static + { + $this->_usedProperties['collect'] = true; + $this->collect = $value; + + return $this; + } + + /** + * The name of the parameter to use to enable or disable collection on a per request basis. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function collectParameter($value): static + { + $this->_usedProperties['collectParameter'] = true; + $this->collectParameter = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function onlyExceptions($value): static + { + $this->_usedProperties['onlyExceptions'] = true; + $this->onlyExceptions = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function onlyMainRequests($value): static + { + $this->_usedProperties['onlyMainRequests'] = true; + $this->onlyMainRequests = $value; + + return $this; + } + + /** + * @default 'file:%kernel.cache_dir%/profiler' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function dsn($value): static + { + $this->_usedProperties['dsn'] = true; + $this->dsn = $value; + + return $this; + } + + /** + * Enables the serializer data collector and profiler panel. + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function collectSerializerData($value): static + { + $this->_usedProperties['collectSerializerData'] = true; + $this->collectSerializerData = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('collect', $config)) { + $this->_usedProperties['collect'] = true; + $this->collect = $config['collect']; + unset($config['collect']); + } + + if (array_key_exists('collect_parameter', $config)) { + $this->_usedProperties['collectParameter'] = true; + $this->collectParameter = $config['collect_parameter']; + unset($config['collect_parameter']); + } + + if (array_key_exists('only_exceptions', $config)) { + $this->_usedProperties['onlyExceptions'] = true; + $this->onlyExceptions = $config['only_exceptions']; + unset($config['only_exceptions']); + } + + if (array_key_exists('only_main_requests', $config)) { + $this->_usedProperties['onlyMainRequests'] = true; + $this->onlyMainRequests = $config['only_main_requests']; + unset($config['only_main_requests']); + } + + if (array_key_exists('dsn', $config)) { + $this->_usedProperties['dsn'] = true; + $this->dsn = $config['dsn']; + unset($config['dsn']); + } + + if (array_key_exists('collect_serializer_data', $config)) { + $this->_usedProperties['collectSerializerData'] = true; + $this->collectSerializerData = $config['collect_serializer_data']; + unset($config['collect_serializer_data']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['collect'])) { + $output['collect'] = $this->collect; + } + if (isset($this->_usedProperties['collectParameter'])) { + $output['collect_parameter'] = $this->collectParameter; + } + if (isset($this->_usedProperties['onlyExceptions'])) { + $output['only_exceptions'] = $this->onlyExceptions; + } + if (isset($this->_usedProperties['onlyMainRequests'])) { + $output['only_main_requests'] = $this->onlyMainRequests; + } + if (isset($this->_usedProperties['dsn'])) { + $output['dsn'] = $this->dsn; + } + if (isset($this->_usedProperties['collectSerializerData'])) { + $output['collect_serializer_data'] = $this->collectSerializerData; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/PropertyAccessConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/PropertyAccessConfig.php new file mode 100644 index 0000000..c687753 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/PropertyAccessConfig.php @@ -0,0 +1,167 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function magicCall($value): static + { + $this->_usedProperties['magicCall'] = true; + $this->magicCall = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function magicGet($value): static + { + $this->_usedProperties['magicGet'] = true; + $this->magicGet = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function magicSet($value): static + { + $this->_usedProperties['magicSet'] = true; + $this->magicSet = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function throwExceptionOnInvalidIndex($value): static + { + $this->_usedProperties['throwExceptionOnInvalidIndex'] = true; + $this->throwExceptionOnInvalidIndex = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function throwExceptionOnInvalidPropertyPath($value): static + { + $this->_usedProperties['throwExceptionOnInvalidPropertyPath'] = true; + $this->throwExceptionOnInvalidPropertyPath = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('magic_call', $config)) { + $this->_usedProperties['magicCall'] = true; + $this->magicCall = $config['magic_call']; + unset($config['magic_call']); + } + + if (array_key_exists('magic_get', $config)) { + $this->_usedProperties['magicGet'] = true; + $this->magicGet = $config['magic_get']; + unset($config['magic_get']); + } + + if (array_key_exists('magic_set', $config)) { + $this->_usedProperties['magicSet'] = true; + $this->magicSet = $config['magic_set']; + unset($config['magic_set']); + } + + if (array_key_exists('throw_exception_on_invalid_index', $config)) { + $this->_usedProperties['throwExceptionOnInvalidIndex'] = true; + $this->throwExceptionOnInvalidIndex = $config['throw_exception_on_invalid_index']; + unset($config['throw_exception_on_invalid_index']); + } + + if (array_key_exists('throw_exception_on_invalid_property_path', $config)) { + $this->_usedProperties['throwExceptionOnInvalidPropertyPath'] = true; + $this->throwExceptionOnInvalidPropertyPath = $config['throw_exception_on_invalid_property_path']; + unset($config['throw_exception_on_invalid_property_path']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['magicCall'])) { + $output['magic_call'] = $this->magicCall; + } + if (isset($this->_usedProperties['magicGet'])) { + $output['magic_get'] = $this->magicGet; + } + if (isset($this->_usedProperties['magicSet'])) { + $output['magic_set'] = $this->magicSet; + } + if (isset($this->_usedProperties['throwExceptionOnInvalidIndex'])) { + $output['throw_exception_on_invalid_index'] = $this->throwExceptionOnInvalidIndex; + } + if (isset($this->_usedProperties['throwExceptionOnInvalidPropertyPath'])) { + $output['throw_exception_on_invalid_property_path'] = $this->throwExceptionOnInvalidPropertyPath; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/PropertyInfoConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/PropertyInfoConfig.php new file mode 100644 index 0000000..a07d71d --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/PropertyInfoConfig.php @@ -0,0 +1,76 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * Registers the constructor extractor. + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function withConstructorExtractor($value): static + { + $this->_usedProperties['withConstructorExtractor'] = true; + $this->withConstructorExtractor = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('with_constructor_extractor', $config)) { + $this->_usedProperties['withConstructorExtractor'] = true; + $this->withConstructorExtractor = $config['with_constructor_extractor']; + unset($config['with_constructor_extractor']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['withConstructorExtractor'])) { + $output['with_constructor_extractor'] = $this->withConstructorExtractor; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/RateLimiter/LimiterConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/RateLimiter/LimiterConfig.php new file mode 100644 index 0000000..3fcf32a --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/RateLimiter/LimiterConfig.php @@ -0,0 +1,223 @@ +_usedProperties['lockFactory'] = true; + $this->lockFactory = $value; + + return $this; + } + + /** + * The cache pool to use for storing the current limiter state. + * @default 'cache.rate_limiter' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cachePool($value): static + { + $this->_usedProperties['cachePool'] = true; + $this->cachePool = $value; + + return $this; + } + + /** + * The service ID of a custom storage implementation, this precedes any configured "cache_pool". + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function storageService($value): static + { + $this->_usedProperties['storageService'] = true; + $this->storageService = $value; + + return $this; + } + + /** + * The algorithm to be used by this limiter. + * @default null + * @param ParamConfigurator|'fixed_window'|'token_bucket'|'sliding_window'|'compound'|'no_limit' $value + * @return $this + */ + public function policy($value): static + { + $this->_usedProperties['policy'] = true; + $this->policy = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function limiters(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['limiters'] = true; + $this->limiters = $value; + + return $this; + } + + /** + * The maximum allowed hits in a fixed interval or burst. + * @default null + * @param ParamConfigurator|int $value + * @return $this + */ + public function limit($value): static + { + $this->_usedProperties['limit'] = true; + $this->limit = $value; + + return $this; + } + + /** + * Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function interval($value): static + { + $this->_usedProperties['interval'] = true; + $this->interval = $value; + + return $this; + } + + /** + * Configures the fill rate if "policy" is set to "token_bucket". + */ + public function rate(array $value = []): \Symfony\Config\Framework\RateLimiter\LimiterConfig\RateConfig + { + if (null === $this->rate) { + $this->_usedProperties['rate'] = true; + $this->rate = new \Symfony\Config\Framework\RateLimiter\LimiterConfig\RateConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "rate()" has already been initialized. You cannot pass values the second time you call rate().'); + } + + return $this->rate; + } + + public function __construct(array $config = []) + { + if (array_key_exists('lock_factory', $config)) { + $this->_usedProperties['lockFactory'] = true; + $this->lockFactory = $config['lock_factory']; + unset($config['lock_factory']); + } + + if (array_key_exists('cache_pool', $config)) { + $this->_usedProperties['cachePool'] = true; + $this->cachePool = $config['cache_pool']; + unset($config['cache_pool']); + } + + if (array_key_exists('storage_service', $config)) { + $this->_usedProperties['storageService'] = true; + $this->storageService = $config['storage_service']; + unset($config['storage_service']); + } + + if (array_key_exists('policy', $config)) { + $this->_usedProperties['policy'] = true; + $this->policy = $config['policy']; + unset($config['policy']); + } + + if (array_key_exists('limiters', $config)) { + $this->_usedProperties['limiters'] = true; + $this->limiters = $config['limiters']; + unset($config['limiters']); + } + + if (array_key_exists('limit', $config)) { + $this->_usedProperties['limit'] = true; + $this->limit = $config['limit']; + unset($config['limit']); + } + + if (array_key_exists('interval', $config)) { + $this->_usedProperties['interval'] = true; + $this->interval = $config['interval']; + unset($config['interval']); + } + + if (array_key_exists('rate', $config)) { + $this->_usedProperties['rate'] = true; + $this->rate = new \Symfony\Config\Framework\RateLimiter\LimiterConfig\RateConfig($config['rate']); + unset($config['rate']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['lockFactory'])) { + $output['lock_factory'] = $this->lockFactory; + } + if (isset($this->_usedProperties['cachePool'])) { + $output['cache_pool'] = $this->cachePool; + } + if (isset($this->_usedProperties['storageService'])) { + $output['storage_service'] = $this->storageService; + } + if (isset($this->_usedProperties['policy'])) { + $output['policy'] = $this->policy; + } + if (isset($this->_usedProperties['limiters'])) { + $output['limiters'] = $this->limiters; + } + if (isset($this->_usedProperties['limit'])) { + $output['limit'] = $this->limit; + } + if (isset($this->_usedProperties['interval'])) { + $output['interval'] = $this->interval; + } + if (isset($this->_usedProperties['rate'])) { + $output['rate'] = $this->rate->toArray(); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/RateLimiter/LimiterConfig/RateConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/RateLimiter/LimiterConfig/RateConfig.php new file mode 100644 index 0000000..ee0e072 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/RateLimiter/LimiterConfig/RateConfig.php @@ -0,0 +1,77 @@ +_usedProperties['interval'] = true; + $this->interval = $value; + + return $this; + } + + /** + * Amount of tokens to add each interval. + * @default 1 + * @param ParamConfigurator|int $value + * @return $this + */ + public function amount($value): static + { + $this->_usedProperties['amount'] = true; + $this->amount = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('interval', $config)) { + $this->_usedProperties['interval'] = true; + $this->interval = $config['interval']; + unset($config['interval']); + } + + if (array_key_exists('amount', $config)) { + $this->_usedProperties['amount'] = true; + $this->amount = $config['amount']; + unset($config['amount']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['interval'])) { + $output['interval'] = $this->interval; + } + if (isset($this->_usedProperties['amount'])) { + $output['amount'] = $this->amount; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/RateLimiterConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/RateLimiterConfig.php new file mode 100644 index 0000000..858a4b7 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/RateLimiterConfig.php @@ -0,0 +1,76 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + public function limiter(string $name, array $value = []): \Symfony\Config\Framework\RateLimiter\LimiterConfig + { + if (!isset($this->limiters[$name])) { + $this->_usedProperties['limiters'] = true; + $this->limiters[$name] = new \Symfony\Config\Framework\RateLimiter\LimiterConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "limiter()" has already been initialized. You cannot pass values the second time you call limiter().'); + } + + return $this->limiters[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('limiters', $config)) { + $this->_usedProperties['limiters'] = true; + $this->limiters = array_map(fn ($v) => new \Symfony\Config\Framework\RateLimiter\LimiterConfig($v), $config['limiters']); + unset($config['limiters']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['limiters'])) { + $output['limiters'] = array_map(fn ($v) => $v->toArray(), $this->limiters); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/RemoteeventConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/RemoteeventConfig.php new file mode 100644 index 0000000..5f22246 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/RemoteeventConfig.php @@ -0,0 +1,52 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/RequestConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/RequestConfig.php new file mode 100644 index 0000000..9934195 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/RequestConfig.php @@ -0,0 +1,73 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @return $this + */ + public function format(string $name, ParamConfigurator|string|array $value): static + { + $this->_usedProperties['formats'] = true; + $this->formats[$name] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('formats', $config)) { + $this->_usedProperties['formats'] = true; + $this->formats = $config['formats']; + unset($config['formats']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['formats'])) { + $output['formats'] = $this->formats; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/RouterConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/RouterConfig.php new file mode 100644 index 0000000..22bce78 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/RouterConfig.php @@ -0,0 +1,242 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function resource($value): static + { + $this->_usedProperties['resource'] = true; + $this->resource = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function type($value): static + { + $this->_usedProperties['type'] = true; + $this->type = $value; + + return $this; + } + + /** + * @default '%kernel.build_dir%' + * @param ParamConfigurator|mixed $value + * @deprecated Since symfony/framework-bundle 7.1: Setting the "framework.router.cache_dir" configuration option is deprecated. It will be removed in version 8.0. + * @return $this + */ + public function cacheDir($value): static + { + $this->_usedProperties['cacheDir'] = true; + $this->cacheDir = $value; + + return $this; + } + + /** + * The default URI used to generate URLs in a non-HTTP context. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultUri($value): static + { + $this->_usedProperties['defaultUri'] = true; + $this->defaultUri = $value; + + return $this; + } + + /** + * @default 80 + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function httpPort($value): static + { + $this->_usedProperties['httpPort'] = true; + $this->httpPort = $value; + + return $this; + } + + /** + * @default 443 + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function httpsPort($value): static + { + $this->_usedProperties['httpsPort'] = true; + $this->httpsPort = $value; + + return $this; + } + + /** + * set to true to throw an exception when a parameter does not match the requirements + * set to false to disable exceptions when a parameter does not match the requirements (and return null instead) + * set to null to disable parameter checks against requirements + * 'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production + * @default true + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function strictRequirements($value): static + { + $this->_usedProperties['strictRequirements'] = true; + $this->strictRequirements = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function utf8($value): static + { + $this->_usedProperties['utf8'] = true; + $this->utf8 = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('resource', $config)) { + $this->_usedProperties['resource'] = true; + $this->resource = $config['resource']; + unset($config['resource']); + } + + if (array_key_exists('type', $config)) { + $this->_usedProperties['type'] = true; + $this->type = $config['type']; + unset($config['type']); + } + + if (array_key_exists('cache_dir', $config)) { + $this->_usedProperties['cacheDir'] = true; + $this->cacheDir = $config['cache_dir']; + unset($config['cache_dir']); + } + + if (array_key_exists('default_uri', $config)) { + $this->_usedProperties['defaultUri'] = true; + $this->defaultUri = $config['default_uri']; + unset($config['default_uri']); + } + + if (array_key_exists('http_port', $config)) { + $this->_usedProperties['httpPort'] = true; + $this->httpPort = $config['http_port']; + unset($config['http_port']); + } + + if (array_key_exists('https_port', $config)) { + $this->_usedProperties['httpsPort'] = true; + $this->httpsPort = $config['https_port']; + unset($config['https_port']); + } + + if (array_key_exists('strict_requirements', $config)) { + $this->_usedProperties['strictRequirements'] = true; + $this->strictRequirements = $config['strict_requirements']; + unset($config['strict_requirements']); + } + + if (array_key_exists('utf8', $config)) { + $this->_usedProperties['utf8'] = true; + $this->utf8 = $config['utf8']; + unset($config['utf8']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['resource'])) { + $output['resource'] = $this->resource; + } + if (isset($this->_usedProperties['type'])) { + $output['type'] = $this->type; + } + if (isset($this->_usedProperties['cacheDir'])) { + $output['cache_dir'] = $this->cacheDir; + } + if (isset($this->_usedProperties['defaultUri'])) { + $output['default_uri'] = $this->defaultUri; + } + if (isset($this->_usedProperties['httpPort'])) { + $output['http_port'] = $this->httpPort; + } + if (isset($this->_usedProperties['httpsPort'])) { + $output['https_port'] = $this->httpsPort; + } + if (isset($this->_usedProperties['strictRequirements'])) { + $output['strict_requirements'] = $this->strictRequirements; + } + if (isset($this->_usedProperties['utf8'])) { + $output['utf8'] = $this->utf8; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/SchedulerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/SchedulerConfig.php new file mode 100644 index 0000000..7eaff14 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/SchedulerConfig.php @@ -0,0 +1,52 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/SecretsConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/SecretsConfig.php new file mode 100644 index 0000000..b2638ae --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/SecretsConfig.php @@ -0,0 +1,121 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default '%kernel.project_dir%/config/secrets/%kernel.runtime_environment%' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function vaultDirectory($value): static + { + $this->_usedProperties['vaultDirectory'] = true; + $this->vaultDirectory = $value; + + return $this; + } + + /** + * @default '%kernel.project_dir%/.env.%kernel.environment%.local' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function localDotenvFile($value): static + { + $this->_usedProperties['localDotenvFile'] = true; + $this->localDotenvFile = $value; + + return $this; + } + + /** + * @default 'base64:default::SYMFONY_DECRYPTION_SECRET' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function decryptionEnvVar($value): static + { + $this->_usedProperties['decryptionEnvVar'] = true; + $this->decryptionEnvVar = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('vault_directory', $config)) { + $this->_usedProperties['vaultDirectory'] = true; + $this->vaultDirectory = $config['vault_directory']; + unset($config['vault_directory']); + } + + if (array_key_exists('local_dotenv_file', $config)) { + $this->_usedProperties['localDotenvFile'] = true; + $this->localDotenvFile = $config['local_dotenv_file']; + unset($config['local_dotenv_file']); + } + + if (array_key_exists('decryption_env_var', $config)) { + $this->_usedProperties['decryptionEnvVar'] = true; + $this->decryptionEnvVar = $config['decryption_env_var']; + unset($config['decryption_env_var']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['vaultDirectory'])) { + $output['vault_directory'] = $this->vaultDirectory; + } + if (isset($this->_usedProperties['localDotenvFile'])) { + $output['local_dotenv_file'] = $this->localDotenvFile; + } + if (isset($this->_usedProperties['decryptionEnvVar'])) { + $output['decryption_env_var'] = $this->decryptionEnvVar; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/SemaphoreConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/SemaphoreConfig.php new file mode 100644 index 0000000..caef9b9 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/SemaphoreConfig.php @@ -0,0 +1,73 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @return $this + */ + public function resource(string $name, mixed $value): static + { + $this->_usedProperties['resources'] = true; + $this->resources[$name] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('resources', $config)) { + $this->_usedProperties['resources'] = true; + $this->resources = $config['resources']; + unset($config['resources']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['resources'])) { + $output['resources'] = $this->resources; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Serializer/MappingConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Serializer/MappingConfig.php new file mode 100644 index 0000000..3916ae9 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Serializer/MappingConfig.php @@ -0,0 +1,52 @@ + $value + * + * @return $this + */ + public function paths(ParamConfigurator|array $value): static + { + $this->_usedProperties['paths'] = true; + $this->paths = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('paths', $config)) { + $this->_usedProperties['paths'] = true; + $this->paths = $config['paths']; + unset($config['paths']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['paths'])) { + $output['paths'] = $this->paths; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Serializer/NamedSerializerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Serializer/NamedSerializerConfig.php new file mode 100644 index 0000000..d31922b --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Serializer/NamedSerializerConfig.php @@ -0,0 +1,121 @@ +_usedProperties['nameConverter'] = true; + $this->nameConverter = $value; + + return $this; + } + + /** + * @return $this + */ + public function defaultContext(string $key, mixed $value): static + { + $this->_usedProperties['defaultContext'] = true; + $this->defaultContext[$key] = $value; + + return $this; + } + + /** + * Whether to include the built-in normalizers + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function includeBuiltInNormalizers($value): static + { + $this->_usedProperties['includeBuiltInNormalizers'] = true; + $this->includeBuiltInNormalizers = $value; + + return $this; + } + + /** + * Whether to include the built-in encoders + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function includeBuiltInEncoders($value): static + { + $this->_usedProperties['includeBuiltInEncoders'] = true; + $this->includeBuiltInEncoders = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('name_converter', $config)) { + $this->_usedProperties['nameConverter'] = true; + $this->nameConverter = $config['name_converter']; + unset($config['name_converter']); + } + + if (array_key_exists('default_context', $config)) { + $this->_usedProperties['defaultContext'] = true; + $this->defaultContext = $config['default_context']; + unset($config['default_context']); + } + + if (array_key_exists('include_built_in_normalizers', $config)) { + $this->_usedProperties['includeBuiltInNormalizers'] = true; + $this->includeBuiltInNormalizers = $config['include_built_in_normalizers']; + unset($config['include_built_in_normalizers']); + } + + if (array_key_exists('include_built_in_encoders', $config)) { + $this->_usedProperties['includeBuiltInEncoders'] = true; + $this->includeBuiltInEncoders = $config['include_built_in_encoders']; + unset($config['include_built_in_encoders']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['nameConverter'])) { + $output['name_converter'] = $this->nameConverter; + } + if (isset($this->_usedProperties['defaultContext'])) { + $output['default_context'] = $this->defaultContext; + } + if (isset($this->_usedProperties['includeBuiltInNormalizers'])) { + $output['include_built_in_normalizers'] = $this->includeBuiltInNormalizers; + } + if (isset($this->_usedProperties['includeBuiltInEncoders'])) { + $output['include_built_in_encoders'] = $this->includeBuiltInEncoders; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/SerializerConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/SerializerConfig.php new file mode 100644 index 0000000..cfbbb07 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/SerializerConfig.php @@ -0,0 +1,215 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function enableAttributes($value): static + { + $this->_usedProperties['enableAttributes'] = true; + $this->enableAttributes = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function nameConverter($value): static + { + $this->_usedProperties['nameConverter'] = true; + $this->nameConverter = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function circularReferenceHandler($value): static + { + $this->_usedProperties['circularReferenceHandler'] = true; + $this->circularReferenceHandler = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function maxDepthHandler($value): static + { + $this->_usedProperties['maxDepthHandler'] = true; + $this->maxDepthHandler = $value; + + return $this; + } + + /** + * @default {"paths":[]} + */ + public function mapping(array $value = []): \Symfony\Config\Framework\Serializer\MappingConfig + { + if (null === $this->mapping) { + $this->_usedProperties['mapping'] = true; + $this->mapping = new \Symfony\Config\Framework\Serializer\MappingConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "mapping()" has already been initialized. You cannot pass values the second time you call mapping().'); + } + + return $this->mapping; + } + + /** + * @return $this + */ + public function defaultContext(string $key, mixed $value): static + { + $this->_usedProperties['defaultContext'] = true; + $this->defaultContext[$key] = $value; + + return $this; + } + + public function namedSerializer(string $name, array $value = []): \Symfony\Config\Framework\Serializer\NamedSerializerConfig + { + if (!isset($this->namedSerializers[$name])) { + $this->_usedProperties['namedSerializers'] = true; + $this->namedSerializers[$name] = new \Symfony\Config\Framework\Serializer\NamedSerializerConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "namedSerializer()" has already been initialized. You cannot pass values the second time you call namedSerializer().'); + } + + return $this->namedSerializers[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('enable_attributes', $config)) { + $this->_usedProperties['enableAttributes'] = true; + $this->enableAttributes = $config['enable_attributes']; + unset($config['enable_attributes']); + } + + if (array_key_exists('name_converter', $config)) { + $this->_usedProperties['nameConverter'] = true; + $this->nameConverter = $config['name_converter']; + unset($config['name_converter']); + } + + if (array_key_exists('circular_reference_handler', $config)) { + $this->_usedProperties['circularReferenceHandler'] = true; + $this->circularReferenceHandler = $config['circular_reference_handler']; + unset($config['circular_reference_handler']); + } + + if (array_key_exists('max_depth_handler', $config)) { + $this->_usedProperties['maxDepthHandler'] = true; + $this->maxDepthHandler = $config['max_depth_handler']; + unset($config['max_depth_handler']); + } + + if (array_key_exists('mapping', $config)) { + $this->_usedProperties['mapping'] = true; + $this->mapping = new \Symfony\Config\Framework\Serializer\MappingConfig($config['mapping']); + unset($config['mapping']); + } + + if (array_key_exists('default_context', $config)) { + $this->_usedProperties['defaultContext'] = true; + $this->defaultContext = $config['default_context']; + unset($config['default_context']); + } + + if (array_key_exists('named_serializers', $config)) { + $this->_usedProperties['namedSerializers'] = true; + $this->namedSerializers = array_map(fn ($v) => new \Symfony\Config\Framework\Serializer\NamedSerializerConfig($v), $config['named_serializers']); + unset($config['named_serializers']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['enableAttributes'])) { + $output['enable_attributes'] = $this->enableAttributes; + } + if (isset($this->_usedProperties['nameConverter'])) { + $output['name_converter'] = $this->nameConverter; + } + if (isset($this->_usedProperties['circularReferenceHandler'])) { + $output['circular_reference_handler'] = $this->circularReferenceHandler; + } + if (isset($this->_usedProperties['maxDepthHandler'])) { + $output['max_depth_handler'] = $this->maxDepthHandler; + } + if (isset($this->_usedProperties['mapping'])) { + $output['mapping'] = $this->mapping->toArray(); + } + if (isset($this->_usedProperties['defaultContext'])) { + $output['default_context'] = $this->defaultContext; + } + if (isset($this->_usedProperties['namedSerializers'])) { + $output['named_serializers'] = array_map(fn ($v) => $v->toArray(), $this->namedSerializers); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/SessionConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/SessionConfig.php new file mode 100644 index 0000000..3b67429 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/SessionConfig.php @@ -0,0 +1,448 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default 'session.storage.factory.native' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function storageFactoryId($value): static + { + $this->_usedProperties['storageFactoryId'] = true; + $this->storageFactoryId = $value; + + return $this; + } + + /** + * Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function handlerId($value): static + { + $this->_usedProperties['handlerId'] = true; + $this->handlerId = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function name($value): static + { + $this->_usedProperties['name'] = true; + $this->name = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cookieLifetime($value): static + { + $this->_usedProperties['cookieLifetime'] = true; + $this->cookieLifetime = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cookiePath($value): static + { + $this->_usedProperties['cookiePath'] = true; + $this->cookiePath = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cookieDomain($value): static + { + $this->_usedProperties['cookieDomain'] = true; + $this->cookieDomain = $value; + + return $this; + } + + /** + * @default 'auto' + * @param ParamConfigurator|true|false|'auto' $value + * @return $this + */ + public function cookieSecure($value): static + { + $this->_usedProperties['cookieSecure'] = true; + $this->cookieSecure = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function cookieHttponly($value): static + { + $this->_usedProperties['cookieHttponly'] = true; + $this->cookieHttponly = $value; + + return $this; + } + + /** + * @default 'lax' + * @param ParamConfigurator|NULL|'lax'|'strict'|'none' $value + * @return $this + */ + public function cookieSamesite($value): static + { + $this->_usedProperties['cookieSamesite'] = true; + $this->cookieSamesite = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function useCookies($value): static + { + $this->_usedProperties['useCookies'] = true; + $this->useCookies = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function gcDivisor($value): static + { + $this->_usedProperties['gcDivisor'] = true; + $this->gcDivisor = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function gcProbability($value): static + { + $this->_usedProperties['gcProbability'] = true; + $this->gcProbability = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function gcMaxlifetime($value): static + { + $this->_usedProperties['gcMaxlifetime'] = true; + $this->gcMaxlifetime = $value; + + return $this; + } + + /** + * Defaults to "%kernel.cache_dir%/sessions" if the "handler_id" option is not null. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function savePath($value): static + { + $this->_usedProperties['savePath'] = true; + $this->savePath = $value; + + return $this; + } + + /** + * Seconds to wait between 2 session metadata updates. + * @default 0 + * @param ParamConfigurator|int $value + * @return $this + */ + public function metadataUpdateThreshold($value): static + { + $this->_usedProperties['metadataUpdateThreshold'] = true; + $this->metadataUpdateThreshold = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|int $value + * @deprecated Since symfony/framework-bundle 7.2: Setting the "framework.session.sid_length" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option. + * @return $this + */ + public function sidLength($value): static + { + $this->_usedProperties['sidLength'] = true; + $this->sidLength = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|int $value + * @deprecated Since symfony/framework-bundle 7.2: Setting the "framework.session.sid_bits_per_character" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option. + * @return $this + */ + public function sidBitsPerCharacter($value): static + { + $this->_usedProperties['sidBitsPerCharacter'] = true; + $this->sidBitsPerCharacter = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('storage_factory_id', $config)) { + $this->_usedProperties['storageFactoryId'] = true; + $this->storageFactoryId = $config['storage_factory_id']; + unset($config['storage_factory_id']); + } + + if (array_key_exists('handler_id', $config)) { + $this->_usedProperties['handlerId'] = true; + $this->handlerId = $config['handler_id']; + unset($config['handler_id']); + } + + if (array_key_exists('name', $config)) { + $this->_usedProperties['name'] = true; + $this->name = $config['name']; + unset($config['name']); + } + + if (array_key_exists('cookie_lifetime', $config)) { + $this->_usedProperties['cookieLifetime'] = true; + $this->cookieLifetime = $config['cookie_lifetime']; + unset($config['cookie_lifetime']); + } + + if (array_key_exists('cookie_path', $config)) { + $this->_usedProperties['cookiePath'] = true; + $this->cookiePath = $config['cookie_path']; + unset($config['cookie_path']); + } + + if (array_key_exists('cookie_domain', $config)) { + $this->_usedProperties['cookieDomain'] = true; + $this->cookieDomain = $config['cookie_domain']; + unset($config['cookie_domain']); + } + + if (array_key_exists('cookie_secure', $config)) { + $this->_usedProperties['cookieSecure'] = true; + $this->cookieSecure = $config['cookie_secure']; + unset($config['cookie_secure']); + } + + if (array_key_exists('cookie_httponly', $config)) { + $this->_usedProperties['cookieHttponly'] = true; + $this->cookieHttponly = $config['cookie_httponly']; + unset($config['cookie_httponly']); + } + + if (array_key_exists('cookie_samesite', $config)) { + $this->_usedProperties['cookieSamesite'] = true; + $this->cookieSamesite = $config['cookie_samesite']; + unset($config['cookie_samesite']); + } + + if (array_key_exists('use_cookies', $config)) { + $this->_usedProperties['useCookies'] = true; + $this->useCookies = $config['use_cookies']; + unset($config['use_cookies']); + } + + if (array_key_exists('gc_divisor', $config)) { + $this->_usedProperties['gcDivisor'] = true; + $this->gcDivisor = $config['gc_divisor']; + unset($config['gc_divisor']); + } + + if (array_key_exists('gc_probability', $config)) { + $this->_usedProperties['gcProbability'] = true; + $this->gcProbability = $config['gc_probability']; + unset($config['gc_probability']); + } + + if (array_key_exists('gc_maxlifetime', $config)) { + $this->_usedProperties['gcMaxlifetime'] = true; + $this->gcMaxlifetime = $config['gc_maxlifetime']; + unset($config['gc_maxlifetime']); + } + + if (array_key_exists('save_path', $config)) { + $this->_usedProperties['savePath'] = true; + $this->savePath = $config['save_path']; + unset($config['save_path']); + } + + if (array_key_exists('metadata_update_threshold', $config)) { + $this->_usedProperties['metadataUpdateThreshold'] = true; + $this->metadataUpdateThreshold = $config['metadata_update_threshold']; + unset($config['metadata_update_threshold']); + } + + if (array_key_exists('sid_length', $config)) { + $this->_usedProperties['sidLength'] = true; + $this->sidLength = $config['sid_length']; + unset($config['sid_length']); + } + + if (array_key_exists('sid_bits_per_character', $config)) { + $this->_usedProperties['sidBitsPerCharacter'] = true; + $this->sidBitsPerCharacter = $config['sid_bits_per_character']; + unset($config['sid_bits_per_character']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['storageFactoryId'])) { + $output['storage_factory_id'] = $this->storageFactoryId; + } + if (isset($this->_usedProperties['handlerId'])) { + $output['handler_id'] = $this->handlerId; + } + if (isset($this->_usedProperties['name'])) { + $output['name'] = $this->name; + } + if (isset($this->_usedProperties['cookieLifetime'])) { + $output['cookie_lifetime'] = $this->cookieLifetime; + } + if (isset($this->_usedProperties['cookiePath'])) { + $output['cookie_path'] = $this->cookiePath; + } + if (isset($this->_usedProperties['cookieDomain'])) { + $output['cookie_domain'] = $this->cookieDomain; + } + if (isset($this->_usedProperties['cookieSecure'])) { + $output['cookie_secure'] = $this->cookieSecure; + } + if (isset($this->_usedProperties['cookieHttponly'])) { + $output['cookie_httponly'] = $this->cookieHttponly; + } + if (isset($this->_usedProperties['cookieSamesite'])) { + $output['cookie_samesite'] = $this->cookieSamesite; + } + if (isset($this->_usedProperties['useCookies'])) { + $output['use_cookies'] = $this->useCookies; + } + if (isset($this->_usedProperties['gcDivisor'])) { + $output['gc_divisor'] = $this->gcDivisor; + } + if (isset($this->_usedProperties['gcProbability'])) { + $output['gc_probability'] = $this->gcProbability; + } + if (isset($this->_usedProperties['gcMaxlifetime'])) { + $output['gc_maxlifetime'] = $this->gcMaxlifetime; + } + if (isset($this->_usedProperties['savePath'])) { + $output['save_path'] = $this->savePath; + } + if (isset($this->_usedProperties['metadataUpdateThreshold'])) { + $output['metadata_update_threshold'] = $this->metadataUpdateThreshold; + } + if (isset($this->_usedProperties['sidLength'])) { + $output['sid_length'] = $this->sidLength; + } + if (isset($this->_usedProperties['sidBitsPerCharacter'])) { + $output['sid_bits_per_character'] = $this->sidBitsPerCharacter; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/SsiConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/SsiConfig.php new file mode 100644 index 0000000..3f81e35 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/SsiConfig.php @@ -0,0 +1,52 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Translator/GlobalConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Translator/GlobalConfig.php new file mode 100644 index 0000000..c5b97dd --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Translator/GlobalConfig.php @@ -0,0 +1,120 @@ +_usedProperties['value'] = true; + $this->value = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function message($value): static + { + $this->_usedProperties['message'] = true; + $this->message = $value; + + return $this; + } + + /** + * @return $this + */ + public function parameter(string $name, mixed $value): static + { + $this->_usedProperties['parameters'] = true; + $this->parameters[$name] = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function domain($value): static + { + $this->_usedProperties['domain'] = true; + $this->domain = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('value', $config)) { + $this->_usedProperties['value'] = true; + $this->value = $config['value']; + unset($config['value']); + } + + if (array_key_exists('message', $config)) { + $this->_usedProperties['message'] = true; + $this->message = $config['message']; + unset($config['message']); + } + + if (array_key_exists('parameters', $config)) { + $this->_usedProperties['parameters'] = true; + $this->parameters = $config['parameters']; + unset($config['parameters']); + } + + if (array_key_exists('domain', $config)) { + $this->_usedProperties['domain'] = true; + $this->domain = $config['domain']; + unset($config['domain']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['value'])) { + $output['value'] = $this->value; + } + if (isset($this->_usedProperties['message'])) { + $output['message'] = $this->message; + } + if (isset($this->_usedProperties['parameters'])) { + $output['parameters'] = $this->parameters; + } + if (isset($this->_usedProperties['domain'])) { + $output['domain'] = $this->domain; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Translator/ProviderConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Translator/ProviderConfig.php new file mode 100644 index 0000000..9eff04f --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Translator/ProviderConfig.php @@ -0,0 +1,98 @@ +_usedProperties['dsn'] = true; + $this->dsn = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function domains(ParamConfigurator|array $value): static + { + $this->_usedProperties['domains'] = true; + $this->domains = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function locales(ParamConfigurator|array $value): static + { + $this->_usedProperties['locales'] = true; + $this->locales = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('dsn', $config)) { + $this->_usedProperties['dsn'] = true; + $this->dsn = $config['dsn']; + unset($config['dsn']); + } + + if (array_key_exists('domains', $config)) { + $this->_usedProperties['domains'] = true; + $this->domains = $config['domains']; + unset($config['domains']); + } + + if (array_key_exists('locales', $config)) { + $this->_usedProperties['locales'] = true; + $this->locales = $config['locales']; + unset($config['locales']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['dsn'])) { + $output['dsn'] = $this->dsn; + } + if (isset($this->_usedProperties['domains'])) { + $output['domains'] = $this->domains; + } + if (isset($this->_usedProperties['locales'])) { + $output['locales'] = $this->locales; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Translator/PseudoLocalizationConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Translator/PseudoLocalizationConfig.php new file mode 100644 index 0000000..c1778d5 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Translator/PseudoLocalizationConfig.php @@ -0,0 +1,167 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function accents($value): static + { + $this->_usedProperties['accents'] = true; + $this->accents = $value; + + return $this; + } + + /** + * @default 1.0 + * @param ParamConfigurator|float $value + * @return $this + */ + public function expansionFactor($value): static + { + $this->_usedProperties['expansionFactor'] = true; + $this->expansionFactor = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function brackets($value): static + { + $this->_usedProperties['brackets'] = true; + $this->brackets = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function parseHtml($value): static + { + $this->_usedProperties['parseHtml'] = true; + $this->parseHtml = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function localizableHtmlAttributes(ParamConfigurator|array $value): static + { + $this->_usedProperties['localizableHtmlAttributes'] = true; + $this->localizableHtmlAttributes = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('accents', $config)) { + $this->_usedProperties['accents'] = true; + $this->accents = $config['accents']; + unset($config['accents']); + } + + if (array_key_exists('expansion_factor', $config)) { + $this->_usedProperties['expansionFactor'] = true; + $this->expansionFactor = $config['expansion_factor']; + unset($config['expansion_factor']); + } + + if (array_key_exists('brackets', $config)) { + $this->_usedProperties['brackets'] = true; + $this->brackets = $config['brackets']; + unset($config['brackets']); + } + + if (array_key_exists('parse_html', $config)) { + $this->_usedProperties['parseHtml'] = true; + $this->parseHtml = $config['parse_html']; + unset($config['parse_html']); + } + + if (array_key_exists('localizable_html_attributes', $config)) { + $this->_usedProperties['localizableHtmlAttributes'] = true; + $this->localizableHtmlAttributes = $config['localizable_html_attributes']; + unset($config['localizable_html_attributes']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['accents'])) { + $output['accents'] = $this->accents; + } + if (isset($this->_usedProperties['expansionFactor'])) { + $output['expansion_factor'] = $this->expansionFactor; + } + if (isset($this->_usedProperties['brackets'])) { + $output['brackets'] = $this->brackets; + } + if (isset($this->_usedProperties['parseHtml'])) { + $output['parse_html'] = $this->parseHtml; + } + if (isset($this->_usedProperties['localizableHtmlAttributes'])) { + $output['localizable_html_attributes'] = $this->localizableHtmlAttributes; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/TranslatorConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/TranslatorConfig.php new file mode 100644 index 0000000..946c7ca --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/TranslatorConfig.php @@ -0,0 +1,293 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function fallbacks(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['fallbacks'] = true; + $this->fallbacks = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function logging($value): static + { + $this->_usedProperties['logging'] = true; + $this->logging = $value; + + return $this; + } + + /** + * @default 'translator.formatter.default' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function formatter($value): static + { + $this->_usedProperties['formatter'] = true; + $this->formatter = $value; + + return $this; + } + + /** + * @default '%kernel.cache_dir%/translations' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function cacheDir($value): static + { + $this->_usedProperties['cacheDir'] = true; + $this->cacheDir = $value; + + return $this; + } + + /** + * The default path used to load translations. + * @default '%kernel.project_dir%/translations' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function defaultPath($value): static + { + $this->_usedProperties['defaultPath'] = true; + $this->defaultPath = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function paths(ParamConfigurator|array $value): static + { + $this->_usedProperties['paths'] = true; + $this->paths = $value; + + return $this; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * @default {"enabled":false,"accents":true,"expansion_factor":1,"brackets":true,"parse_html":false,"localizable_html_attributes":[]} + * @return \Symfony\Config\Framework\Translator\PseudoLocalizationConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Translator\PseudoLocalizationConfig : static) + */ + public function pseudoLocalization(array|bool $value = []): \Symfony\Config\Framework\Translator\PseudoLocalizationConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['pseudoLocalization'] = true; + $this->pseudoLocalization = $value; + + return $this; + } + + if (!$this->pseudoLocalization instanceof \Symfony\Config\Framework\Translator\PseudoLocalizationConfig) { + $this->_usedProperties['pseudoLocalization'] = true; + $this->pseudoLocalization = new \Symfony\Config\Framework\Translator\PseudoLocalizationConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "pseudoLocalization()" has already been initialized. You cannot pass values the second time you call pseudoLocalization().'); + } + + return $this->pseudoLocalization; + } + + /** + * Translation providers you can read/write your translations from. + */ + public function provider(string $name, array $value = []): \Symfony\Config\Framework\Translator\ProviderConfig + { + if (!isset($this->providers[$name])) { + $this->_usedProperties['providers'] = true; + $this->providers[$name] = new \Symfony\Config\Framework\Translator\ProviderConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "provider()" has already been initialized. You cannot pass values the second time you call provider().'); + } + + return $this->providers[$name]; + } + + /** + * @template TValue of string|array + * @param TValue $value + * Global parameters. + * @example 3.14 + * @return \Symfony\Config\Framework\Translator\GlobalConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Translator\GlobalConfig : static) + */ + public function global(string $name, string|array $value = []): \Symfony\Config\Framework\Translator\GlobalConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['globals'] = true; + $this->globals[$name] = $value; + + return $this; + } + + if (!isset($this->globals[$name]) || !$this->globals[$name] instanceof \Symfony\Config\Framework\Translator\GlobalConfig) { + $this->_usedProperties['globals'] = true; + $this->globals[$name] = new \Symfony\Config\Framework\Translator\GlobalConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "global()" has already been initialized. You cannot pass values the second time you call global().'); + } + + return $this->globals[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('fallbacks', $config)) { + $this->_usedProperties['fallbacks'] = true; + $this->fallbacks = $config['fallbacks']; + unset($config['fallbacks']); + } + + if (array_key_exists('logging', $config)) { + $this->_usedProperties['logging'] = true; + $this->logging = $config['logging']; + unset($config['logging']); + } + + if (array_key_exists('formatter', $config)) { + $this->_usedProperties['formatter'] = true; + $this->formatter = $config['formatter']; + unset($config['formatter']); + } + + if (array_key_exists('cache_dir', $config)) { + $this->_usedProperties['cacheDir'] = true; + $this->cacheDir = $config['cache_dir']; + unset($config['cache_dir']); + } + + if (array_key_exists('default_path', $config)) { + $this->_usedProperties['defaultPath'] = true; + $this->defaultPath = $config['default_path']; + unset($config['default_path']); + } + + if (array_key_exists('paths', $config)) { + $this->_usedProperties['paths'] = true; + $this->paths = $config['paths']; + unset($config['paths']); + } + + if (array_key_exists('pseudo_localization', $config)) { + $this->_usedProperties['pseudoLocalization'] = true; + $this->pseudoLocalization = \is_array($config['pseudo_localization']) ? new \Symfony\Config\Framework\Translator\PseudoLocalizationConfig($config['pseudo_localization']) : $config['pseudo_localization']; + unset($config['pseudo_localization']); + } + + if (array_key_exists('providers', $config)) { + $this->_usedProperties['providers'] = true; + $this->providers = array_map(fn ($v) => new \Symfony\Config\Framework\Translator\ProviderConfig($v), $config['providers']); + unset($config['providers']); + } + + if (array_key_exists('globals', $config)) { + $this->_usedProperties['globals'] = true; + $this->globals = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\Translator\GlobalConfig($v) : $v, $config['globals']); + unset($config['globals']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['fallbacks'])) { + $output['fallbacks'] = $this->fallbacks; + } + if (isset($this->_usedProperties['logging'])) { + $output['logging'] = $this->logging; + } + if (isset($this->_usedProperties['formatter'])) { + $output['formatter'] = $this->formatter; + } + if (isset($this->_usedProperties['cacheDir'])) { + $output['cache_dir'] = $this->cacheDir; + } + if (isset($this->_usedProperties['defaultPath'])) { + $output['default_path'] = $this->defaultPath; + } + if (isset($this->_usedProperties['paths'])) { + $output['paths'] = $this->paths; + } + if (isset($this->_usedProperties['pseudoLocalization'])) { + $output['pseudo_localization'] = $this->pseudoLocalization instanceof \Symfony\Config\Framework\Translator\PseudoLocalizationConfig ? $this->pseudoLocalization->toArray() : $this->pseudoLocalization; + } + if (isset($this->_usedProperties['providers'])) { + $output['providers'] = array_map(fn ($v) => $v->toArray(), $this->providers); + } + if (isset($this->_usedProperties['globals'])) { + $output['globals'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\Translator\GlobalConfig ? $v->toArray() : $v, $this->globals); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/TypeInfoConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/TypeInfoConfig.php new file mode 100644 index 0000000..e04edf1 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/TypeInfoConfig.php @@ -0,0 +1,73 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @return $this + */ + public function alias(string $name, mixed $value): static + { + $this->_usedProperties['aliases'] = true; + $this->aliases[$name] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('aliases', $config)) { + $this->_usedProperties['aliases'] = true; + $this->aliases = $config['aliases']; + unset($config['aliases']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['aliases'])) { + $output['aliases'] = $this->aliases; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/UidConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/UidConfig.php new file mode 100644 index 0000000..3186dca --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/UidConfig.php @@ -0,0 +1,167 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default 7 + * @param ParamConfigurator|7|6|4|1 $value + * @return $this + */ + public function defaultUuidVersion($value): static + { + $this->_usedProperties['defaultUuidVersion'] = true; + $this->defaultUuidVersion = $value; + + return $this; + } + + /** + * @default 5 + * @param ParamConfigurator|5|3 $value + * @return $this + */ + public function nameBasedUuidVersion($value): static + { + $this->_usedProperties['nameBasedUuidVersion'] = true; + $this->nameBasedUuidVersion = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function nameBasedUuidNamespace($value): static + { + $this->_usedProperties['nameBasedUuidNamespace'] = true; + $this->nameBasedUuidNamespace = $value; + + return $this; + } + + /** + * @default 7 + * @param ParamConfigurator|7|6|1 $value + * @return $this + */ + public function timeBasedUuidVersion($value): static + { + $this->_usedProperties['timeBasedUuidVersion'] = true; + $this->timeBasedUuidVersion = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function timeBasedUuidNode($value): static + { + $this->_usedProperties['timeBasedUuidNode'] = true; + $this->timeBasedUuidNode = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('default_uuid_version', $config)) { + $this->_usedProperties['defaultUuidVersion'] = true; + $this->defaultUuidVersion = $config['default_uuid_version']; + unset($config['default_uuid_version']); + } + + if (array_key_exists('name_based_uuid_version', $config)) { + $this->_usedProperties['nameBasedUuidVersion'] = true; + $this->nameBasedUuidVersion = $config['name_based_uuid_version']; + unset($config['name_based_uuid_version']); + } + + if (array_key_exists('name_based_uuid_namespace', $config)) { + $this->_usedProperties['nameBasedUuidNamespace'] = true; + $this->nameBasedUuidNamespace = $config['name_based_uuid_namespace']; + unset($config['name_based_uuid_namespace']); + } + + if (array_key_exists('time_based_uuid_version', $config)) { + $this->_usedProperties['timeBasedUuidVersion'] = true; + $this->timeBasedUuidVersion = $config['time_based_uuid_version']; + unset($config['time_based_uuid_version']); + } + + if (array_key_exists('time_based_uuid_node', $config)) { + $this->_usedProperties['timeBasedUuidNode'] = true; + $this->timeBasedUuidNode = $config['time_based_uuid_node']; + unset($config['time_based_uuid_node']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['defaultUuidVersion'])) { + $output['default_uuid_version'] = $this->defaultUuidVersion; + } + if (isset($this->_usedProperties['nameBasedUuidVersion'])) { + $output['name_based_uuid_version'] = $this->nameBasedUuidVersion; + } + if (isset($this->_usedProperties['nameBasedUuidNamespace'])) { + $output['name_based_uuid_namespace'] = $this->nameBasedUuidNamespace; + } + if (isset($this->_usedProperties['timeBasedUuidVersion'])) { + $output['time_based_uuid_version'] = $this->timeBasedUuidVersion; + } + if (isset($this->_usedProperties['timeBasedUuidNode'])) { + $output['time_based_uuid_node'] = $this->timeBasedUuidNode; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Validation/AutoMappingConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Validation/AutoMappingConfig.php new file mode 100644 index 0000000..9042b01 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Validation/AutoMappingConfig.php @@ -0,0 +1,52 @@ + $value + * + * @return $this + */ + public function services(ParamConfigurator|array $value): static + { + $this->_usedProperties['services'] = true; + $this->services = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('services', $config)) { + $this->_usedProperties['services'] = true; + $this->services = $config['services']; + unset($config['services']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['services'])) { + $output['services'] = $this->services; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Validation/MappingConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Validation/MappingConfig.php new file mode 100644 index 0000000..171a288 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Validation/MappingConfig.php @@ -0,0 +1,52 @@ + $value + * + * @return $this + */ + public function paths(ParamConfigurator|array $value): static + { + $this->_usedProperties['paths'] = true; + $this->paths = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('paths', $config)) { + $this->_usedProperties['paths'] = true; + $this->paths = $config['paths']; + unset($config['paths']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['paths'])) { + $output['paths'] = $this->paths; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Validation/NotCompromisedPasswordConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Validation/NotCompromisedPasswordConfig.php new file mode 100644 index 0000000..d7225aa --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Validation/NotCompromisedPasswordConfig.php @@ -0,0 +1,77 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * API endpoint for the NotCompromisedPassword Validator. + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function endpoint($value): static + { + $this->_usedProperties['endpoint'] = true; + $this->endpoint = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('endpoint', $config)) { + $this->_usedProperties['endpoint'] = true; + $this->endpoint = $config['endpoint']; + unset($config['endpoint']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['endpoint'])) { + $output['endpoint'] = $this->endpoint; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/ValidationConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/ValidationConfig.php new file mode 100644 index 0000000..fa3d462 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/ValidationConfig.php @@ -0,0 +1,283 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @deprecated Since symfony/framework-bundle 7.3: Setting the "framework.validation.cache" configuration option is deprecated. It will be removed in version 8.0. + * @return $this + */ + public function cache($value): static + { + $this->_usedProperties['cache'] = true; + $this->cache = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function enableAttributes($value): static + { + $this->_usedProperties['enableAttributes'] = true; + $this->enableAttributes = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function staticMethod(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['staticMethod'] = true; + $this->staticMethod = $value; + + return $this; + } + + /** + * @default 'validators' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function translationDomain($value): static + { + $this->_usedProperties['translationDomain'] = true; + $this->translationDomain = $value; + + return $this; + } + + /** + * @default 'html5' + * @param ParamConfigurator|'html5'|'html5-allow-no-tld'|'strict'|'loose' $value + * @return $this + */ + public function emailValidationMode($value): static + { + $this->_usedProperties['emailValidationMode'] = true; + $this->emailValidationMode = $value; + + return $this; + } + + /** + * @default {"paths":[]} + */ + public function mapping(array $value = []): \Symfony\Config\Framework\Validation\MappingConfig + { + if (null === $this->mapping) { + $this->_usedProperties['mapping'] = true; + $this->mapping = new \Symfony\Config\Framework\Validation\MappingConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "mapping()" has already been initialized. You cannot pass values the second time you call mapping().'); + } + + return $this->mapping; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * @default {"enabled":true,"endpoint":null} + * @return \Symfony\Config\Framework\Validation\NotCompromisedPasswordConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Validation\NotCompromisedPasswordConfig : static) + */ + public function notCompromisedPassword(array|bool $value = []): \Symfony\Config\Framework\Validation\NotCompromisedPasswordConfig|static + { + if (!\is_array($value)) { + $this->_usedProperties['notCompromisedPassword'] = true; + $this->notCompromisedPassword = $value; + + return $this; + } + + if (!$this->notCompromisedPassword instanceof \Symfony\Config\Framework\Validation\NotCompromisedPasswordConfig) { + $this->_usedProperties['notCompromisedPassword'] = true; + $this->notCompromisedPassword = new \Symfony\Config\Framework\Validation\NotCompromisedPasswordConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "notCompromisedPassword()" has already been initialized. You cannot pass values the second time you call notCompromisedPassword().'); + } + + return $this->notCompromisedPassword; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function disableTranslation($value): static + { + $this->_usedProperties['disableTranslation'] = true; + $this->disableTranslation = $value; + + return $this; + } + + /** + * A collection of namespaces for which auto-mapping will be enabled by default, or null to opt-in with the EnableAutoMapping constraint. + * @example [] + * @example ["validator.property_info_loader"] + */ + public function autoMapping(string $namespace, array $value = []): \Symfony\Config\Framework\Validation\AutoMappingConfig + { + if (!isset($this->autoMapping[$namespace])) { + $this->_usedProperties['autoMapping'] = true; + $this->autoMapping[$namespace] = new \Symfony\Config\Framework\Validation\AutoMappingConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "autoMapping()" has already been initialized. You cannot pass values the second time you call autoMapping().'); + } + + return $this->autoMapping[$namespace]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('cache', $config)) { + $this->_usedProperties['cache'] = true; + $this->cache = $config['cache']; + unset($config['cache']); + } + + if (array_key_exists('enable_attributes', $config)) { + $this->_usedProperties['enableAttributes'] = true; + $this->enableAttributes = $config['enable_attributes']; + unset($config['enable_attributes']); + } + + if (array_key_exists('static_method', $config)) { + $this->_usedProperties['staticMethod'] = true; + $this->staticMethod = $config['static_method']; + unset($config['static_method']); + } + + if (array_key_exists('translation_domain', $config)) { + $this->_usedProperties['translationDomain'] = true; + $this->translationDomain = $config['translation_domain']; + unset($config['translation_domain']); + } + + if (array_key_exists('email_validation_mode', $config)) { + $this->_usedProperties['emailValidationMode'] = true; + $this->emailValidationMode = $config['email_validation_mode']; + unset($config['email_validation_mode']); + } + + if (array_key_exists('mapping', $config)) { + $this->_usedProperties['mapping'] = true; + $this->mapping = new \Symfony\Config\Framework\Validation\MappingConfig($config['mapping']); + unset($config['mapping']); + } + + if (array_key_exists('not_compromised_password', $config)) { + $this->_usedProperties['notCompromisedPassword'] = true; + $this->notCompromisedPassword = \is_array($config['not_compromised_password']) ? new \Symfony\Config\Framework\Validation\NotCompromisedPasswordConfig($config['not_compromised_password']) : $config['not_compromised_password']; + unset($config['not_compromised_password']); + } + + if (array_key_exists('disable_translation', $config)) { + $this->_usedProperties['disableTranslation'] = true; + $this->disableTranslation = $config['disable_translation']; + unset($config['disable_translation']); + } + + if (array_key_exists('auto_mapping', $config)) { + $this->_usedProperties['autoMapping'] = true; + $this->autoMapping = array_map(fn ($v) => new \Symfony\Config\Framework\Validation\AutoMappingConfig($v), $config['auto_mapping']); + unset($config['auto_mapping']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['cache'])) { + $output['cache'] = $this->cache; + } + if (isset($this->_usedProperties['enableAttributes'])) { + $output['enable_attributes'] = $this->enableAttributes; + } + if (isset($this->_usedProperties['staticMethod'])) { + $output['static_method'] = $this->staticMethod; + } + if (isset($this->_usedProperties['translationDomain'])) { + $output['translation_domain'] = $this->translationDomain; + } + if (isset($this->_usedProperties['emailValidationMode'])) { + $output['email_validation_mode'] = $this->emailValidationMode; + } + if (isset($this->_usedProperties['mapping'])) { + $output['mapping'] = $this->mapping->toArray(); + } + if (isset($this->_usedProperties['notCompromisedPassword'])) { + $output['not_compromised_password'] = $this->notCompromisedPassword instanceof \Symfony\Config\Framework\Validation\NotCompromisedPasswordConfig ? $this->notCompromisedPassword->toArray() : $this->notCompromisedPassword; + } + if (isset($this->_usedProperties['disableTranslation'])) { + $output['disable_translation'] = $this->disableTranslation; + } + if (isset($this->_usedProperties['autoMapping'])) { + $output['auto_mapping'] = array_map(fn ($v) => $v->toArray(), $this->autoMapping); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/WebLinkConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/WebLinkConfig.php new file mode 100644 index 0000000..6b34e04 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/WebLinkConfig.php @@ -0,0 +1,52 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Webhook/RoutingConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Webhook/RoutingConfig.php new file mode 100644 index 0000000..921df4c --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Webhook/RoutingConfig.php @@ -0,0 +1,74 @@ +_usedProperties['service'] = true; + $this->service = $value; + + return $this; + } + + /** + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function secret($value): static + { + $this->_usedProperties['secret'] = true; + $this->secret = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('service', $config)) { + $this->_usedProperties['service'] = true; + $this->service = $config['service']; + unset($config['service']); + } + + if (array_key_exists('secret', $config)) { + $this->_usedProperties['secret'] = true; + $this->secret = $config['secret']; + unset($config['secret']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['service'])) { + $output['service'] = $this->service; + } + if (isset($this->_usedProperties['secret'])) { + $output['secret'] = $this->secret; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/WebhookConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/WebhookConfig.php new file mode 100644 index 0000000..292ffd6 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/WebhookConfig.php @@ -0,0 +1,100 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + /** + * The message bus to use. + * @default 'messenger.default_bus' + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function messageBus($value): static + { + $this->_usedProperties['messageBus'] = true; + $this->messageBus = $value; + + return $this; + } + + public function routing(string $type, array $value = []): \Symfony\Config\Framework\Webhook\RoutingConfig + { + if (!isset($this->routing[$type])) { + $this->_usedProperties['routing'] = true; + $this->routing[$type] = new \Symfony\Config\Framework\Webhook\RoutingConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "routing()" has already been initialized. You cannot pass values the second time you call routing().'); + } + + return $this->routing[$type]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('message_bus', $config)) { + $this->_usedProperties['messageBus'] = true; + $this->messageBus = $config['message_bus']; + unset($config['message_bus']); + } + + if (array_key_exists('routing', $config)) { + $this->_usedProperties['routing'] = true; + $this->routing = array_map(fn ($v) => new \Symfony\Config\Framework\Webhook\RoutingConfig($v), $config['routing']); + unset($config['routing']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['messageBus'])) { + $output['message_bus'] = $this->messageBus; + } + if (isset($this->_usedProperties['routing'])) { + $output['routing'] = array_map(fn ($v) => $v->toArray(), $this->routing); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig.php new file mode 100644 index 0000000..e4dc9ab --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig.php @@ -0,0 +1,296 @@ +_usedProperties['auditTrail'] = true; + $this->auditTrail = $value; + + return $this; + } + + if (!$this->auditTrail instanceof \Symfony\Config\Framework\Workflows\WorkflowConfig\AuditTrailConfig) { + $this->_usedProperties['auditTrail'] = true; + $this->auditTrail = new \Symfony\Config\Framework\Workflows\WorkflowConfig\AuditTrailConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "auditTrail()" has already been initialized. You cannot pass values the second time you call auditTrail().'); + } + + return $this->auditTrail; + } + + /** + * @default 'state_machine' + * @param ParamConfigurator|'workflow'|'state_machine' $value + * @return $this + */ + public function type($value): static + { + $this->_usedProperties['type'] = true; + $this->type = $value; + + return $this; + } + + public function markingStore(array $value = []): \Symfony\Config\Framework\Workflows\WorkflowConfig\MarkingStoreConfig + { + if (null === $this->markingStore) { + $this->_usedProperties['markingStore'] = true; + $this->markingStore = new \Symfony\Config\Framework\Workflows\WorkflowConfig\MarkingStoreConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "markingStore()" has already been initialized. You cannot pass values the second time you call markingStore().'); + } + + return $this->markingStore; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + */ + public function supports(ParamConfigurator|string|array $value): static + { + $this->_usedProperties['supports'] = true; + $this->supports = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function definitionValidators(ParamConfigurator|array $value): static + { + $this->_usedProperties['definitionValidators'] = true; + $this->definitionValidators = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function supportStrategy($value): static + { + $this->_usedProperties['supportStrategy'] = true; + $this->supportStrategy = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|\BackedEnum|string $value + * + * @return $this + */ + public function initialMarking(ParamConfigurator|\BackedEnum|string|array $value): static + { + $this->_usedProperties['initialMarking'] = true; + $this->initialMarking = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function eventsToDispatch(ParamConfigurator|array $value): static + { + $this->_usedProperties['eventsToDispatch'] = true; + $this->eventsToDispatch = $value; + + return $this; + } + + /** + * @template TValue of string|array + * @param TValue $value + * @return \Symfony\Config\Framework\Workflows\WorkflowConfig\PlaceConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Workflows\WorkflowConfig\PlaceConfig : static) + */ + public function place(string|array $value = []): \Symfony\Config\Framework\Workflows\WorkflowConfig\PlaceConfig|static + { + $this->_usedProperties['places'] = true; + if (!\is_array($value)) { + $this->places[] = $value; + + return $this; + } + + return $this->places[] = new \Symfony\Config\Framework\Workflows\WorkflowConfig\PlaceConfig($value); + } + + public function transition(array $value = []): \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig + { + $this->_usedProperties['transitions'] = true; + + return $this->transitions[] = new \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig($value); + } + + /** + * @return $this + */ + public function metadata(string $key, mixed $value): static + { + $this->_usedProperties['metadata'] = true; + $this->metadata[$key] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('audit_trail', $config)) { + $this->_usedProperties['auditTrail'] = true; + $this->auditTrail = \is_array($config['audit_trail']) ? new \Symfony\Config\Framework\Workflows\WorkflowConfig\AuditTrailConfig($config['audit_trail']) : $config['audit_trail']; + unset($config['audit_trail']); + } + + if (array_key_exists('type', $config)) { + $this->_usedProperties['type'] = true; + $this->type = $config['type']; + unset($config['type']); + } + + if (array_key_exists('marking_store', $config)) { + $this->_usedProperties['markingStore'] = true; + $this->markingStore = new \Symfony\Config\Framework\Workflows\WorkflowConfig\MarkingStoreConfig($config['marking_store']); + unset($config['marking_store']); + } + + if (array_key_exists('supports', $config)) { + $this->_usedProperties['supports'] = true; + $this->supports = $config['supports']; + unset($config['supports']); + } + + if (array_key_exists('definition_validators', $config)) { + $this->_usedProperties['definitionValidators'] = true; + $this->definitionValidators = $config['definition_validators']; + unset($config['definition_validators']); + } + + if (array_key_exists('support_strategy', $config)) { + $this->_usedProperties['supportStrategy'] = true; + $this->supportStrategy = $config['support_strategy']; + unset($config['support_strategy']); + } + + if (array_key_exists('initial_marking', $config)) { + $this->_usedProperties['initialMarking'] = true; + $this->initialMarking = $config['initial_marking']; + unset($config['initial_marking']); + } + + if (array_key_exists('events_to_dispatch', $config)) { + $this->_usedProperties['eventsToDispatch'] = true; + $this->eventsToDispatch = $config['events_to_dispatch']; + unset($config['events_to_dispatch']); + } + + if (array_key_exists('places', $config)) { + $this->_usedProperties['places'] = true; + $this->places = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\Workflows\WorkflowConfig\PlaceConfig($v) : $v, $config['places']); + unset($config['places']); + } + + if (array_key_exists('transitions', $config)) { + $this->_usedProperties['transitions'] = true; + $this->transitions = array_map(fn ($v) => new \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig($v), $config['transitions']); + unset($config['transitions']); + } + + if (array_key_exists('metadata', $config)) { + $this->_usedProperties['metadata'] = true; + $this->metadata = $config['metadata']; + unset($config['metadata']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['auditTrail'])) { + $output['audit_trail'] = $this->auditTrail instanceof \Symfony\Config\Framework\Workflows\WorkflowConfig\AuditTrailConfig ? $this->auditTrail->toArray() : $this->auditTrail; + } + if (isset($this->_usedProperties['type'])) { + $output['type'] = $this->type; + } + if (isset($this->_usedProperties['markingStore'])) { + $output['marking_store'] = $this->markingStore->toArray(); + } + if (isset($this->_usedProperties['supports'])) { + $output['supports'] = $this->supports; + } + if (isset($this->_usedProperties['definitionValidators'])) { + $output['definition_validators'] = $this->definitionValidators; + } + if (isset($this->_usedProperties['supportStrategy'])) { + $output['support_strategy'] = $this->supportStrategy; + } + if (isset($this->_usedProperties['initialMarking'])) { + $output['initial_marking'] = $this->initialMarking; + } + if (isset($this->_usedProperties['eventsToDispatch'])) { + $output['events_to_dispatch'] = $this->eventsToDispatch; + } + if (isset($this->_usedProperties['places'])) { + $output['places'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\Workflows\WorkflowConfig\PlaceConfig ? $v->toArray() : $v, $this->places); + } + if (isset($this->_usedProperties['transitions'])) { + $output['transitions'] = array_map(fn ($v) => $v->toArray(), $this->transitions); + } + if (isset($this->_usedProperties['metadata'])) { + $output['metadata'] = $this->metadata; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/AuditTrailConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/AuditTrailConfig.php new file mode 100644 index 0000000..7845b0d --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/AuditTrailConfig.php @@ -0,0 +1,52 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/MarkingStoreConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/MarkingStoreConfig.php new file mode 100644 index 0000000..08c5e66 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/MarkingStoreConfig.php @@ -0,0 +1,98 @@ +_usedProperties['type'] = true; + $this->type = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function property($value): static + { + $this->_usedProperties['property'] = true; + $this->property = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function service($value): static + { + $this->_usedProperties['service'] = true; + $this->service = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('type', $config)) { + $this->_usedProperties['type'] = true; + $this->type = $config['type']; + unset($config['type']); + } + + if (array_key_exists('property', $config)) { + $this->_usedProperties['property'] = true; + $this->property = $config['property']; + unset($config['property']); + } + + if (array_key_exists('service', $config)) { + $this->_usedProperties['service'] = true; + $this->service = $config['service']; + unset($config['service']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['type'])) { + $output['type'] = $this->type; + } + if (isset($this->_usedProperties['property'])) { + $output['property'] = $this->property; + } + if (isset($this->_usedProperties['service'])) { + $output['service'] = $this->service; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/PlaceConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/PlaceConfig.php new file mode 100644 index 0000000..62acb6b --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/PlaceConfig.php @@ -0,0 +1,73 @@ +_usedProperties['name'] = true; + $this->name = $value; + + return $this; + } + + /** + * @return $this + */ + public function metadata(string $key, mixed $value): static + { + $this->_usedProperties['metadata'] = true; + $this->metadata[$key] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('name', $config)) { + $this->_usedProperties['name'] = true; + $this->name = $config['name']; + unset($config['name']); + } + + if (array_key_exists('metadata', $config)) { + $this->_usedProperties['metadata'] = true; + $this->metadata = $config['metadata']; + unset($config['metadata']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['name'])) { + $output['name'] = $this->name; + } + if (isset($this->_usedProperties['metadata'])) { + $output['metadata'] = $this->metadata; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/TransitionConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/TransitionConfig.php new file mode 100644 index 0000000..485d532 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/TransitionConfig.php @@ -0,0 +1,180 @@ +_usedProperties['name'] = true; + $this->name = $value; + + return $this; + } + + /** + * An expression to block the transition. + * @example is_fully_authenticated() and is_granted('ROLE_JOURNALIST') and subject.getTitle() == 'My first article' + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function guard($value): static + { + $this->_usedProperties['guard'] = true; + $this->guard = $value; + + return $this; + } + + /** + * @template TValue of \BackedEnum|string|array + * @param TValue $value + * @return \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\FromConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\FromConfig : static) + */ + public function from(\BackedEnum|string|array $value = []): \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\FromConfig|static + { + $this->_usedProperties['from'] = true; + if (!\is_array($value)) { + $this->from[] = $value; + + return $this; + } + + return $this->from[] = new \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\FromConfig($value); + } + + /** + * @template TValue of \BackedEnum|string|array + * @param TValue $value + * @return \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\ToConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\ToConfig : static) + */ + public function to(\BackedEnum|string|array $value = []): \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\ToConfig|static + { + $this->_usedProperties['to'] = true; + if (!\is_array($value)) { + $this->to[] = $value; + + return $this; + } + + return $this->to[] = new \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\ToConfig($value); + } + + /** + * @default 1 + * @param ParamConfigurator|int $value + * @return $this + */ + public function weight($value): static + { + $this->_usedProperties['weight'] = true; + $this->weight = $value; + + return $this; + } + + /** + * @return $this + */ + public function metadata(string $key, mixed $value): static + { + $this->_usedProperties['metadata'] = true; + $this->metadata[$key] = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('name', $config)) { + $this->_usedProperties['name'] = true; + $this->name = $config['name']; + unset($config['name']); + } + + if (array_key_exists('guard', $config)) { + $this->_usedProperties['guard'] = true; + $this->guard = $config['guard']; + unset($config['guard']); + } + + if (array_key_exists('from', $config)) { + $this->_usedProperties['from'] = true; + $this->from = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\FromConfig($v) : $v, $config['from']); + unset($config['from']); + } + + if (array_key_exists('to', $config)) { + $this->_usedProperties['to'] = true; + $this->to = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\ToConfig($v) : $v, $config['to']); + unset($config['to']); + } + + if (array_key_exists('weight', $config)) { + $this->_usedProperties['weight'] = true; + $this->weight = $config['weight']; + unset($config['weight']); + } + + if (array_key_exists('metadata', $config)) { + $this->_usedProperties['metadata'] = true; + $this->metadata = $config['metadata']; + unset($config['metadata']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['name'])) { + $output['name'] = $this->name; + } + if (isset($this->_usedProperties['guard'])) { + $output['guard'] = $this->guard; + } + if (isset($this->_usedProperties['from'])) { + $output['from'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\FromConfig ? $v->toArray() : $v, $this->from); + } + if (isset($this->_usedProperties['to'])) { + $output['to'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\Workflows\WorkflowConfig\TransitionConfig\ToConfig ? $v->toArray() : $v, $this->to); + } + if (isset($this->_usedProperties['weight'])) { + $output['weight'] = $this->weight; + } + if (isset($this->_usedProperties['metadata'])) { + $output['metadata'] = $this->metadata; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/TransitionConfig/FromConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/TransitionConfig/FromConfig.php new file mode 100644 index 0000000..589324c --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/TransitionConfig/FromConfig.php @@ -0,0 +1,75 @@ +_usedProperties['place'] = true; + $this->place = $value; + + return $this; + } + + /** + * @default 1 + * @param ParamConfigurator|int $value + * @return $this + */ + public function weight($value): static + { + $this->_usedProperties['weight'] = true; + $this->weight = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('place', $config)) { + $this->_usedProperties['place'] = true; + $this->place = $config['place']; + unset($config['place']); + } + + if (array_key_exists('weight', $config)) { + $this->_usedProperties['weight'] = true; + $this->weight = $config['weight']; + unset($config['weight']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['place'])) { + $output['place'] = $this->place; + } + if (isset($this->_usedProperties['weight'])) { + $output['weight'] = $this->weight; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/TransitionConfig/ToConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/TransitionConfig/ToConfig.php new file mode 100644 index 0000000..a813458 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/Workflows/WorkflowConfig/TransitionConfig/ToConfig.php @@ -0,0 +1,75 @@ +_usedProperties['place'] = true; + $this->place = $value; + + return $this; + } + + /** + * @default 1 + * @param ParamConfigurator|int $value + * @return $this + */ + public function weight($value): static + { + $this->_usedProperties['weight'] = true; + $this->weight = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('place', $config)) { + $this->_usedProperties['place'] = true; + $this->place = $config['place']; + unset($config['place']); + } + + if (array_key_exists('weight', $config)) { + $this->_usedProperties['weight'] = true; + $this->weight = $config['weight']; + unset($config['weight']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['place'])) { + $output['place'] = $this->place; + } + if (isset($this->_usedProperties['weight'])) { + $output['weight'] = $this->weight; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/Framework/WorkflowsConfig.php b/backend/var/cache/dev/Symfony/Config/Framework/WorkflowsConfig.php new file mode 100644 index 0000000..12431df --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/Framework/WorkflowsConfig.php @@ -0,0 +1,76 @@ +_usedProperties['enabled'] = true; + $this->enabled = $value; + + return $this; + } + + public function workflow(string $name, array $value = []): \Symfony\Config\Framework\Workflows\WorkflowConfig + { + if (!isset($this->workflows[$name])) { + $this->_usedProperties['workflows'] = true; + $this->workflows[$name] = new \Symfony\Config\Framework\Workflows\WorkflowConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "workflow()" has already been initialized. You cannot pass values the second time you call workflow().'); + } + + return $this->workflows[$name]; + } + + public function __construct(array $config = []) + { + if (array_key_exists('enabled', $config)) { + $this->_usedProperties['enabled'] = true; + $this->enabled = $config['enabled']; + unset($config['enabled']); + } + + if (array_key_exists('workflows', $config)) { + $this->_usedProperties['workflows'] = true; + $this->workflows = array_map(fn ($v) => new \Symfony\Config\Framework\Workflows\WorkflowConfig($v), $config['workflows']); + unset($config['workflows']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['enabled'])) { + $output['enabled'] = $this->enabled; + } + if (isset($this->_usedProperties['workflows'])) { + $output['workflows'] = array_map(fn ($v) => $v->toArray(), $this->workflows); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/FrameworkConfig.php b/backend/var/cache/dev/Symfony/Config/FrameworkConfig.php new file mode 100644 index 0000000..0a37e0f --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/FrameworkConfig.php @@ -0,0 +1,1932 @@ +_hasDeprecatedCalls = true; + $this->_usedProperties['secret'] = true; + $this->secret = $value; + + return $this; + } + + /** + * Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. + * @default false + * @param ParamConfigurator|bool $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function httpMethodOverride($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['httpMethodOverride'] = true; + $this->httpMethodOverride = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + * @deprecated since Symfony 7.4 + */ + public function allowedHttpMethodOverride(ParamConfigurator|array $value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['allowedHttpMethodOverride'] = true; + $this->allowedHttpMethodOverride = $value; + + return $this; + } + + /** + * Set true to enable support for xsendfile in binary file responses. + * @default '%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%' + * @param ParamConfigurator|mixed $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function trustXSendfileTypeHeader($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['trustXSendfileTypeHeader'] = true; + $this->trustXSendfileTypeHeader = $value; + + return $this; + } + + /** + * @default '%env(default::SYMFONY_IDE)%' + * @param ParamConfigurator|mixed $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function ide($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['ide'] = true; + $this->ide = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function test($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['test'] = true; + $this->test = $value; + + return $this; + } + + /** + * @default 'en' + * @param ParamConfigurator|mixed $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function defaultLocale($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['defaultLocale'] = true; + $this->defaultLocale = $value; + + return $this; + } + + /** + * Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed). + * @default false + * @param ParamConfigurator|bool $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function setLocaleFromAcceptLanguage($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['setLocaleFromAcceptLanguage'] = true; + $this->setLocaleFromAcceptLanguage = $value; + + return $this; + } + + /** + * Whether to set the Content-Language HTTP header on the Response using the Request locale. + * @default false + * @param ParamConfigurator|bool $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function setContentLanguageFromLocale($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['setContentLanguageFromLocale'] = true; + $this->setContentLanguageFromLocale = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + * @deprecated since Symfony 7.4 + */ + public function enabledLocales(ParamConfigurator|array $value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['enabledLocales'] = true; + $this->enabledLocales = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + * @deprecated since Symfony 7.4 + */ + public function trustedHosts(ParamConfigurator|string|array $value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['trustedHosts'] = true; + $this->trustedHosts = $value; + + return $this; + } + + /** + * @default array ( + * 0 => '%env(default::SYMFONY_TRUSTED_PROXIES)%', + * ) + * @param ParamConfigurator|mixed $value + * + * @return $this + * @deprecated since Symfony 7.4 + */ + public function trustedProxies(mixed $value = array ( + 0 => '%env(default::SYMFONY_TRUSTED_PROXIES)%', + )): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['trustedProxies'] = true; + $this->trustedProxies = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|string $value + * + * @return $this + * @deprecated since Symfony 7.4 + */ + public function trustedHeaders(ParamConfigurator|string|array $value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['trustedHeaders'] = true; + $this->trustedHeaders = $value; + + return $this; + } + + /** + * @default 'error_controller' + * @param ParamConfigurator|mixed $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function errorController($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['errorController'] = true; + $this->errorController = $value; + + return $this; + } + + /** + * HttpKernel will handle all kinds of \Throwable. + * @default true + * @param ParamConfigurator|bool $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function handleAllThrowables($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['handleAllThrowables'] = true; + $this->handleAllThrowables = $value; + + return $this; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * @default {"enabled":null,"stateless_token_ids":[],"check_header":false,"cookie_name":"csrf-token"} + * @return \Symfony\Config\Framework\CsrfProtectionConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\CsrfProtectionConfig : static) + * @deprecated since Symfony 7.4 + */ + public function csrfProtection(array|bool $value = []): \Symfony\Config\Framework\CsrfProtectionConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['csrfProtection'] = true; + $this->csrfProtection = $value; + + return $this; + } + + if (!$this->csrfProtection instanceof \Symfony\Config\Framework\CsrfProtectionConfig) { + $this->_usedProperties['csrfProtection'] = true; + $this->csrfProtection = new \Symfony\Config\Framework\CsrfProtectionConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "csrfProtection()" has already been initialized. You cannot pass values the second time you call csrfProtection().'); + } + + return $this->csrfProtection; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Form configuration + * @default {"enabled":false,"csrf_protection":{"enabled":null,"token_id":null,"field_name":"_token","field_attr":{"data-controller":"csrf-protection"}}} + * @return \Symfony\Config\Framework\FormConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\FormConfig : static) + * @deprecated since Symfony 7.4 + */ + public function form(array|bool $value = []): \Symfony\Config\Framework\FormConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['form'] = true; + $this->form = $value; + + return $this; + } + + if (!$this->form instanceof \Symfony\Config\Framework\FormConfig) { + $this->_usedProperties['form'] = true; + $this->form = new \Symfony\Config\Framework\FormConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "form()" has already been initialized. You cannot pass values the second time you call form().'); + } + + return $this->form; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * HTTP cache configuration + * @default {"enabled":false,"debug":"%kernel.debug%","private_headers":[],"skip_response_headers":[]} + * @return \Symfony\Config\Framework\HttpCacheConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\HttpCacheConfig : static) + * @deprecated since Symfony 7.4 + */ + public function httpCache(array|bool $value = []): \Symfony\Config\Framework\HttpCacheConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['httpCache'] = true; + $this->httpCache = $value; + + return $this; + } + + if (!$this->httpCache instanceof \Symfony\Config\Framework\HttpCacheConfig) { + $this->_usedProperties['httpCache'] = true; + $this->httpCache = new \Symfony\Config\Framework\HttpCacheConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "httpCache()" has already been initialized. You cannot pass values the second time you call httpCache().'); + } + + return $this->httpCache; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * ESI configuration + * @default {"enabled":false} + * @return \Symfony\Config\Framework\EsiConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\EsiConfig : static) + * @deprecated since Symfony 7.4 + */ + public function esi(array|bool $value = []): \Symfony\Config\Framework\EsiConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['esi'] = true; + $this->esi = $value; + + return $this; + } + + if (!$this->esi instanceof \Symfony\Config\Framework\EsiConfig) { + $this->_usedProperties['esi'] = true; + $this->esi = new \Symfony\Config\Framework\EsiConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "esi()" has already been initialized. You cannot pass values the second time you call esi().'); + } + + return $this->esi; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * SSI configuration + * @default {"enabled":false} + * @return \Symfony\Config\Framework\SsiConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\SsiConfig : static) + * @deprecated since Symfony 7.4 + */ + public function ssi(array|bool $value = []): \Symfony\Config\Framework\SsiConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['ssi'] = true; + $this->ssi = $value; + + return $this; + } + + if (!$this->ssi instanceof \Symfony\Config\Framework\SsiConfig) { + $this->_usedProperties['ssi'] = true; + $this->ssi = new \Symfony\Config\Framework\SsiConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "ssi()" has already been initialized. You cannot pass values the second time you call ssi().'); + } + + return $this->ssi; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Fragments configuration + * @default {"enabled":false,"hinclude_default_template":null,"path":"\/_fragment"} + * @return \Symfony\Config\Framework\FragmentsConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\FragmentsConfig : static) + * @deprecated since Symfony 7.4 + */ + public function fragments(array|bool $value = []): \Symfony\Config\Framework\FragmentsConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['fragments'] = true; + $this->fragments = $value; + + return $this; + } + + if (!$this->fragments instanceof \Symfony\Config\Framework\FragmentsConfig) { + $this->_usedProperties['fragments'] = true; + $this->fragments = new \Symfony\Config\Framework\FragmentsConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "fragments()" has already been initialized. You cannot pass values the second time you call fragments().'); + } + + return $this->fragments; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Profiler configuration + * @default {"enabled":false,"collect":true,"collect_parameter":null,"only_exceptions":false,"only_main_requests":false,"dsn":"file:%kernel.cache_dir%\/profiler","collect_serializer_data":false} + * @return \Symfony\Config\Framework\ProfilerConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\ProfilerConfig : static) + * @deprecated since Symfony 7.4 + */ + public function profiler(array|bool $value = []): \Symfony\Config\Framework\ProfilerConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['profiler'] = true; + $this->profiler = $value; + + return $this; + } + + if (!$this->profiler instanceof \Symfony\Config\Framework\ProfilerConfig) { + $this->_usedProperties['profiler'] = true; + $this->profiler = new \Symfony\Config\Framework\ProfilerConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "profiler()" has already been initialized. You cannot pass values the second time you call profiler().'); + } + + return $this->profiler; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * @default {"enabled":false,"workflows":[]} + * @return \Symfony\Config\Framework\WorkflowsConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\WorkflowsConfig : static) + * @deprecated since Symfony 7.4 + */ + public function workflows(array|bool $value = []): \Symfony\Config\Framework\WorkflowsConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['workflows'] = true; + $this->workflows = $value; + + return $this; + } + + if (!$this->workflows instanceof \Symfony\Config\Framework\WorkflowsConfig) { + $this->_usedProperties['workflows'] = true; + $this->workflows = new \Symfony\Config\Framework\WorkflowsConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "workflows()" has already been initialized. You cannot pass values the second time you call workflows().'); + } + + return $this->workflows; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Router configuration + * @default {"enabled":false,"cache_dir":"%kernel.build_dir%","default_uri":null,"http_port":80,"https_port":443,"strict_requirements":true,"utf8":true} + * @return \Symfony\Config\Framework\RouterConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\RouterConfig : static) + * @deprecated since Symfony 7.4 + */ + public function router(array|bool $value = []): \Symfony\Config\Framework\RouterConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['router'] = true; + $this->router = $value; + + return $this; + } + + if (!$this->router instanceof \Symfony\Config\Framework\RouterConfig) { + $this->_usedProperties['router'] = true; + $this->router = new \Symfony\Config\Framework\RouterConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "router()" has already been initialized. You cannot pass values the second time you call router().'); + } + + return $this->router; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Session configuration + * @default {"enabled":false,"storage_factory_id":"session.storage.factory.native","cookie_secure":"auto","cookie_httponly":true,"cookie_samesite":"lax","metadata_update_threshold":0} + * @return \Symfony\Config\Framework\SessionConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\SessionConfig : static) + * @deprecated since Symfony 7.4 + */ + public function session(array|bool $value = []): \Symfony\Config\Framework\SessionConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['session'] = true; + $this->session = $value; + + return $this; + } + + if (!$this->session instanceof \Symfony\Config\Framework\SessionConfig) { + $this->_usedProperties['session'] = true; + $this->session = new \Symfony\Config\Framework\SessionConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "session()" has already been initialized. You cannot pass values the second time you call session().'); + } + + return $this->session; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Request configuration + * @default {"enabled":false,"formats":[]} + * @return \Symfony\Config\Framework\RequestConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\RequestConfig : static) + * @deprecated since Symfony 7.4 + */ + public function request(array|bool $value = []): \Symfony\Config\Framework\RequestConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['request'] = true; + $this->request = $value; + + return $this; + } + + if (!$this->request instanceof \Symfony\Config\Framework\RequestConfig) { + $this->_usedProperties['request'] = true; + $this->request = new \Symfony\Config\Framework\RequestConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "request()" has already been initialized. You cannot pass values the second time you call request().'); + } + + return $this->request; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Assets configuration + * @default {"enabled":false,"strict_mode":false,"version_strategy":null,"version":null,"version_format":"%%s?%%s","json_manifest_path":null,"base_path":"","base_urls":[],"packages":[]} + * @return \Symfony\Config\Framework\AssetsConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\AssetsConfig : static) + * @deprecated since Symfony 7.4 + */ + public function assets(array|bool $value = []): \Symfony\Config\Framework\AssetsConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['assets'] = true; + $this->assets = $value; + + return $this; + } + + if (!$this->assets instanceof \Symfony\Config\Framework\AssetsConfig) { + $this->_usedProperties['assets'] = true; + $this->assets = new \Symfony\Config\Framework\AssetsConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "assets()" has already been initialized. You cannot pass values the second time you call assets().'); + } + + return $this->assets; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Asset Mapper configuration + * @default {"enabled":false,"paths":[],"excluded_patterns":[],"exclude_dotfiles":true,"server":true,"public_prefix":"\/assets\/","missing_import_mode":"warn","extensions":[],"importmap_path":"%kernel.project_dir%\/importmap.php","importmap_polyfill":"es-module-shims","importmap_script_attributes":[],"vendor_dir":"%kernel.project_dir%\/assets\/vendor","precompress":{"enabled":false,"formats":[],"extensions":[]}} + * @return \Symfony\Config\Framework\AssetMapperConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\AssetMapperConfig : static) + * @deprecated since Symfony 7.4 + */ + public function assetMapper(array|bool $value = []): \Symfony\Config\Framework\AssetMapperConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['assetMapper'] = true; + $this->assetMapper = $value; + + return $this; + } + + if (!$this->assetMapper instanceof \Symfony\Config\Framework\AssetMapperConfig) { + $this->_usedProperties['assetMapper'] = true; + $this->assetMapper = new \Symfony\Config\Framework\AssetMapperConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "assetMapper()" has already been initialized. You cannot pass values the second time you call assetMapper().'); + } + + return $this->assetMapper; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Translator configuration + * @default {"enabled":false,"fallbacks":[],"logging":false,"formatter":"translator.formatter.default","cache_dir":"%kernel.cache_dir%\/translations","default_path":"%kernel.project_dir%\/translations","paths":[],"pseudo_localization":{"enabled":false,"accents":true,"expansion_factor":1,"brackets":true,"parse_html":false,"localizable_html_attributes":[]},"providers":[],"globals":[]} + * @return \Symfony\Config\Framework\TranslatorConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\TranslatorConfig : static) + * @deprecated since Symfony 7.4 + */ + public function translator(array|bool $value = []): \Symfony\Config\Framework\TranslatorConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['translator'] = true; + $this->translator = $value; + + return $this; + } + + if (!$this->translator instanceof \Symfony\Config\Framework\TranslatorConfig) { + $this->_usedProperties['translator'] = true; + $this->translator = new \Symfony\Config\Framework\TranslatorConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "translator()" has already been initialized. You cannot pass values the second time you call translator().'); + } + + return $this->translator; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Validation configuration + * @default {"enabled":false,"enable_attributes":true,"static_method":["loadValidatorMetadata"],"translation_domain":"validators","email_validation_mode":"html5","mapping":{"paths":[]},"not_compromised_password":{"enabled":true,"endpoint":null},"disable_translation":false,"auto_mapping":[]} + * @return \Symfony\Config\Framework\ValidationConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\ValidationConfig : static) + * @deprecated since Symfony 7.4 + */ + public function validation(array|bool $value = []): \Symfony\Config\Framework\ValidationConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['validation'] = true; + $this->validation = $value; + + return $this; + } + + if (!$this->validation instanceof \Symfony\Config\Framework\ValidationConfig) { + $this->_usedProperties['validation'] = true; + $this->validation = new \Symfony\Config\Framework\ValidationConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "validation()" has already been initialized. You cannot pass values the second time you call validation().'); + } + + return $this->validation; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * @default {"enabled":false} + * @return \Symfony\Config\Framework\AnnotationsConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\AnnotationsConfig : static) + * @deprecated since Symfony 7.4 + */ + public function annotations(array|bool $value = []): \Symfony\Config\Framework\AnnotationsConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['annotations'] = true; + $this->annotations = $value; + + return $this; + } + + if (!$this->annotations instanceof \Symfony\Config\Framework\AnnotationsConfig) { + $this->_usedProperties['annotations'] = true; + $this->annotations = new \Symfony\Config\Framework\AnnotationsConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "annotations()" has already been initialized. You cannot pass values the second time you call annotations().'); + } + + return $this->annotations; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Serializer configuration + * @default {"enabled":false,"enable_attributes":true,"mapping":{"paths":[]},"default_context":[],"named_serializers":[]} + * @return \Symfony\Config\Framework\SerializerConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\SerializerConfig : static) + * @deprecated since Symfony 7.4 + */ + public function serializer(array|bool $value = []): \Symfony\Config\Framework\SerializerConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['serializer'] = true; + $this->serializer = $value; + + return $this; + } + + if (!$this->serializer instanceof \Symfony\Config\Framework\SerializerConfig) { + $this->_usedProperties['serializer'] = true; + $this->serializer = new \Symfony\Config\Framework\SerializerConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "serializer()" has already been initialized. You cannot pass values the second time you call serializer().'); + } + + return $this->serializer; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Property access configuration + * @default {"enabled":false,"magic_call":false,"magic_get":true,"magic_set":true,"throw_exception_on_invalid_index":false,"throw_exception_on_invalid_property_path":true} + * @return \Symfony\Config\Framework\PropertyAccessConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\PropertyAccessConfig : static) + * @deprecated since Symfony 7.4 + */ + public function propertyAccess(array|bool $value = []): \Symfony\Config\Framework\PropertyAccessConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['propertyAccess'] = true; + $this->propertyAccess = $value; + + return $this; + } + + if (!$this->propertyAccess instanceof \Symfony\Config\Framework\PropertyAccessConfig) { + $this->_usedProperties['propertyAccess'] = true; + $this->propertyAccess = new \Symfony\Config\Framework\PropertyAccessConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "propertyAccess()" has already been initialized. You cannot pass values the second time you call propertyAccess().'); + } + + return $this->propertyAccess; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Type info configuration + * @default {"enabled":false,"aliases":[]} + * @return \Symfony\Config\Framework\TypeInfoConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\TypeInfoConfig : static) + * @deprecated since Symfony 7.4 + */ + public function typeInfo(array|bool $value = []): \Symfony\Config\Framework\TypeInfoConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['typeInfo'] = true; + $this->typeInfo = $value; + + return $this; + } + + if (!$this->typeInfo instanceof \Symfony\Config\Framework\TypeInfoConfig) { + $this->_usedProperties['typeInfo'] = true; + $this->typeInfo = new \Symfony\Config\Framework\TypeInfoConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "typeInfo()" has already been initialized. You cannot pass values the second time you call typeInfo().'); + } + + return $this->typeInfo; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Property info configuration + * @default {"enabled":false} + * @return \Symfony\Config\Framework\PropertyInfoConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\PropertyInfoConfig : static) + * @deprecated since Symfony 7.4 + */ + public function propertyInfo(array|bool $value = []): \Symfony\Config\Framework\PropertyInfoConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['propertyInfo'] = true; + $this->propertyInfo = $value; + + return $this; + } + + if (!$this->propertyInfo instanceof \Symfony\Config\Framework\PropertyInfoConfig) { + $this->_usedProperties['propertyInfo'] = true; + $this->propertyInfo = new \Symfony\Config\Framework\PropertyInfoConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "propertyInfo()" has already been initialized. You cannot pass values the second time you call propertyInfo().'); + } + + return $this->propertyInfo; + } + + /** + * Cache configuration + * @default {"prefix_seed":"_%kernel.project_dir%.%kernel.container_class%","app":"cache.adapter.filesystem","system":"cache.adapter.system","directory":"%kernel.share_dir%\/pools\/app","default_redis_provider":"redis:\/\/localhost","default_valkey_provider":"valkey:\/\/localhost","default_memcached_provider":"memcached:\/\/localhost","default_doctrine_dbal_provider":"database_connection","default_pdo_provider":null,"pools":[]} + * @deprecated since Symfony 7.4 + */ + public function cache(array $value = []): \Symfony\Config\Framework\CacheConfig + { + $this->_hasDeprecatedCalls = true; + if (null === $this->cache) { + $this->_usedProperties['cache'] = true; + $this->cache = new \Symfony\Config\Framework\CacheConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "cache()" has already been initialized. You cannot pass values the second time you call cache().'); + } + + return $this->cache; + } + + /** + * PHP errors handling configuration + * @default {"log":true,"throw":true} + * @deprecated since Symfony 7.4 + */ + public function phpErrors(array $value = []): \Symfony\Config\Framework\PhpErrorsConfig + { + $this->_hasDeprecatedCalls = true; + if (null === $this->phpErrors) { + $this->_usedProperties['phpErrors'] = true; + $this->phpErrors = new \Symfony\Config\Framework\PhpErrorsConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "phpErrors()" has already been initialized. You cannot pass values the second time you call phpErrors().'); + } + + return $this->phpErrors; + } + + /** + * Exception handling configuration + * @deprecated since Symfony 7.4 + */ + public function exception(string $class, array $value = []): \Symfony\Config\Framework\ExceptionConfig + { + $this->_hasDeprecatedCalls = true; + if (!isset($this->exceptions[$class])) { + $this->_usedProperties['exceptions'] = true; + $this->exceptions[$class] = new \Symfony\Config\Framework\ExceptionConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "exception()" has already been initialized. You cannot pass values the second time you call exception().'); + } + + return $this->exceptions[$class]; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Web links configuration + * @default {"enabled":false} + * @return \Symfony\Config\Framework\WebLinkConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\WebLinkConfig : static) + * @deprecated since Symfony 7.4 + */ + public function webLink(array|bool $value = []): \Symfony\Config\Framework\WebLinkConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['webLink'] = true; + $this->webLink = $value; + + return $this; + } + + if (!$this->webLink instanceof \Symfony\Config\Framework\WebLinkConfig) { + $this->_usedProperties['webLink'] = true; + $this->webLink = new \Symfony\Config\Framework\WebLinkConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "webLink()" has already been initialized. You cannot pass values the second time you call webLink().'); + } + + return $this->webLink; + } + + /** + * @template TValue of string|array|bool + * @param TValue $value + * Lock configuration + * @default {"enabled":false,"resources":{"default":["flock"]}} + * @return \Symfony\Config\Framework\LockConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\LockConfig : static) + * @deprecated since Symfony 7.4 + */ + public function lock(string|array|bool $value = []): \Symfony\Config\Framework\LockConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['lock'] = true; + $this->lock = $value; + + return $this; + } + + if (!$this->lock instanceof \Symfony\Config\Framework\LockConfig) { + $this->_usedProperties['lock'] = true; + $this->lock = new \Symfony\Config\Framework\LockConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "lock()" has already been initialized. You cannot pass values the second time you call lock().'); + } + + return $this->lock; + } + + /** + * @template TValue of string|array|bool + * @param TValue $value + * Semaphore configuration + * @default {"enabled":false,"resources":[]} + * @return \Symfony\Config\Framework\SemaphoreConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\SemaphoreConfig : static) + * @deprecated since Symfony 7.4 + */ + public function semaphore(string|array|bool $value = []): \Symfony\Config\Framework\SemaphoreConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['semaphore'] = true; + $this->semaphore = $value; + + return $this; + } + + if (!$this->semaphore instanceof \Symfony\Config\Framework\SemaphoreConfig) { + $this->_usedProperties['semaphore'] = true; + $this->semaphore = new \Symfony\Config\Framework\SemaphoreConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "semaphore()" has already been initialized. You cannot pass values the second time you call semaphore().'); + } + + return $this->semaphore; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Messenger configuration + * @default {"enabled":false,"routing":[],"serializer":{"default_serializer":"messenger.transport.native_php_serializer","symfony_serializer":{"format":"json","context":[]}},"transports":[],"failure_transport":null,"stop_worker_on_signals":[],"default_bus":null,"buses":{"messenger.bus.default":{"default_middleware":{"enabled":true,"allow_no_handlers":false,"allow_no_senders":true},"middleware":[]}}} + * @return \Symfony\Config\Framework\MessengerConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\MessengerConfig : static) + * @deprecated since Symfony 7.4 + */ + public function messenger(array|bool $value = []): \Symfony\Config\Framework\MessengerConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['messenger'] = true; + $this->messenger = $value; + + return $this; + } + + if (!$this->messenger instanceof \Symfony\Config\Framework\MessengerConfig) { + $this->_usedProperties['messenger'] = true; + $this->messenger = new \Symfony\Config\Framework\MessengerConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "messenger()" has already been initialized. You cannot pass values the second time you call messenger().'); + } + + return $this->messenger; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Scheduler configuration + * @default {"enabled":false} + * @return \Symfony\Config\Framework\SchedulerConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\SchedulerConfig : static) + * @deprecated since Symfony 7.4 + */ + public function scheduler(array|bool $value = []): \Symfony\Config\Framework\SchedulerConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['scheduler'] = true; + $this->scheduler = $value; + + return $this; + } + + if (!$this->scheduler instanceof \Symfony\Config\Framework\SchedulerConfig) { + $this->_usedProperties['scheduler'] = true; + $this->scheduler = new \Symfony\Config\Framework\SchedulerConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "scheduler()" has already been initialized. You cannot pass values the second time you call scheduler().'); + } + + return $this->scheduler; + } + + /** + * Enabled by default when debug is enabled. + * @default true + * @param ParamConfigurator|bool $value + * @return $this + * @deprecated since Symfony 7.4 + */ + public function disallowSearchEngineIndex($value): static + { + $this->_hasDeprecatedCalls = true; + $this->_usedProperties['disallowSearchEngineIndex'] = true; + $this->disallowSearchEngineIndex = $value; + + return $this; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * HTTP Client configuration + * @default {"enabled":false,"scoped_clients":[]} + * @return \Symfony\Config\Framework\HttpClientConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\HttpClientConfig : static) + * @deprecated since Symfony 7.4 + */ + public function httpClient(array|bool $value = []): \Symfony\Config\Framework\HttpClientConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['httpClient'] = true; + $this->httpClient = $value; + + return $this; + } + + if (!$this->httpClient instanceof \Symfony\Config\Framework\HttpClientConfig) { + $this->_usedProperties['httpClient'] = true; + $this->httpClient = new \Symfony\Config\Framework\HttpClientConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "httpClient()" has already been initialized. You cannot pass values the second time you call httpClient().'); + } + + return $this->httpClient; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Mailer configuration + * @default {"enabled":false,"message_bus":null,"dsn":null,"transports":[],"headers":[],"dkim_signer":{"enabled":false,"key":"","domain":"","select":"","passphrase":"","options":[]},"smime_signer":{"enabled":false,"key":"","certificate":"","passphrase":null,"extra_certificates":null,"sign_options":null},"smime_encrypter":{"enabled":false,"repository":"","cipher":null}} + * @return \Symfony\Config\Framework\MailerConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\MailerConfig : static) + * @deprecated since Symfony 7.4 + */ + public function mailer(array|bool $value = []): \Symfony\Config\Framework\MailerConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['mailer'] = true; + $this->mailer = $value; + + return $this; + } + + if (!$this->mailer instanceof \Symfony\Config\Framework\MailerConfig) { + $this->_usedProperties['mailer'] = true; + $this->mailer = new \Symfony\Config\Framework\MailerConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "mailer()" has already been initialized. You cannot pass values the second time you call mailer().'); + } + + return $this->mailer; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * @default {"enabled":true,"vault_directory":"%kernel.project_dir%\/config\/secrets\/%kernel.runtime_environment%","local_dotenv_file":"%kernel.project_dir%\/.env.%kernel.environment%.local","decryption_env_var":"base64:default::SYMFONY_DECRYPTION_SECRET"} + * @return \Symfony\Config\Framework\SecretsConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\SecretsConfig : static) + * @deprecated since Symfony 7.4 + */ + public function secrets(array|bool $value = []): \Symfony\Config\Framework\SecretsConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['secrets'] = true; + $this->secrets = $value; + + return $this; + } + + if (!$this->secrets instanceof \Symfony\Config\Framework\SecretsConfig) { + $this->_usedProperties['secrets'] = true; + $this->secrets = new \Symfony\Config\Framework\SecretsConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "secrets()" has already been initialized. You cannot pass values the second time you call secrets().'); + } + + return $this->secrets; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Notifier configuration + * @default {"enabled":false,"message_bus":null,"chatter_transports":[],"texter_transports":[],"notification_on_failed_messages":false,"channel_policy":[],"admin_recipients":[]} + * @return \Symfony\Config\Framework\NotifierConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\NotifierConfig : static) + * @deprecated since Symfony 7.4 + */ + public function notifier(array|bool $value = []): \Symfony\Config\Framework\NotifierConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['notifier'] = true; + $this->notifier = $value; + + return $this; + } + + if (!$this->notifier instanceof \Symfony\Config\Framework\NotifierConfig) { + $this->_usedProperties['notifier'] = true; + $this->notifier = new \Symfony\Config\Framework\NotifierConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "notifier()" has already been initialized. You cannot pass values the second time you call notifier().'); + } + + return $this->notifier; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Rate limiter configuration + * @default {"enabled":false,"limiters":[]} + * @return \Symfony\Config\Framework\RateLimiterConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\RateLimiterConfig : static) + * @deprecated since Symfony 7.4 + */ + public function rateLimiter(array|bool $value = []): \Symfony\Config\Framework\RateLimiterConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['rateLimiter'] = true; + $this->rateLimiter = $value; + + return $this; + } + + if (!$this->rateLimiter instanceof \Symfony\Config\Framework\RateLimiterConfig) { + $this->_usedProperties['rateLimiter'] = true; + $this->rateLimiter = new \Symfony\Config\Framework\RateLimiterConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "rateLimiter()" has already been initialized. You cannot pass values the second time you call rateLimiter().'); + } + + return $this->rateLimiter; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Uid configuration + * @default {"enabled":false,"default_uuid_version":7,"name_based_uuid_version":5,"time_based_uuid_version":7} + * @return \Symfony\Config\Framework\UidConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\UidConfig : static) + * @deprecated since Symfony 7.4 + */ + public function uid(array|bool $value = []): \Symfony\Config\Framework\UidConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['uid'] = true; + $this->uid = $value; + + return $this; + } + + if (!$this->uid instanceof \Symfony\Config\Framework\UidConfig) { + $this->_usedProperties['uid'] = true; + $this->uid = new \Symfony\Config\Framework\UidConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "uid()" has already been initialized. You cannot pass values the second time you call uid().'); + } + + return $this->uid; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * HtmlSanitizer configuration + * @default {"enabled":false,"sanitizers":[]} + * @return \Symfony\Config\Framework\HtmlSanitizerConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\HtmlSanitizerConfig : static) + * @deprecated since Symfony 7.4 + */ + public function htmlSanitizer(array|bool $value = []): \Symfony\Config\Framework\HtmlSanitizerConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['htmlSanitizer'] = true; + $this->htmlSanitizer = $value; + + return $this; + } + + if (!$this->htmlSanitizer instanceof \Symfony\Config\Framework\HtmlSanitizerConfig) { + $this->_usedProperties['htmlSanitizer'] = true; + $this->htmlSanitizer = new \Symfony\Config\Framework\HtmlSanitizerConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "htmlSanitizer()" has already been initialized. You cannot pass values the second time you call htmlSanitizer().'); + } + + return $this->htmlSanitizer; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * Webhook configuration + * @default {"enabled":false,"message_bus":"messenger.default_bus","routing":[]} + * @return \Symfony\Config\Framework\WebhookConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\WebhookConfig : static) + * @deprecated since Symfony 7.4 + */ + public function webhook(array|bool $value = []): \Symfony\Config\Framework\WebhookConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['webhook'] = true; + $this->webhook = $value; + + return $this; + } + + if (!$this->webhook instanceof \Symfony\Config\Framework\WebhookConfig) { + $this->_usedProperties['webhook'] = true; + $this->webhook = new \Symfony\Config\Framework\WebhookConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "webhook()" has already been initialized. You cannot pass values the second time you call webhook().'); + } + + return $this->webhook; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * RemoteEvent configuration + * @default {"enabled":false} + * @return \Symfony\Config\Framework\RemoteeventConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\RemoteeventConfig : static) + * @deprecated since Symfony 7.4 + */ + public function remoteevent(array|bool $value = []): \Symfony\Config\Framework\RemoteeventConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['remoteevent'] = true; + $this->remoteevent = $value; + + return $this; + } + + if (!$this->remoteevent instanceof \Symfony\Config\Framework\RemoteeventConfig) { + $this->_usedProperties['remoteevent'] = true; + $this->remoteevent = new \Symfony\Config\Framework\RemoteeventConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "remoteevent()" has already been initialized. You cannot pass values the second time you call remoteevent().'); + } + + return $this->remoteevent; + } + + /** + * @template TValue of array|bool + * @param TValue $value + * JSON streamer configuration + * @default {"enabled":false} + * @return \Symfony\Config\Framework\JsonStreamerConfig|$this + * @psalm-return (TValue is array ? \Symfony\Config\Framework\JsonStreamerConfig : static) + * @deprecated since Symfony 7.4 + */ + public function jsonStreamer(array|bool $value = []): \Symfony\Config\Framework\JsonStreamerConfig|static + { + $this->_hasDeprecatedCalls = true; + if (!\is_array($value)) { + $this->_usedProperties['jsonStreamer'] = true; + $this->jsonStreamer = $value; + + return $this; + } + + if (!$this->jsonStreamer instanceof \Symfony\Config\Framework\JsonStreamerConfig) { + $this->_usedProperties['jsonStreamer'] = true; + $this->jsonStreamer = new \Symfony\Config\Framework\JsonStreamerConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "jsonStreamer()" has already been initialized. You cannot pass values the second time you call jsonStreamer().'); + } + + return $this->jsonStreamer; + } + + public function getExtensionAlias(): string + { + return 'framework'; + } + + public function __construct(array $config = []) + { + if (array_key_exists('secret', $config)) { + $this->_usedProperties['secret'] = true; + $this->secret = $config['secret']; + unset($config['secret']); + } + + if (array_key_exists('http_method_override', $config)) { + $this->_usedProperties['httpMethodOverride'] = true; + $this->httpMethodOverride = $config['http_method_override']; + unset($config['http_method_override']); + } + + if (array_key_exists('allowed_http_method_override', $config)) { + $this->_usedProperties['allowedHttpMethodOverride'] = true; + $this->allowedHttpMethodOverride = $config['allowed_http_method_override']; + unset($config['allowed_http_method_override']); + } + + if (array_key_exists('trust_x_sendfile_type_header', $config)) { + $this->_usedProperties['trustXSendfileTypeHeader'] = true; + $this->trustXSendfileTypeHeader = $config['trust_x_sendfile_type_header']; + unset($config['trust_x_sendfile_type_header']); + } + + if (array_key_exists('ide', $config)) { + $this->_usedProperties['ide'] = true; + $this->ide = $config['ide']; + unset($config['ide']); + } + + if (array_key_exists('test', $config)) { + $this->_usedProperties['test'] = true; + $this->test = $config['test']; + unset($config['test']); + } + + if (array_key_exists('default_locale', $config)) { + $this->_usedProperties['defaultLocale'] = true; + $this->defaultLocale = $config['default_locale']; + unset($config['default_locale']); + } + + if (array_key_exists('set_locale_from_accept_language', $config)) { + $this->_usedProperties['setLocaleFromAcceptLanguage'] = true; + $this->setLocaleFromAcceptLanguage = $config['set_locale_from_accept_language']; + unset($config['set_locale_from_accept_language']); + } + + if (array_key_exists('set_content_language_from_locale', $config)) { + $this->_usedProperties['setContentLanguageFromLocale'] = true; + $this->setContentLanguageFromLocale = $config['set_content_language_from_locale']; + unset($config['set_content_language_from_locale']); + } + + if (array_key_exists('enabled_locales', $config)) { + $this->_usedProperties['enabledLocales'] = true; + $this->enabledLocales = $config['enabled_locales']; + unset($config['enabled_locales']); + } + + if (array_key_exists('trusted_hosts', $config)) { + $this->_usedProperties['trustedHosts'] = true; + $this->trustedHosts = $config['trusted_hosts']; + unset($config['trusted_hosts']); + } + + if (array_key_exists('trusted_proxies', $config)) { + $this->_usedProperties['trustedProxies'] = true; + $this->trustedProxies = $config['trusted_proxies']; + unset($config['trusted_proxies']); + } + + if (array_key_exists('trusted_headers', $config)) { + $this->_usedProperties['trustedHeaders'] = true; + $this->trustedHeaders = $config['trusted_headers']; + unset($config['trusted_headers']); + } + + if (array_key_exists('error_controller', $config)) { + $this->_usedProperties['errorController'] = true; + $this->errorController = $config['error_controller']; + unset($config['error_controller']); + } + + if (array_key_exists('handle_all_throwables', $config)) { + $this->_usedProperties['handleAllThrowables'] = true; + $this->handleAllThrowables = $config['handle_all_throwables']; + unset($config['handle_all_throwables']); + } + + if (array_key_exists('csrf_protection', $config)) { + $this->_usedProperties['csrfProtection'] = true; + $this->csrfProtection = \is_array($config['csrf_protection']) ? new \Symfony\Config\Framework\CsrfProtectionConfig($config['csrf_protection']) : $config['csrf_protection']; + unset($config['csrf_protection']); + } + + if (array_key_exists('form', $config)) { + $this->_usedProperties['form'] = true; + $this->form = \is_array($config['form']) ? new \Symfony\Config\Framework\FormConfig($config['form']) : $config['form']; + unset($config['form']); + } + + if (array_key_exists('http_cache', $config)) { + $this->_usedProperties['httpCache'] = true; + $this->httpCache = \is_array($config['http_cache']) ? new \Symfony\Config\Framework\HttpCacheConfig($config['http_cache']) : $config['http_cache']; + unset($config['http_cache']); + } + + if (array_key_exists('esi', $config)) { + $this->_usedProperties['esi'] = true; + $this->esi = \is_array($config['esi']) ? new \Symfony\Config\Framework\EsiConfig($config['esi']) : $config['esi']; + unset($config['esi']); + } + + if (array_key_exists('ssi', $config)) { + $this->_usedProperties['ssi'] = true; + $this->ssi = \is_array($config['ssi']) ? new \Symfony\Config\Framework\SsiConfig($config['ssi']) : $config['ssi']; + unset($config['ssi']); + } + + if (array_key_exists('fragments', $config)) { + $this->_usedProperties['fragments'] = true; + $this->fragments = \is_array($config['fragments']) ? new \Symfony\Config\Framework\FragmentsConfig($config['fragments']) : $config['fragments']; + unset($config['fragments']); + } + + if (array_key_exists('profiler', $config)) { + $this->_usedProperties['profiler'] = true; + $this->profiler = \is_array($config['profiler']) ? new \Symfony\Config\Framework\ProfilerConfig($config['profiler']) : $config['profiler']; + unset($config['profiler']); + } + + if (array_key_exists('workflows', $config)) { + $this->_usedProperties['workflows'] = true; + $this->workflows = \is_array($config['workflows']) ? new \Symfony\Config\Framework\WorkflowsConfig($config['workflows']) : $config['workflows']; + unset($config['workflows']); + } + + if (array_key_exists('router', $config)) { + $this->_usedProperties['router'] = true; + $this->router = \is_array($config['router']) ? new \Symfony\Config\Framework\RouterConfig($config['router']) : $config['router']; + unset($config['router']); + } + + if (array_key_exists('session', $config)) { + $this->_usedProperties['session'] = true; + $this->session = \is_array($config['session']) ? new \Symfony\Config\Framework\SessionConfig($config['session']) : $config['session']; + unset($config['session']); + } + + if (array_key_exists('request', $config)) { + $this->_usedProperties['request'] = true; + $this->request = \is_array($config['request']) ? new \Symfony\Config\Framework\RequestConfig($config['request']) : $config['request']; + unset($config['request']); + } + + if (array_key_exists('assets', $config)) { + $this->_usedProperties['assets'] = true; + $this->assets = \is_array($config['assets']) ? new \Symfony\Config\Framework\AssetsConfig($config['assets']) : $config['assets']; + unset($config['assets']); + } + + if (array_key_exists('asset_mapper', $config)) { + $this->_usedProperties['assetMapper'] = true; + $this->assetMapper = \is_array($config['asset_mapper']) ? new \Symfony\Config\Framework\AssetMapperConfig($config['asset_mapper']) : $config['asset_mapper']; + unset($config['asset_mapper']); + } + + if (array_key_exists('translator', $config)) { + $this->_usedProperties['translator'] = true; + $this->translator = \is_array($config['translator']) ? new \Symfony\Config\Framework\TranslatorConfig($config['translator']) : $config['translator']; + unset($config['translator']); + } + + if (array_key_exists('validation', $config)) { + $this->_usedProperties['validation'] = true; + $this->validation = \is_array($config['validation']) ? new \Symfony\Config\Framework\ValidationConfig($config['validation']) : $config['validation']; + unset($config['validation']); + } + + if (array_key_exists('annotations', $config)) { + $this->_usedProperties['annotations'] = true; + $this->annotations = \is_array($config['annotations']) ? new \Symfony\Config\Framework\AnnotationsConfig($config['annotations']) : $config['annotations']; + unset($config['annotations']); + } + + if (array_key_exists('serializer', $config)) { + $this->_usedProperties['serializer'] = true; + $this->serializer = \is_array($config['serializer']) ? new \Symfony\Config\Framework\SerializerConfig($config['serializer']) : $config['serializer']; + unset($config['serializer']); + } + + if (array_key_exists('property_access', $config)) { + $this->_usedProperties['propertyAccess'] = true; + $this->propertyAccess = \is_array($config['property_access']) ? new \Symfony\Config\Framework\PropertyAccessConfig($config['property_access']) : $config['property_access']; + unset($config['property_access']); + } + + if (array_key_exists('type_info', $config)) { + $this->_usedProperties['typeInfo'] = true; + $this->typeInfo = \is_array($config['type_info']) ? new \Symfony\Config\Framework\TypeInfoConfig($config['type_info']) : $config['type_info']; + unset($config['type_info']); + } + + if (array_key_exists('property_info', $config)) { + $this->_usedProperties['propertyInfo'] = true; + $this->propertyInfo = \is_array($config['property_info']) ? new \Symfony\Config\Framework\PropertyInfoConfig($config['property_info']) : $config['property_info']; + unset($config['property_info']); + } + + if (array_key_exists('cache', $config)) { + $this->_usedProperties['cache'] = true; + $this->cache = new \Symfony\Config\Framework\CacheConfig($config['cache']); + unset($config['cache']); + } + + if (array_key_exists('php_errors', $config)) { + $this->_usedProperties['phpErrors'] = true; + $this->phpErrors = new \Symfony\Config\Framework\PhpErrorsConfig($config['php_errors']); + unset($config['php_errors']); + } + + if (array_key_exists('exceptions', $config)) { + $this->_usedProperties['exceptions'] = true; + $this->exceptions = array_map(fn ($v) => new \Symfony\Config\Framework\ExceptionConfig($v), $config['exceptions']); + unset($config['exceptions']); + } + + if (array_key_exists('web_link', $config)) { + $this->_usedProperties['webLink'] = true; + $this->webLink = \is_array($config['web_link']) ? new \Symfony\Config\Framework\WebLinkConfig($config['web_link']) : $config['web_link']; + unset($config['web_link']); + } + + if (array_key_exists('lock', $config)) { + $this->_usedProperties['lock'] = true; + $this->lock = \is_array($config['lock']) ? new \Symfony\Config\Framework\LockConfig($config['lock']) : $config['lock']; + unset($config['lock']); + } + + if (array_key_exists('semaphore', $config)) { + $this->_usedProperties['semaphore'] = true; + $this->semaphore = \is_array($config['semaphore']) ? new \Symfony\Config\Framework\SemaphoreConfig($config['semaphore']) : $config['semaphore']; + unset($config['semaphore']); + } + + if (array_key_exists('messenger', $config)) { + $this->_usedProperties['messenger'] = true; + $this->messenger = \is_array($config['messenger']) ? new \Symfony\Config\Framework\MessengerConfig($config['messenger']) : $config['messenger']; + unset($config['messenger']); + } + + if (array_key_exists('scheduler', $config)) { + $this->_usedProperties['scheduler'] = true; + $this->scheduler = \is_array($config['scheduler']) ? new \Symfony\Config\Framework\SchedulerConfig($config['scheduler']) : $config['scheduler']; + unset($config['scheduler']); + } + + if (array_key_exists('disallow_search_engine_index', $config)) { + $this->_usedProperties['disallowSearchEngineIndex'] = true; + $this->disallowSearchEngineIndex = $config['disallow_search_engine_index']; + unset($config['disallow_search_engine_index']); + } + + if (array_key_exists('http_client', $config)) { + $this->_usedProperties['httpClient'] = true; + $this->httpClient = \is_array($config['http_client']) ? new \Symfony\Config\Framework\HttpClientConfig($config['http_client']) : $config['http_client']; + unset($config['http_client']); + } + + if (array_key_exists('mailer', $config)) { + $this->_usedProperties['mailer'] = true; + $this->mailer = \is_array($config['mailer']) ? new \Symfony\Config\Framework\MailerConfig($config['mailer']) : $config['mailer']; + unset($config['mailer']); + } + + if (array_key_exists('secrets', $config)) { + $this->_usedProperties['secrets'] = true; + $this->secrets = \is_array($config['secrets']) ? new \Symfony\Config\Framework\SecretsConfig($config['secrets']) : $config['secrets']; + unset($config['secrets']); + } + + if (array_key_exists('notifier', $config)) { + $this->_usedProperties['notifier'] = true; + $this->notifier = \is_array($config['notifier']) ? new \Symfony\Config\Framework\NotifierConfig($config['notifier']) : $config['notifier']; + unset($config['notifier']); + } + + if (array_key_exists('rate_limiter', $config)) { + $this->_usedProperties['rateLimiter'] = true; + $this->rateLimiter = \is_array($config['rate_limiter']) ? new \Symfony\Config\Framework\RateLimiterConfig($config['rate_limiter']) : $config['rate_limiter']; + unset($config['rate_limiter']); + } + + if (array_key_exists('uid', $config)) { + $this->_usedProperties['uid'] = true; + $this->uid = \is_array($config['uid']) ? new \Symfony\Config\Framework\UidConfig($config['uid']) : $config['uid']; + unset($config['uid']); + } + + if (array_key_exists('html_sanitizer', $config)) { + $this->_usedProperties['htmlSanitizer'] = true; + $this->htmlSanitizer = \is_array($config['html_sanitizer']) ? new \Symfony\Config\Framework\HtmlSanitizerConfig($config['html_sanitizer']) : $config['html_sanitizer']; + unset($config['html_sanitizer']); + } + + if (array_key_exists('webhook', $config)) { + $this->_usedProperties['webhook'] = true; + $this->webhook = \is_array($config['webhook']) ? new \Symfony\Config\Framework\WebhookConfig($config['webhook']) : $config['webhook']; + unset($config['webhook']); + } + + if (array_key_exists('remote-event', $config)) { + $this->_usedProperties['remoteevent'] = true; + $this->remoteevent = \is_array($config['remote-event']) ? new \Symfony\Config\Framework\RemoteeventConfig($config['remote-event']) : $config['remote-event']; + unset($config['remote-event']); + } + + if (array_key_exists('json_streamer', $config)) { + $this->_usedProperties['jsonStreamer'] = true; + $this->jsonStreamer = \is_array($config['json_streamer']) ? new \Symfony\Config\Framework\JsonStreamerConfig($config['json_streamer']) : $config['json_streamer']; + unset($config['json_streamer']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['secret'])) { + $output['secret'] = $this->secret; + } + if (isset($this->_usedProperties['httpMethodOverride'])) { + $output['http_method_override'] = $this->httpMethodOverride; + } + if (isset($this->_usedProperties['allowedHttpMethodOverride'])) { + $output['allowed_http_method_override'] = $this->allowedHttpMethodOverride; + } + if (isset($this->_usedProperties['trustXSendfileTypeHeader'])) { + $output['trust_x_sendfile_type_header'] = $this->trustXSendfileTypeHeader; + } + if (isset($this->_usedProperties['ide'])) { + $output['ide'] = $this->ide; + } + if (isset($this->_usedProperties['test'])) { + $output['test'] = $this->test; + } + if (isset($this->_usedProperties['defaultLocale'])) { + $output['default_locale'] = $this->defaultLocale; + } + if (isset($this->_usedProperties['setLocaleFromAcceptLanguage'])) { + $output['set_locale_from_accept_language'] = $this->setLocaleFromAcceptLanguage; + } + if (isset($this->_usedProperties['setContentLanguageFromLocale'])) { + $output['set_content_language_from_locale'] = $this->setContentLanguageFromLocale; + } + if (isset($this->_usedProperties['enabledLocales'])) { + $output['enabled_locales'] = $this->enabledLocales; + } + if (isset($this->_usedProperties['trustedHosts'])) { + $output['trusted_hosts'] = $this->trustedHosts; + } + if (isset($this->_usedProperties['trustedProxies'])) { + $output['trusted_proxies'] = $this->trustedProxies; + } + if (isset($this->_usedProperties['trustedHeaders'])) { + $output['trusted_headers'] = $this->trustedHeaders; + } + if (isset($this->_usedProperties['errorController'])) { + $output['error_controller'] = $this->errorController; + } + if (isset($this->_usedProperties['handleAllThrowables'])) { + $output['handle_all_throwables'] = $this->handleAllThrowables; + } + if (isset($this->_usedProperties['csrfProtection'])) { + $output['csrf_protection'] = $this->csrfProtection instanceof \Symfony\Config\Framework\CsrfProtectionConfig ? $this->csrfProtection->toArray() : $this->csrfProtection; + } + if (isset($this->_usedProperties['form'])) { + $output['form'] = $this->form instanceof \Symfony\Config\Framework\FormConfig ? $this->form->toArray() : $this->form; + } + if (isset($this->_usedProperties['httpCache'])) { + $output['http_cache'] = $this->httpCache instanceof \Symfony\Config\Framework\HttpCacheConfig ? $this->httpCache->toArray() : $this->httpCache; + } + if (isset($this->_usedProperties['esi'])) { + $output['esi'] = $this->esi instanceof \Symfony\Config\Framework\EsiConfig ? $this->esi->toArray() : $this->esi; + } + if (isset($this->_usedProperties['ssi'])) { + $output['ssi'] = $this->ssi instanceof \Symfony\Config\Framework\SsiConfig ? $this->ssi->toArray() : $this->ssi; + } + if (isset($this->_usedProperties['fragments'])) { + $output['fragments'] = $this->fragments instanceof \Symfony\Config\Framework\FragmentsConfig ? $this->fragments->toArray() : $this->fragments; + } + if (isset($this->_usedProperties['profiler'])) { + $output['profiler'] = $this->profiler instanceof \Symfony\Config\Framework\ProfilerConfig ? $this->profiler->toArray() : $this->profiler; + } + if (isset($this->_usedProperties['workflows'])) { + $output['workflows'] = $this->workflows instanceof \Symfony\Config\Framework\WorkflowsConfig ? $this->workflows->toArray() : $this->workflows; + } + if (isset($this->_usedProperties['router'])) { + $output['router'] = $this->router instanceof \Symfony\Config\Framework\RouterConfig ? $this->router->toArray() : $this->router; + } + if (isset($this->_usedProperties['session'])) { + $output['session'] = $this->session instanceof \Symfony\Config\Framework\SessionConfig ? $this->session->toArray() : $this->session; + } + if (isset($this->_usedProperties['request'])) { + $output['request'] = $this->request instanceof \Symfony\Config\Framework\RequestConfig ? $this->request->toArray() : $this->request; + } + if (isset($this->_usedProperties['assets'])) { + $output['assets'] = $this->assets instanceof \Symfony\Config\Framework\AssetsConfig ? $this->assets->toArray() : $this->assets; + } + if (isset($this->_usedProperties['assetMapper'])) { + $output['asset_mapper'] = $this->assetMapper instanceof \Symfony\Config\Framework\AssetMapperConfig ? $this->assetMapper->toArray() : $this->assetMapper; + } + if (isset($this->_usedProperties['translator'])) { + $output['translator'] = $this->translator instanceof \Symfony\Config\Framework\TranslatorConfig ? $this->translator->toArray() : $this->translator; + } + if (isset($this->_usedProperties['validation'])) { + $output['validation'] = $this->validation instanceof \Symfony\Config\Framework\ValidationConfig ? $this->validation->toArray() : $this->validation; + } + if (isset($this->_usedProperties['annotations'])) { + $output['annotations'] = $this->annotations instanceof \Symfony\Config\Framework\AnnotationsConfig ? $this->annotations->toArray() : $this->annotations; + } + if (isset($this->_usedProperties['serializer'])) { + $output['serializer'] = $this->serializer instanceof \Symfony\Config\Framework\SerializerConfig ? $this->serializer->toArray() : $this->serializer; + } + if (isset($this->_usedProperties['propertyAccess'])) { + $output['property_access'] = $this->propertyAccess instanceof \Symfony\Config\Framework\PropertyAccessConfig ? $this->propertyAccess->toArray() : $this->propertyAccess; + } + if (isset($this->_usedProperties['typeInfo'])) { + $output['type_info'] = $this->typeInfo instanceof \Symfony\Config\Framework\TypeInfoConfig ? $this->typeInfo->toArray() : $this->typeInfo; + } + if (isset($this->_usedProperties['propertyInfo'])) { + $output['property_info'] = $this->propertyInfo instanceof \Symfony\Config\Framework\PropertyInfoConfig ? $this->propertyInfo->toArray() : $this->propertyInfo; + } + if (isset($this->_usedProperties['cache'])) { + $output['cache'] = $this->cache->toArray(); + } + if (isset($this->_usedProperties['phpErrors'])) { + $output['php_errors'] = $this->phpErrors->toArray(); + } + if (isset($this->_usedProperties['exceptions'])) { + $output['exceptions'] = array_map(fn ($v) => $v->toArray(), $this->exceptions); + } + if (isset($this->_usedProperties['webLink'])) { + $output['web_link'] = $this->webLink instanceof \Symfony\Config\Framework\WebLinkConfig ? $this->webLink->toArray() : $this->webLink; + } + if (isset($this->_usedProperties['lock'])) { + $output['lock'] = $this->lock instanceof \Symfony\Config\Framework\LockConfig ? $this->lock->toArray() : $this->lock; + } + if (isset($this->_usedProperties['semaphore'])) { + $output['semaphore'] = $this->semaphore instanceof \Symfony\Config\Framework\SemaphoreConfig ? $this->semaphore->toArray() : $this->semaphore; + } + if (isset($this->_usedProperties['messenger'])) { + $output['messenger'] = $this->messenger instanceof \Symfony\Config\Framework\MessengerConfig ? $this->messenger->toArray() : $this->messenger; + } + if (isset($this->_usedProperties['scheduler'])) { + $output['scheduler'] = $this->scheduler instanceof \Symfony\Config\Framework\SchedulerConfig ? $this->scheduler->toArray() : $this->scheduler; + } + if (isset($this->_usedProperties['disallowSearchEngineIndex'])) { + $output['disallow_search_engine_index'] = $this->disallowSearchEngineIndex; + } + if (isset($this->_usedProperties['httpClient'])) { + $output['http_client'] = $this->httpClient instanceof \Symfony\Config\Framework\HttpClientConfig ? $this->httpClient->toArray() : $this->httpClient; + } + if (isset($this->_usedProperties['mailer'])) { + $output['mailer'] = $this->mailer instanceof \Symfony\Config\Framework\MailerConfig ? $this->mailer->toArray() : $this->mailer; + } + if (isset($this->_usedProperties['secrets'])) { + $output['secrets'] = $this->secrets instanceof \Symfony\Config\Framework\SecretsConfig ? $this->secrets->toArray() : $this->secrets; + } + if (isset($this->_usedProperties['notifier'])) { + $output['notifier'] = $this->notifier instanceof \Symfony\Config\Framework\NotifierConfig ? $this->notifier->toArray() : $this->notifier; + } + if (isset($this->_usedProperties['rateLimiter'])) { + $output['rate_limiter'] = $this->rateLimiter instanceof \Symfony\Config\Framework\RateLimiterConfig ? $this->rateLimiter->toArray() : $this->rateLimiter; + } + if (isset($this->_usedProperties['uid'])) { + $output['uid'] = $this->uid instanceof \Symfony\Config\Framework\UidConfig ? $this->uid->toArray() : $this->uid; + } + if (isset($this->_usedProperties['htmlSanitizer'])) { + $output['html_sanitizer'] = $this->htmlSanitizer instanceof \Symfony\Config\Framework\HtmlSanitizerConfig ? $this->htmlSanitizer->toArray() : $this->htmlSanitizer; + } + if (isset($this->_usedProperties['webhook'])) { + $output['webhook'] = $this->webhook instanceof \Symfony\Config\Framework\WebhookConfig ? $this->webhook->toArray() : $this->webhook; + } + if (isset($this->_usedProperties['remoteevent'])) { + $output['remote-event'] = $this->remoteevent instanceof \Symfony\Config\Framework\RemoteeventConfig ? $this->remoteevent->toArray() : $this->remoteevent; + } + if (isset($this->_usedProperties['jsonStreamer'])) { + $output['json_streamer'] = $this->jsonStreamer instanceof \Symfony\Config\Framework\JsonStreamerConfig ? $this->jsonStreamer->toArray() : $this->jsonStreamer; + } + if ($this->_hasDeprecatedCalls) { + trigger_deprecation('symfony/config', '7.4', 'Calling any fluent method on "%s" is deprecated; pass the configuration to the constructor instead.', $this::class); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/NelmioCors/DefaultsConfig.php b/backend/var/cache/dev/Symfony/Config/NelmioCors/DefaultsConfig.php new file mode 100644 index 0000000..8be3b5e --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/NelmioCors/DefaultsConfig.php @@ -0,0 +1,282 @@ +_usedProperties['allowCredentials'] = true; + $this->allowCredentials = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|mixed $value + * + * @return $this + */ + public function allowOrigin(mixed $value): static + { + $this->_usedProperties['allowOrigin'] = true; + $this->allowOrigin = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|mixed $value + * + * @return $this + */ + public function allowHeaders(mixed $value): static + { + $this->_usedProperties['allowHeaders'] = true; + $this->allowHeaders = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function allowMethods(ParamConfigurator|array $value): static + { + $this->_usedProperties['allowMethods'] = true; + $this->allowMethods = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function allowPrivateNetwork($value): static + { + $this->_usedProperties['allowPrivateNetwork'] = true; + $this->allowPrivateNetwork = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|mixed $value + * + * @return $this + */ + public function exposeHeaders(mixed $value): static + { + $this->_usedProperties['exposeHeaders'] = true; + $this->exposeHeaders = $value; + + return $this; + } + + /** + * @default 0 + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function maxAge($value): static + { + $this->_usedProperties['maxAge'] = true; + $this->maxAge = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function hosts(ParamConfigurator|array $value): static + { + $this->_usedProperties['hosts'] = true; + $this->hosts = $value; + + return $this; + } + + /** + * @default false + * @param ParamConfigurator|bool $value + * @return $this + */ + public function originRegex($value): static + { + $this->_usedProperties['originRegex'] = true; + $this->originRegex = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function forcedAllowOriginValue($value): static + { + $this->_usedProperties['forcedAllowOriginValue'] = true; + $this->forcedAllowOriginValue = $value; + + return $this; + } + + /** + * @default true + * @param ParamConfigurator|bool $value + * @return $this + */ + public function skipSameAsOrigin($value): static + { + $this->_usedProperties['skipSameAsOrigin'] = true; + $this->skipSameAsOrigin = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('allow_credentials', $config)) { + $this->_usedProperties['allowCredentials'] = true; + $this->allowCredentials = $config['allow_credentials']; + unset($config['allow_credentials']); + } + + if (array_key_exists('allow_origin', $config)) { + $this->_usedProperties['allowOrigin'] = true; + $this->allowOrigin = $config['allow_origin']; + unset($config['allow_origin']); + } + + if (array_key_exists('allow_headers', $config)) { + $this->_usedProperties['allowHeaders'] = true; + $this->allowHeaders = $config['allow_headers']; + unset($config['allow_headers']); + } + + if (array_key_exists('allow_methods', $config)) { + $this->_usedProperties['allowMethods'] = true; + $this->allowMethods = $config['allow_methods']; + unset($config['allow_methods']); + } + + if (array_key_exists('allow_private_network', $config)) { + $this->_usedProperties['allowPrivateNetwork'] = true; + $this->allowPrivateNetwork = $config['allow_private_network']; + unset($config['allow_private_network']); + } + + if (array_key_exists('expose_headers', $config)) { + $this->_usedProperties['exposeHeaders'] = true; + $this->exposeHeaders = $config['expose_headers']; + unset($config['expose_headers']); + } + + if (array_key_exists('max_age', $config)) { + $this->_usedProperties['maxAge'] = true; + $this->maxAge = $config['max_age']; + unset($config['max_age']); + } + + if (array_key_exists('hosts', $config)) { + $this->_usedProperties['hosts'] = true; + $this->hosts = $config['hosts']; + unset($config['hosts']); + } + + if (array_key_exists('origin_regex', $config)) { + $this->_usedProperties['originRegex'] = true; + $this->originRegex = $config['origin_regex']; + unset($config['origin_regex']); + } + + if (array_key_exists('forced_allow_origin_value', $config)) { + $this->_usedProperties['forcedAllowOriginValue'] = true; + $this->forcedAllowOriginValue = $config['forced_allow_origin_value']; + unset($config['forced_allow_origin_value']); + } + + if (array_key_exists('skip_same_as_origin', $config)) { + $this->_usedProperties['skipSameAsOrigin'] = true; + $this->skipSameAsOrigin = $config['skip_same_as_origin']; + unset($config['skip_same_as_origin']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['allowCredentials'])) { + $output['allow_credentials'] = $this->allowCredentials; + } + if (isset($this->_usedProperties['allowOrigin'])) { + $output['allow_origin'] = $this->allowOrigin; + } + if (isset($this->_usedProperties['allowHeaders'])) { + $output['allow_headers'] = $this->allowHeaders; + } + if (isset($this->_usedProperties['allowMethods'])) { + $output['allow_methods'] = $this->allowMethods; + } + if (isset($this->_usedProperties['allowPrivateNetwork'])) { + $output['allow_private_network'] = $this->allowPrivateNetwork; + } + if (isset($this->_usedProperties['exposeHeaders'])) { + $output['expose_headers'] = $this->exposeHeaders; + } + if (isset($this->_usedProperties['maxAge'])) { + $output['max_age'] = $this->maxAge; + } + if (isset($this->_usedProperties['hosts'])) { + $output['hosts'] = $this->hosts; + } + if (isset($this->_usedProperties['originRegex'])) { + $output['origin_regex'] = $this->originRegex; + } + if (isset($this->_usedProperties['forcedAllowOriginValue'])) { + $output['forced_allow_origin_value'] = $this->forcedAllowOriginValue; + } + if (isset($this->_usedProperties['skipSameAsOrigin'])) { + $output['skip_same_as_origin'] = $this->skipSameAsOrigin; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/NelmioCors/PathsConfig.php b/backend/var/cache/dev/Symfony/Config/NelmioCors/PathsConfig.php new file mode 100644 index 0000000..a4112e8 --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/NelmioCors/PathsConfig.php @@ -0,0 +1,282 @@ +_usedProperties['allowCredentials'] = true; + $this->allowCredentials = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|mixed $value + * + * @return $this + */ + public function allowOrigin(mixed $value): static + { + $this->_usedProperties['allowOrigin'] = true; + $this->allowOrigin = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|mixed $value + * + * @return $this + */ + public function allowHeaders(mixed $value): static + { + $this->_usedProperties['allowHeaders'] = true; + $this->allowHeaders = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function allowMethods(ParamConfigurator|array $value): static + { + $this->_usedProperties['allowMethods'] = true; + $this->allowMethods = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function allowPrivateNetwork($value): static + { + $this->_usedProperties['allowPrivateNetwork'] = true; + $this->allowPrivateNetwork = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list|mixed $value + * + * @return $this + */ + public function exposeHeaders(mixed $value): static + { + $this->_usedProperties['exposeHeaders'] = true; + $this->exposeHeaders = $value; + + return $this; + } + + /** + * @default 0 + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function maxAge($value): static + { + $this->_usedProperties['maxAge'] = true; + $this->maxAge = $value; + + return $this; + } + + /** + * @param ParamConfigurator|list $value + * + * @return $this + */ + public function hosts(ParamConfigurator|array $value): static + { + $this->_usedProperties['hosts'] = true; + $this->hosts = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function originRegex($value): static + { + $this->_usedProperties['originRegex'] = true; + $this->originRegex = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|mixed $value + * @return $this + */ + public function forcedAllowOriginValue($value): static + { + $this->_usedProperties['forcedAllowOriginValue'] = true; + $this->forcedAllowOriginValue = $value; + + return $this; + } + + /** + * @default null + * @param ParamConfigurator|bool $value + * @return $this + */ + public function skipSameAsOrigin($value): static + { + $this->_usedProperties['skipSameAsOrigin'] = true; + $this->skipSameAsOrigin = $value; + + return $this; + } + + public function __construct(array $config = []) + { + if (array_key_exists('allow_credentials', $config)) { + $this->_usedProperties['allowCredentials'] = true; + $this->allowCredentials = $config['allow_credentials']; + unset($config['allow_credentials']); + } + + if (array_key_exists('allow_origin', $config)) { + $this->_usedProperties['allowOrigin'] = true; + $this->allowOrigin = $config['allow_origin']; + unset($config['allow_origin']); + } + + if (array_key_exists('allow_headers', $config)) { + $this->_usedProperties['allowHeaders'] = true; + $this->allowHeaders = $config['allow_headers']; + unset($config['allow_headers']); + } + + if (array_key_exists('allow_methods', $config)) { + $this->_usedProperties['allowMethods'] = true; + $this->allowMethods = $config['allow_methods']; + unset($config['allow_methods']); + } + + if (array_key_exists('allow_private_network', $config)) { + $this->_usedProperties['allowPrivateNetwork'] = true; + $this->allowPrivateNetwork = $config['allow_private_network']; + unset($config['allow_private_network']); + } + + if (array_key_exists('expose_headers', $config)) { + $this->_usedProperties['exposeHeaders'] = true; + $this->exposeHeaders = $config['expose_headers']; + unset($config['expose_headers']); + } + + if (array_key_exists('max_age', $config)) { + $this->_usedProperties['maxAge'] = true; + $this->maxAge = $config['max_age']; + unset($config['max_age']); + } + + if (array_key_exists('hosts', $config)) { + $this->_usedProperties['hosts'] = true; + $this->hosts = $config['hosts']; + unset($config['hosts']); + } + + if (array_key_exists('origin_regex', $config)) { + $this->_usedProperties['originRegex'] = true; + $this->originRegex = $config['origin_regex']; + unset($config['origin_regex']); + } + + if (array_key_exists('forced_allow_origin_value', $config)) { + $this->_usedProperties['forcedAllowOriginValue'] = true; + $this->forcedAllowOriginValue = $config['forced_allow_origin_value']; + unset($config['forced_allow_origin_value']); + } + + if (array_key_exists('skip_same_as_origin', $config)) { + $this->_usedProperties['skipSameAsOrigin'] = true; + $this->skipSameAsOrigin = $config['skip_same_as_origin']; + unset($config['skip_same_as_origin']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['allowCredentials'])) { + $output['allow_credentials'] = $this->allowCredentials; + } + if (isset($this->_usedProperties['allowOrigin'])) { + $output['allow_origin'] = $this->allowOrigin; + } + if (isset($this->_usedProperties['allowHeaders'])) { + $output['allow_headers'] = $this->allowHeaders; + } + if (isset($this->_usedProperties['allowMethods'])) { + $output['allow_methods'] = $this->allowMethods; + } + if (isset($this->_usedProperties['allowPrivateNetwork'])) { + $output['allow_private_network'] = $this->allowPrivateNetwork; + } + if (isset($this->_usedProperties['exposeHeaders'])) { + $output['expose_headers'] = $this->exposeHeaders; + } + if (isset($this->_usedProperties['maxAge'])) { + $output['max_age'] = $this->maxAge; + } + if (isset($this->_usedProperties['hosts'])) { + $output['hosts'] = $this->hosts; + } + if (isset($this->_usedProperties['originRegex'])) { + $output['origin_regex'] = $this->originRegex; + } + if (isset($this->_usedProperties['forcedAllowOriginValue'])) { + $output['forced_allow_origin_value'] = $this->forcedAllowOriginValue; + } + if (isset($this->_usedProperties['skipSameAsOrigin'])) { + $output['skip_same_as_origin'] = $this->skipSameAsOrigin; + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/Symfony/Config/NelmioCorsConfig.php b/backend/var/cache/dev/Symfony/Config/NelmioCorsConfig.php new file mode 100644 index 0000000..f56b5df --- /dev/null +++ b/backend/var/cache/dev/Symfony/Config/NelmioCorsConfig.php @@ -0,0 +1,93 @@ +_hasDeprecatedCalls = true; + if (null === $this->defaults) { + $this->_usedProperties['defaults'] = true; + $this->defaults = new \Symfony\Config\NelmioCors\DefaultsConfig($value); + } elseif (0 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "defaults()" has already been initialized. You cannot pass values the second time you call defaults().'); + } + + return $this->defaults; + } + + /** + * @deprecated since Symfony 7.4 + */ + public function paths(string $path, array $value = []): \Symfony\Config\NelmioCors\PathsConfig + { + $this->_hasDeprecatedCalls = true; + if (!isset($this->paths[$path])) { + $this->_usedProperties['paths'] = true; + $this->paths[$path] = new \Symfony\Config\NelmioCors\PathsConfig($value); + } elseif (1 < \func_num_args()) { + throw new InvalidConfigurationException('The node created by "paths()" has already been initialized. You cannot pass values the second time you call paths().'); + } + + return $this->paths[$path]; + } + + public function getExtensionAlias(): string + { + return 'nelmio_cors'; + } + + public function __construct(array $config = []) + { + if (array_key_exists('defaults', $config)) { + $this->_usedProperties['defaults'] = true; + $this->defaults = new \Symfony\Config\NelmioCors\DefaultsConfig($config['defaults']); + unset($config['defaults']); + } + + if (array_key_exists('paths', $config)) { + $this->_usedProperties['paths'] = true; + $this->paths = array_map(fn ($v) => new \Symfony\Config\NelmioCors\PathsConfig($v), $config['paths']); + unset($config['paths']); + } + + if ($config) { + throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config))); + } + } + + public function toArray(): array + { + $output = []; + if (isset($this->_usedProperties['defaults'])) { + $output['defaults'] = $this->defaults->toArray(); + } + if (isset($this->_usedProperties['paths'])) { + $output['paths'] = array_map(fn ($v) => $v->toArray(), $this->paths); + } + if ($this->_hasDeprecatedCalls) { + trigger_deprecation('symfony/config', '7.4', 'Calling any fluent method on "%s" is deprecated; pass the configuration to the constructor instead.', $this::class); + } + + return $output; + } + +} diff --git a/backend/var/cache/dev/serialization.php b/backend/var/cache/dev/serialization.php new file mode 100644 index 0000000..6f5f6c7 --- /dev/null +++ b/backend/var/cache/dev/serialization.php @@ -0,0 +1,11 @@ + [['code', '_format'], ['_controller' => 'error_controller::preview', '_format' => 'html'], ['code' => '\\d+'], [['variable', '.', '[^/]++', '_format', true], ['variable', '/', '\\d+', 'code', true], ['text', '/_error']], [], [], []], +]; diff --git a/backend/var/cache/dev/url_generating_routes.php.meta b/backend/var/cache/dev/url_generating_routes.php.meta new file mode 100644 index 0000000..54c2aaf Binary files /dev/null and b/backend/var/cache/dev/url_generating_routes.php.meta differ diff --git a/backend/var/cache/dev/url_generating_routes.php.meta.json b/backend/var/cache/dev/url_generating_routes.php.meta.json new file mode 100644 index 0000000..683966d --- /dev/null +++ b/backend/var/cache/dev/url_generating_routes.php.meta.json @@ -0,0 +1 @@ +{"resources":[{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/routes/framework.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/vendor/symfony/framework-bundle/Resources/config/routing/errors.php"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/routes.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\ReflectionClassResource","files":{"/var/www/html/backend/vendor/symfony/http-kernel/HttpKernelInterface.php":null,"/var/www/html/backend/vendor/symfony/http-kernel/TerminableInterface.php":null,"/var/www/html/backend/vendor/symfony/http-kernel/RebootableInterface.php":null,"/var/www/html/backend/vendor/symfony/http-kernel/KernelInterface.php":null,"/var/www/html/backend/src/Kernel.php":null,"/var/www/html/backend/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php":null,"/var/www/html/backend/vendor/symfony/http-kernel/Kernel.php":null},"className":"App\\Kernel","excludedVendors":[],"hash":"e99ca94924fc07b15a24e4777153ceff"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/src/Kernel.php"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/vendor/symfony/http-kernel/Kernel.php"},{"@type":"Symfony\\Component\\DependencyInjection\\Config\\ContainerParametersResource","parameters":[]},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/var/cache/dev/App_KernelDevDebugContainer.php"}]} \ No newline at end of file diff --git a/backend/var/cache/dev/url_matching_routes.php b/backend/var/cache/dev/url_matching_routes.php new file mode 100644 index 0000000..ca3f039 --- /dev/null +++ b/backend/var/cache/dev/url_matching_routes.php @@ -0,0 +1,24 @@ + '{^(?' + .'|/_error/(\\d+)(?:\\.([^/]++))?(*:35)' + .')/?$}sDu', + ], + [ // $dynamicRoutes + 35 => [ + [['_route' => '_preview_error', '_controller' => 'error_controller::preview', '_format' => 'html'], ['code', '_format'], null, null, false, true, null], + [null, null, null, null, false, false, 0], + ], + ], + null, // $checkCondition +]; diff --git a/backend/var/cache/dev/url_matching_routes.php.meta b/backend/var/cache/dev/url_matching_routes.php.meta new file mode 100644 index 0000000..54c2aaf Binary files /dev/null and b/backend/var/cache/dev/url_matching_routes.php.meta differ diff --git a/backend/var/cache/dev/url_matching_routes.php.meta.json b/backend/var/cache/dev/url_matching_routes.php.meta.json new file mode 100644 index 0000000..683966d --- /dev/null +++ b/backend/var/cache/dev/url_matching_routes.php.meta.json @@ -0,0 +1 @@ +{"resources":[{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/routes/framework.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/vendor/symfony/framework-bundle/Resources/config/routing/errors.php"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/config/routes.yaml"},{"@type":"Symfony\\Component\\Config\\Resource\\ReflectionClassResource","files":{"/var/www/html/backend/vendor/symfony/http-kernel/HttpKernelInterface.php":null,"/var/www/html/backend/vendor/symfony/http-kernel/TerminableInterface.php":null,"/var/www/html/backend/vendor/symfony/http-kernel/RebootableInterface.php":null,"/var/www/html/backend/vendor/symfony/http-kernel/KernelInterface.php":null,"/var/www/html/backend/src/Kernel.php":null,"/var/www/html/backend/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php":null,"/var/www/html/backend/vendor/symfony/http-kernel/Kernel.php":null},"className":"App\\Kernel","excludedVendors":[],"hash":"e99ca94924fc07b15a24e4777153ceff"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/src/Kernel.php"},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/vendor/symfony/http-kernel/Kernel.php"},{"@type":"Symfony\\Component\\DependencyInjection\\Config\\ContainerParametersResource","parameters":[]},{"@type":"Symfony\\Component\\Config\\Resource\\FileResource","resource":"/var/www/html/backend/var/cache/dev/App_KernelDevDebugContainer.php"}]} \ No newline at end of file diff --git a/backend/var/cache/dev/validation.php b/backend/var/cache/dev/validation.php new file mode 100644 index 0000000..6f5f6c7 --- /dev/null +++ b/backend/var/cache/dev/validation.php @@ -0,0 +1,11 @@ + dirname(__DIR__, 1), +]); + +[$app, $args] = $runtime + ->getResolver($app) + ->resolve(); + +$app = $app(...$args); + +exit( + $runtime + ->getRunner($app) + ->run() +); diff --git a/backend/vendor/bin/doctrine-migrations b/backend/vendor/bin/doctrine-migrations new file mode 100755 index 0000000..9517060 --- /dev/null +++ b/backend/vendor/bin/doctrine-migrations @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/doctrine/migrations/bin/doctrine-migrations'); + } +} + +return include __DIR__ . '/..'.'/doctrine/migrations/bin/doctrine-migrations'; diff --git a/backend/vendor/bin/patch-type-declarations b/backend/vendor/bin/patch-type-declarations new file mode 100755 index 0000000..4e63fef --- /dev/null +++ b/backend/vendor/bin/patch-type-declarations @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/error-handler/Resources/bin/patch-type-declarations'); + } +} + +return include __DIR__ . '/..'.'/symfony/error-handler/Resources/bin/patch-type-declarations'; diff --git a/backend/vendor/bin/sql-formatter b/backend/vendor/bin/sql-formatter new file mode 100755 index 0000000..ed0a69d --- /dev/null +++ b/backend/vendor/bin/sql-formatter @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/doctrine/sql-formatter/bin/sql-formatter'); + } +} + +return include __DIR__ . '/..'.'/doctrine/sql-formatter/bin/sql-formatter'; diff --git a/backend/vendor/bin/var-dump-server b/backend/vendor/bin/var-dump-server new file mode 100755 index 0000000..18db1c1 --- /dev/null +++ b/backend/vendor/bin/var-dump-server @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'); + } +} + +return include __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'; diff --git a/backend/vendor/bin/yaml-lint b/backend/vendor/bin/yaml-lint new file mode 100755 index 0000000..388092f --- /dev/null +++ b/backend/vendor/bin/yaml-lint @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint'); + } +} + +return include __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint'; diff --git a/backend/vendor/composer/ClassLoader.php b/backend/vendor/composer/ClassLoader.php new file mode 100644 index 0000000..7824d8f --- /dev/null +++ b/backend/vendor/composer/ClassLoader.php @@ -0,0 +1,579 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var string|null */ + private $vendorDir; + + // PSR-4 + /** + * @var array> + */ + private $prefixLengthsPsr4 = array(); + /** + * @var array> + */ + private $prefixDirsPsr4 = array(); + /** + * @var list + */ + private $fallbackDirsPsr4 = array(); + + // PSR-0 + /** + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array>> + */ + private $prefixesPsr0 = array(); + /** + * @var list + */ + private $fallbackDirsPsr0 = array(); + + /** @var bool */ + private $useIncludePath = false; + + /** + * @var array + */ + private $classMap = array(); + + /** @var bool */ + private $classMapAuthoritative = false; + + /** + * @var array + */ + private $missingClasses = array(); + + /** @var string|null */ + private $apcuPrefix; + + /** + * @var array + */ + private static $registeredLoaders = array(); + + /** + * @param string|null $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); + } + + /** + * @return array> + */ + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + /** + * @return array> + */ + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + /** + * @return list + */ + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + /** + * @return list + */ + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + /** + * @return array Array of classname => path + */ + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + * + * @return void + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void + */ + public function add($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 base directories + * + * @return void + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + * + * @return void + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + * + * @return void + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + * + * @return void + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return true|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + $includeFile = self::$includeFile; + $includeFile($file); + + return true; + } + + return null; + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders keyed by their corresponding vendor directories. + * + * @return array + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } + + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } +} diff --git a/backend/vendor/composer/InstalledVersions.php b/backend/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..2052022 --- /dev/null +++ b/backend/vendor/composer/InstalledVersions.php @@ -0,0 +1,396 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final + */ +class InstalledVersions +{ + /** + * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to + * @internal + */ + private static $selfDir = null; + + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null + */ + private static $installed; + + /** + * @var bool + */ + private static $installedIsLocalDir; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints((string) $constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + + // when using reload, we disable the duplicate protection to ensure that self::$installed data is + // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, + // so we have to assume it does not, and that may result in duplicate data being returned when listing + // all installed packages for example + self::$installedIsLocalDir = false; + } + + /** + * @return string + */ + private static function getSelfDir() + { + if (self::$selfDir === null) { + self::$selfDir = strtr(__DIR__, '\\', '/'); + } + + return self::$selfDir; + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + $copiedLocalDir = false; + + if (self::$canGetVendors) { + $selfDir = self::getSelfDir(); + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + $vendorDir = strtr($vendorDir, '\\', '/'); + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require $vendorDir.'/composer/installed.php'; + self::$installedByVendor[$vendorDir] = $required; + $installed[] = $required; + if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { + self::$installed = $required; + self::$installedIsLocalDir = true; + } + } + if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { + $copiedLocalDir = true; + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; + } else { + self::$installed = array(); + } + } + + if (self::$installed !== array() && !$copiedLocalDir) { + $installed[] = self::$installed; + } + + return $installed; + } +} diff --git a/backend/vendor/composer/LICENSE b/backend/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/backend/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/backend/vendor/composer/autoload_classmap.php b/backend/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..ca23a3b --- /dev/null +++ b/backend/vendor/composer/autoload_classmap.php @@ -0,0 +1,26 @@ + $vendorDir . '/composer/InstalledVersions.php', + 'DateError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateError.php', + 'DateException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateException.php', + 'DateInvalidOperationException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateInvalidOperationException.php', + 'DateInvalidTimeZoneException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateInvalidTimeZoneException.php', + 'DateMalformedIntervalStringException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateMalformedIntervalStringException.php', + 'DateMalformedPeriodStringException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateMalformedPeriodStringException.php', + 'DateMalformedStringException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateMalformedStringException.php', + 'DateObjectError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateObjectError.php', + 'DateRangeError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateRangeError.php', + 'Deprecated' => $vendorDir . '/symfony/polyfill-php84/Resources/stubs/Deprecated.php', + 'NoDiscard' => $vendorDir . '/symfony/polyfill-php85/Resources/stubs/NoDiscard.php', + 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', + 'Override' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/Override.php', + 'ReflectionConstant' => $vendorDir . '/symfony/polyfill-php84/Resources/stubs/ReflectionConstant.php', + 'SQLite3Exception' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/SQLite3Exception.php', + '' => $vendorDir . '/symfony/cache/Traits/ValueWrapper.php', +); diff --git a/backend/vendor/composer/autoload_files.php b/backend/vendor/composer/autoload_files.php new file mode 100644 index 0000000..c1a160f --- /dev/null +++ b/backend/vendor/composer/autoload_files.php @@ -0,0 +1,18 @@ + $vendorDir . '/symfony/deprecation-contracts/function.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + '606a39d89246991a373564698c2d8383' => $vendorDir . '/symfony/polyfill-php85/bootstrap.php', + '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', + '8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php', + 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', + 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php', + '9d2b9fc6db0f153a0a149fefb182415e' => $vendorDir . '/symfony/polyfill-php84/bootstrap.php', + '662a729f963d39afe703c9d9b7ab4a8c' => $vendorDir . '/symfony/polyfill-php83/bootstrap.php', +); diff --git a/backend/vendor/composer/autoload_namespaces.php b/backend/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..15a2ff3 --- /dev/null +++ b/backend/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src', $vendorDir . '/phpdocumentor/reflection-common/src'), + 'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'), + 'Symfony\\Runtime\\Symfony\\Component\\' => array($vendorDir . '/symfony/runtime/Internal'), + 'Symfony\\Polyfill\\Php85\\' => array($vendorDir . '/symfony/polyfill-php85'), + 'Symfony\\Polyfill\\Php84\\' => array($vendorDir . '/symfony/polyfill-php84'), + 'Symfony\\Polyfill\\Php83\\' => array($vendorDir . '/symfony/polyfill-php83'), + 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'), + 'Symfony\\Polyfill\\Intl\\Grapheme\\' => array($vendorDir . '/symfony/polyfill-intl-grapheme'), + 'Symfony\\Flex\\' => array($vendorDir . '/symfony/flex/src'), + 'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'), + 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'), + 'Symfony\\Contracts\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher-contracts'), + 'Symfony\\Contracts\\Cache\\' => array($vendorDir . '/symfony/cache-contracts'), + 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), + 'Symfony\\Component\\VarExporter\\' => array($vendorDir . '/symfony/var-exporter'), + 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), + 'Symfony\\Component\\Validator\\' => array($vendorDir . '/symfony/validator'), + 'Symfony\\Component\\TypeInfo\\' => array($vendorDir . '/symfony/type-info'), + 'Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'), + 'Symfony\\Component\\Stopwatch\\' => array($vendorDir . '/symfony/stopwatch'), + 'Symfony\\Component\\Serializer\\' => array($vendorDir . '/symfony/serializer'), + 'Symfony\\Component\\Runtime\\' => array($vendorDir . '/symfony/runtime'), + 'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'), + 'Symfony\\Component\\PropertyInfo\\' => array($vendorDir . '/symfony/property-info'), + 'Symfony\\Component\\PropertyAccess\\' => array($vendorDir . '/symfony/property-access'), + 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), + 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), + 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), + 'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'), + 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), + 'Symfony\\Component\\ErrorHandler\\' => array($vendorDir . '/symfony/error-handler'), + 'Symfony\\Component\\Dotenv\\' => array($vendorDir . '/symfony/dotenv'), + 'Symfony\\Component\\DependencyInjection\\' => array($vendorDir . '/symfony/dependency-injection'), + 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), + 'Symfony\\Component\\Config\\' => array($vendorDir . '/symfony/config'), + 'Symfony\\Component\\Cache\\' => array($vendorDir . '/symfony/cache'), + 'Symfony\\Bundle\\FrameworkBundle\\' => array($vendorDir . '/symfony/framework-bundle'), + 'Symfony\\Bridge\\Doctrine\\' => array($vendorDir . '/symfony/doctrine-bridge'), + 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'), + 'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'), + 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), + 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), + 'PHPStan\\PhpDocParser\\' => array($vendorDir . '/phpstan/phpdoc-parser/src'), + 'Nelmio\\CorsBundle\\' => array($vendorDir . '/nelmio/cors-bundle'), + 'Doctrine\\SqlFormatter\\' => array($vendorDir . '/doctrine/sql-formatter/src'), + 'Doctrine\\Persistence\\' => array($vendorDir . '/doctrine/persistence/src/Persistence'), + 'Doctrine\\ORM\\' => array($vendorDir . '/doctrine/orm/src'), + 'Doctrine\\Migrations\\' => array($vendorDir . '/doctrine/migrations/src'), + 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), + 'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/src'), + 'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/src'), + 'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/src'), + 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/src'), + 'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/src'), + 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/event-manager/src'), + 'Doctrine\\Bundle\\MigrationsBundle\\' => array($vendorDir . '/doctrine/doctrine-migrations-bundle/src'), + 'Doctrine\\Bundle\\DoctrineBundle\\' => array($vendorDir . '/doctrine/doctrine-bundle/src'), + 'App\\Tests\\' => array($baseDir . '/tests'), + 'App\\' => array($baseDir . '/src'), +); diff --git a/backend/vendor/composer/autoload_real.php b/backend/vendor/composer/autoload_real.php new file mode 100644 index 0000000..ebf7654 --- /dev/null +++ b/backend/vendor/composer/autoload_real.php @@ -0,0 +1,50 @@ +register(true); + + $filesToLoad = \Composer\Autoload\ComposerStaticInit75e7f8d848176580e9902a32f6f14640::$files; + $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } + }, null, null); + foreach ($filesToLoad as $fileIdentifier => $file) { + $requireFile($fileIdentifier, $file); + } + + return $loader; + } +} diff --git a/backend/vendor/composer/autoload_static.php b/backend/vendor/composer/autoload_static.php new file mode 100644 index 0000000..139989f --- /dev/null +++ b/backend/vendor/composer/autoload_static.php @@ -0,0 +1,379 @@ + __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + '606a39d89246991a373564698c2d8383' => __DIR__ . '/..' . '/symfony/polyfill-php85/bootstrap.php', + '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', + '8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php', + 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', + 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php', + '9d2b9fc6db0f153a0a149fefb182415e' => __DIR__ . '/..' . '/symfony/polyfill-php84/bootstrap.php', + '662a729f963d39afe703c9d9b7ab4a8c' => __DIR__ . '/..' . '/symfony/polyfill-php83/bootstrap.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'p' => + array ( + 'phpDocumentor\\Reflection\\' => 25, + ), + 'W' => + array ( + 'Webmozart\\Assert\\' => 17, + ), + 'S' => + array ( + 'Symfony\\Runtime\\Symfony\\Component\\' => 34, + 'Symfony\\Polyfill\\Php85\\' => 23, + 'Symfony\\Polyfill\\Php84\\' => 23, + 'Symfony\\Polyfill\\Php83\\' => 23, + 'Symfony\\Polyfill\\Mbstring\\' => 26, + 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33, + 'Symfony\\Polyfill\\Intl\\Grapheme\\' => 31, + 'Symfony\\Flex\\' => 13, + 'Symfony\\Contracts\\Translation\\' => 30, + 'Symfony\\Contracts\\Service\\' => 26, + 'Symfony\\Contracts\\EventDispatcher\\' => 34, + 'Symfony\\Contracts\\Cache\\' => 24, + 'Symfony\\Component\\Yaml\\' => 23, + 'Symfony\\Component\\VarExporter\\' => 30, + 'Symfony\\Component\\VarDumper\\' => 28, + 'Symfony\\Component\\Validator\\' => 28, + 'Symfony\\Component\\TypeInfo\\' => 27, + 'Symfony\\Component\\String\\' => 25, + 'Symfony\\Component\\Stopwatch\\' => 28, + 'Symfony\\Component\\Serializer\\' => 29, + 'Symfony\\Component\\Runtime\\' => 26, + 'Symfony\\Component\\Routing\\' => 26, + 'Symfony\\Component\\PropertyInfo\\' => 31, + 'Symfony\\Component\\PropertyAccess\\' => 33, + 'Symfony\\Component\\HttpKernel\\' => 29, + 'Symfony\\Component\\HttpFoundation\\' => 33, + 'Symfony\\Component\\Finder\\' => 25, + 'Symfony\\Component\\Filesystem\\' => 29, + 'Symfony\\Component\\EventDispatcher\\' => 34, + 'Symfony\\Component\\ErrorHandler\\' => 31, + 'Symfony\\Component\\Dotenv\\' => 25, + 'Symfony\\Component\\DependencyInjection\\' => 38, + 'Symfony\\Component\\Console\\' => 26, + 'Symfony\\Component\\Config\\' => 25, + 'Symfony\\Component\\Cache\\' => 24, + 'Symfony\\Bundle\\FrameworkBundle\\' => 31, + 'Symfony\\Bridge\\Doctrine\\' => 24, + ), + 'P' => + array ( + 'Psr\\Log\\' => 8, + 'Psr\\EventDispatcher\\' => 20, + 'Psr\\Container\\' => 14, + 'Psr\\Cache\\' => 10, + 'PHPStan\\PhpDocParser\\' => 21, + ), + 'N' => + array ( + 'Nelmio\\CorsBundle\\' => 18, + ), + 'D' => + array ( + 'Doctrine\\SqlFormatter\\' => 22, + 'Doctrine\\Persistence\\' => 21, + 'Doctrine\\ORM\\' => 13, + 'Doctrine\\Migrations\\' => 20, + 'Doctrine\\Instantiator\\' => 22, + 'Doctrine\\Inflector\\' => 19, + 'Doctrine\\Deprecations\\' => 22, + 'Doctrine\\DBAL\\' => 14, + 'Doctrine\\Common\\Lexer\\' => 22, + 'Doctrine\\Common\\Collections\\' => 28, + 'Doctrine\\Common\\' => 16, + 'Doctrine\\Bundle\\MigrationsBundle\\' => 33, + 'Doctrine\\Bundle\\DoctrineBundle\\' => 31, + ), + 'A' => + array ( + 'App\\Tests\\' => 10, + 'App\\' => 4, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'phpDocumentor\\Reflection\\' => + array ( + 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', + 1 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', + 2 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src', + ), + 'Webmozart\\Assert\\' => + array ( + 0 => __DIR__ . '/..' . '/webmozart/assert/src', + ), + 'Symfony\\Runtime\\Symfony\\Component\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/runtime/Internal', + ), + 'Symfony\\Polyfill\\Php85\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php85', + ), + 'Symfony\\Polyfill\\Php84\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php84', + ), + 'Symfony\\Polyfill\\Php83\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php83', + ), + 'Symfony\\Polyfill\\Mbstring\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', + ), + 'Symfony\\Polyfill\\Intl\\Normalizer\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer', + ), + 'Symfony\\Polyfill\\Intl\\Grapheme\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme', + ), + 'Symfony\\Flex\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/flex/src', + ), + 'Symfony\\Contracts\\Translation\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/translation-contracts', + ), + 'Symfony\\Contracts\\Service\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/service-contracts', + ), + 'Symfony\\Contracts\\EventDispatcher\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts', + ), + 'Symfony\\Contracts\\Cache\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/cache-contracts', + ), + 'Symfony\\Component\\Yaml\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/yaml', + ), + 'Symfony\\Component\\VarExporter\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/var-exporter', + ), + 'Symfony\\Component\\VarDumper\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/var-dumper', + ), + 'Symfony\\Component\\Validator\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/validator', + ), + 'Symfony\\Component\\TypeInfo\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/type-info', + ), + 'Symfony\\Component\\String\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/string', + ), + 'Symfony\\Component\\Stopwatch\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/stopwatch', + ), + 'Symfony\\Component\\Serializer\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/serializer', + ), + 'Symfony\\Component\\Runtime\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/runtime', + ), + 'Symfony\\Component\\Routing\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/routing', + ), + 'Symfony\\Component\\PropertyInfo\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/property-info', + ), + 'Symfony\\Component\\PropertyAccess\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/property-access', + ), + 'Symfony\\Component\\HttpKernel\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/http-kernel', + ), + 'Symfony\\Component\\HttpFoundation\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/http-foundation', + ), + 'Symfony\\Component\\Finder\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/finder', + ), + 'Symfony\\Component\\Filesystem\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/filesystem', + ), + 'Symfony\\Component\\EventDispatcher\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/event-dispatcher', + ), + 'Symfony\\Component\\ErrorHandler\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/error-handler', + ), + 'Symfony\\Component\\Dotenv\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/dotenv', + ), + 'Symfony\\Component\\DependencyInjection\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/dependency-injection', + ), + 'Symfony\\Component\\Console\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/console', + ), + 'Symfony\\Component\\Config\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/config', + ), + 'Symfony\\Component\\Cache\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/cache', + ), + 'Symfony\\Bundle\\FrameworkBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/framework-bundle', + ), + 'Symfony\\Bridge\\Doctrine\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/doctrine-bridge', + ), + 'Psr\\Log\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/log/src', + ), + 'Psr\\EventDispatcher\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/event-dispatcher/src', + ), + 'Psr\\Container\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/container/src', + ), + 'Psr\\Cache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/cache/src', + ), + 'PHPStan\\PhpDocParser\\' => + array ( + 0 => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src', + ), + 'Nelmio\\CorsBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/nelmio/cors-bundle', + ), + 'Doctrine\\SqlFormatter\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/sql-formatter/src', + ), + 'Doctrine\\Persistence\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/persistence/src/Persistence', + ), + 'Doctrine\\ORM\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/orm/src', + ), + 'Doctrine\\Migrations\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/migrations/src', + ), + 'Doctrine\\Instantiator\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator', + ), + 'Doctrine\\Inflector\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/inflector/src', + ), + 'Doctrine\\Deprecations\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/deprecations/src', + ), + 'Doctrine\\DBAL\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/dbal/src', + ), + 'Doctrine\\Common\\Lexer\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/lexer/src', + ), + 'Doctrine\\Common\\Collections\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/collections/src', + ), + 'Doctrine\\Common\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/event-manager/src', + ), + 'Doctrine\\Bundle\\MigrationsBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/doctrine-migrations-bundle/src', + ), + 'Doctrine\\Bundle\\DoctrineBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/doctrine-bundle/src', + ), + 'App\\Tests\\' => + array ( + 0 => __DIR__ . '/../..' . '/tests', + ), + 'App\\' => + array ( + 0 => __DIR__ . '/../..' . '/src', + ), + ); + + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'DateError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateError.php', + 'DateException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateException.php', + 'DateInvalidOperationException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateInvalidOperationException.php', + 'DateInvalidTimeZoneException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateInvalidTimeZoneException.php', + 'DateMalformedIntervalStringException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateMalformedIntervalStringException.php', + 'DateMalformedPeriodStringException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateMalformedPeriodStringException.php', + 'DateMalformedStringException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateMalformedStringException.php', + 'DateObjectError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateObjectError.php', + 'DateRangeError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateRangeError.php', + 'Deprecated' => __DIR__ . '/..' . '/symfony/polyfill-php84/Resources/stubs/Deprecated.php', + 'NoDiscard' => __DIR__ . '/..' . '/symfony/polyfill-php85/Resources/stubs/NoDiscard.php', + 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', + 'Override' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/Override.php', + 'ReflectionConstant' => __DIR__ . '/..' . '/symfony/polyfill-php84/Resources/stubs/ReflectionConstant.php', + 'SQLite3Exception' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/SQLite3Exception.php', + '' => __DIR__ . '/..' . '/symfony/cache/Traits/ValueWrapper.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit75e7f8d848176580e9902a32f6f14640::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit75e7f8d848176580e9902a32f6f14640::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit75e7f8d848176580e9902a32f6f14640::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/backend/vendor/composer/installed.json b/backend/vendor/composer/installed.json new file mode 100644 index 0000000..1307ef3 --- /dev/null +++ b/backend/vendor/composer/installed.json @@ -0,0 +1,5055 @@ +{ + "packages": [ + { + "name": "doctrine/collections", + "version": "2.6.0", + "version_normalized": "2.6.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "7713da39d8e237f28411d6a616a3dce5e20d5de2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/7713da39d8e237f28411d6a616a3dce5e20d5de2", + "reference": "7713da39d8e237f28411d6a616a3dce5e20d5de2", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1", + "php": "^8.1", + "symfony/polyfill-php84": "^1.30" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "ext-json": "*", + "phpstan/phpstan": "^2.1.30", + "phpstan/phpstan-phpunit": "^2.0.7", + "phpunit/phpunit": "^10.5.58 || ^11.5.42 || ^12.4" + }, + "time": "2026-01-15T10:01:58+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Collections\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", + "homepage": "https://www.doctrine-project.org/projects/collections.html", + "keywords": [ + "array", + "collections", + "iterators", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/collections/issues", + "source": "https://github.com/doctrine/collections/tree/2.6.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcollections", + "type": "tidelift" + } + ], + "install-path": "../doctrine/collections" + }, + { + "name": "doctrine/dbal", + "version": "4.4.3", + "version_normalized": "4.4.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "61e730f1658814821a85f2402c945f3883407dec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/61e730f1658814821a85f2402c945f3883407dec", + "reference": "61e730f1658814821a85f2402c945f3883407dec", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.1.5", + "php": "^8.2", + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" + }, + "require-dev": { + "doctrine/coding-standard": "14.0.0", + "fig/log-test": "^1", + "jetbrains/phpstorm-stubs": "2023.2", + "phpstan/phpstan": "2.1.30", + "phpstan/phpstan-phpunit": "2.0.7", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "11.5.50", + "slevomat/coding-standard": "8.27.1", + "squizlabs/php_codesniffer": "4.0.1", + "symfony/cache": "^6.3.8|^7.0|^8.0", + "symfony/console": "^5.4|^6.3|^7.0|^8.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "time": "2026-03-20T08:52:12+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\DBAL\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", + "keywords": [ + "abstraction", + "database", + "db2", + "dbal", + "mariadb", + "mssql", + "mysql", + "oci8", + "oracle", + "pdo", + "pgsql", + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "support": { + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/4.4.3" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "install-path": "../doctrine/dbal" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.6", + "version_normalized": "1.1.6.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<=7.5 || >=14" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^12 || ^14", + "phpstan/phpstan": "1.4.10 || 2.1.30", + "phpstan/phpstan-phpunit": "^1.0 || ^2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12.4 || ^13.0", + "psr/log": "^1 || ^2 || ^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "time": "2026-02-07T07:09:04+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.6" + }, + "install-path": "../doctrine/deprecations" + }, + { + "name": "doctrine/doctrine-bundle", + "version": "2.18.2", + "version_normalized": "2.18.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineBundle.git", + "reference": "0ff098b29b8b3c68307c8987dcaed7fd829c6546" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/0ff098b29b8b3c68307c8987dcaed7fd829c6546", + "reference": "0ff098b29b8b3c68307c8987dcaed7fd829c6546", + "shasum": "" + }, + "require": { + "doctrine/dbal": "^3.7.0 || ^4.0", + "doctrine/deprecations": "^1.0", + "doctrine/persistence": "^3.1 || ^4", + "doctrine/sql-formatter": "^1.0.1", + "php": "^8.1", + "symfony/cache": "^6.4 || ^7.0", + "symfony/config": "^6.4 || ^7.0", + "symfony/console": "^6.4 || ^7.0", + "symfony/dependency-injection": "^6.4 || ^7.0", + "symfony/doctrine-bridge": "^6.4.3 || ^7.0.3", + "symfony/framework-bundle": "^6.4 || ^7.0", + "symfony/service-contracts": "^2.5 || ^3" + }, + "conflict": { + "doctrine/annotations": ">=3.0", + "doctrine/cache": "< 1.11", + "doctrine/orm": "<2.17 || >=4.0", + "symfony/var-exporter": "< 6.4.1 || 7.0.0", + "twig/twig": "<2.13 || >=3.0 <3.0.4" + }, + "require-dev": { + "doctrine/annotations": "^1 || ^2", + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^14", + "doctrine/orm": "^2.17 || ^3.1", + "friendsofphp/proxy-manager-lts": "^1.0", + "phpstan/phpstan": "2.1.1", + "phpstan/phpstan-phpunit": "2.0.3", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.53 || ^12.3.10", + "psr/log": "^1.1.4 || ^2.0 || ^3.0", + "symfony/doctrine-messenger": "^6.4 || ^7.0", + "symfony/expression-language": "^6.4 || ^7.0", + "symfony/messenger": "^6.4 || ^7.0", + "symfony/property-info": "^6.4 || ^7.0", + "symfony/security-bundle": "^6.4 || ^7.0", + "symfony/stopwatch": "^6.4 || ^7.0", + "symfony/string": "^6.4 || ^7.0", + "symfony/twig-bridge": "^6.4 || ^7.0", + "symfony/validator": "^6.4 || ^7.0", + "symfony/var-exporter": "^6.4.1 || ^7.0.1", + "symfony/web-profiler-bundle": "^6.4 || ^7.0", + "symfony/yaml": "^6.4 || ^7.0", + "twig/twig": "^2.14.7 || ^3.0.4" + }, + "suggest": { + "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", + "ext-pdo": "*", + "symfony/web-profiler-bundle": "To use the data collector." + }, + "time": "2025-12-20T21:35:32+00:00", + "type": "symfony-bundle", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Doctrine Project", + "homepage": "https://www.doctrine-project.org/" + } + ], + "description": "Symfony DoctrineBundle", + "homepage": "https://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "orm", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/DoctrineBundle/issues", + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.18.2" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdoctrine-bundle", + "type": "tidelift" + } + ], + "install-path": "../doctrine/doctrine-bundle" + }, + { + "name": "doctrine/doctrine-migrations-bundle", + "version": "3.7.0", + "version_normalized": "3.7.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git", + "reference": "1e380c6dd8ac8488217f39cff6b77e367f1a644b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/1e380c6dd8ac8488217f39cff6b77e367f1a644b", + "reference": "1e380c6dd8ac8488217f39cff6b77e367f1a644b", + "shasum": "" + }, + "require": { + "doctrine/doctrine-bundle": "^2.4 || ^3.0", + "doctrine/migrations": "^3.2", + "php": "^7.2 || ^8.0", + "symfony/deprecation-contracts": "^2.1 || ^3", + "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/semver": "^3.0", + "doctrine/coding-standard": "^12 || ^14", + "doctrine/orm": "^2.6 || ^3", + "phpstan/phpstan": "^1.4 || ^2", + "phpstan/phpstan-deprecation-rules": "^1 || ^2", + "phpstan/phpstan-phpunit": "^1 || ^2", + "phpstan/phpstan-strict-rules": "^1.1 || ^2", + "phpstan/phpstan-symfony": "^1.3 || ^2", + "phpunit/phpunit": "^8.5 || ^9.5", + "symfony/phpunit-bridge": "^6.3 || ^7 || ^8", + "symfony/var-exporter": "^5.4 || ^6 || ^7 || ^8" + }, + "time": "2025-11-15T19:02:59+00:00", + "type": "symfony-bundle", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\MigrationsBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Doctrine Project", + "homepage": "https://www.doctrine-project.org" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DoctrineMigrationsBundle", + "homepage": "https://www.doctrine-project.org", + "keywords": [ + "dbal", + "migrations", + "schema" + ], + "support": { + "issues": "https://github.com/doctrine/DoctrineMigrationsBundle/issues", + "source": "https://github.com/doctrine/DoctrineMigrationsBundle/tree/3.7.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdoctrine-migrations-bundle", + "type": "tidelift" + } + ], + "install-path": "../doctrine/doctrine-migrations-bundle" + }, + { + "name": "doctrine/event-manager", + "version": "2.1.1", + "version_normalized": "2.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "dda33921b198841ca8dbad2eaa5d4d34769d18cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/dda33921b198841ca8dbad2eaa5d4d34769d18cf", + "reference": "dda33921b198841ca8dbad2eaa5d4d34769d18cf", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "conflict": { + "doctrine/common": "<2.9" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "phpdocumentor/guides-cli": "^1.4", + "phpstan/phpstan": "^2.1.32", + "phpunit/phpunit": "^10.5.58" + }, + "time": "2026-01-29T07:11:08+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/2.1.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "install-path": "../doctrine/event-manager" + }, + { + "name": "doctrine/inflector", + "version": "2.1.0", + "version_normalized": "2.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "6d6c96277ea252fc1304627204c3d5e6e15faa3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/6d6c96277ea252fc1304627204c3d5e6e15faa3b", + "reference": "6d6c96277ea252fc1304627204c3d5e6e15faa3b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^12.0 || ^13.0", + "phpstan/phpstan": "^1.12 || ^2.0", + "phpstan/phpstan-phpunit": "^1.4 || ^2.0", + "phpstan/phpstan-strict-rules": "^1.6 || ^2.0", + "phpunit/phpunit": "^8.5 || ^12.2" + }, + "time": "2025-08-10T19:31:58+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.1.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "install-path": "../doctrine/inflector" + }, + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "time": "2022-12-30T00:23:10+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "install-path": "../doctrine/instantiator" + }, + { + "name": "doctrine/lexer", + "version": "3.0.1", + "version_normalized": "3.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.21" + }, + "time": "2024-02-05T11:56:58+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "install-path": "../doctrine/lexer" + }, + { + "name": "doctrine/migrations", + "version": "3.9.6", + "version_normalized": "3.9.6.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/migrations.git", + "reference": "ffd8355cdd8505fc650d9604f058bf62aedd80a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/migrations/zipball/ffd8355cdd8505fc650d9604f058bf62aedd80a1", + "reference": "ffd8355cdd8505fc650d9604f058bf62aedd80a1", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2", + "doctrine/dbal": "^3.6 || ^4", + "doctrine/deprecations": "^0.5.3 || ^1", + "doctrine/event-manager": "^1.2 || ^2.0", + "php": "^8.1", + "psr/log": "^1.1.3 || ^2 || ^3", + "symfony/console": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/var-exporter": "^6.2 || ^7.0 || ^8.0" + }, + "conflict": { + "doctrine/orm": "<2.12 || >=4" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "doctrine/orm": "^2.13 || ^3", + "doctrine/persistence": "^2 || ^3 || ^4", + "doctrine/sql-formatter": "^1.0", + "ext-pdo_sqlite": "*", + "fig/log-test": "^1", + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-phpunit": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpstan/phpstan-symfony": "^2", + "phpunit/phpunit": "^10.3 || ^11.0 || ^12.0", + "symfony/cache": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/process": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0 || ^8.0" + }, + "suggest": { + "doctrine/sql-formatter": "Allows to generate formatted SQL with the diff command.", + "symfony/yaml": "Allows the use of yaml for migration configuration files." + }, + "time": "2026-02-11T06:46:11+00:00", + "bin": [ + "bin/doctrine-migrations" + ], + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Migrations\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Michael Simonson", + "email": "contact@mikesimonson.com" + } + ], + "description": "PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.", + "homepage": "https://www.doctrine-project.org/projects/migrations.html", + "keywords": [ + "database", + "dbal", + "migrations" + ], + "support": { + "issues": "https://github.com/doctrine/migrations/issues", + "source": "https://github.com/doctrine/migrations/tree/3.9.6" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fmigrations", + "type": "tidelift" + } + ], + "install-path": "../doctrine/migrations" + }, + { + "name": "doctrine/orm", + "version": "3.6.2", + "version_normalized": "3.6.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/orm.git", + "reference": "4262eb495b4d2a53b45de1ac58881e0091f2970f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/orm/zipball/4262eb495b4d2a53b45de1ac58881e0091f2970f", + "reference": "4262eb495b4d2a53b45de1ac58881e0091f2970f", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2", + "doctrine/collections": "^2.2", + "doctrine/dbal": "^3.8.2 || ^4", + "doctrine/deprecations": "^0.5.3 || ^1", + "doctrine/event-manager": "^1.2 || ^2", + "doctrine/inflector": "^1.4 || ^2.0", + "doctrine/instantiator": "^1.3 || ^2", + "doctrine/lexer": "^3", + "doctrine/persistence": "^3.3.1 || ^4", + "ext-ctype": "*", + "php": "^8.1", + "psr/cache": "^1 || ^2 || ^3", + "symfony/console": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/var-exporter": "^6.3.9 || ^7.0 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^14.0", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "2.1.23", + "phpstan/phpstan-deprecation-rules": "^2", + "phpunit/phpunit": "^10.5.0 || ^11.5", + "psr/log": "^1 || ^2 || ^3", + "symfony/cache": "^5.4 || ^6.2 || ^7.0 || ^8.0" + }, + "suggest": { + "ext-dom": "Provides support for XSD validation for XML mapping files", + "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0" + }, + "time": "2026-01-30T21:41:41+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\ORM\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Object-Relational-Mapper for PHP", + "homepage": "https://www.doctrine-project.org/projects/orm.html", + "keywords": [ + "database", + "orm" + ], + "support": { + "issues": "https://github.com/doctrine/orm/issues", + "source": "https://github.com/doctrine/orm/tree/3.6.2" + }, + "install-path": "../doctrine/orm" + }, + { + "name": "doctrine/persistence", + "version": "4.1.1", + "version_normalized": "4.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/persistence.git", + "reference": "b9c49ad3558bb77ef973f4e173f2e9c2eca9be09" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/b9c49ad3558bb77ef973f4e173f2e9c2eca9be09", + "reference": "b9c49ad3558bb77ef973f4e173f2e9c2eca9be09", + "shasum": "" + }, + "require": { + "doctrine/event-manager": "^1 || ^2", + "php": "^8.1", + "psr/cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "phpstan/phpstan": "2.1.30", + "phpstan/phpstan-phpunit": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.58 || ^12", + "symfony/cache": "^4.4 || ^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^4.4 || ^5.4 || ^6.0 || ^7.0" + }, + "time": "2025-10-16T20:13:18+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Persistence\\": "src/Persistence" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", + "homepage": "https://www.doctrine-project.org/projects/persistence.html", + "keywords": [ + "mapper", + "object", + "odm", + "orm", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/persistence/issues", + "source": "https://github.com/doctrine/persistence/tree/4.1.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fpersistence", + "type": "tidelift" + } + ], + "install-path": "../doctrine/persistence" + }, + { + "name": "doctrine/sql-formatter", + "version": "1.5.4", + "version_normalized": "1.5.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/sql-formatter.git", + "reference": "9563949f5cd3bd12a17d12fb980528bc141c5806" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/9563949f5cd3bd12a17d12fb980528bc141c5806", + "reference": "9563949f5cd3bd12a17d12fb980528bc141c5806", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "ergebnis/phpunit-slow-test-detector": "^2.20", + "phpstan/phpstan": "^2.1.31", + "phpunit/phpunit": "^10.5.58" + }, + "time": "2026-02-08T16:21:46+00:00", + "bin": [ + "bin/sql-formatter" + ], + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\SqlFormatter\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Dorn", + "email": "jeremy@jeremydorn.com", + "homepage": "https://jeremydorn.com/" + } + ], + "description": "a PHP SQL highlighting library", + "homepage": "https://github.com/doctrine/sql-formatter/", + "keywords": [ + "highlight", + "sql" + ], + "support": { + "issues": "https://github.com/doctrine/sql-formatter/issues", + "source": "https://github.com/doctrine/sql-formatter/tree/1.5.4" + }, + "install-path": "../doctrine/sql-formatter" + }, + { + "name": "nelmio/cors-bundle", + "version": "2.6.1", + "version_normalized": "2.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/nelmio/NelmioCorsBundle.git", + "reference": "3d80dbcd5d1eb5f8b20ed5199e1778d44c2e4d1c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/3d80dbcd5d1eb5f8b20ed5199e1778d44c2e4d1c", + "reference": "3d80dbcd5d1eb5f8b20ed5199e1778d44c2e4d1c", + "shasum": "" + }, + "require": { + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.11.5", + "phpstan/phpstan-deprecation-rules": "^1.2.0", + "phpstan/phpstan-phpunit": "^1.4", + "phpstan/phpstan-symfony": "^1.4.4", + "phpunit/phpunit": "^8" + }, + "time": "2026-01-12T15:59:08+00:00", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Nelmio\\CorsBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nelmio", + "homepage": "http://nelm.io" + }, + { + "name": "Symfony Community", + "homepage": "https://github.com/nelmio/NelmioCorsBundle/contributors" + } + ], + "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application", + "keywords": [ + "api", + "cors", + "crossdomain" + ], + "support": { + "issues": "https://github.com/nelmio/NelmioCorsBundle/issues", + "source": "https://github.com/nelmio/NelmioCorsBundle/tree/2.6.1" + }, + "install-path": "../nelmio/cors-bundle" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "version_normalized": "2.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "time": "2020-06-27T09:03:43+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "install-path": "../phpdocumentor/reflection-common" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "6.0.3", + "version_normalized": "6.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "7bae67520aa9f5ecc506d646810bd40d9da54582" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/7bae67520aa9f5ecc506d646810bd40d9da54582", + "reference": "7bae67520aa9f5ecc506d646810bd40d9da54582", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.1", + "ext-filter": "*", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^2.0", + "phpstan/phpdoc-parser": "^2.0", + "webmozart/assert": "^1.9.1 || ^2" + }, + "require-dev": { + "mockery/mockery": "~1.3.5 || ~1.6.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "psalm/phar": "^5.26", + "shipmonk/dead-code-detector": "^0.5.1" + }, + "time": "2026-03-18T20:49:53+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/6.0.3" + }, + "install-path": "../phpdocumentor/reflection-docblock" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "2.0.0", + "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/327a05bbee54120d4786a0dc67aad30226ad4cf9", + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psalm/phar": "^4" + }, + "time": "2026-01-06T21:53:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev", + "dev-2.x": "2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/2.0.0" + }, + "install-path": "../phpdocumentor/type-resolver" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "2.3.2", + "version_normalized": "2.3.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a004701b11273a26cd7955a61d67a7f1e525a45a", + "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^5.3.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6", + "symfony/process": "^5.2" + }, + "time": "2026-01-25T14:56:51+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.2" + }, + "install-path": "../phpstan/phpdoc-parser" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "version_normalized": "3.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "time": "2021-02-03T23:26:27+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "install-path": "../psr/cache" + }, + { + "name": "psr/container", + "version": "2.0.2", + "version_normalized": "2.0.2.0", + "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" + }, + "time": "2021-11-05T16:47:00+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "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" + }, + "install-path": "../psr/container" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "time": "2019-01-08T18:20:26+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "install-path": "../psr/event-dispatcher" + }, + { + "name": "psr/log", + "version": "3.0.2", + "version_normalized": "3.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "time": "2024-09-11T13:17:53+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "installation-source": "dist", + "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/3.0.2" + }, + "install-path": "../psr/log" + }, + { + "name": "symfony/cache", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache.git", + "reference": "665522ec357540e66c294c08583b40ee576574f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache/zipball/665522ec357540e66c294c08583b40ee576574f0", + "reference": "665522ec357540e66c294c08583b40ee576574f0", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/cache": "^2.0|^3.0", + "psr/log": "^1.1|^2|^3", + "symfony/cache-contracts": "^3.6", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^2.5|^3", + "symfony/var-exporter": "^6.4|^7.0|^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.6", + "ext-redis": "<6.1", + "ext-relay": "<0.12.1", + "symfony/dependency-injection": "<6.4", + "symfony/http-kernel": "<6.4", + "symfony/var-dumper": "<6.4" + }, + "provide": { + "psr/cache-implementation": "2.0|3.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0", + "symfony/cache-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/dbal": "^3.6|^4", + "predis/predis": "^1.1|^2.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/filesystem": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "time": "2026-03-06T08:14:57+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Cache\\": "" + }, + "classmap": [ + "Traits/ValueWrapper.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], + "support": { + "source": "https://github.com/symfony/cache/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/cache" + }, + { + "name": "symfony/cache-contracts", + "version": "v3.6.0", + "version_normalized": "3.6.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache-contracts.git", + "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/5d68a57d66910405e5c0b63d6f0af941e66fc868", + "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/cache": "^3.0" + }, + "time": "2025-03-13T15:25:07+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Cache\\": "" + } + }, + "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": "Generic abstractions related to caching", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/cache-contracts/tree/v3.6.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" + } + ], + "install-path": "../symfony/cache-contracts" + }, + { + "name": "symfony/config", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/6c17162555bfb58957a55bb0e43e00035b6ae3d5", + "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^7.1|^8.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "require-dev": { + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "time": "2026-03-06T10:41:14+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "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": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/config" + }, + { + "name": "symfony/console", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "e1e6770440fb9c9b0cf725f81d1361ad1835329d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/e1e6770440fb9c9b0cf725f81d1361ad1835329d", + "reference": "e1e6770440fb9c9b0cf725f81d1361ad1835329d", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^7.2|^8.0" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "time": "2026-03-06T14:06:20+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/console" + }, + { + "name": "symfony/dependency-injection", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db", + "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^3.6", + "symfony/var-exporter": "^6.4.20|^7.2.5|^8.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2", + "symfony/config": "<6.4", + "symfony/finder": "<6.4", + "symfony/yaml": "<6.4" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "time": "2026-03-03T07:48:48+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "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": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/dependency-injection" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.6.0", + "version_normalized": "3.6.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "time": "2024-09-25T14:21:43+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "function.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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.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" + } + ], + "install-path": "../symfony/deprecation-contracts" + }, + { + "name": "symfony/doctrine-bridge", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/doctrine-bridge.git", + "reference": "4fc5e2dd41be3c0b6321e0373072782edeff45ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/4fc5e2dd41be3c0b6321e0373072782edeff45ed", + "reference": "4fc5e2dd41be3c0b6321e0373072782edeff45ed", + "shasum": "" + }, + "require": { + "doctrine/event-manager": "^2", + "doctrine/persistence": "^3.1|^4", + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "doctrine/collections": "<1.8", + "doctrine/dbal": "<3.6", + "doctrine/lexer": "<1.1", + "doctrine/orm": "<2.15", + "symfony/cache": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/form": "<6.4.6|>=7,<7.0.6", + "symfony/http-foundation": "<6.4", + "symfony/http-kernel": "<6.4", + "symfony/lock": "<6.4", + "symfony/messenger": "<6.4", + "symfony/property-info": "<6.4", + "symfony/security-bundle": "<6.4", + "symfony/security-core": "<6.4", + "symfony/validator": "<7.4" + }, + "require-dev": { + "doctrine/collections": "^1.8|^2.0", + "doctrine/data-fixtures": "^1.1|^2", + "doctrine/dbal": "^3.6|^4", + "doctrine/orm": "^2.15|^3", + "psr/log": "^1|^2|^3", + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/doctrine-messenger": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/form": "^7.2|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/security-core": "^6.4|^7.0|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/translation": "^6.4|^7.0|^8.0", + "symfony/type-info": "^7.1.8|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", + "symfony/validator": "^7.4|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "time": "2026-03-05T08:16:50+00:00", + "type": "symfony-bridge", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Doctrine\\": "" + }, + "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 integration for Doctrine with various Symfony components", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/doctrine-bridge/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/doctrine-bridge" + }, + { + "name": "symfony/dotenv", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/dotenv.git", + "reference": "7e5529a0b02395cb4614cdf507495a4cef3115c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/7e5529a0b02395cb4614cdf507495a4cef3115c5", + "reference": "7e5529a0b02395cb4614cdf507495a4cef3115c5", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "conflict": { + "symfony/console": "<6.4", + "symfony/process": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0" + }, + "time": "2026-03-03T07:48:48+00:00", + "type": "library", + "installation-source": "dist", + "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/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/dotenv" + }, + { + "name": "symfony/error-handler", + "version": "v7.4.4", + "version_normalized": "7.4.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "8da531f364ddfee53e36092a7eebbbd0b775f6b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/8da531f364ddfee53e36092a7eebbbd0b775f6b8", + "reference": "8da531f364ddfee53e36092a7eebbbd0b775f6b8", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/polyfill-php85": "^1.32", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "conflict": { + "symfony/deprecation-contracts": "<2.5", + "symfony/http-kernel": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4|^7.0|^8.0", + "symfony/webpack-encore-bundle": "^1.0|^2.0" + }, + "time": "2026-01-20T16:42:42+00:00", + "bin": [ + "Resources/bin/patch-type-declarations" + ], + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "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 tools to manage errors and ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v7.4.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/error-handler" + }, + { + "name": "symfony/event-dispatcher", + "version": "v7.4.4", + "version_normalized": "7.4.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "dc2c0eba1af673e736bb851d747d266108aea746" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/dc2c0eba1af673e736bb851d747d266108aea746", + "reference": "dc2c0eba1af673e736bb851d747d266108aea746", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/framework-bundle": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^6.4|^7.0|^8.0" + }, + "time": "2026-01-05T11:45:34+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "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 tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v7.4.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/event-dispatcher" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.6.0", + "version_normalized": "3.6.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "59eb412e93815df44f05f342958efa9f46b1e586" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", + "reference": "59eb412e93815df44f05f342958efa9f46b1e586", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "time": "2024-09-25T14:21:43+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "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": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.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" + } + ], + "install-path": "../symfony/event-dispatcher-contracts" + }, + { + "name": "symfony/filesystem", + "version": "v7.4.6", + "version_normalized": "7.4.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3ebc794fa5315e59fd122561623c2e2e4280538e", + "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^6.4|^7.0|^8.0" + }, + "time": "2026-02-25T16:50:00+00:00", + "type": "library", + "installation-source": "dist", + "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/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/filesystem" + }, + { + "name": "symfony/finder", + "version": "v7.4.6", + "version_normalized": "7.4.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "8655bf1076b7a3a346cb11413ffdabff50c7ffcf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/8655bf1076b7a3a346cb11413ffdabff50c7ffcf", + "reference": "8655bf1076b7a3a346cb11413ffdabff50c7ffcf", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0|^8.0" + }, + "time": "2026-01-29T09:40:50+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "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": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/finder" + }, + { + "name": "symfony/flex", + "version": "v2.10.0", + "version_normalized": "2.10.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/flex.git", + "reference": "9cd384775973eabbf6e8b05784dda279fc67c28d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/flex/zipball/9cd384775973eabbf6e8b05784dda279fc67c28d", + "reference": "9cd384775973eabbf6e8b05784dda279fc67c28d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.1", + "php": ">=8.1" + }, + "conflict": { + "composer/semver": "<1.7.2", + "symfony/dotenv": "<5.4" + }, + "require-dev": { + "composer/composer": "^2.1", + "symfony/dotenv": "^6.4|^7.4|^8.0", + "symfony/filesystem": "^6.4|^7.4|^8.0", + "symfony/phpunit-bridge": "^6.4|^7.4|^8.0", + "symfony/process": "^6.4|^7.4|^8.0" + }, + "time": "2025-11-16T09:38:19+00:00", + "type": "composer-plugin", + "extra": { + "class": "Symfony\\Flex\\Flex" + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Flex\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "Composer plugin for Symfony", + "support": { + "issues": "https://github.com/symfony/flex/issues", + "source": "https://github.com/symfony/flex/tree/v2.10.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/flex" + }, + { + "name": "symfony/framework-bundle", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/framework-bundle.git", + "reference": "c94bc78c85d76af67918404a95d44940f66a7c2f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/c94bc78c85d76af67918404a95d44940f66a7c2f", + "reference": "c94bc78c85d76af67918404a95d44940f66a7c2f", + "shasum": "" + }, + "require": { + "composer-runtime-api": ">=2.1", + "ext-xml": "*", + "php": ">=8.2", + "symfony/cache": "^6.4.12|^7.0|^8.0", + "symfony/config": "^7.4.4|^8.0.4", + "symfony/dependency-injection": "^7.4.4|^8.0.4", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^7.3|^8.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/filesystem": "^7.1|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php85": "^1.32", + "symfony/routing": "^7.4|^8.0" + }, + "conflict": { + "doctrine/persistence": "<1.3", + "phpdocumentor/reflection-docblock": "<5.2|>=7", + "phpdocumentor/type-resolver": "<1.5.1", + "symfony/asset": "<6.4", + "symfony/asset-mapper": "<6.4", + "symfony/clock": "<6.4", + "symfony/console": "<6.4", + "symfony/dom-crawler": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/form": "<7.4", + "symfony/http-client": "<6.4", + "symfony/lock": "<6.4", + "symfony/mailer": "<6.4", + "symfony/messenger": "<7.4", + "symfony/mime": "<6.4", + "symfony/property-access": "<6.4", + "symfony/property-info": "<6.4", + "symfony/runtime": "<6.4.13|>=7.0,<7.1.6", + "symfony/scheduler": "<6.4.4|>=7.0.0,<7.0.4", + "symfony/security-core": "<6.4", + "symfony/security-csrf": "<7.2", + "symfony/serializer": "<7.2.5", + "symfony/stopwatch": "<6.4", + "symfony/translation": "<7.3", + "symfony/twig-bridge": "<6.4", + "symfony/twig-bundle": "<6.4", + "symfony/validator": "<6.4", + "symfony/web-profiler-bundle": "<6.4", + "symfony/webhook": "<7.2", + "symfony/workflow": "<7.4" + }, + "require-dev": { + "doctrine/persistence": "^1.3|^2|^3", + "dragonmantank/cron-expression": "^3.1", + "phpdocumentor/reflection-docblock": "^5.2|^6.0", + "seld/jsonlint": "^1.10", + "symfony/asset": "^6.4|^7.0|^8.0", + "symfony/asset-mapper": "^6.4|^7.0|^8.0", + "symfony/browser-kit": "^6.4|^7.0|^8.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/css-selector": "^6.4|^7.0|^8.0", + "symfony/dom-crawler": "^6.4|^7.0|^8.0", + "symfony/dotenv": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/form": "^7.4|^8.0", + "symfony/html-sanitizer": "^6.4|^7.0|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/json-streamer": "^7.3|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/mailer": "^6.4|^7.0|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/notifier": "^6.4|^7.0|^8.0", + "symfony/object-mapper": "^7.3|^8.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/rate-limiter": "^6.4|^7.0|^8.0", + "symfony/runtime": "^6.4.13|^7.1.6|^8.0", + "symfony/scheduler": "^6.4.4|^7.0.4|^8.0", + "symfony/security-bundle": "^6.4|^7.0|^8.0", + "symfony/semaphore": "^6.4|^7.0|^8.0", + "symfony/serializer": "^7.2.5|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/string": "^6.4|^7.0|^8.0", + "symfony/translation": "^7.3|^8.0", + "symfony/twig-bundle": "^6.4|^7.0|^8.0", + "symfony/type-info": "^7.1.8|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", + "symfony/validator": "^7.4|^8.0", + "symfony/web-link": "^6.4|^7.0|^8.0", + "symfony/webhook": "^7.2|^8.0", + "symfony/workflow": "^7.4|^8.0", + "symfony/yaml": "^7.3|^8.0", + "twig/twig": "^3.12" + }, + "time": "2026-03-06T15:39:55+00:00", + "type": "symfony-bundle", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\FrameworkBundle\\": "" + }, + "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 a tight integration between Symfony components and the Symfony full-stack framework", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/framework-bundle/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/framework-bundle" + }, + { + "name": "symfony/http-foundation", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "f94b3e7b7dafd40e666f0c9ff2084133bae41e81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f94b3e7b7dafd40e666f0c9ff2084133bae41e81", + "reference": "f94b3e7b7dafd40e666f0c9ff2084133bae41e81", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "^1.1" + }, + "conflict": { + "doctrine/dbal": "<3.6", + "symfony/cache": "<6.4.12|>=7.0,<7.1.5" + }, + "require-dev": { + "doctrine/dbal": "^3.6|^4", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^6.4.12|^7.1.5|^8.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/rate-limiter": "^6.4|^7.0|^8.0" + }, + "time": "2026-03-06T13:15:18+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "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": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/http-foundation" + }, + { + "name": "symfony/http-kernel", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "3b3fcf386c809be990c922e10e4c620d6367cab1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/3b3fcf386c809be990c922e10e4c620d6367cab1", + "reference": "3b3fcf386c809be990c922e10e4c620d6367cab1", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^7.3|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/browser-kit": "<6.4", + "symfony/cache": "<6.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/doctrine-bridge": "<6.4", + "symfony/flex": "<2.10", + "symfony/form": "<6.4", + "symfony/http-client": "<6.4", + "symfony/http-client-contracts": "<2.5", + "symfony/mailer": "<6.4", + "symfony/messenger": "<6.4", + "symfony/translation": "<6.4", + "symfony/translation-contracts": "<2.5", + "symfony/twig-bridge": "<6.4", + "symfony/validator": "<6.4", + "symfony/var-dumper": "<6.4", + "twig/twig": "<3.12" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^6.4|^7.0|^8.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/css-selector": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4.1|^7.0.1|^8.0", + "symfony/dom-crawler": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/http-client-contracts": "^2.5|^3", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/property-access": "^7.1|^8.0", + "symfony/routing": "^6.4|^7.0|^8.0", + "symfony/serializer": "^7.1|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/translation": "^6.4|^7.0|^8.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/uid": "^6.4|^7.0|^8.0", + "symfony/validator": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0", + "symfony/var-exporter": "^6.4|^7.0|^8.0", + "twig/twig": "^3.12" + }, + "time": "2026-03-06T16:33:18+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "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 a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/http-kernel" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.33.0", + "version_normalized": "1.33.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "time": "2025-06-27T09:58:17+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-intl-grapheme" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.33.0", + "version_normalized": "1.33.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "3833d7255cc303546435cb650316bff708a1c75c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "time": "2024-09-09T11:45:10+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "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 for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-intl-normalizer" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.33.0", + "version_normalized": "1.33.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2024-12-23T08:48:59+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-mbstring" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.33.0", + "version_normalized": "1.33.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5", + "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "time": "2025-07-08T02:45:35+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + }, + "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.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-php83" + }, + { + "name": "symfony/polyfill-php84", + "version": "v1.33.0", + "version_normalized": "1.33.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php84.git", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/d8ced4d875142b6a7426000426b8abc631d6b191", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "time": "2025-06-24T13:30:11+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php84\\": "" + }, + "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.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php84/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-php84" + }, + { + "name": "symfony/polyfill-php85", + "version": "v1.33.0", + "version_normalized": "1.33.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php85.git", + "reference": "d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91", + "reference": "d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "time": "2025-06-23T16:12:55+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php85\\": "" + }, + "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.5+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php85/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-php85" + }, + { + "name": "symfony/property-access", + "version": "v7.4.4", + "version_normalized": "7.4.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-access.git", + "reference": "fa49bf1ca8fce1ba0e2dba4e4658554cfb9364b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-access/zipball/fa49bf1ca8fce1ba0e2dba4e4658554cfb9364b1", + "reference": "fa49bf1ca8fce1ba0e2dba4e4658554cfb9364b1", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/property-info": "^6.4.32|~7.3.10|^7.4.4|^8.0.4" + }, + "require-dev": { + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/var-exporter": "^6.4.1|^7.0.1|^8.0" + }, + "time": "2026-01-05T08:47:25+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyAccess\\": "" + }, + "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 functions to read and write from/to an object or array using a simple string notation", + "homepage": "https://symfony.com", + "keywords": [ + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property-path", + "reflection" + ], + "support": { + "source": "https://github.com/symfony/property-access/tree/v7.4.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/property-access" + }, + { + "name": "symfony/property-info", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-info.git", + "reference": "02501d75fd834345da3ecdd8e3200ced39e370f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-info/zipball/02501d75fd834345da3ecdd8e3200ced39e370f8", + "reference": "02501d75fd834345da3ecdd8e3200ced39e370f8", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/string": "^6.4|^7.0|^8.0", + "symfony/type-info": "^7.4.7|^8.0.7" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<5.2|>=7", + "phpdocumentor/type-resolver": "<1.5.1", + "symfony/cache": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/serializer": "<6.4" + }, + "require-dev": { + "phpdocumentor/reflection-docblock": "^5.2|^6.0", + "phpstan/phpdoc-parser": "^1.0|^2.0", + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4|^7.0|^8.0" + }, + "time": "2026-03-04T15:53:26+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyInfo\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kévin Dunglas", + "email": "dunglas@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Extracts information about PHP class' properties using metadata of popular sources", + "homepage": "https://symfony.com", + "keywords": [ + "doctrine", + "phpdoc", + "property", + "symfony", + "type", + "validator" + ], + "support": { + "source": "https://github.com/symfony/property-info/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/property-info" + }, + { + "name": "symfony/routing", + "version": "v7.4.6", + "version_normalized": "7.4.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "238d749c56b804b31a9bf3e26519d93b65a60938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/238d749c56b804b31a9bf3e26519d93b65a60938", + "reference": "238d749c56b804b31a9bf3e26519d93b65a60938", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/config": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/yaml": "<6.4" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "time": "2026-02-25T16:50:00+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "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": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/routing" + }, + { + "name": "symfony/runtime", + "version": "v7.4.1", + "version_normalized": "7.4.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/runtime.git", + "reference": "876f902a6cb6b26c003de244188c06b2ba1c172f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/runtime/zipball/876f902a6cb6b26c003de244188c06b2ba1c172f", + "reference": "876f902a6cb6b26c003de244188c06b2ba1c172f", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0|^2.0", + "php": ">=8.2" + }, + "conflict": { + "symfony/dotenv": "<6.4" + }, + "require-dev": { + "composer/composer": "^2.6", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/dotenv": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0" + }, + "time": "2025-12-05T14:04:53+00:00", + "type": "composer-plugin", + "extra": { + "class": "Symfony\\Component\\Runtime\\Internal\\ComposerPlugin" + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Runtime\\": "", + "Symfony\\Runtime\\Symfony\\Component\\": "Internal/" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Enables decoupling PHP applications from global state", + "homepage": "https://symfony.com", + "keywords": [ + "runtime" + ], + "support": { + "source": "https://github.com/symfony/runtime/tree/v7.4.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/runtime" + }, + { + "name": "symfony/serializer", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/serializer.git", + "reference": "bd395bbc6fabd136a48e1a6f91b09f88b5050b0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/serializer/zipball/bd395bbc6fabd136a48e1a6f91b09f88b5050b0b", + "reference": "bd395bbc6fabd136a48e1a6f91b09f88b5050b0b", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php84": "^1.30" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<5.2|>=7", + "phpdocumentor/type-resolver": "<1.5.1", + "symfony/dependency-injection": "<6.4", + "symfony/property-access": "<6.4", + "symfony/property-info": "<6.4", + "symfony/type-info": "<7.2.5", + "symfony/uid": "<6.4", + "symfony/validator": "<6.4", + "symfony/yaml": "<6.4" + }, + "require-dev": { + "phpdocumentor/reflection-docblock": "^5.2|^6.0", + "phpstan/phpdoc-parser": "^1.0|^2.0", + "seld/jsonlint": "^1.10", + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^7.2|^8.0", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/filesystem": "^6.4|^7.0|^8.0", + "symfony/form": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/type-info": "^7.2.5|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", + "symfony/validator": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0", + "symfony/var-exporter": "^6.4|^7.0|^8.0", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "time": "2026-03-06T13:15:18+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Serializer\\": "" + }, + "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": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/serializer/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/serializer" + }, + { + "name": "symfony/service-contracts", + "version": "v3.6.1", + "version_normalized": "3.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "time": "2025-07-15T11:30:57+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "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": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/service-contracts" + }, + { + "name": "symfony/stopwatch", + "version": "v7.4.0", + "version_normalized": "7.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "8a24af0a2e8a872fb745047180649b8418303084" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/8a24af0a2e8a872fb745047180649b8418303084", + "reference": "8a24af0a2e8a872fb745047180649b8418303084", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/service-contracts": "^2.5|^3" + }, + "time": "2025-08-04T07:05:15+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "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 a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v7.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/stopwatch" + }, + { + "name": "symfony/string", + "version": "v7.4.6", + "version_normalized": "7.4.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "9f209231affa85aa930a5e46e6eb03381424b30b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/9f209231affa85aa930a5e46e6eb03381424b30b", + "reference": "9f209231affa85aa930a5e46e6eb03381424b30b", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.33", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/emoji": "^7.1|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/intl": "^6.4|^7.0|^8.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0|^8.0" + }, + "time": "2026-02-09T09:33:46+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/string" + }, + { + "name": "symfony/translation-contracts", + "version": "v3.6.1", + "version_normalized": "3.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "65a8bc82080447fae78373aa10f8d13b38338977" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/65a8bc82080447fae78373aa10f8d13b38338977", + "reference": "65a8bc82080447fae78373aa10f8d13b38338977", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "time": "2025-07-15T13:41:35+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "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": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.6.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/translation-contracts" + }, + { + "name": "symfony/type-info", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/type-info.git", + "reference": "31f1e40cbf7851c7354281c90eb1b352c4cb8269" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/type-info/zipball/31f1e40cbf7851c7354281c90eb1b352c4cb8269", + "reference": "31f1e40cbf7851c7354281c90eb1b352c4cb8269", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "phpstan/phpdoc-parser": "<1.30" + }, + "require-dev": { + "phpstan/phpdoc-parser": "^1.30|^2.0" + }, + "time": "2026-03-04T12:49:16+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\TypeInfo\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mathias Arlaud", + "email": "mathias.arlaud@gmail.com" + }, + { + "name": "Baptiste LEDUC", + "email": "baptiste.leduc@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Extracts PHP types information.", + "homepage": "https://symfony.com", + "keywords": [ + "PHPStan", + "phpdoc", + "symfony", + "type" + ], + "support": { + "source": "https://github.com/symfony/type-info/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/type-info" + }, + { + "name": "symfony/validator", + "version": "v7.4.7", + "version_normalized": "7.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/validator.git", + "reference": "3a1a460a9f8c5e5611e15c52c4baa5a62fa3c203" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/validator/zipball/3a1a460a9f8c5e5611e15c52c4baa5a62fa3c203", + "reference": "3a1a460a9f8c5e5611e15c52c4baa5a62fa3c203", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php83": "^1.27", + "symfony/translation-contracts": "^2.5|^3" + }, + "conflict": { + "doctrine/lexer": "<1.1", + "symfony/dependency-injection": "<6.4", + "symfony/doctrine-bridge": "<7.0", + "symfony/expression-language": "<6.4", + "symfony/http-kernel": "<6.4", + "symfony/intl": "<6.4", + "symfony/property-info": "<6.4", + "symfony/translation": "<6.4.3|>=7.0,<7.0.3", + "symfony/var-exporter": "<6.4.25|>=7.0,<7.3.3", + "symfony/yaml": "<6.4" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10|^3|^4", + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/intl": "^6.4|^7.0|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/string": "^6.4|^7.0|^8.0", + "symfony/translation": "^6.4.3|^7.0.3|^8.0", + "symfony/type-info": "^7.1.8", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "time": "2026-03-06T11:10:17+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Validator\\": "" + }, + "exclude-from-classmap": [ + "/Tests/", + "/Resources/bin/" + ] + }, + "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 tools to validate values", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/validator/tree/v7.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/validator" + }, + { + "name": "symfony/var-dumper", + "version": "v7.4.6", + "version_normalized": "7.4.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "045321c440ac18347b136c63d2e9bf28a2dc0291" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/045321c440ac18347b136c63d2e9bf28a2dc0291", + "reference": "045321c440ac18347b136c63d2e9bf28a2dc0291", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/console": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", + "twig/twig": "^3.12" + }, + "time": "2026-02-15T10:53:20+00:00", + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/var-dumper" + }, + { + "name": "symfony/var-exporter", + "version": "v7.4.0", + "version_normalized": "7.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "03a60f169c79a28513a78c967316fbc8bf17816f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/03a60f169c79a28513a78c967316fbc8bf17816f", + "reference": "03a60f169c79a28513a78c967316fbc8bf17816f", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "require-dev": { + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "time": "2025-09-11T10:15:23+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v7.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/var-exporter" + }, + { + "name": "symfony/yaml", + "version": "v7.4.6", + "version_normalized": "7.4.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "58751048de17bae71c5aa0d13cb19d79bca26391" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/58751048de17bae71c5aa0d13cb19d79bca26391", + "reference": "58751048de17bae71c5aa0d13cb19d79bca26391", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0" + }, + "time": "2026-02-09T09:33:46+00:00", + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "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": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v7.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/yaml" + }, + { + "name": "webmozart/assert", + "version": "2.1.6", + "version_normalized": "2.1.6.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "ff31ad6efc62e66e518fbab1cde3453d389bcdc8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/ff31ad6efc62e66e518fbab1cde3453d389bcdc8", + "reference": "ff31ad6efc62e66e518fbab1cde3453d389bcdc8", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-date": "*", + "ext-filter": "*", + "php": "^8.2" + }, + "suggest": { + "ext-intl": "", + "ext-simplexml": "", + "ext-spl": "" + }, + "time": "2026-02-27T10:28:38+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-feature/2-0": "2.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Woody Gilk", + "email": "woody.gilk@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/2.1.6" + }, + "install-path": "../webmozart/assert" + } + ], + "dev": true, + "dev-package-names": [] +} diff --git a/backend/vendor/composer/installed.php b/backend/vendor/composer/installed.php new file mode 100644 index 0000000..9fb1ba0 --- /dev/null +++ b/backend/vendor/composer/installed.php @@ -0,0 +1,659 @@ + array( + 'name' => 'symfony/skeleton', + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => null, + 'type' => 'project', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev' => true, + ), + 'versions' => array( + 'doctrine/collections' => array( + 'pretty_version' => '2.6.0', + 'version' => '2.6.0.0', + 'reference' => '7713da39d8e237f28411d6a616a3dce5e20d5de2', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/collections', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/dbal' => array( + 'pretty_version' => '4.4.3', + 'version' => '4.4.3.0', + 'reference' => '61e730f1658814821a85f2402c945f3883407dec', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/dbal', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/deprecations' => array( + 'pretty_version' => '1.1.6', + 'version' => '1.1.6.0', + 'reference' => 'd4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/deprecations', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/doctrine-bundle' => array( + 'pretty_version' => '2.18.2', + 'version' => '2.18.2.0', + 'reference' => '0ff098b29b8b3c68307c8987dcaed7fd829c6546', + 'type' => 'symfony-bundle', + 'install_path' => __DIR__ . '/../doctrine/doctrine-bundle', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/doctrine-migrations-bundle' => array( + 'pretty_version' => '3.7.0', + 'version' => '3.7.0.0', + 'reference' => '1e380c6dd8ac8488217f39cff6b77e367f1a644b', + 'type' => 'symfony-bundle', + 'install_path' => __DIR__ . '/../doctrine/doctrine-migrations-bundle', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/event-manager' => array( + 'pretty_version' => '2.1.1', + 'version' => '2.1.1.0', + 'reference' => 'dda33921b198841ca8dbad2eaa5d4d34769d18cf', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/event-manager', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/inflector' => array( + 'pretty_version' => '2.1.0', + 'version' => '2.1.0.0', + 'reference' => '6d6c96277ea252fc1304627204c3d5e6e15faa3b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/inflector', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/instantiator' => array( + 'pretty_version' => '2.0.0', + 'version' => '2.0.0.0', + 'reference' => 'c6222283fa3f4ac679f8b9ced9a4e23f163e80d0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/instantiator', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/lexer' => array( + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => '31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/lexer', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/migrations' => array( + 'pretty_version' => '3.9.6', + 'version' => '3.9.6.0', + 'reference' => 'ffd8355cdd8505fc650d9604f058bf62aedd80a1', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/migrations', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/orm' => array( + 'pretty_version' => '3.6.2', + 'version' => '3.6.2.0', + 'reference' => '4262eb495b4d2a53b45de1ac58881e0091f2970f', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/orm', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/persistence' => array( + 'pretty_version' => '4.1.1', + 'version' => '4.1.1.0', + 'reference' => 'b9c49ad3558bb77ef973f4e173f2e9c2eca9be09', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/persistence', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/sql-formatter' => array( + 'pretty_version' => '1.5.4', + 'version' => '1.5.4.0', + 'reference' => '9563949f5cd3bd12a17d12fb980528bc141c5806', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/sql-formatter', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'nelmio/cors-bundle' => array( + 'pretty_version' => '2.6.1', + 'version' => '2.6.1.0', + 'reference' => '3d80dbcd5d1eb5f8b20ed5199e1778d44c2e4d1c', + 'type' => 'symfony-bundle', + 'install_path' => __DIR__ . '/../nelmio/cors-bundle', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'phpdocumentor/reflection-common' => array( + 'pretty_version' => '2.2.0', + 'version' => '2.2.0.0', + 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpdocumentor/reflection-common', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'phpdocumentor/reflection-docblock' => array( + 'pretty_version' => '6.0.3', + 'version' => '6.0.3.0', + 'reference' => '7bae67520aa9f5ecc506d646810bd40d9da54582', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpdocumentor/reflection-docblock', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'phpdocumentor/type-resolver' => array( + 'pretty_version' => '2.0.0', + 'version' => '2.0.0.0', + 'reference' => '327a05bbee54120d4786a0dc67aad30226ad4cf9', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpdocumentor/type-resolver', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'phpstan/phpdoc-parser' => array( + 'pretty_version' => '2.3.2', + 'version' => '2.3.2.0', + 'reference' => 'a004701b11273a26cd7955a61d67a7f1e525a45a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/cache' => array( + 'pretty_version' => '3.0.0', + 'version' => '3.0.0.0', + 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/cache', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/cache-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '2.0|3.0', + ), + ), + 'psr/container' => array( + 'pretty_version' => '2.0.2', + 'version' => '2.0.2.0', + 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/container', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/container-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.1|2.0', + ), + ), + 'psr/event-dispatcher' => array( + 'pretty_version' => '1.0.0', + 'version' => '1.0.0.0', + 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/event-dispatcher', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/event-dispatcher-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), + 'psr/log' => array( + 'pretty_version' => '3.0.2', + 'version' => '3.0.2.0', + 'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/log', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/log-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0|2.0|3.0', + ), + ), + 'psr/simple-cache-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0|2.0|3.0', + ), + ), + 'symfony/cache' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => '665522ec357540e66c294c08583b40ee576574f0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/cache', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/cache-contracts' => array( + 'pretty_version' => 'v3.6.0', + 'version' => '3.6.0.0', + 'reference' => '5d68a57d66910405e5c0b63d6f0af941e66fc868', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/cache-contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/cache-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.1|2.0|3.0', + ), + ), + 'symfony/config' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => '6c17162555bfb58957a55bb0e43e00035b6ae3d5', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/config', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/console' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => 'e1e6770440fb9c9b0cf725f81d1361ad1835329d', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/console', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/dependency-injection' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => '0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/dependency-injection', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/deprecation-contracts' => array( + 'pretty_version' => 'v3.6.0', + 'version' => '3.6.0.0', + 'reference' => '63afe740e99a13ba87ec199bb07bbdee937a5b62', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/doctrine-bridge' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => '4fc5e2dd41be3c0b6321e0373072782edeff45ed', + 'type' => 'symfony-bridge', + 'install_path' => __DIR__ . '/../symfony/doctrine-bridge', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/dotenv' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => '7e5529a0b02395cb4614cdf507495a4cef3115c5', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/dotenv', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/error-handler' => array( + 'pretty_version' => 'v7.4.4', + 'version' => '7.4.4.0', + 'reference' => '8da531f364ddfee53e36092a7eebbbd0b775f6b8', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/error-handler', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/event-dispatcher' => array( + 'pretty_version' => 'v7.4.4', + 'version' => '7.4.4.0', + 'reference' => 'dc2c0eba1af673e736bb851d747d266108aea746', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/event-dispatcher', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/event-dispatcher-contracts' => array( + 'pretty_version' => 'v3.6.0', + 'version' => '3.6.0.0', + 'reference' => '59eb412e93815df44f05f342958efa9f46b1e586', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/event-dispatcher-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '2.0|3.0', + ), + ), + 'symfony/filesystem' => array( + 'pretty_version' => 'v7.4.6', + 'version' => '7.4.6.0', + 'reference' => '3ebc794fa5315e59fd122561623c2e2e4280538e', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/filesystem', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/finder' => array( + 'pretty_version' => 'v7.4.6', + 'version' => '7.4.6.0', + 'reference' => '8655bf1076b7a3a346cb11413ffdabff50c7ffcf', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/finder', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/flex' => array( + 'pretty_version' => 'v2.10.0', + 'version' => '2.10.0.0', + 'reference' => '9cd384775973eabbf6e8b05784dda279fc67c28d', + 'type' => 'composer-plugin', + 'install_path' => __DIR__ . '/../symfony/flex', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/framework-bundle' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => 'c94bc78c85d76af67918404a95d44940f66a7c2f', + 'type' => 'symfony-bundle', + 'install_path' => __DIR__ . '/../symfony/framework-bundle', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/http-foundation' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => 'f94b3e7b7dafd40e666f0c9ff2084133bae41e81', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/http-foundation', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/http-kernel' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => '3b3fcf386c809be990c922e10e4c620d6367cab1', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/http-kernel', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-ctype' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '*', + ), + ), + 'symfony/polyfill-iconv' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '*', + ), + ), + 'symfony/polyfill-intl-grapheme' => array( + 'pretty_version' => 'v1.33.0', + 'version' => '1.33.0.0', + 'reference' => '380872130d3a5dd3ace2f4010d95125fde5d5c70', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-intl-normalizer' => array( + 'pretty_version' => 'v1.33.0', + 'version' => '1.33.0.0', + 'reference' => '3833d7255cc303546435cb650316bff708a1c75c', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-mbstring' => array( + 'pretty_version' => 'v1.33.0', + 'version' => '1.33.0.0', + 'reference' => '6d857f4d76bd4b343eac26d6b539585d2bc56493', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-php72' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '*', + ), + ), + 'symfony/polyfill-php73' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '*', + ), + ), + 'symfony/polyfill-php74' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '*', + ), + ), + 'symfony/polyfill-php80' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '*', + ), + ), + 'symfony/polyfill-php81' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '*', + ), + ), + 'symfony/polyfill-php82' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '*', + ), + ), + 'symfony/polyfill-php83' => array( + 'pretty_version' => 'v1.33.0', + 'version' => '1.33.0.0', + 'reference' => '17f6f9a6b1735c0f163024d959f700cfbc5155e5', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-php83', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-php84' => array( + 'pretty_version' => 'v1.33.0', + 'version' => '1.33.0.0', + 'reference' => 'd8ced4d875142b6a7426000426b8abc631d6b191', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-php84', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-php85' => array( + 'pretty_version' => 'v1.33.0', + 'version' => '1.33.0.0', + 'reference' => 'd4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-php85', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/property-access' => array( + 'pretty_version' => 'v7.4.4', + 'version' => '7.4.4.0', + 'reference' => 'fa49bf1ca8fce1ba0e2dba4e4658554cfb9364b1', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/property-access', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/property-info' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => '02501d75fd834345da3ecdd8e3200ced39e370f8', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/property-info', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/routing' => array( + 'pretty_version' => 'v7.4.6', + 'version' => '7.4.6.0', + 'reference' => '238d749c56b804b31a9bf3e26519d93b65a60938', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/routing', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/runtime' => array( + 'pretty_version' => 'v7.4.1', + 'version' => '7.4.1.0', + 'reference' => '876f902a6cb6b26c003de244188c06b2ba1c172f', + 'type' => 'composer-plugin', + 'install_path' => __DIR__ . '/../symfony/runtime', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/serializer' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => 'bd395bbc6fabd136a48e1a6f91b09f88b5050b0b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/serializer', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/service-contracts' => array( + 'pretty_version' => 'v3.6.1', + 'version' => '3.6.1.0', + 'reference' => '45112560a3ba2d715666a509a0bc9521d10b6c43', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/service-contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/service-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.1|2.0|3.0', + ), + ), + 'symfony/skeleton' => array( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => null, + 'type' => 'project', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/stopwatch' => array( + 'pretty_version' => 'v7.4.0', + 'version' => '7.4.0.0', + 'reference' => '8a24af0a2e8a872fb745047180649b8418303084', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/stopwatch', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/string' => array( + 'pretty_version' => 'v7.4.6', + 'version' => '7.4.6.0', + 'reference' => '9f209231affa85aa930a5e46e6eb03381424b30b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/string', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/translation-contracts' => array( + 'pretty_version' => 'v3.6.1', + 'version' => '3.6.1.0', + 'reference' => '65a8bc82080447fae78373aa10f8d13b38338977', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/translation-contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/type-info' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => '31f1e40cbf7851c7354281c90eb1b352c4cb8269', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/type-info', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/validator' => array( + 'pretty_version' => 'v7.4.7', + 'version' => '7.4.7.0', + 'reference' => '3a1a460a9f8c5e5611e15c52c4baa5a62fa3c203', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/validator', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/var-dumper' => array( + 'pretty_version' => 'v7.4.6', + 'version' => '7.4.6.0', + 'reference' => '045321c440ac18347b136c63d2e9bf28a2dc0291', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/var-dumper', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/var-exporter' => array( + 'pretty_version' => 'v7.4.0', + 'version' => '7.4.0.0', + 'reference' => '03a60f169c79a28513a78c967316fbc8bf17816f', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/var-exporter', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/yaml' => array( + 'pretty_version' => 'v7.4.6', + 'version' => '7.4.6.0', + 'reference' => '58751048de17bae71c5aa0d13cb19d79bca26391', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/yaml', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'webmozart/assert' => array( + 'pretty_version' => '2.1.6', + 'version' => '2.1.6.0', + 'reference' => 'ff31ad6efc62e66e518fbab1cde3453d389bcdc8', + 'type' => 'library', + 'install_path' => __DIR__ . '/../webmozart/assert', + 'aliases' => array(), + 'dev_requirement' => false, + ), + ), +); diff --git a/backend/vendor/composer/platform_check.php b/backend/vendor/composer/platform_check.php new file mode 100644 index 0000000..14bf88d --- /dev/null +++ b/backend/vendor/composer/platform_check.php @@ -0,0 +1,25 @@ += 80200)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 8.2.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + throw new \RuntimeException( + 'Composer detected issues in your platform: ' . implode(' ', $issues) + ); +} diff --git a/backend/vendor/doctrine/collections/CONTRIBUTING.md b/backend/vendor/doctrine/collections/CONTRIBUTING.md new file mode 100644 index 0000000..7a0a8c9 --- /dev/null +++ b/backend/vendor/doctrine/collections/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# Contribute to Doctrine + +Thank you for contributing to Doctrine! + +Before we can merge your Pull-Request here are some guidelines that you need to follow. +These guidelines exist not to annoy you, but to keep the code base clean, +unified and future proof. + +## Coding Standard + +We use the [Doctrine Coding Standard](https://github.com/doctrine/coding-standard). + +## Unit-Tests + +Please try to add a test for your pull-request. + +* If you want to contribute new functionality add unit- or functional tests + depending on the scope of the feature. + +You can run the unit-tests by calling ``vendor/bin/phpunit`` from the root of the project. +It will run all the project tests. + +In order to do that, you will need a fresh copy of doctrine/collections, and you +will have to run a composer installation in the project: + +```sh +git clone git@github.com:doctrine/collections.git +cd collections +curl -sS https://getcomposer.org/installer | php -- +./composer.phar install +``` + +## Github Actions + +We automatically run your pull request through Github Actions against supported +PHP versions. If you break the tests, we cannot merge your code, so please make +sure that your code is working before opening up a Pull-Request. + +## Getting merged + +Please allow us time to review your pull requests. We will give our best to review +everything as fast as possible, but cannot always live up to our own expectations. + +Thank you very much again for your contribution! diff --git a/backend/vendor/doctrine/collections/LICENSE b/backend/vendor/doctrine/collections/LICENSE new file mode 100644 index 0000000..5e781fc --- /dev/null +++ b/backend/vendor/doctrine/collections/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2013 Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/backend/vendor/doctrine/collections/README.md b/backend/vendor/doctrine/collections/README.md new file mode 100644 index 0000000..048fb61 --- /dev/null +++ b/backend/vendor/doctrine/collections/README.md @@ -0,0 +1,6 @@ +# Doctrine Collections + +[![Build Status](https://github.com/doctrine/collections/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/collections/actions) +[![Code Coverage](https://codecov.io/gh/doctrine/collections/branch/2.0.x/graph/badge.svg)](https://codecov.io/gh/doctrine/collections/branch/2.0.x) + +Collections Abstraction library diff --git a/backend/vendor/doctrine/collections/UPGRADE.md b/backend/vendor/doctrine/collections/UPGRADE.md new file mode 100644 index 0000000..a44ce40 --- /dev/null +++ b/backend/vendor/doctrine/collections/UPGRADE.md @@ -0,0 +1,151 @@ +Note about upgrading: Doctrine uses static and runtime mechanisms to raise +awareness about deprecated code. + +- Use of `@deprecated` docblock that is detected by IDEs (like PHPStorm) or + Static Analysis tools (like Psalm, phpstan) +- Use of our low-overhead runtime deprecation API, details: + https://github.com/doctrine/deprecations/ + +# Upgrade to 2.6 + +When extending `Doctrine\Common\Collections\AbstractLazyCollection`, the +backing collection initialized in `doInitialize()` must implement +`Doctrine\Common\Collections\Selectable`. Initializing with a collection that +does not implement `Selectable` is deprecated and will throw an exception in 3.0. + +Also, implementing `ReadableCollection` without implementing `Selectable` +deprecated and will be an error in 3.0. + +# Upgrade to 2.5 + +Extending the following classes is deprecated and will no longer be possible in 3.0: + +- `Doctrine\Common\Collections\Criteria` +- `Doctrine\Common\Collections\Expr\ClosureExpressionVisitor` +- `Doctrine\Common\Collections\Expr\Comparison` +- `Doctrine\Common\Collections\Expr\CompositeExpression` +- `Doctrine\Common\Collections\Expr\Value` +- `Doctrine\Common\Collections\ExpressionBuilder` + +# Upgrade to 2.4 + +## Deprecated accessing fields through other means than raw field access when using the criteria filtering API (the `Doctrine\Common\Collections\Selectable` interface) + +Starting with the next major version, the only way to access data when using the criteria filtering +API is through direct (reflection-based) access at properties directly, also bypassing property hooks. +This is to ensure consistency with how the ORM/ODM works. See https://github.com/doctrine/collections/pull/472 for +the full motivation. + +To opt-in to the new behaviour, pass `true` for the `$accessRawFieldValues` parameter when creating a `Criteria` +object through either `Doctrine\Common\Collections\Criteria::create()` or when calling the `Doctrine\Common\Collections\Criteria` constructor. + +Be aware that switching to reflection-based field access may prevent ORM or ODM proxy objects +becoming initialized, since their triggers (like calling public methods) are bypassed. This might lead +to `null` values being read from such objects, which may cause wrong filtering or sorting results. +To avoid this issue, use native lazy objects added in PHP 8.4. +See https://github.com/doctrine/collections/issues/487 for more details on when this may happen. + +# Upgrade to 2.2 + +## Deprecated string representation of sort order + +Criteria orderings direction is now represented by the +`Doctrine\Common\Collection\Order` enum. + +As a consequence: + +- `Criteria::ASC` and `Criteria::DESC` are deprecated in favor of + `Order::Ascending` and `Order::Descending`, respectively. +- `Criteria::getOrderings()` is deprecated in favor of `Criteria::orderings()`, + which returns `array`. +- `Criteria::orderBy()` accepts `array`, but passing + anything other than `array` is deprecated. + +# Upgrade to 2.0 + +## BC breaking changes + +Native parameter types were added. Native return types will be added in 3.0.x +As a consequence, some signatures were changed and will have to be adjusted in sub-classes. + +Note that in order to keep compatibility with both 1.x and 2.x versions, +extending code would have to omit the added parameter types. +This would only work in PHP 7.2+ which is the first version featuring +[parameter widening](https://wiki.php.net/rfc/parameter-no-type-variance). +It is also recommended to add return types according to the tables below + +You can find a list of major changes to public API below. + +### Doctrine\Common\Collections\Collection + +| 1.0.x | 3.0.x | +|---------------------------------:|:-------------------------------------------------| +| `add($element)` | `add(mixed $element): void` | +| `clear()` | `clear(): void` | +| `contains($element)` | `contains(mixed $element): bool` | +| `isEmpty()` | `isEmpty(): bool` | +| `removeElement($element)` | `removeElement(mixed $element): bool` | +| `containsKey($key)` | `containsKey(string\|int $key): bool` | +| `get()` | `get(string\|int $key): mixed` | +| `getKeys()` | `getKeys(): array` | +| `getValues()` | `getValues(): array` | +| `set($key, $value)` | `set(string\|int $key, $value): void` | +| `toArray()` | `toArray(): array` | +| `first()` | `first(): mixed` | +| `last()` | `last(): mixed` | +| `key()` | `key(): int\|string\|null` | +| `current()` | `current(): mixed` | +| `next()` | `next(): mixed` | +| `exists(Closure $p)` | `exists(Closure $p): bool` | +| `filter(Closure $p)` | `filter(Closure $p): self` | +| `forAll(Closure $p)` | `forAll(Closure $p): bool` | +| `map(Closure $func)` | `map(Closure $func): self` | +| `partition(Closure $p)` | `partition(Closure $p): array` | +| `indexOf($element)` | `indexOf(mixed $element): int\|string\|false` | +| `slice($offset, $length = null)` | `slice(int $offset, ?int $length = null): array` | +| `count()` | `count(): int` | +| `getIterator()` | `getIterator(): \Traversable` | +| `offsetSet($offset, $value)` | `offsetSet(mixed $offset, mixed $value): void` | +| `offsetUnset($offset)` | `offsetUnset(mixed $offset): void` | +| `offsetExists($offset)` | `offsetExists(mixed $offset): bool` | + +### Doctrine\Common\Collections\AbstractLazyCollection + +| 1.0.x | 3.0.x | +|------------------:|:------------------------| +| `isInitialized()` | `isInitialized(): bool` | +| `initialize()` | `initialize(): void` | +| `doInitialize()` | `doInitialize(): void` | + +### Doctrine\Common\Collections\ArrayCollection + +| 1.0.x | 3.0.x | +|------------------------------:|:--------------------------------------| +| `createFrom(array $elements)` | `createFrom(array $elements): static` | +| `__toString()` | `__toString(): string` | + +### Doctrine\Common\Collections\Criteria + +| 1.0.x | 3.0.x | +|------------------------------------------:|:--------------------------------------------| +| `where(Expression $expression): self` | `where(Expression $expression): static` | +| `andWhere(Expression $expression): self` | `andWhere(Expression $expression): static` | +| `orWhere(Expression $expression): self` | `orWhere(Expression $expression): static` | +| `orderBy(array $orderings): self` | `orderBy(array $orderings): static` | +| `setFirstResult(?int $firstResult): self` | `setFirstResult(?int $firstResult): static` | +| `setMaxResult(?int $maxResults): self` | `setMaxResults(?int $maxResults): static` | + +### Doctrine\Common\Collections\Selectable + +| 1.0.x | 3.0.x | +|-------------------------------:|:-------------------------------------------| +| `matching(Criteria $criteria)` | `matching(Criteria $criteria): Collection` | + +# Upgrade to 1.7 + +## Deprecated null first result + +Passing null as `$firstResult` to +`Doctrine\Common\Collections\Criteria::__construct()` and to +`Doctrine\Common\Collections\Criteria::setFirstResult()` is deprecated. +Use `0` instead. diff --git a/backend/vendor/doctrine/collections/composer.json b/backend/vendor/doctrine/collections/composer.json new file mode 100644 index 0000000..c408731 --- /dev/null +++ b/backend/vendor/doctrine/collections/composer.json @@ -0,0 +1,63 @@ +{ + "name": "doctrine/collections", + "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", + "license": "MIT", + "type": "library", + "keywords": [ + "php", + "collections", + "array", + "iterators" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "homepage": "https://www.doctrine-project.org/projects/collections.html", + "require": { + "php": "^8.1", + "doctrine/deprecations": "^1", + "symfony/polyfill-php84": "^1.30" + }, + "require-dev": { + "ext-json": "*", + "doctrine/coding-standard": "^14", + "phpstan/phpstan": "^2.1.30", + "phpstan/phpstan-phpunit": "^2.0.7", + "phpunit/phpunit": "^10.5.58 || ^11.5.42 || ^12.4" + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Collections\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Doctrine\\Tests\\Common\\Collections\\": "tests" + } + }, + "config": { + "allow-plugins": { + "composer/package-versions-deprecated": true, + "dealerdirect/phpcodesniffer-composer-installer": true + } + } +} diff --git a/backend/vendor/doctrine/collections/docs/composer.json b/backend/vendor/doctrine/collections/docs/composer.json new file mode 100644 index 0000000..c5a4e14 --- /dev/null +++ b/backend/vendor/doctrine/collections/docs/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "doctrine/docs-builder": "^1.0" + } +} diff --git a/backend/vendor/doctrine/collections/docs/en/derived-collections.rst b/backend/vendor/doctrine/collections/docs/en/derived-collections.rst new file mode 100644 index 0000000..03d9da5 --- /dev/null +++ b/backend/vendor/doctrine/collections/docs/en/derived-collections.rst @@ -0,0 +1,26 @@ +Derived Collections +=================== + +You can create custom collection classes by extending the +``Doctrine\Common\Collections\ArrayCollection`` class. If the +``__construct`` semantics are different from the default ``ArrayCollection`` +you can override the ``createFrom`` method: + +.. code-block:: php + final class DerivedArrayCollection extends ArrayCollection + { + /** @var \stdClass */ + private $foo; + + public function __construct(\stdClass $foo, array $elements = []) + { + $this->foo = $foo; + + parent::__construct($elements); + } + + protected function createFrom(array $elements) : self + { + return new static($this->foo, $elements); + } + } diff --git a/backend/vendor/doctrine/collections/docs/en/expression-builder.rst b/backend/vendor/doctrine/collections/docs/en/expression-builder.rst new file mode 100644 index 0000000..043b89c --- /dev/null +++ b/backend/vendor/doctrine/collections/docs/en/expression-builder.rst @@ -0,0 +1,195 @@ +Expression Builder +================== + +The Expression Builder is a convenient fluent interface for +building expressions to be used with the ``Doctrine\Common\Collections\Criteria`` +class: + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $criteria = new Criteria(); + $criteria->where($expressionBuilder->eq('name', 'jwage')); + $criteria->orWhere($expressionBuilder->eq('name', 'romanb')); + + $collection->matching($criteria); + +The ``ExpressionBuilder`` has the following API: + +andX +---- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->andX( + $expressionBuilder->eq('foo', 1), + $expressionBuilder->eq('bar', 1) + ); + + $collection->matching(new Criteria($expression)); + +orX +--- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->orX( + $expressionBuilder->eq('foo', 1), + $expressionBuilder->eq('bar', 1) + ); + + $collection->matching(new Criteria($expression)); + +not +--- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->not( + $expressionBuilder->eq('foo', 1) + ); + + $collection->matching(new Criteria($expression)); + +eq +--- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->eq('foo', 1); + + $collection->matching(new Criteria($expression)); + +gt +--- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->gt('foo', 1); + + $collection->matching(new Criteria($expression)); + +lt +--- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->lt('foo', 1); + + $collection->matching(new Criteria($expression)); + +gte +--- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->gte('foo', 1); + + $collection->matching(new Criteria($expression)); + +lte +--- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->lte('foo', 1); + + $collection->matching(new Criteria($expression)); + +neq +--- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->neq('foo', 1); + + $collection->matching(new Criteria($expression)); + +isNull +------ + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->isNull('foo'); + + $collection->matching(new Criteria($expression)); + +isNotNull +--------- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->isNotNull('foo'); + + $collection->matching(new Criteria($expression)); + +in +--- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->in('foo', ['value1', 'value2']); + + $collection->matching(new Criteria($expression)); + +notIn +----- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->notIn('foo', ['value1', 'value2']); + + $collection->matching(new Criteria($expression)); + +contains +-------- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->contains('foo', 'value1'); + + $collection->matching(new Criteria($expression)); + +memberOf +-------- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->memberOf('foo', ['value1', 'value2']); + + $collection->matching(new Criteria($expression)); + +startsWith +---------- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->startsWith('foo', 'hello'); + + $collection->matching(new Criteria($expression)); + +endsWith +-------- + +.. code-block:: php + $expressionBuilder = Criteria::expr(); + + $expression = $expressionBuilder->endsWith('foo', 'world'); + + $collection->matching(new Criteria($expression)); diff --git a/backend/vendor/doctrine/collections/docs/en/expressions.rst b/backend/vendor/doctrine/collections/docs/en/expressions.rst new file mode 100644 index 0000000..5587bfb --- /dev/null +++ b/backend/vendor/doctrine/collections/docs/en/expressions.rst @@ -0,0 +1,117 @@ +Expressions +=========== + +The ``Doctrine\Common\Collections\Expr\Comparison`` class +can be used to create comparison expressions to be used with the +``Doctrine\Common\Collections\Criteria`` class. It has the +following operator constants: + +- ``Comparison::EQ`` +- ``Comparison::NEQ`` +- ``Comparison::LT`` +- ``Comparison::LTE`` +- ``Comparison::GT`` +- ``Comparison::GTE`` +- ``Comparison::IS`` +- ``Comparison::IN`` +- ``Comparison::NIN`` +- ``Comparison::CONTAINS`` +- ``Comparison::MEMBER_OF`` +- ``Comparison::STARTS_WITH`` +- ``Comparison::ENDS_WITH`` + +The ``Doctrine\Common\Collections\Expr\CompositeExpression`` class +can be used to create composite expressions to be used with the +``Doctrine\Common\Collections\Criteria`` class. It has the +following operator constants: + +- ``CompositeExpression::TYPE_AND`` +- ``CompositeExpression::TYPE_OR`` +- ``CompositeExpression::TYPE_NOT`` + +When using the ``TYPE_OR`` and ``TYPE_AND`` operators the +``CompositeExpression`` accepts multiple expressions as parameter +but only one expression can be provided when using the ``NOT`` operator. + +The ``Doctrine\Common\Collections\Criteria`` class has the following +API to be used with expressions: + +where +----- + +Sets the where expression to evaluate when this Criteria is searched for. + +.. code-block:: php + $expr = new Comparison('key', Comparison::EQ, 'value'); + + $criteria->where($expr); + +andWhere +-------- + +Appends the where expression to evaluate when this Criteria is searched for +using an AND with previous expression. + +.. code-block:: php + $expr = new Comparison('key', Comparison::EQ, 'value'); + + $criteria->andWhere($expr); + +orWhere +------- + +Appends the where expression to evaluate when this Criteria is searched for +using an OR with previous expression. + +.. code-block:: php + $expr1 = new Comparison('key', Comparison::EQ, 'value1'); + $expr2 = new Comparison('key', Comparison::EQ, 'value2'); + + $criteria->where($expr1); + $criteria->orWhere($expr2); + +orderBy +------- + +Sets the ordering of the result of this Criteria. + +.. code-block:: php + use Doctrine\Common\Collections\Order; + + $criteria->orderBy(['name' => Order::Ascending]); + +setFirstResult +-------------- + +Set the number of first result that this Criteria should return. + +.. code-block:: php + $criteria->setFirstResult(0); + +getFirstResult +-------------- + +Gets the current first result option of this Criteria. + +.. code-block:: php + $criteria->setFirstResult(10); + + echo $criteria->getFirstResult(); // 10 + +setMaxResults +------------- + +Sets the max results that this Criteria should return. + +.. code-block:: php + $criteria->setMaxResults(20); + +getMaxResults +------------- + +Gets the current max results option of this Criteria. + +.. code-block:: php + $criteria->setMaxResults(20); + + echo $criteria->getMaxResults(); // 20 diff --git a/backend/vendor/doctrine/collections/docs/en/index.rst b/backend/vendor/doctrine/collections/docs/en/index.rst new file mode 100644 index 0000000..1b405e6 --- /dev/null +++ b/backend/vendor/doctrine/collections/docs/en/index.rst @@ -0,0 +1,386 @@ +Getting Started +=============== + +Introduction +------------ + +Doctrine Collections is a library that contains classes for working with +arrays of data. Here is an example using the simple +``Doctrine\Common\Collections\ArrayCollection`` class: + +.. code-block:: php + filter(static fn ($element): bool => $element > 1); // [2, 3] + +Collection Methods +------------------ + +Doctrine Collections provides an interface named ``Doctrine\Common\Collections\Collection`` +that resembles the nature of a regular PHP array. That is, +it is essentially an **ordered map** that can also be used +like a list. + +A Collection has an internal iterator just like a PHP array. In addition, +a Collection can be iterated with external iterators, which is preferable. +To use an external iterator simply use the foreach language construct to +iterate over the collection, which calls ``getIterator()`` internally, or +explicitly retrieve an iterator though ``getIterator()`` which can then be +used to iterate over the collection. You can not rely on the internal iterator +of the collection being at a certain position unless you explicitly positioned it before. + +Methods that do not alter the collection or have template types +appearing in invariant or contravariant positions are not directly +defined in ``Doctrine\Common\Collections\Collection``, but are inherited +from the ``Doctrine\Common\Collections\ReadableCollection`` interface. + +The methods available on the interface are: + +add +^^^ + +Adds an element at the end of the collection. + +.. code-block:: php + $collection->add('test'); + +clear +^^^^^ + +Clears the collection, removing all elements. + +.. code-block:: php + $collection->clear(); + +contains +^^^^^^^^ + +Checks whether an element is contained in the collection. This is an O(n) operation, where n is the size of the collection. + +.. code-block:: php + $collection = new Collection(['test']); + + $contains = $collection->contains('test'); // true + +containsKey +^^^^^^^^^^^ + +Checks whether the collection contains an element with the specified key/index. + +.. code-block:: php + $collection = new Collection(['test' => true]); + + $contains = $collection->containsKey('test'); // true + +current +^^^^^^^ + +Gets the element of the collection at the current iterator position. + +.. code-block:: php + $collection = new Collection(['first', 'second', 'third']); + + $current = $collection->current(); // first + +get +^^^ + +Gets the element at the specified key/index. + +.. code-block:: php + $collection = new Collection([ + 'key' => 'value', + ]); + + $value = $collection->get('key'); // value + +getKeys +^^^^^^^ + +Gets all keys/indices of the collection. + +.. code-block:: php + $collection = new Collection(['a', 'b', 'c']); + + $keys = $collection->getKeys(); // [0, 1, 2] + +getValues +^^^^^^^^^ + +Gets all values of the collection. + +.. code-block:: php + $collection = new Collection([ + 'key1' => 'value1', + 'key2' => 'value2', + 'key3' => 'value3', + ]); + + $values = $collection->getValues(); // ['value1', 'value2', 'value3'] + +isEmpty +^^^^^^^ + +Checks whether the collection is empty (contains no elements). + +.. code-block:: php + $collection = new Collection(['a', 'b', 'c']); + + $isEmpty = $collection->isEmpty(); // false + +first +^^^^^ + +Sets the internal iterator to the first element in the collection and returns this element. + +.. code-block:: php + $collection = new Collection(['first', 'second', 'third']); + + $first = $collection->first(); // first + +exists +^^^^^^ + +Tests for the existence of an element that satisfies the given predicate. + +.. code-block:: php + $collection = new Collection(['first', 'second', 'third']); + + $exists = $collection->exists(static fn ($key, $value): bool => $value === 'first'); // true + +findFirst +^^^^^^^^^ + +Returns the first element of this collection that satisfies the given predicate. + +.. code-block:: php + $collection = new Collection([1, 2, 3, 2, 1]); + + $one = $collection->findFirst(static fn (int $key, int $value): bool => $value > 2 && $key > 1); // 3 + +filter +^^^^^^ + +Returns all the elements of this collection for which your callback function returns `true`. +The order and keys of the elements are preserved. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $filteredCollection = $collection->filter(static fn ($element): bool => $element > 1); // [2, 3] + +forAll +^^^^^^ + +Tests whether the given predicate holds for all elements of this collection. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $forAll = $collection->forAll(static fn ($key, $value): bool => $value > 1); // false + +indexOf +^^^^^^^ + +Gets the index/key of a given element. The comparison of two elements is strict, that means not only the value but also the type must match. For objects this means reference equality. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $indexOf = $collection->indexOf(3); // 2 + +key +^^^ + +Gets the key/index of the element at the current iterator position. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $collection->next(); + + $key = $collection->key(); // 1 + +last +^^^^ + +Sets the internal iterator to the last element in the collection and returns this element. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $last = $collection->last(); // 3 + +map +^^^ + +Applies the given function to each element in the collection and returns a new collection with the elements returned by the function. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $mappedCollection = $collection->map(static fn (int $value): int => $value + 1); // [2, 3, 4] + +reduce +^^^^^^ + +Applies iteratively the given function to each element in the collection, so as to reduce the collection to a single value. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $reduce = $collection->reduce(static fn (int $accumulator, int $value): int => $accumulator + $value, 0); // 6 + +next +^^^^ + +Moves the internal iterator position to the next element and returns this element. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $next = $collection->next(); // 2 + +partition +^^^^^^^^^ + +Partitions this collection in two collections according to a predicate. Keys are preserved in the resulting collections. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $mappedCollection = $collection->partition(static fn ($key, $value): bool => $value > 1); // [[2, 3], [1]] + +remove +^^^^^^ + +Removes the element at the specified index from the collection. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $collection->remove(0); // [2, 3] + +removeElement +^^^^^^^^^^^^^ + +Removes the specified element from the collection, if it is found. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $collection->removeElement(3); // [1, 2] + +set +^^^ + +Sets an element in the collection at the specified key/index. + +.. code-block:: php + $collection = new ArrayCollection(); + + $collection->set('name', 'jwage'); + +slice +^^^^^ + +Extracts a slice of $length elements starting at position $offset from the Collection. If $length is null it returns all elements from $offset to the end of the Collection. Keys have to be preserved by this method. Calling this method will only return the selected slice and NOT change the elements contained in the collection slice is called on. + +.. code-block:: php + $collection = new ArrayCollection([0, 1, 2, 3, 4, 5]); + + $slice = $collection->slice(1, 2); // [1, 2] + +toArray +^^^^^^^ + +Gets a native PHP array representation of the collection. + +.. code-block:: php + $collection = new ArrayCollection([0, 1, 2, 3, 4, 5]); + + $array = $collection->toArray(); // [0, 1, 2, 3, 4, 5] + +Selectable Methods +------------------ + +Some Doctrine Collections, like ``Doctrine\Common\Collections\ArrayCollection``, +implement an interface named ``Doctrine\Common\Collections\Selectable`` +that offers the usage of a powerful expressions API, where conditions +can be applied to a collection to get a result with matching elements +only. + +matching +^^^^^^^^ + +Selects all elements from a selectable that match the expression and +returns a new collection containing these elements and preserved keys. + +.. code-block:: php + use Doctrine\Common\Collections\Criteria; + use Doctrine\Common\Collections\Expr\Comparison; + + $collection = new ArrayCollection([ + 'wage' => [ + 'name' => 'jwage', + ], + 'roman' => [ + 'name' => 'romanb', + ], + ]); + + $expr = new Comparison('name', '=', 'jwage'); + + $criteria = new Criteria(); + + $criteria->where($expr); + + $matchingCollection = $collection->matching($criteria); // [ 'wage' => [ 'name' => 'jwage' ]] + +You can read more about expressions :ref:`here `. + +.. note:: + + Currently, expressions use strict comparison for the ``EQ`` (equal) and ``NEQ`` (not equal) + checks. That makes them behave more naturally as long as only scalar values are involved. + For example, ``'04'`` and ``4`` are *not* equal. + + However, this can lead to surprising results when working with objects, especially objects + representing values. ``DateTime`` and ``DateTimeImmutable`` are two widespread examples for + objects that would typically rather be compared by their value than by identity. + + Comparative operators like ``GT`` or ``LTE`` as well as ``IN`` and ``NIN`` do + not exhibit this behavior. + + Also, multi-dimensional sorting based on non-scalar values will only consider the + next sort criteria for *identical* matches, which may not give the expected results + when objects come into play. Keep this in mind, for example, when sorting by fields that + contain ``DateTime`` or ``DateTimeImmutable`` objects. + +.. note:: + + For collections that contain objects, the field name given to ``Comparison`` will + lead to various access methods being tried in sequence. This behavior is deprecated + as of v2.4.0. Set the ``$accessRawFieldValues`` parameter in the ``Criteria`` constructor + to ``true`` to opt-in to the new behaviour of using direct (reflection-based) field access only. + This will be the only option in the next major version. + + Unless you opt in, refer to the ``ClosureExpressionVisitor::getObjectFieldValue()`` method + for the exact order of accessors tried. Roughly speaking, for a field named ``field``, + the following things will be tried in order: + + 1. ``getField()``, ``isField()`` and ``field()`` as getter methods + 2. When the object implements a ``__call`` magic method, invoke it + by calling ``getField()`` + 3. When the object implements ``ArrayAccess``, use that to access the + ``field`` offset + 4. When the object contains a ``::$field`` public property that is not + ``null``, access it directly + 5. Convert snake-case field names to camel case and retry the ``get``, ``is`` + and prefixless accessor methods + 6. Direct access to ``::$field``, which must be a public property, as a + last resort. diff --git a/backend/vendor/doctrine/collections/docs/en/lazy-collections.rst b/backend/vendor/doctrine/collections/docs/en/lazy-collections.rst new file mode 100644 index 0000000..b9cafb6 --- /dev/null +++ b/backend/vendor/doctrine/collections/docs/en/lazy-collections.rst @@ -0,0 +1,26 @@ +Lazy Collections +================ + +To create a lazy collection you can extend the +``Doctrine\Common\Collections\AbstractLazyCollection`` class +and define the ``doInitialize`` method. Here is an example where +we lazily query the database for a collection of user records: + +.. code-block:: php + use Doctrine\DBAL\Connection; + + class UsersLazyCollection extends AbstractLazyCollection + { + /** @var Connection */ + private $connection; + + public function __construct(Connection $connection) + { + $this->connection = $connection; + } + + protected function doInitialize() : void + { + $this->collection = $this->connection->fetchAll('SELECT * FROM users'); + } + } diff --git a/backend/vendor/doctrine/collections/docs/en/serialization.rst b/backend/vendor/doctrine/collections/docs/en/serialization.rst new file mode 100644 index 0000000..be53d6e --- /dev/null +++ b/backend/vendor/doctrine/collections/docs/en/serialization.rst @@ -0,0 +1,29 @@ +Serialization +============= + +Using (un-)serialize() on a collection is not a supported use-case +and may break when changes on the collection's internals happen in the future. +If a collection needs to be serialized, use ``toArray()`` and reconstruct +the collection manually. + +.. code-block:: php + + $collection = new ArrayCollection([1, 2, 3]); + $serialized = serialize($collection->toArray()); + +A reconstruction is also necessary when the collection contains objects with +infinite recursion of dependencies like in this ``json_serialize()`` example: + +.. code-block:: php + + $foo = new Foo(); + $bar = new Bar(); + + $foo->setBar($bar); + $bar->setFoo($foo); + + $collection = new ArrayCollection([$foo]); + $json = json_serialize($collection->toArray()); // recursion detected + +Serializer libraries can be used to create the serialization-output to prevent +errors. diff --git a/backend/vendor/doctrine/collections/docs/en/sidebar.rst b/backend/vendor/doctrine/collections/docs/en/sidebar.rst new file mode 100644 index 0000000..ebfb11c --- /dev/null +++ b/backend/vendor/doctrine/collections/docs/en/sidebar.rst @@ -0,0 +1,11 @@ +:orphan: + +.. toctree:: + :depth: 3 + + index + expressions + expression-builder + derived-collections + lazy-collections + serialization diff --git a/backend/vendor/doctrine/collections/src/AbstractLazyCollection.php b/backend/vendor/doctrine/collections/src/AbstractLazyCollection.php new file mode 100644 index 0000000..3614b80 --- /dev/null +++ b/backend/vendor/doctrine/collections/src/AbstractLazyCollection.php @@ -0,0 +1,442 @@ + + * @template-implements Selectable + */ +abstract class AbstractLazyCollection implements Collection, Selectable +{ + /** + * The backed collection to use + * + * @phpstan-var Collection|null + * @var Collection|null + */ + protected Collection|null $collection; + + protected bool $initialized = false; + + /** + * {@inheritDoc} + * + * @return int + */ + #[ReturnTypeWillChange] + public function count() + { + $this->initialize(); + + return $this->collection->count(); + } + + /** + * {@inheritDoc} + */ + public function add(mixed $element) + { + $this->initialize(); + + $this->collection->add($element); + } + + /** + * {@inheritDoc} + */ + public function clear() + { + $this->initialize(); + $this->collection->clear(); + } + + /** + * {@inheritDoc} + */ + public function contains(mixed $element) + { + $this->initialize(); + + return $this->collection->contains($element); + } + + /** + * {@inheritDoc} + */ + public function isEmpty() + { + $this->initialize(); + + return $this->collection->isEmpty(); + } + + /** + * {@inheritDoc} + */ + public function remove(string|int $key) + { + $this->initialize(); + + return $this->collection->remove($key); + } + + /** + * {@inheritDoc} + */ + public function removeElement(mixed $element) + { + $this->initialize(); + + return $this->collection->removeElement($element); + } + + /** + * {@inheritDoc} + */ + public function containsKey(string|int $key) + { + $this->initialize(); + + return $this->collection->containsKey($key); + } + + /** + * {@inheritDoc} + */ + public function get(string|int $key) + { + $this->initialize(); + + return $this->collection->get($key); + } + + /** + * {@inheritDoc} + */ + public function getKeys() + { + $this->initialize(); + + return $this->collection->getKeys(); + } + + /** + * {@inheritDoc} + */ + public function getValues() + { + $this->initialize(); + + return $this->collection->getValues(); + } + + /** + * {@inheritDoc} + */ + public function set(string|int $key, mixed $value) + { + $this->initialize(); + $this->collection->set($key, $value); + } + + /** + * {@inheritDoc} + */ + public function toArray() + { + $this->initialize(); + + return $this->collection->toArray(); + } + + /** + * {@inheritDoc} + */ + public function first() + { + $this->initialize(); + + return $this->collection->first(); + } + + /** + * {@inheritDoc} + */ + public function last() + { + $this->initialize(); + + return $this->collection->last(); + } + + /** + * {@inheritDoc} + */ + public function key() + { + $this->initialize(); + + return $this->collection->key(); + } + + /** + * {@inheritDoc} + */ + public function current() + { + $this->initialize(); + + return $this->collection->current(); + } + + /** + * {@inheritDoc} + */ + public function next() + { + $this->initialize(); + + return $this->collection->next(); + } + + /** + * {@inheritDoc} + */ + public function exists(Closure $p) + { + $this->initialize(); + + return $this->collection->exists($p); + } + + /** + * {@inheritDoc} + */ + public function findFirst(Closure $p) + { + $this->initialize(); + + return $this->collection->findFirst($p); + } + + /** + * {@inheritDoc} + */ + public function filter(Closure $p) + { + $this->initialize(); + + return $this->collection->filter($p); + } + + /** + * {@inheritDoc} + */ + public function forAll(Closure $p) + { + $this->initialize(); + + return $this->collection->forAll($p); + } + + /** + * {@inheritDoc} + */ + public function map(Closure $func) + { + $this->initialize(); + + return $this->collection->map($func); + } + + /** + * {@inheritDoc} + */ + public function reduce(Closure $func, mixed $initial = null) + { + $this->initialize(); + + return $this->collection->reduce($func, $initial); + } + + /** + * {@inheritDoc} + */ + public function partition(Closure $p) + { + $this->initialize(); + + return $this->collection->partition($p); + } + + /** + * {@inheritDoc} + * + * @template TMaybeContained + */ + public function indexOf(mixed $element) + { + $this->initialize(); + + return $this->collection->indexOf($element); + } + + /** + * {@inheritDoc} + */ + public function slice(int $offset, int|null $length = null) + { + $this->initialize(); + + return $this->collection->slice($offset, $length); + } + + /** + * {@inheritDoc} + * + * @return Traversable + * @phpstan-return Traversable + */ + #[ReturnTypeWillChange] + public function getIterator() + { + $this->initialize(); + + return $this->collection->getIterator(); + } + + /** + * {@inheritDoc} + * + * @param TKey $offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists(mixed $offset) + { + $this->initialize(); + + return $this->collection->offsetExists($offset); + } + + /** + * {@inheritDoc} + * + * @param TKey $offset + * + * @return T|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + $this->initialize(); + + return $this->collection->offsetGet($offset); + } + + /** + * {@inheritDoc} + * + * @param TKey|null $offset + * @param T $value + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet(mixed $offset, mixed $value) + { + $this->initialize(); + $this->collection->offsetSet($offset, $value); + } + + /** + * @param TKey $offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset(mixed $offset) + { + $this->initialize(); + $this->collection->offsetUnset($offset); + } + + /** + * Is the lazy collection already initialized? + * + * @return bool + * + * @phpstan-assert-if-true Collection $this->collection + */ + public function isInitialized() + { + return $this->initialized; + } + + /** + * Initialize the collection + * + * @return void + * + * @phpstan-assert Collection $this->collection + */ + protected function initialize() + { + if ($this->initialized) { + return; + } + + $this->doInitialize(); + $this->initialized = true; + + if ($this->collection === null) { + throw new LogicException('You must initialize the collection property in the doInitialize() method.'); + } + + if ($this->collection instanceof Selectable) { + return; + } + + Deprecation::trigger( + 'doctrine/collections', + 'https://github.com/doctrine/collections/pull/518', + 'Initializing %s with a collection that does not implement %s is deprecated and will throw an exception in 3.0.', + self::class, + Selectable::class, + ); + } + + /** + * Do the initialization logic + * + * @return void + */ + abstract protected function doInitialize(); + + /** + * {@inheritDoc} + */ + public function matching(Criteria $criteria) + { + $this->initialize(); + + if (! $this->collection instanceof Selectable) { + throw new LogicException('The backed collection must implement Selectable to use matching().'); + } + + return $this->collection->matching($criteria); + } +} diff --git a/backend/vendor/doctrine/collections/src/ArrayCollection.php b/backend/vendor/doctrine/collections/src/ArrayCollection.php new file mode 100644 index 0000000..3141930 --- /dev/null +++ b/backend/vendor/doctrine/collections/src/ArrayCollection.php @@ -0,0 +1,485 @@ + + * @template-implements Selectable + * @phpstan-consistent-constructor + */ +class ArrayCollection implements Collection, Selectable, Stringable +{ + /** + * An array containing the entries of this collection. + * + * @phpstan-var array + * @var mixed[] + */ + private array $elements = []; + + /** + * Initializes a new ArrayCollection. + * + * @phpstan-param array $elements + */ + public function __construct(array $elements = []) + { + $this->elements = $elements; + } + + /** + * {@inheritDoc} + */ + public function toArray() + { + return $this->elements; + } + + /** + * {@inheritDoc} + */ + public function first() + { + return reset($this->elements); + } + + /** + * Creates a new instance from the specified elements. + * + * This method is provided for derived classes to specify how a new + * instance should be created when constructor semantics have changed. + * + * @param array $elements Elements. + * @phpstan-param array $elements + * + * @return static + * @phpstan-return static + * + * @phpstan-template K of array-key + * @phpstan-template V + */ + protected function createFrom(array $elements) + { + return new static($elements); + } + + /** + * {@inheritDoc} + */ + public function last() + { + return end($this->elements); + } + + /** + * {@inheritDoc} + */ + public function key() + { + return key($this->elements); + } + + /** + * {@inheritDoc} + */ + public function next() + { + return next($this->elements); + } + + /** + * {@inheritDoc} + */ + public function current() + { + return current($this->elements); + } + + /** + * {@inheritDoc} + */ + public function remove(string|int $key) + { + if (! isset($this->elements[$key]) && ! array_key_exists($key, $this->elements)) { + return null; + } + + $removed = $this->elements[$key]; + unset($this->elements[$key]); + + return $removed; + } + + /** + * {@inheritDoc} + */ + public function removeElement(mixed $element) + { + $key = array_search($element, $this->elements, true); + + if ($key === false) { + return false; + } + + unset($this->elements[$key]); + + return true; + } + + /** + * Required by interface ArrayAccess. + * + * @param TKey $offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists(mixed $offset) + { + return $this->containsKey($offset); + } + + /** + * Required by interface ArrayAccess. + * + * @param TKey $offset + * + * @return T|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset) + { + return $this->get($offset); + } + + /** + * Required by interface ArrayAccess. + * + * @param TKey|null $offset + * @param T $value + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet(mixed $offset, mixed $value) + { + if ($offset === null) { + $this->add($value); + + return; + } + + /** @phpstan-var TKey $offset */ + $this->set($offset, $value); + } + + /** + * Required by interface ArrayAccess. + * + * @param TKey $offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset(mixed $offset) + { + $this->remove($offset); + } + + /** + * {@inheritDoc} + */ + public function containsKey(string|int $key) + { + return isset($this->elements[$key]) || array_key_exists($key, $this->elements); + } + + /** + * {@inheritDoc} + */ + public function contains(mixed $element) + { + return in_array($element, $this->elements, true); + } + + /** + * {@inheritDoc} + */ + public function exists(Closure $p) + { + return array_any( + $this->elements, + static fn (mixed $element, mixed $key): bool => (bool) $p($key, $element), + ); + } + + /** + * {@inheritDoc} + * + * @phpstan-param TMaybeContained $element + * + * @return int|string|false + * @phpstan-return (TMaybeContained is T ? TKey|false : false) + * + * @template TMaybeContained + */ + public function indexOf($element) + { + return array_search($element, $this->elements, true); + } + + /** + * {@inheritDoc} + */ + public function get(string|int $key) + { + return $this->elements[$key] ?? null; + } + + /** + * {@inheritDoc} + */ + public function getKeys() + { + return array_keys($this->elements); + } + + /** + * {@inheritDoc} + */ + public function getValues() + { + return array_values($this->elements); + } + + /** + * {@inheritDoc} + * + * @return int<0, max> + */ + #[ReturnTypeWillChange] + public function count() + { + return count($this->elements); + } + + /** + * {@inheritDoc} + */ + public function set(string|int $key, mixed $value) + { + $this->elements[$key] = $value; + } + + /** + * {@inheritDoc} + * + * This breaks assumptions about the template type, but it would + * be a backwards-incompatible change to remove this method + */ + public function add(mixed $element) + { + $this->elements[] = $element; + } + + /** + * {@inheritDoc} + */ + public function isEmpty() + { + return empty($this->elements); + } + + /** + * {@inheritDoc} + * + * @return Traversable + * @phpstan-return Traversable + */ + #[ReturnTypeWillChange] + public function getIterator() + { + return new ArrayIterator($this->elements); + } + + /** + * {@inheritDoc} + * + * @phpstan-param Closure(T):U $func + * + * @return static + * @phpstan-return static + * + * @phpstan-template U + */ + public function map(Closure $func) + { + return $this->createFrom(array_map($func, $this->elements)); + } + + /** + * {@inheritDoc} + */ + public function reduce(Closure $func, $initial = null) + { + return array_reduce($this->elements, $func, $initial); + } + + /** + * {@inheritDoc} + * + * @phpstan-param Closure(T, TKey):bool $p + * + * @return static + * @phpstan-return static + */ + public function filter(Closure $p) + { + return $this->createFrom(array_filter($this->elements, $p, ARRAY_FILTER_USE_BOTH)); + } + + /** + * {@inheritDoc} + */ + public function findFirst(Closure $p) + { + return array_find( + $this->elements, + static fn (mixed $element, mixed $key): bool => (bool) $p($key, $element), + ); + } + + /** + * {@inheritDoc} + */ + public function forAll(Closure $p) + { + return array_all( + $this->elements, + static fn (mixed $element, mixed $key): bool => (bool) $p($key, $element), + ); + } + + /** + * {@inheritDoc} + */ + public function partition(Closure $p) + { + $matches = $noMatches = []; + + foreach ($this->elements as $key => $element) { + if ($p($key, $element)) { + $matches[$key] = $element; + } else { + $noMatches[$key] = $element; + } + } + + return [$this->createFrom($matches), $this->createFrom($noMatches)]; + } + + /** + * Returns a string representation of this object. + * {@inheritDoc} + * + * @return string + */ + #[ReturnTypeWillChange] + public function __toString() + { + return self::class . '@' . spl_object_hash($this); + } + + /** + * {@inheritDoc} + */ + public function clear() + { + $this->elements = []; + } + + /** + * {@inheritDoc} + */ + public function slice(int $offset, int|null $length = null) + { + return array_slice($this->elements, $offset, $length, true); + } + + /** @phpstan-return Collection&Selectable */ + public function matching(Criteria $criteria) + { + $accessRawFieldValues = $criteria->isRawFieldValueAccessEnabled(); + + $expr = $criteria->getWhereExpression(); + $filtered = $this->elements; + + if ($expr) { + $visitor = new ClosureExpressionVisitor($accessRawFieldValues); + $filter = $visitor->dispatch($expr); + $filtered = array_filter($filtered, $filter); + } + + $orderings = $criteria->orderings(); + + if ($orderings) { + $next = null; + foreach (array_reverse($orderings) as $field => $ordering) { + $next = ClosureExpressionVisitor::sortByField($field, $ordering === Order::Descending ? -1 : 1, $next, $accessRawFieldValues); + } + + uasort($filtered, $next); + } + + $offset = $criteria->getFirstResult(); + $length = $criteria->getMaxResults(); + + if ($offset !== null && $offset > 0 || $length !== null && $length > 0) { + $filtered = array_slice($filtered, (int) $offset, $length, true); + } + + return $this->createFrom($filtered); + } +} diff --git a/backend/vendor/doctrine/collections/src/Collection.php b/backend/vendor/doctrine/collections/src/Collection.php new file mode 100644 index 0000000..265d9d8 --- /dev/null +++ b/backend/vendor/doctrine/collections/src/Collection.php @@ -0,0 +1,117 @@ +ordered map that can also be used + * like a list. + * + * A Collection has an internal iterator just like a PHP array. In addition, + * a Collection can be iterated with external iterators, which is preferable. + * To use an external iterator simply use the foreach language construct to + * iterate over the collection (which calls {@link getIterator()} internally) or + * explicitly retrieve an iterator though {@link getIterator()} which can then be + * used to iterate over the collection. + * You can not rely on the internal iterator of the collection being at a certain + * position unless you explicitly positioned it before. Prefer iteration with + * external iterators. + * + * @phpstan-template TKey of array-key + * @phpstan-template T + * @template-extends ReadableCollection + * @template-extends ArrayAccess + */ +interface Collection extends ReadableCollection, ArrayAccess +{ + /** + * Adds an element at the end of the collection. + * + * @param mixed $element The element to add. + * @phpstan-param T $element + * + * @return void we will require a native return type declaration in 3.0 + */ + public function add(mixed $element); + + /** + * Clears the collection, removing all elements. + * + * @return void + */ + public function clear(); + + /** + * Removes the element at the specified index from the collection. + * + * @param string|int $key The key/index of the element to remove. + * @phpstan-param TKey $key + * + * @return mixed The removed element or NULL, if the collection did not contain the element. + * @phpstan-return T|null + */ + public function remove(string|int $key); + + /** + * Removes the specified element from the collection, if it is found. + * + * @param mixed $element The element to remove. + * @phpstan-param T $element + * + * @return bool TRUE if this collection contained the specified element, FALSE otherwise. + */ + public function removeElement(mixed $element); + + /** + * Sets an element in the collection at the specified key/index. + * + * @param string|int $key The key/index of the element to set. + * @param mixed $value The element to set. + * @phpstan-param TKey $key + * @phpstan-param T $value + * + * @return void + */ + public function set(string|int $key, mixed $value); + + /** + * {@inheritDoc} + * + * @phpstan-param Closure(T):U $func + * + * @return Collection + * @phpstan-return Collection + * + * @phpstan-template U + */ + public function map(Closure $func); + + /** + * {@inheritDoc} + * + * @phpstan-param Closure(T, TKey):bool $p + * + * @return Collection A collection with the results of the filter operation. + * @phpstan-return Collection + */ + public function filter(Closure $p); + + /** + * {@inheritDoc} + * + * @phpstan-param Closure(TKey, T):bool $p + * + * @return Collection[] An array with two elements. The first element contains the collection + * of elements where the predicate returned TRUE, the second element + * contains the collection of elements where the predicate returned FALSE. + * @phpstan-return array{0: Collection, 1: Collection} + */ + public function partition(Closure $p); +} diff --git a/backend/vendor/doctrine/collections/src/Criteria.php b/backend/vendor/doctrine/collections/src/Criteria.php new file mode 100644 index 0000000..499b748 --- /dev/null +++ b/backend/vendor/doctrine/collections/src/Criteria.php @@ -0,0 +1,308 @@ + */ + private array $orderings = []; + + private int|null $firstResult = null; + private int|null $maxResults = null; + + /** + * Creates an instance of the class. + * + * @return static + */ + public static function create(/* bool $accessRawFieldValues = false */): self + { + $accessRawFieldValues = 0 < func_num_args() ? func_get_arg(0) : false; + + return new static(firstResult: 0, accessRawFieldValues: $accessRawFieldValues); + } + + /** + * Returns the expression builder. + * + * @return ExpressionBuilder + */ + public static function expr() + { + if (self::$expressionBuilder === null) { + self::$expressionBuilder = new ExpressionBuilder(); + } + + return self::$expressionBuilder; + } + + /** + * Construct a new Criteria. + * + * @param int|null $firstResult + * @param array|null $orderings + */ + public function __construct( + private Expression|null $expression = null, + array|null $orderings = null, + int|Placeholder|null $firstResult = Placeholder::NotSpecified, + int|null $maxResults = null, + private bool $accessRawFieldValues = false, + ) { + if (! $accessRawFieldValues) { + Deprecation::trigger( + 'doctrine/collections', + 'https://github.com/doctrine/collections/pull/472', + 'Not enabling raw field value access for the Criteria matching API in %s is deprecated. Raw field access will be the only supported method in 3.0', + self::class, + ); + } + + if ($firstResult === null) { + Deprecation::trigger( + 'doctrine/collections', + 'https://github.com/doctrine/collections/pull/311', + 'Passing null as $firstResult to the constructor of %s is deprecated. Pass 0 instead or omit the argument.', + self::class, + ); + } + + if ($firstResult === Placeholder::NotSpecified) { + $firstResult = null; + } + + $this->setFirstResult($firstResult); + $this->setMaxResults($maxResults); + + if ($orderings === null) { + return; + } + + $this->orderBy($orderings); + } + + /** + * Sets the where expression to evaluate when this Criteria is searched for. + * + * @return $this + */ + public function where(Expression $expression) + { + $this->expression = $expression; + + return $this; + } + + /** + * Appends the where expression to evaluate when this Criteria is searched for + * using an AND with previous expression. + * + * @return $this + */ + public function andWhere(Expression $expression) + { + if ($this->expression === null) { + return $this->where($expression); + } + + $this->expression = new CompositeExpression( + CompositeExpression::TYPE_AND, + [$this->expression, $expression], + ); + + return $this; + } + + /** + * Appends the where expression to evaluate when this Criteria is searched for + * using an OR with previous expression. + * + * @return $this + */ + public function orWhere(Expression $expression) + { + if ($this->expression === null) { + return $this->where($expression); + } + + $this->expression = new CompositeExpression( + CompositeExpression::TYPE_OR, + [$this->expression, $expression], + ); + + return $this; + } + + /** + * Gets the expression attached to this Criteria. + * + * @return Expression|null + */ + public function getWhereExpression() + { + return $this->expression; + } + + /** + * Gets the current orderings of this Criteria. + * + * @deprecated use orderings() instead + * + * @return array + */ + public function getOrderings() + { + Deprecation::trigger( + 'doctrine/collections', + 'https://github.com/doctrine/collections/pull/389', + 'Calling %s() is deprecated. Use %s::orderings() instead.', + __METHOD__, + self::class, + ); + + return array_map( + static fn (Order $ordering): string => $ordering->value, + $this->orderings, + ); + } + + /** + * Gets the current orderings of this Criteria. + * + * @return array + */ + public function orderings(): array + { + return $this->orderings; + } + + /** + * Sets the ordering of the result of this Criteria. + * + * Keys are field and values are the order, being a valid Order enum case. + * + * @see Order::Ascending + * @see Order::Descending + * + * @param array $orderings + * + * @return $this + */ + public function orderBy(array $orderings) + { + $method = __METHOD__; + $this->orderings = array_map( + static function (string|Order $ordering) use ($method): Order { + if ($ordering instanceof Order) { + return $ordering; + } + + static $triggered = false; + + if (! $triggered) { + Deprecation::trigger( + 'doctrine/collections', + 'https://github.com/doctrine/collections/pull/389', + 'Passing non-Order enum values to %s() is deprecated. Pass Order enum values instead.', + $method, + ); + } + + $triggered = true; + + return strtoupper($ordering) === Order::Ascending->value ? Order::Ascending : Order::Descending; + }, + $orderings, + ); + + return $this; + } + + /** + * Gets the current first result option of this Criteria. + * + * @return int|null + */ + public function getFirstResult() + { + return $this->firstResult; + } + + /** + * Set the number of first result that this Criteria should return. + * + * @param int|null $firstResult The value to set. + * + * @return $this + */ + public function setFirstResult(int|null $firstResult) + { + if ($firstResult === null) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/collections', + 'https://github.com/doctrine/collections/pull/311', + 'Passing null to %s() is deprecated, pass 0 instead.', + __METHOD__, + ); + } + + $this->firstResult = $firstResult; + + return $this; + } + + /** + * Gets maxResults. + * + * @return int|null + */ + public function getMaxResults() + { + return $this->maxResults; + } + + /** + * Sets maxResults. + * + * @param int|null $maxResults The value to set. + * + * @return $this + */ + public function setMaxResults(int|null $maxResults) + { + $this->maxResults = $maxResults; + + return $this; + } + + /** @internal */ + public function isRawFieldValueAccessEnabled(): bool + { + return $this->accessRawFieldValues; + } +} diff --git a/backend/vendor/doctrine/collections/src/Expr/ClosureExpressionVisitor.php b/backend/vendor/doctrine/collections/src/Expr/ClosureExpressionVisitor.php new file mode 100644 index 0000000..a397b4b --- /dev/null +++ b/backend/vendor/doctrine/collections/src/Expr/ClosureExpressionVisitor.php @@ -0,0 +1,272 @@ +$accessor(); + } + } + + if (preg_match('/^is[A-Z]+/', $field) === 1 && method_exists($object, $field)) { + return $object->$field(); + } + + // __call should be triggered for get. + $accessor = $accessors[0] . $field; + + if (method_exists($object, '__call')) { + return $object->$accessor(); + } + + if ($object instanceof ArrayAccess) { + return $object[$field]; + } + + if (isset($object->$field)) { + return $object->$field; + } + + // camelcase field name to support different variable naming conventions + $ccField = preg_replace_callback('/_(.?)/', static fn ($matches) => strtoupper((string) $matches[1]), $field); + + foreach ($accessors as $accessor) { + $accessor .= $ccField; + + if (method_exists($object, $accessor)) { + return $object->$accessor(); + } + } + + return $object->$field; + } + + private static function getNearestFieldValue(object $object, string $field): mixed + { + $reflectionClass = new ReflectionClass($object); + + while ($reflectionClass && ! $reflectionClass->hasProperty($field)) { + $reflectionClass = $reflectionClass->getParentClass(); + } + + if ($reflectionClass === false) { + throw new RuntimeException(sprintf('Field "%s" does not exist in class "%s"', $field, $object::class)); + } + + $property = $reflectionClass->getProperty($field); + + if (PHP_VERSION_ID >= 80400) { + return $property->getRawValue($object); + } + + return $property->getValue($object); + } + + /** + * Helper for sorting arrays of objects based on multiple fields + orientations. + * + * @return Closure + */ + public static function sortByField(string $name, int $orientation = 1, Closure|null $next = null, /* bool $accessRawFieldValues = false */) + { + $accessRawFieldValues = 4 <= func_num_args() ? func_get_arg(3) : false; + + if (! $accessRawFieldValues) { + Deprecation::trigger( + 'doctrine/collections', + 'https://github.com/doctrine/collections/pull/472', + 'Not enabling raw field value access for %s is deprecated. Raw field access will be the only supported method in 3.0', + __METHOD__, + ); + } + + if (! $next) { + $next = static fn (): int => 0; + } + + return static function ($a, $b) use ($name, $next, $orientation, $accessRawFieldValues): int { + $aValue = ClosureExpressionVisitor::getObjectFieldValue($a, $name, $accessRawFieldValues); + $bValue = ClosureExpressionVisitor::getObjectFieldValue($b, $name, $accessRawFieldValues); + + if ($aValue === $bValue) { + return $next($a, $b); + } + + return ($aValue > $bValue ? 1 : -1) * $orientation; + }; + } + + /** + * {@inheritDoc} + */ + public function walkComparison(Comparison $comparison) + { + $field = $comparison->getField(); + $value = $comparison->getValue()->getValue(); + + return match ($comparison->getOperator()) { + Comparison::EQ => fn ($object): bool => self::getObjectFieldValue($object, $field, $this->accessRawFieldValues) === $value, + Comparison::NEQ => fn ($object): bool => self::getObjectFieldValue($object, $field, $this->accessRawFieldValues) !== $value, + Comparison::LT => fn ($object): bool => self::getObjectFieldValue($object, $field, $this->accessRawFieldValues) < $value, + Comparison::LTE => fn ($object): bool => self::getObjectFieldValue($object, $field, $this->accessRawFieldValues) <= $value, + Comparison::GT => fn ($object): bool => self::getObjectFieldValue($object, $field, $this->accessRawFieldValues) > $value, + Comparison::GTE => fn ($object): bool => self::getObjectFieldValue($object, $field, $this->accessRawFieldValues) >= $value, + Comparison::IN => function ($object) use ($field, $value): bool { + $fieldValue = ClosureExpressionVisitor::getObjectFieldValue($object, $field, $this->accessRawFieldValues); + + return in_array($fieldValue, $value, is_scalar($fieldValue)); + }, + Comparison::NIN => function ($object) use ($field, $value): bool { + $fieldValue = ClosureExpressionVisitor::getObjectFieldValue($object, $field, $this->accessRawFieldValues); + + return ! in_array($fieldValue, $value, is_scalar($fieldValue)); + }, + Comparison::CONTAINS => fn ($object): bool => str_contains((string) self::getObjectFieldValue($object, $field, $this->accessRawFieldValues), (string) $value), + Comparison::MEMBER_OF => function ($object) use ($field, $value): bool { + $fieldValues = ClosureExpressionVisitor::getObjectFieldValue($object, $field, $this->accessRawFieldValues); + + if (! is_array($fieldValues)) { + $fieldValues = iterator_to_array($fieldValues); + } + + return in_array($value, $fieldValues, true); + }, + Comparison::STARTS_WITH => fn ($object): bool => str_starts_with((string) self::getObjectFieldValue($object, $field, $this->accessRawFieldValues), (string) $value), + Comparison::ENDS_WITH => fn ($object): bool => str_ends_with((string) self::getObjectFieldValue($object, $field, $this->accessRawFieldValues), (string) $value), + default => throw new RuntimeException('Unknown comparison operator: ' . $comparison->getOperator()), + }; + } + + /** + * {@inheritDoc} + */ + public function walkValue(Value $value) + { + return $value->getValue(); + } + + /** + * {@inheritDoc} + */ + public function walkCompositeExpression(CompositeExpression $expr) + { + $expressionList = []; + + foreach ($expr->getExpressionList() as $child) { + $expressionList[] = $this->dispatch($child); + } + + return match ($expr->getType()) { + CompositeExpression::TYPE_AND => $this->andExpressions($expressionList), + CompositeExpression::TYPE_OR => $this->orExpressions($expressionList), + CompositeExpression::TYPE_NOT => $this->notExpression($expressionList), + default => throw new RuntimeException('Unknown composite ' . $expr->getType()), + }; + } + + /** @param callable[] $expressions */ + private function andExpressions(array $expressions): Closure + { + return static fn ($object): bool => array_all( + $expressions, + static fn (callable $expression): bool => (bool) $expression($object), + ); + } + + /** @param callable[] $expressions */ + private function orExpressions(array $expressions): Closure + { + return static fn ($object): bool => array_any( + $expressions, + static fn (callable $expression): bool => (bool) $expression($object), + ); + } + + /** @param callable[] $expressions */ + private function notExpression(array $expressions): Closure + { + return static fn ($object) => ! $expressions[0]($object); + } +} diff --git a/backend/vendor/doctrine/collections/src/Expr/Comparison.php b/backend/vendor/doctrine/collections/src/Expr/Comparison.php new file mode 100644 index 0000000..0a2e4be --- /dev/null +++ b/backend/vendor/doctrine/collections/src/Expr/Comparison.php @@ -0,0 +1,64 @@ +'; + final public const LT = '<'; + final public const LTE = '<='; + final public const GT = '>'; + final public const GTE = '>='; + final public const IS = '='; // no difference with EQ + final public const IN = 'IN'; + final public const NIN = 'NIN'; + final public const CONTAINS = 'CONTAINS'; + final public const MEMBER_OF = 'MEMBER_OF'; + final public const STARTS_WITH = 'STARTS_WITH'; + final public const ENDS_WITH = 'ENDS_WITH'; + + private readonly Value $value; + + public function __construct(private readonly string $field, private readonly string $op, mixed $value) + { + if (! ($value instanceof Value)) { + $value = new Value($value); + } + + $this->value = $value; + } + + /** @return string */ + public function getField() + { + return $this->field; + } + + /** @return Value */ + public function getValue() + { + return $this->value; + } + + /** @return string */ + public function getOperator() + { + return $this->op; + } + + /** + * {@inheritDoc} + */ + public function visit(ExpressionVisitor $visitor) + { + return $visitor->walkComparison($this); + } +} diff --git a/backend/vendor/doctrine/collections/src/Expr/CompositeExpression.php b/backend/vendor/doctrine/collections/src/Expr/CompositeExpression.php new file mode 100644 index 0000000..d27c389 --- /dev/null +++ b/backend/vendor/doctrine/collections/src/Expr/CompositeExpression.php @@ -0,0 +1,72 @@ + */ + private array $expressions = []; + + /** + * @param Expression[] $expressions + * + * @throws RuntimeException + */ + public function __construct(private readonly string $type, array $expressions) + { + foreach ($expressions as $expr) { + if ($expr instanceof Value) { + throw new RuntimeException('Values are not supported expressions as children of and/or expressions.'); + } + + if (! ($expr instanceof Expression)) { + throw new RuntimeException('No expression given to CompositeExpression.'); + } + + $this->expressions[] = $expr; + } + + if ($type === self::TYPE_NOT && count($this->expressions) !== 1) { + throw new RuntimeException('Not expression only allows one expression as child.'); + } + } + + /** + * Returns the list of expressions nested in this composite. + * + * @return list + */ + public function getExpressionList() + { + return $this->expressions; + } + + /** @return string */ + public function getType() + { + return $this->type; + } + + /** + * {@inheritDoc} + */ + public function visit(ExpressionVisitor $visitor) + { + return $visitor->walkCompositeExpression($this); + } +} diff --git a/backend/vendor/doctrine/collections/src/Expr/Expression.php b/backend/vendor/doctrine/collections/src/Expr/Expression.php new file mode 100644 index 0000000..70ad45f --- /dev/null +++ b/backend/vendor/doctrine/collections/src/Expr/Expression.php @@ -0,0 +1,14 @@ +visit($this); + } +} diff --git a/backend/vendor/doctrine/collections/src/Expr/Value.php b/backend/vendor/doctrine/collections/src/Expr/Value.php new file mode 100644 index 0000000..c868d68 --- /dev/null +++ b/backend/vendor/doctrine/collections/src/Expr/Value.php @@ -0,0 +1,27 @@ +value; + } + + /** + * {@inheritDoc} + */ + public function visit(ExpressionVisitor $visitor) + { + return $visitor->walkValue($this); + } +} diff --git a/backend/vendor/doctrine/collections/src/ExpressionBuilder.php b/backend/vendor/doctrine/collections/src/ExpressionBuilder.php new file mode 100644 index 0000000..68b34ad --- /dev/null +++ b/backend/vendor/doctrine/collections/src/ExpressionBuilder.php @@ -0,0 +1,130 @@ + + */ +interface ReadableCollection extends Countable, IteratorAggregate +{ + /** + * Checks whether an element is contained in the collection. + * This is an O(n) operation, where n is the size of the collection. + * + * @param mixed $element The element to search for. + * @phpstan-param TMaybeContained $element + * + * @return bool TRUE if the collection contains the element, FALSE otherwise. + * @phpstan-return (TMaybeContained is T ? bool : false) + * + * @template TMaybeContained + */ + public function contains(mixed $element); + + /** + * Checks whether the collection is empty (contains no elements). + * + * @return bool TRUE if the collection is empty, FALSE otherwise. + */ + public function isEmpty(); + + /** + * Checks whether the collection contains an element with the specified key/index. + * + * @param string|int $key The key/index to check for. + * @phpstan-param TKey $key + * + * @return bool TRUE if the collection contains an element with the specified key/index, + * FALSE otherwise. + */ + public function containsKey(string|int $key); + + /** + * Gets the element at the specified key/index. + * + * @param string|int $key The key/index of the element to retrieve. + * @phpstan-param TKey $key + * + * @return mixed + * @phpstan-return T|null + */ + public function get(string|int $key); + + /** + * Gets all keys/indices of the collection. + * + * @return int[]|string[] The keys/indices of the collection, in the order of the corresponding + * elements in the collection. + * @phpstan-return list + */ + public function getKeys(); + + /** + * Gets all values of the collection. + * + * @return mixed[] The values of all elements in the collection, in the + * order they appear in the collection. + * @phpstan-return list + */ + public function getValues(); + + /** + * Gets a native PHP array representation of the collection. + * + * @return mixed[] + * @phpstan-return array + */ + public function toArray(); + + /** + * Sets the internal iterator to the first element in the collection and returns this element. + * + * @return mixed + * @phpstan-return T|false + */ + public function first(); + + /** + * Sets the internal iterator to the last element in the collection and returns this element. + * + * @return mixed + * @phpstan-return T|false + */ + public function last(); + + /** + * Gets the key/index of the element at the current iterator position. + * + * @return int|string|null + * @phpstan-return TKey|null + */ + public function key(); + + /** + * Gets the element of the collection at the current iterator position. + * + * @return mixed + * @phpstan-return T|false + */ + public function current(); + + /** + * Moves the internal iterator position to the next element and returns this element. + * + * @return mixed + * @phpstan-return T|false + */ + public function next(); + + /** + * Extracts a slice of $length elements starting at position $offset from the Collection. + * + * If $length is null it returns all elements from $offset to the end of the Collection. + * Keys have to be preserved by this method. Calling this method will only return the + * selected slice and NOT change the elements contained in the collection slice is called on. + * + * @param int $offset The offset to start from. + * @param int|null $length The maximum number of elements to return, or null for no limit. + * + * @return mixed[] + * @phpstan-return array + */ + public function slice(int $offset, int|null $length = null); + + /** + * Tests for the existence of an element that satisfies the given predicate. + * + * @param Closure $p The predicate. + * @phpstan-param Closure(TKey, T):bool $p + * + * @return bool TRUE if the predicate is TRUE for at least one element, FALSE otherwise. + */ + public function exists(Closure $p); + + /** + * Returns all the elements of this collection that satisfy the predicate p. + * The order of the elements is preserved. + * + * @param Closure $p The predicate used for filtering. + * @phpstan-param Closure(T, TKey):bool $p + * + * @return ReadableCollection A collection with the results of the filter operation. + * @phpstan-return ReadableCollection + */ + public function filter(Closure $p); + + /** + * Applies the given function to each element in the collection and returns + * a new collection with the elements returned by the function. + * + * @phpstan-param Closure(T):U $func + * + * @return ReadableCollection + * @phpstan-return ReadableCollection + * + * @phpstan-template U + */ + public function map(Closure $func); + + /** + * Partitions this collection in two collections according to a predicate. + * Keys are preserved in the resulting collections. + * + * @param Closure $p The predicate on which to partition. + * @phpstan-param Closure(TKey, T):bool $p + * + * @return ReadableCollection[] An array with two elements. The first element contains the collection + * of elements where the predicate returned TRUE, the second element + * contains the collection of elements where the predicate returned FALSE. + * @phpstan-return array{0: ReadableCollection, 1: ReadableCollection} + */ + public function partition(Closure $p); + + /** + * Tests whether the given predicate p holds for all elements of this collection. + * + * @param Closure $p The predicate. + * @phpstan-param Closure(TKey, T):bool $p + * + * @return bool TRUE, if the predicate yields TRUE for all elements, FALSE otherwise. + */ + public function forAll(Closure $p); + + /** + * Gets the index/key of a given element. The comparison of two elements is strict, + * that means not only the value but also the type must match. + * For objects this means reference equality. + * + * @param mixed $element The element to search for. + * @phpstan-param TMaybeContained $element + * + * @return int|string|bool The key/index of the element or FALSE if the element was not found. + * @phpstan-return (TMaybeContained is T ? TKey|false : false) + * + * @template TMaybeContained + */ + public function indexOf(mixed $element); + + /** + * Returns the first element of this collection that satisfies the predicate p. + * + * @param Closure $p The predicate. + * @phpstan-param Closure(TKey, T):bool $p + * + * @return mixed The first element respecting the predicate, + * null if no element respects the predicate. + * @phpstan-return T|null + */ + public function findFirst(Closure $p); + + /** + * Applies iteratively the given function to each element in the collection, + * so as to reduce the collection to a single value. + * + * @phpstan-param Closure(TReturn|TInitial, T):TReturn $func + * @phpstan-param TInitial $initial + * + * @return mixed + * @phpstan-return TReturn|TInitial + * + * @phpstan-template TReturn + * @phpstan-template TInitial + */ + public function reduce(Closure $func, mixed $initial = null); +} diff --git a/backend/vendor/doctrine/collections/src/Selectable.php b/backend/vendor/doctrine/collections/src/Selectable.php new file mode 100644 index 0000000..eb11c93 --- /dev/null +++ b/backend/vendor/doctrine/collections/src/Selectable.php @@ -0,0 +1,32 @@ +&Selectable + * @phpstan-return ReadableCollection&Selectable + */ + public function matching(Criteria $criteria); +} diff --git a/backend/vendor/doctrine/dbal/LICENSE b/backend/vendor/doctrine/dbal/LICENSE new file mode 100644 index 0000000..e8fdec4 --- /dev/null +++ b/backend/vendor/doctrine/dbal/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2018 Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/backend/vendor/doctrine/dbal/composer.json b/backend/vendor/doctrine/dbal/composer.json new file mode 100644 index 0000000..5dc9e2e --- /dev/null +++ b/backend/vendor/doctrine/dbal/composer.json @@ -0,0 +1,71 @@ +{ + "name": "doctrine/dbal", + "type": "library", + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "keywords": [ + "abstraction", + "database", + "dbal", + "db2", + "mariadb", + "mssql", + "mysql", + "pgsql", + "postgresql", + "oci8", + "oracle", + "pdo", + "queryobject", + "sasql", + "sql", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "homepage": "https://www.doctrine-project.org/projects/dbal.html", + "license": "MIT", + "authors": [ + {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, + {"name": "Roman Borschel", "email": "roman@code-factory.org"}, + {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, + {"name": "Jonathan Wage", "email": "jonwage@gmail.com"} + ], + "require": { + "php": "^8.2", + "doctrine/deprecations": "^1.1.5", + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" + }, + "require-dev": { + "doctrine/coding-standard": "14.0.0", + "fig/log-test": "^1", + "jetbrains/phpstorm-stubs": "2023.2", + "phpstan/phpstan": "2.1.30", + "phpstan/phpstan-phpunit": "2.0.7", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "11.5.50", + "slevomat/coding-standard": "8.27.1", + "squizlabs/php_codesniffer": "4.0.1", + "symfony/cache": "^6.3.8|^7.0|^8.0", + "symfony/console": "^5.4|^6.3|^7.0|^8.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "config": { + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "composer/package-versions-deprecated": true + } + }, + "autoload": { + "psr-4": { "Doctrine\\DBAL\\": "src" } + }, + "autoload-dev": { + "psr-4": { "Doctrine\\DBAL\\Tests\\": "tests" } + }, + "scripts": { + "docs": "composer --working-dir docs update && ./docs/vendor/bin/build-docs.sh @additional_args" + } +} diff --git a/backend/vendor/doctrine/dbal/src/ArrayParameterType.php b/backend/vendor/doctrine/dbal/src/ArrayParameterType.php new file mode 100644 index 0000000..851d47d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/ArrayParameterType.php @@ -0,0 +1,39 @@ + ParameterType::INTEGER, + self::STRING => ParameterType::STRING, + self::ASCII => ParameterType::ASCII, + self::BINARY => ParameterType::BINARY, + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/ArrayParameters/Exception.php b/backend/vendor/doctrine/dbal/src/ArrayParameters/Exception.php new file mode 100644 index 0000000..e5a580b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/ArrayParameters/Exception.php @@ -0,0 +1,12 @@ + $columnNames The names of the result columns. Must be non-empty. + * @param list> $rows The rows of the result. Each row must have the same number of columns + * as the number of column names. + */ + public function __construct( + private readonly array $columnNames, + private array $rows, + ) { + } + + public function fetchNumeric(): array|false + { + return $this->fetch(); + } + + public function fetchAssociative(): array|false + { + $row = $this->fetch(); + + if ($row === false) { + return false; + } + + return array_combine($this->columnNames, $row); + } + + public function fetchOne(): mixed + { + $row = $this->fetch(); + + if ($row === false) { + return false; + } + + return $row[0]; + } + + /** + * {@inheritDoc} + */ + public function fetchAllNumeric(): array + { + return FetchUtils::fetchAllNumeric($this); + } + + /** + * {@inheritDoc} + */ + public function fetchAllAssociative(): array + { + return FetchUtils::fetchAllAssociative($this); + } + + /** + * {@inheritDoc} + */ + public function fetchFirstColumn(): array + { + return FetchUtils::fetchFirstColumn($this); + } + + public function rowCount(): int + { + return count($this->rows); + } + + public function columnCount(): int + { + return count($this->columnNames); + } + + public function getColumnName(int $index): string + { + return $this->columnNames[$index] ?? throw InvalidColumnIndex::new($index); + } + + public function free(): void + { + $this->rows = []; + } + + /** @return array{list, list>} */ + public function __serialize(): array + { + return [$this->columnNames, $this->rows]; + } + + /** @param mixed[] $data */ + public function __unserialize(array $data): void + { + // Handle objects serialized with DBAL 4.1 and earlier. + if (isset($data["\0" . self::class . "\0data"])) { + /** @var list> $legacyData */ + $legacyData = $data["\0" . self::class . "\0data"]; + + $this->columnNames = array_keys($legacyData[0] ?? []); + $this->rows = array_map(array_values(...), $legacyData); + + return; + } + + [$this->columnNames, $this->rows] = $data; + } + + /** @return list|false */ + private function fetch(): array|false + { + if (! isset($this->rows[$this->num])) { + return false; + } + + return $this->rows[$this->num++]; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Cache/CacheException.php b/backend/vendor/doctrine/dbal/src/Cache/CacheException.php new file mode 100644 index 0000000..780a833 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Cache/CacheException.php @@ -0,0 +1,11 @@ +resultCache; + } + + public function getLifetime(): int + { + return $this->lifetime; + } + + /** @throws CacheException */ + public function getCacheKey(): string + { + if ($this->cacheKey === null) { + throw NoCacheKey::new(); + } + + return $this->cacheKey; + } + + /** + * Generates the real cache key from query, params, types and connection parameters. + * + * @param list|array $params + * @param array $connectionParams + * @phpstan-param array|array $types + * + * @return array{string, string} + */ + public function generateCacheKeys(string $sql, array $params, array $types, array $connectionParams = []): array + { + if (isset($connectionParams['password'])) { + unset($connectionParams['password']); + } + + $realCacheKey = 'query=' . $sql . + '¶ms=' . serialize($params) . + '&types=' . serialize($types) . + '&connectionParams=' . hash('sha256', serialize($connectionParams)); + + // should the key be automatically generated using the inputs or is the cache key set? + $cacheKey = $this->cacheKey ?? sha1($realCacheKey); + + return [$cacheKey, $realCacheKey]; + } + + public function setResultCache(CacheItemPoolInterface $cache): QueryCacheProfile + { + return new QueryCacheProfile($this->lifetime, $this->cacheKey, $cache); + } + + public function setCacheKey(?string $cacheKey): self + { + return new QueryCacheProfile($this->lifetime, $cacheKey, $this->resultCache); + } + + public function setLifetime(int $lifetime): self + { + return new QueryCacheProfile($lifetime, $this->cacheKey, $this->resultCache); + } +} diff --git a/backend/vendor/doctrine/dbal/src/ColumnCase.php b/backend/vendor/doctrine/dbal/src/ColumnCase.php new file mode 100644 index 0000000..687a04f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/ColumnCase.php @@ -0,0 +1,21 @@ +schemaAssetsFilter = static function (): bool { + return true; + }; + } + + /** + * Gets the cache driver implementation that is used for query result caching. + */ + public function getResultCache(): ?CacheItemPoolInterface + { + return $this->resultCache; + } + + /** + * Sets the cache driver implementation that is used for query result caching. + */ + public function setResultCache(CacheItemPoolInterface $cache): void + { + $this->resultCache = $cache; + } + + /** + * Sets the callable to use to filter schema assets. + */ + public function setSchemaAssetsFilter(callable $schemaAssetsFilter): void + { + $this->schemaAssetsFilter = $schemaAssetsFilter; + } + + /** + * Returns the callable to use to filter schema assets. + */ + public function getSchemaAssetsFilter(): callable + { + return $this->schemaAssetsFilter; + } + + /** + * Sets the default auto-commit mode for connections. + * + * If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual + * transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either + * the method commit or the method rollback. By default, new connections are in auto-commit mode. + * + * @see getAutoCommit + * + * @param bool $autoCommit True to enable auto-commit mode; false to disable it + */ + public function setAutoCommit(bool $autoCommit): void + { + $this->autoCommit = $autoCommit; + } + + /** + * Returns the default auto-commit mode for connections. + * + * @see setAutoCommit + * + * @return bool True if auto-commit mode is enabled by default for connections, false otherwise. + */ + public function getAutoCommit(): bool + { + return $this->autoCommit; + } + + /** + * @param Middleware[] $middlewares + * + * @return $this + */ + public function setMiddlewares(array $middlewares): self + { + $this->middlewares = $middlewares; + + return $this; + } + + /** @return Middleware[] */ + public function getMiddlewares(): array + { + return $this->middlewares; + } + + public function getSchemaManagerFactory(): ?SchemaManagerFactory + { + return $this->schemaManagerFactory; + } + + /** @return $this */ + public function setSchemaManagerFactory(SchemaManagerFactory $schemaManagerFactory): self + { + $this->schemaManagerFactory = $schemaManagerFactory; + + return $this; + } + + public function getDisableTypeComments(): bool + { + return true; + } + + /** @return $this */ + public function setDisableTypeComments(bool $disableTypeComments): self + { + if (! $disableTypeComments) { + throw new InvalidArgumentException('Column comments cannot be enabled anymore.'); + } + + return $this; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Connection.php b/backend/vendor/doctrine/dbal/src/Connection.php new file mode 100644 index 0000000..cd501c3 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Connection.php @@ -0,0 +1,1468 @@ +, + * WrapperParameterType>|array + * @phpstan-consistent-constructor + */ +class Connection implements ServerVersionProvider +{ + /** + * The wrapped driver connection. + */ + protected ?DriverConnection $_conn = null; + + protected Configuration $_config; + + /** + * The current auto-commit mode of this connection. + */ + private bool $autoCommit = true; + + /** + * The transaction nesting level. + */ + private int $transactionNestingLevel = 0; + + /** + * The currently active transaction isolation level or NULL before it has been determined. + */ + private ?TransactionIsolationLevel $transactionIsolationLevel = null; + + /** + * The parameters used during creation of the Connection instance. + * + * @var array + * @phpstan-var Params + */ + private array $params; + + /** + * The database platform object used by the connection or NULL before it's initialized. + */ + private ?AbstractPlatform $platform = null; + + private ?ExceptionConverter $exceptionConverter = null; + private ?Parser $parser = null; + + /** + * Flag that indicates whether the current transaction is marked for rollback only. + */ + private bool $isRollbackOnly = false; + + private SchemaManagerFactory $schemaManagerFactory; + + /** + * Initializes a new instance of the Connection class. + * + * @internal The connection can be only instantiated by the driver manager. + * + * @param array $params The connection parameters. + * @param Driver $driver The driver to use. + * @param Configuration|null $config The configuration, optional. + * @phpstan-param Params $params + */ + public function __construct( + #[SensitiveParameter] + array $params, + protected Driver $driver, + ?Configuration $config = null, + ) { + $this->_config = $config ?? new Configuration(); + $this->params = $params; + $this->autoCommit = $this->_config->getAutoCommit(); + + $this->schemaManagerFactory = $this->_config->getSchemaManagerFactory() + ?? new DefaultSchemaManagerFactory(); + } + + /** + * Gets the parameters used during instantiation. + * + * @internal + * + * @return array + * @phpstan-return Params + */ + public function getParams(): array + { + return $this->params; + } + + /** + * Gets the name of the currently selected database. + * + * @return ?non-empty-string The name of the database or NULL if a database is not selected. + * The platforms which don't support the concept of a database (e.g. embedded databases) + * must always return a string as an indicator of an implicitly selected database. + * + * @throws Exception + */ + public function getDatabase(): ?string + { + $platform = $this->getDatabasePlatform(); + $query = $platform->getDummySelectSQL($platform->getCurrentDatabaseExpression()); + + return $this->fetchOne($query); + } + + /** + * Gets the DBAL driver instance. + */ + public function getDriver(): Driver + { + return $this->driver; + } + + /** + * Gets the Configuration used by the Connection. + */ + public function getConfiguration(): Configuration + { + return $this->_config; + } + + /** + * Gets the DatabasePlatform for the connection. + * + * @throws Exception + */ + public function getDatabasePlatform(): AbstractPlatform + { + if ($this->platform === null) { + $versionProvider = $this; + + if (isset($this->params['serverVersion'])) { + $versionProvider = new StaticServerVersionProvider($this->params['serverVersion']); + } elseif (isset($this->params['primary']['serverVersion'])) { + $versionProvider = new StaticServerVersionProvider($this->params['primary']['serverVersion']); + } + + $this->platform = $this->driver->getDatabasePlatform($versionProvider); + } + + return $this->platform; + } + + /** + * Creates an expression builder for the connection. + */ + public function createExpressionBuilder(): ExpressionBuilder + { + return new ExpressionBuilder($this); + } + + /** + * Establishes the connection with the database and returns the underlying connection. + * + * @throws Exception + */ + protected function connect(): DriverConnection + { + if ($this->_conn !== null) { + return $this->_conn; + } + + try { + $connection = $this->_conn = $this->driver->connect($this->params); + } catch (Driver\Exception $e) { + throw $this->convertException($e); + } + + if ($this->autoCommit === false) { + $this->beginTransaction(); + } + + return $connection; + } + + /** + * {@inheritDoc} + * + * @throws Exception + */ + public function getServerVersion(): string + { + return $this->connect()->getServerVersion(); + } + + /** + * Returns the current auto-commit mode for this connection. + * + * @see setAutoCommit + * + * @return bool True if auto-commit mode is currently enabled for this connection, false otherwise. + */ + public function isAutoCommit(): bool + { + return $this->autoCommit; + } + + /** + * Sets auto-commit mode for this connection. + * + * If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual + * transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either + * the method commit or the method rollback. By default, new connections are in auto-commit mode. + * + * NOTE: If this method is called during a transaction and the auto-commit mode is changed, the transaction is + * committed. If this method is called and the auto-commit mode is not changed, the call is a no-op. + * + * @see isAutoCommit + * + * @throws Exception + */ + public function setAutoCommit(bool $autoCommit): void + { + // Mode not changed, no-op. + if ($autoCommit === $this->autoCommit) { + return; + } + + $this->autoCommit = $autoCommit; + + // Commit all currently active transactions if any when switching auto-commit mode. + if ($this->_conn === null || $this->transactionNestingLevel === 0) { + return; + } + + $this->commitAll(); + } + + /** + * Prepares and executes an SQL query and returns the first row of the result + * as an associative array. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return array|false False is returned if no rows are found. + * + * @throws Exception + */ + public function fetchAssociative(string $query, array $params = [], array $types = []): array|false + { + return $this->executeQuery($query, $params, $types)->fetchAssociative(); + } + + /** + * Prepares and executes an SQL query and returns the first row of the result + * as a numerically indexed array. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return list|false False is returned if no rows are found. + * + * @throws Exception + */ + public function fetchNumeric(string $query, array $params = [], array $types = []): array|false + { + return $this->executeQuery($query, $params, $types)->fetchNumeric(); + } + + /** + * Prepares and executes an SQL query and returns the value of a single column + * of the first row of the result. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return mixed|false False is returned if no rows are found. + * + * @throws Exception + */ + public function fetchOne(string $query, array $params = [], array $types = []): mixed + { + return $this->executeQuery($query, $params, $types)->fetchOne(); + } + + /** + * Whether an actual connection to the database is established. + * + * @phpstan-assert-if-true !null $this->_conn + */ + public function isConnected(): bool + { + return $this->_conn !== null; + } + + /** + * Checks whether a transaction is currently active. + * + * @return bool TRUE if a transaction is currently active, FALSE otherwise. + */ + public function isTransactionActive(): bool + { + return $this->transactionNestingLevel > 0; + } + + /** + * Adds condition based on the criteria to the query components + * + * @param array $criteria Map of key columns to their values + * + * @return array{list, list, list} + */ + private function getCriteriaCondition(array $criteria): array + { + $columns = $values = $conditions = []; + + foreach ($criteria as $columnName => $value) { + if ($value === null) { + $conditions[] = $columnName . ' IS NULL'; + continue; + } + + $columns[] = $columnName; + $values[] = $value; + $conditions[] = $columnName . ' = ?'; + } + + return [$columns, $values, $conditions]; + } + + /** + * Executes an SQL DELETE statement on a table. + * + * Table expression and columns are not escaped and are not safe for user-input. + * + * @param array $criteria + * @param array, string|ParameterType|Type>|array $types + * + * @return int|numeric-string The number of affected rows. + * + * @throws Exception + */ + public function delete(string $table, array $criteria = [], array $types = []): int|string + { + [$columns, $values, $conditions] = $this->getCriteriaCondition($criteria); + + $sql = 'DELETE FROM ' . $table; + + if ($conditions !== []) { + $sql .= ' WHERE ' . implode(' AND ', $conditions); + } + + return $this->executeStatement( + $sql, + $values, + is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types, + ); + } + + /** + * Closes the connection. + */ + public function close(): void + { + $this->_conn = null; + $this->transactionNestingLevel = 0; + } + + /** + * Sets the transaction isolation level. + * + * @param TransactionIsolationLevel $level The level to set. + * + * @throws Exception + */ + public function setTransactionIsolation(TransactionIsolationLevel $level): void + { + $this->transactionIsolationLevel = $level; + + $this->executeStatement($this->getDatabasePlatform()->getSetTransactionIsolationSQL($level)); + } + + /** + * Gets the currently active transaction isolation level. + * + * @return TransactionIsolationLevel The current transaction isolation level. + * + * @throws Exception + */ + public function getTransactionIsolation(): TransactionIsolationLevel + { + return $this->transactionIsolationLevel ??= $this->getDatabasePlatform()->getDefaultTransactionIsolationLevel(); + } + + /** + * Executes an SQL UPDATE statement on a table. + * + * Table expression and columns are not escaped and are not safe for user-input. + * + * @param array $data + * @param array $criteria + * @param array, string|ParameterType|Type>|array $types + * + * @return int|numeric-string The number of affected rows. + * + * @throws Exception + */ + public function update(string $table, array $data, array $criteria = [], array $types = []): int|string + { + $columns = $values = $conditions = $set = []; + + foreach ($data as $columnName => $value) { + $columns[] = $columnName; + $values[] = $value; + $set[] = $columnName . ' = ?'; + } + + [$criteriaColumns, $criteriaValues, $criteriaConditions] = $this->getCriteriaCondition($criteria); + + $columns = array_merge($columns, $criteriaColumns); + $values = array_merge($values, $criteriaValues); + $conditions = array_merge($conditions, $criteriaConditions); + + if (is_string(key($types))) { + $types = $this->extractTypeValues($columns, $types); + } + + $sql = 'UPDATE ' . $table . ' SET ' . implode(', ', $set); + + if ($conditions !== []) { + $sql .= ' WHERE ' . implode(' AND ', $conditions); + } + + return $this->executeStatement($sql, $values, $types); + } + + /** + * Inserts a table row with specified data. + * + * Table expression and columns are not escaped and are not safe for user-input. + * + * @param array $data + * @param array, string|ParameterType|Type>|array $types + * + * @return int|numeric-string The number of affected rows. + * + * @throws Exception + */ + public function insert(string $table, array $data, array $types = []): int|string + { + if (count($data) === 0) { + return $this->executeStatement('INSERT INTO ' . $table . ' () VALUES ()'); + } + + $columns = []; + $values = []; + $set = []; + + foreach ($data as $columnName => $value) { + $columns[] = $columnName; + $values[] = $value; + $set[] = '?'; + } + + return $this->executeStatement( + 'INSERT INTO ' . $table . ' (' . implode(', ', $columns) . ')' . + ' VALUES (' . implode(', ', $set) . ')', + $values, + is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types, + ); + } + + /** + * Extract ordered type list from an ordered column list and type map. + * + * @param array $columns + * @param array|array $types + * + * @return array, string|ParameterType|Type> + */ + private function extractTypeValues(array $columns, array $types): array + { + $typeValues = []; + + foreach ($columns as $columnName) { + $typeValues[] = $types[$columnName] ?? ParameterType::STRING; + } + + return $typeValues; + } + + /** + * Quotes a string so it can be safely used as a table or column name, even if + * it is a reserved name. + * + * Delimiting style depends on the underlying database platform that is being used. + * + * NOTE: Just because you CAN use quoted identifiers does not mean + * you SHOULD use them. In general, they end up causing way more + * problems than they solve. + * + * @deprecated Use {@link quoteSingleIdentifier()} individually for each part of a qualified name instead. + * + * @param string $identifier The identifier to be quoted. + * + * @return string The quoted identifier. + * + * @throws Exception + */ + public function quoteIdentifier(string $identifier): string + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6590', + <<<'DEPRECATION' + Method %s is deprecated and will be removed in 5.0. + Use quoteSingleIdentifier() individually for each part of a qualified name instead. + DEPRECATION, + __METHOD__, + ); + + return $this->getDatabasePlatform()->quoteIdentifier($identifier); + } + + /** + * Quotes a string so that it can be safely used as an identifier in SQL. + * + * @throws Exception + */ + public function quoteSingleIdentifier(string $identifier): string + { + return $this->getDatabasePlatform()->quoteSingleIdentifier($identifier); + } + + /** + * The usage of this method is discouraged. Use prepared statements + * or {@see AbstractPlatform::quoteStringLiteral()} instead. + * + * @throws Exception + */ + public function quote(string $value): string + { + return $this->connect()->quote($value); + } + + /** + * Prepares and executes an SQL query and returns the result as an array of numeric arrays. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return list> + * + * @throws Exception + */ + public function fetchAllNumeric(string $query, array $params = [], array $types = []): array + { + return $this->executeQuery($query, $params, $types)->fetchAllNumeric(); + } + + /** + * Prepares and executes an SQL query and returns the result as an array of associative arrays. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return list> + * + * @throws Exception + */ + public function fetchAllAssociative(string $query, array $params = [], array $types = []): array + { + return $this->executeQuery($query, $params, $types)->fetchAllAssociative(); + } + + /** + * Prepares and executes an SQL query and returns the result as an associative array with the keys + * mapped to the first column and the values mapped to the second column. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return array + * + * @throws Exception + */ + public function fetchAllKeyValue(string $query, array $params = [], array $types = []): array + { + return $this->executeQuery($query, $params, $types)->fetchAllKeyValue(); + } + + /** + * Prepares and executes an SQL query and returns the result as an associative array with the keys mapped + * to the first column and the values being an associative array representing the rest of the columns + * and their values. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return array> + * + * @throws Exception + */ + public function fetchAllAssociativeIndexed(string $query, array $params = [], array $types = []): array + { + return $this->executeQuery($query, $params, $types)->fetchAllAssociativeIndexed(); + } + + /** + * Prepares and executes an SQL query and returns the result as an array of the first column values. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return list + * + * @throws Exception + */ + public function fetchFirstColumn(string $query, array $params = [], array $types = []): array + { + return $this->executeQuery($query, $params, $types)->fetchFirstColumn(); + } + + /** + * Prepares and executes an SQL query and returns the result as an iterator over rows represented as numeric arrays. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return Traversable> + * + * @throws Exception + */ + public function iterateNumeric(string $query, array $params = [], array $types = []): Traversable + { + return $this->executeQuery($query, $params, $types)->iterateNumeric(); + } + + /** + * Prepares and executes an SQL query and returns the result as an iterator over rows represented + * as associative arrays. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return Traversable> + * + * @throws Exception + */ + public function iterateAssociative(string $query, array $params = [], array $types = []): Traversable + { + return $this->executeQuery($query, $params, $types)->iterateAssociative(); + } + + /** + * Prepares and executes an SQL query and returns the result as an iterator with the keys + * mapped to the first column and the values mapped to the second column. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return Traversable + * + * @throws Exception + */ + public function iterateKeyValue(string $query, array $params = [], array $types = []): Traversable + { + return $this->executeQuery($query, $params, $types)->iterateKeyValue(); + } + + /** + * Prepares and executes an SQL query and returns the result as an iterator with the keys mapped + * to the first column and the values being an associative array representing the rest of the columns + * and their values. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return Traversable> + * + * @throws Exception + */ + public function iterateAssociativeIndexed(string $query, array $params = [], array $types = []): Traversable + { + return $this->executeQuery($query, $params, $types)->iterateAssociativeIndexed(); + } + + /** + * Prepares and executes an SQL query and returns the result as an iterator over the first column values. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return Traversable + * + * @throws Exception + */ + public function iterateColumn(string $query, array $params = [], array $types = []): Traversable + { + return $this->executeQuery($query, $params, $types)->iterateColumn(); + } + + /** + * Prepares an SQL statement. + * + * @param string $sql The SQL statement to prepare. + * + * @throws Exception + */ + public function prepare(string $sql): Statement + { + $connection = $this->connect(); + + try { + $statement = $connection->prepare($sql); + } catch (Driver\Exception $e) { + throw $this->convertExceptionDuringQuery($e, $sql); + } + + return new Statement($this, $statement, $sql); + } + + /** + * Executes an, optionally parameterized, SQL query. + * + * If the query is parametrized, a prepared statement is used. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @throws Exception + */ + public function executeQuery( + string $sql, + array $params = [], + array $types = [], + ?QueryCacheProfile $qcp = null, + ): Result { + if ($qcp !== null) { + return $this->executeCacheQuery($sql, $params, $types, $qcp); + } + + $connection = $this->connect(); + + try { + if (count($params) > 0) { + [$sql, $params, $types] = $this->expandArrayParameters($sql, $params, $types); + + $stmt = $connection->prepare($sql); + + $this->bindParameters($stmt, $params, $types); + + $result = $stmt->execute(); + } else { + $result = $connection->query($sql); + } + + return new Result($result, $this); + } catch (Driver\Exception $e) { + throw $this->convertExceptionDuringQuery($e, $sql, $params, $types); + } + } + + /** + * Executes a caching query. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @throws CacheException + * @throws Exception + */ + public function executeCacheQuery(string $sql, array $params, array $types, QueryCacheProfile $qcp): Result + { + $resultCache = $qcp->getResultCache() ?? $this->_config->getResultCache(); + + if ($resultCache === null) { + throw NoResultDriverConfigured::new(); + } + + $connectionParams = $this->params; + unset($connectionParams['password']); + + [$cacheKey, $realKey] = $qcp->generateCacheKeys($sql, $params, $types, $connectionParams); + + // @phpstan-ignore missingType.checkedException + $item = $resultCache->getItem($cacheKey); + + if ($item->isHit()) { + $value = $item->get(); + if (! is_array($value)) { + $value = []; + } + + if (isset($value[$realKey]) && $value[$realKey] instanceof ArrayResult) { + return new Result(clone $value[$realKey], $this); + } + } else { + $value = []; + } + + $result = $this->executeQuery($sql, $params, $types); + + $columnNames = []; + for ($i = 0; $i < $result->columnCount(); $i++) { + $columnNames[] = $result->getColumnName($i); + } + + $rows = $result->fetchAllNumeric(); + + $value[$realKey] = new ArrayResult($columnNames, $rows); + + $item->set($value); + + $lifetime = $qcp->getLifetime(); + if ($lifetime > 0) { + $item->expiresAfter($lifetime); + } + + $resultCache->save($item); + + return new Result(clone $value[$realKey], $this); + } + + /** + * Executes an SQL statement with the given parameters and returns the number of affected rows. + * + * Could be used for: + * - DML statements: INSERT, UPDATE, DELETE, etc. + * - DDL statements: CREATE, DROP, ALTER, etc. + * - DCL statements: GRANT, REVOKE, etc. + * - Session control statements: ALTER SESSION, SET, DECLARE, etc. + * - Other statements that don't yield a row set. + * + * This method supports PDO binding types as well as DBAL mapping types. + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return int|numeric-string + * + * @throws Exception + */ + public function executeStatement(string $sql, array $params = [], array $types = []): int|string + { + $connection = $this->connect(); + + try { + if (count($params) > 0) { + [$sql, $params, $types] = $this->expandArrayParameters($sql, $params, $types); + + $stmt = $connection->prepare($sql); + + $this->bindParameters($stmt, $params, $types); + + return $stmt->execute() + ->rowCount(); + } + + return $connection->exec($sql); + } catch (Driver\Exception $e) { + throw $this->convertExceptionDuringQuery($e, $sql, $params, $types); + } + } + + /** + * Returns the current transaction nesting level. + * + * @return int The nesting level. A value of 0 means there's no active transaction. + */ + public function getTransactionNestingLevel(): int + { + return $this->transactionNestingLevel; + } + + /** + * Returns the ID of the last inserted row. + * + * If the underlying driver does not support identity columns, an exception is thrown. + * + * @throws Exception + */ + public function lastInsertId(): int|string + { + try { + return $this->connect()->lastInsertId(); + } catch (Driver\Exception $e) { + throw $this->convertException($e); + } + } + + /** + * Executes a function in a transaction. + * + * The function gets passed this Connection instance as an (optional) parameter. + * + * If an exception occurs during execution of the function or transaction commit, + * the transaction is rolled back and the exception re-thrown. + * + * @param Closure(self):T $func The function to execute transactionally. + * + * @return T The value returned by $func + * + * @throws Throwable + * + * @template T + */ + public function transactional(Closure $func): mixed + { + $this->beginTransaction(); + + $successful = false; + + try { + $res = $func($this); + + $successful = true; + } catch (ConnectionLost $connectionLost) { + // Catching here only to be able to prevent a rollback attempt + throw $connectionLost; + } finally { + if (! isset($connectionLost) && ! $successful) { + $this->rollBack(); + } + } + + $shouldRollback = true; + try { + $this->commit(); + + $shouldRollback = false; + } catch (TheDriverException $t) { + $shouldRollback = ! ( + $t instanceof TransactionRolledBack + || $t instanceof UniqueConstraintViolationException + || $t instanceof ForeignKeyConstraintViolationException + || $t instanceof DeadlockException + || $t instanceof ConnectionLost + ); + + throw $t; + } finally { + if ($shouldRollback) { + $this->rollBack(); + } + } + + return $res; + } + + /** + * Sets if nested transactions should use savepoints. + * + * @deprecated No replacement planned + * + * @throws Exception + */ + public function setNestTransactionsWithSavepoints(bool $nestTransactionsWithSavepoints): void + { + if (! $nestTransactionsWithSavepoints) { + throw new InvalidArgumentException(sprintf( + 'Calling %s with false to enable nesting transactions without savepoints is no longer supported.', + __METHOD__, + )); + } + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/5383', + '%s is deprecated and will be removed in 5.0', + __METHOD__, + ); + } + + /** + * Gets if nested transactions should use savepoints. + * + * @deprecated No replacement planned + */ + public function getNestTransactionsWithSavepoints(): bool + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/5383', + '%s is deprecated and will be removed in 5.0', + __METHOD__, + ); + + return true; + } + + /** + * Returns the savepoint name to use for nested transactions. + */ + protected function _getNestedTransactionSavePointName(): string + { + return 'DOCTRINE_' . $this->transactionNestingLevel; + } + + /** @throws Exception */ + public function beginTransaction(): void + { + $connection = $this->connect(); + + ++$this->transactionNestingLevel; + + if ($this->transactionNestingLevel === 1) { + try { + $connection->beginTransaction(); + } catch (Driver\Exception $e) { + throw $this->convertException($e); + } + } else { + $this->createSavepoint($this->_getNestedTransactionSavePointName()); + } + } + + /** @throws Exception */ + public function commit(): void + { + if ($this->transactionNestingLevel === 0) { + throw NoActiveTransaction::new(); + } + + if ($this->isRollbackOnly) { + throw CommitFailedRollbackOnly::new(); + } + + $connection = $this->connect(); + + try { + if ($this->transactionNestingLevel === 1) { + try { + $connection->commit(); + } catch (Driver\Exception $e) { + throw $this->convertException($e); + } + } else { + $this->releaseSavepoint($this->_getNestedTransactionSavePointName()); + } + } finally { + $this->updateTransactionStateAfterCommit(); + } + } + + /** @throws Exception */ + private function updateTransactionStateAfterCommit(): void + { + if ($this->transactionNestingLevel !== 0) { + --$this->transactionNestingLevel; + } + + if ($this->autoCommit !== false || $this->transactionNestingLevel !== 0) { + return; + } + + $this->beginTransaction(); + } + + /** + * Commits all current nesting transactions. + * + * @throws Exception + */ + private function commitAll(): void + { + while ($this->transactionNestingLevel !== 0) { + if ($this->autoCommit === false && $this->transactionNestingLevel === 1) { + // When in no auto-commit mode, the last nesting commit immediately starts a new transaction. + // Therefore we need to do the final commit here and then leave to avoid an infinite loop. + $this->commit(); + + return; + } + + $this->commit(); + } + } + + /** @throws Exception */ + public function rollBack(): void + { + if ($this->transactionNestingLevel === 0) { + throw NoActiveTransaction::new(); + } + + $connection = $this->connect(); + + if ($this->transactionNestingLevel === 1) { + $this->transactionNestingLevel = 0; + + try { + $connection->rollBack(); + } catch (Driver\Exception $e) { + throw $this->convertException($e); + } finally { + $this->isRollbackOnly = false; + + if ($this->autoCommit === false) { + $this->beginTransaction(); + } + } + } else { + $this->rollbackSavepoint($this->_getNestedTransactionSavePointName()); + --$this->transactionNestingLevel; + } + } + + /** + * Creates a new savepoint. + * + * @param string $savepoint The name of the savepoint to create. + * + * @throws Exception + */ + public function createSavepoint(string $savepoint): void + { + $platform = $this->getDatabasePlatform(); + + if (! $platform->supportsSavepoints()) { + throw SavepointsNotSupported::new(); + } + + $this->executeStatement($platform->createSavePoint($savepoint)); + } + + /** + * Releases the given savepoint. + * + * @param string $savepoint The name of the savepoint to release. + * + * @throws Exception + */ + public function releaseSavepoint(string $savepoint): void + { + $platform = $this->getDatabasePlatform(); + + if (! $platform->supportsSavepoints()) { + throw SavepointsNotSupported::new(); + } + + if (! $platform->supportsReleaseSavepoints()) { + return; + } + + $this->executeStatement($platform->releaseSavePoint($savepoint)); + } + + /** + * Rolls back to the given savepoint. + * + * @param string $savepoint The name of the savepoint to rollback to. + * + * @throws Exception + */ + public function rollbackSavepoint(string $savepoint): void + { + $platform = $this->getDatabasePlatform(); + + if (! $platform->supportsSavepoints()) { + throw SavepointsNotSupported::new(); + } + + $this->executeStatement($platform->rollbackSavePoint($savepoint)); + } + + /** + * Provides access to the native database connection. + * + * @return resource|object + * + * @throws Exception + */ + public function getNativeConnection() + { + return $this->connect()->getNativeConnection(); + } + + /** + * Creates a SchemaManager that can be used to inspect or change the + * database schema through the connection. + * + * @throws Exception + */ + public function createSchemaManager(): AbstractSchemaManager + { + return $this->schemaManagerFactory->createSchemaManager($this); + } + + /** + * Marks the current transaction so that the only possible + * outcome for the transaction to be rolled back. + * + * @throws ConnectionException If no transaction is active. + */ + public function setRollbackOnly(): void + { + if ($this->transactionNestingLevel === 0) { + throw NoActiveTransaction::new(); + } + + $this->isRollbackOnly = true; + } + + /** + * Checks whether the current transaction is marked for rollback only. + * + * @throws ConnectionException If no transaction is active. + */ + public function isRollbackOnly(): bool + { + if ($this->transactionNestingLevel === 0) { + throw NoActiveTransaction::new(); + } + + return $this->isRollbackOnly; + } + + /** + * Converts a given value to its database representation according to the conversion + * rules of a specific DBAL mapping type. + * + * @param mixed $value The value to convert. + * @param string $type The name of the DBAL mapping type. + * + * @return mixed The converted value. + * + * @throws Exception + */ + public function convertToDatabaseValue(mixed $value, string $type): mixed + { + return Type::getType($type)->convertToDatabaseValue($value, $this->getDatabasePlatform()); + } + + /** + * Converts a given value to its PHP representation according to the conversion + * rules of a specific DBAL mapping type. + * + * @param mixed $value The value to convert. + * @param string $type The name of the DBAL mapping type. + * + * @return mixed The converted type. + * + * @throws Exception + */ + public function convertToPHPValue(mixed $value, string $type): mixed + { + return Type::getType($type)->convertToPHPValue($value, $this->getDatabasePlatform()); + } + + /** + * Binds a set of parameters, some or all of which are typed with a PDO binding type + * or DBAL mapping type, to a given statement. + * + * @param list|array $params + * @param array|array $types + * + * @throws Exception + */ + private function bindParameters(DriverStatement $stmt, array $params, array $types): void + { + // Check whether parameters are positional or named. Mixing is not allowed. + if (is_int(key($params))) { + $bindIndex = 1; + + foreach ($params as $key => $value) { + if (array_key_exists($key, $types)) { + $type = $types[$key]; + [$value, $bindingType] = $this->getBindingInfo($value, $type); + } else { + $bindingType = ParameterType::STRING; + } + + try { + $stmt->bindValue($bindIndex, $value, $bindingType); + } catch (Driver\Exception $e) { + throw $this->convertException($e); + } + + ++$bindIndex; + } + } else { + // Named parameters + foreach ($params as $name => $value) { + if (array_key_exists($name, $types)) { + $type = $types[$name]; + [$value, $bindingType] = $this->getBindingInfo($value, $type); + } else { + $bindingType = ParameterType::STRING; + } + + try { + $stmt->bindValue($name, $value, $bindingType); + } catch (Driver\Exception $e) { + throw $this->convertException($e); + } + } + } + } + + /** + * Gets the binding type of a given type. + * + * @param mixed $value The value to bind. + * @param string|ParameterType|Type $type The type to bind. + * + * @return array{mixed, ParameterType} [0] => the (escaped) value, [1] => the binding type. + * + * @throws Exception + */ + private function getBindingInfo(mixed $value, string|ParameterType|Type $type): array + { + if (is_string($type)) { + $type = Type::getType($type); + } + + if ($type instanceof Type) { + $value = $type->convertToDatabaseValue($value, $this->getDatabasePlatform()); + $bindingType = $type->getBindingType(); + } else { + $bindingType = $type; + } + + return [$value, $bindingType]; + } + + /** + * Creates a new instance of a SQL query builder. + */ + public function createQueryBuilder(): QueryBuilder + { + return new Query\QueryBuilder($this); + } + + /** + * @internal + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + */ + final public function convertExceptionDuringQuery( + Driver\Exception $e, + string $sql, + array $params = [], + array $types = [], + ): DriverException { + return $this->handleDriverException($e, new Query($sql, $params, $types)); + } + + /** @internal */ + final public function convertException(Driver\Exception $e): DriverException + { + return $this->handleDriverException($e, null); + } + + /** + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return array{ + * string, + * list|array, + * array, string|ParameterType|Type>|array + * } + * + * @throws Exception + */ + private function expandArrayParameters(string $sql, array $params, array $types): array + { + $needsConversion = false; + $nonArrayTypes = []; + + if (is_string(key($params))) { + $needsConversion = true; + } else { + foreach ($types as $key => $type) { + if ($type instanceof ArrayParameterType) { + $needsConversion = true; + break; + } + + $nonArrayTypes[$key] = $type; + } + } + + if (! $needsConversion) { + return [$sql, $params, $nonArrayTypes]; + } + + $this->parser ??= $this->getDatabasePlatform()->createSQLParser(); + $visitor = new ExpandArrayParameters($params, $types); + + try { + $this->parser->parse($sql, $visitor); + } catch (Parser\Exception $e) { + throw ParseError::fromParserException($e); + } + + return [ + $visitor->getSQL(), + $visitor->getParameters(), + $visitor->getTypes(), + ]; + } + + private function handleDriverException( + Driver\Exception $driverException, + ?Query $query, + ): DriverException { + $this->exceptionConverter ??= $this->driver->getExceptionConverter(); + $exception = $this->exceptionConverter->convert($driverException, $query); + + if ($exception instanceof ConnectionLost) { + $this->close(); + } + + return $exception; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Connection/StaticServerVersionProvider.php b/backend/vendor/doctrine/dbal/src/Connection/StaticServerVersionProvider.php new file mode 100644 index 0000000..9e0e4e2 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Connection/StaticServerVersionProvider.php @@ -0,0 +1,20 @@ +version; + } +} diff --git a/backend/vendor/doctrine/dbal/src/ConnectionException.php b/backend/vendor/doctrine/dbal/src/ConnectionException.php new file mode 100644 index 0000000..bb11a23 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/ConnectionException.php @@ -0,0 +1,9 @@ +executeQuery("DELETE FROM table"); + * + * Be aware that Connection#executeQuery is a method specifically for READ + * operations only. + * + * Use Connection#executeStatement for any SQL statement that changes/updates + * state in the database (UPDATE, INSERT, DELETE or DDL statements). + * + * This connection is limited to replica operations using the + * Connection#executeQuery operation only, because it wouldn't be compatible + * with the ORM or SchemaManager code otherwise. Both use all the other + * operations in a context where writes could happen to a replica, which makes + * this restricted approach necessary. + * + * You can manually connect to the primary at any time by calling: + * + * $conn->ensureConnectedToPrimary(); + * + * Instantiation through the DriverManager looks like: + * + * @phpstan-import-type Params from DriverManager + * @phpstan-import-type OverrideParams from DriverManager + * @example + * + * $conn = DriverManager::getConnection(array( + * 'wrapperClass' => 'Doctrine\DBAL\Connections\PrimaryReadReplicaConnection', + * 'driver' => 'pdo_mysql', + * 'primary' => array('user' => '', 'password' => '', 'host' => '', 'dbname' => ''), + * 'replica' => array( + * array('user' => 'replica1', 'password' => '', 'host' => '', 'dbname' => ''), + * array('user' => 'replica2', 'password' => '', 'host' => '', 'dbname' => ''), + * ) + * )); + * + * You can also pass 'driverOptions' and any other documented option to each of this drivers + * to pass additional information. + */ +class PrimaryReadReplicaConnection extends Connection +{ + /** + * Primary and Replica connection (one of the randomly picked replicas). + * + * @var array + */ + protected array $connections = ['primary' => null, 'replica' => null]; + + /** + * You can keep the replica connection and then switch back to it + * during the request if you know what you are doing. + */ + protected bool $keepReplica = false; + + /** + * Creates Primary Replica Connection. + * + * @internal The connection can be only instantiated by the driver manager. + * + * @param array $params + * @phpstan-param Params $params + */ + public function __construct(array $params, Driver $driver, ?Configuration $config = null) + { + if (! isset($params['replica'], $params['primary'])) { + throw new InvalidArgumentException('primary or replica configuration missing'); + } + + if (count($params['replica']) === 0) { + throw new InvalidArgumentException('You have to configure at least one replica.'); + } + + if (isset($params['driver'])) { + $params['primary']['driver'] = $params['driver']; + + foreach ($params['replica'] as $replicaKey => $replica) { + $params['replica'][$replicaKey]['driver'] = $params['driver']; + } + } + + $this->keepReplica = ! empty($params['keepReplica']); + + parent::__construct($params, $driver, $config); + } + + /** + * Checks if the connection is currently towards the primary or not. + */ + public function isConnectedToPrimary(): bool + { + return $this->_conn !== null && $this->_conn === $this->connections['primary']; + } + + public function connect(?string $connectionName = null): DriverConnection + { + if ($connectionName !== null) { + throw new InvalidArgumentException( + 'Passing a connection name as first argument is not supported anymore.' + . ' Use ensureConnectedToPrimary()/ensureConnectedToReplica() instead.', + ); + } + + return $this->performConnect(); + } + + /** @throws Exception */ + protected function performConnect(?string $connectionName = null): DriverConnection + { + $requestedConnectionChange = ($connectionName !== null); + $connectionName ??= 'replica'; + + if ($connectionName !== 'replica' && $connectionName !== 'primary') { + throw new InvalidArgumentException('Invalid option to connect(), only primary or replica allowed.'); + } + + // If we have a connection open, and this is not an explicit connection + // change request, then abort right here, because we are already done. + // This prevents writes to the replica in case of "keepReplica" option enabled. + if ($this->_conn !== null && ! $requestedConnectionChange) { + return $this->_conn; + } + + $forcePrimaryAsReplica = false; + + if ($this->getTransactionNestingLevel() > 0) { + $connectionName = 'primary'; + $forcePrimaryAsReplica = true; + } + + if (isset($this->connections[$connectionName])) { + $this->_conn = $this->connections[$connectionName]; + + if ($forcePrimaryAsReplica && ! $this->keepReplica) { + $this->connections['replica'] = $this->_conn; + } + + return $this->_conn; + } + + if ($connectionName === 'primary') { + $this->connections['primary'] = $this->_conn = $this->connectTo($connectionName); + + // Set replica connection to primary to avoid invalid reads + if (! $this->keepReplica) { + $this->connections['replica'] = $this->connections['primary']; + } + } else { + $this->connections['replica'] = $this->_conn = $this->connectTo($connectionName); + } + + return $this->_conn; + } + + /** + * Connects to the primary node of the database cluster. + * + * All following statements after this will be executed against the primary node. + * + * @throws Exception + */ + public function ensureConnectedToPrimary(): void + { + $this->performConnect('primary'); + } + + /** + * Connects to a replica node of the database cluster. + * + * All following statements after this will be executed against the replica node, + * unless the keepReplica option is set to false and a primary connection + * was already opened. + * + * @throws Exception + */ + public function ensureConnectedToReplica(): void + { + $this->performConnect('replica'); + } + + /** + * Connects to a specific connection. + * + * @throws Exception + */ + protected function connectTo(string $connectionName): DriverConnection + { + $params = $this->getParams(); + assert(isset($params['primary'])); + + if ($connectionName === 'primary') { + $connectionParams = $params['primary']; + } else { + assert(isset($params['replica'])); + $connectionParams = $this->chooseReplicaConnectionParameters($params['primary'], $params['replica']); + } + + try { + return $this->driver->connect($connectionParams); + } catch (DriverException $e) { + throw $this->convertException($e); + } + } + + /** + * @param OverrideParams $primary + * @param array $replicas + * + * @return array + * @phpstan-return OverrideParams + */ + protected function chooseReplicaConnectionParameters( + #[SensitiveParameter] + array $primary, + #[SensitiveParameter] + array $replicas, + ): array { + $params = $replicas[array_rand($replicas)]; + + if (! isset($params['charset']) && isset($primary['charset'])) { + $params['charset'] = $primary['charset']; + } + + return $params; + } + + /** + * {@inheritDoc} + */ + public function executeStatement(string $sql, array $params = [], array $types = []): int|string + { + $this->ensureConnectedToPrimary(); + + return parent::executeStatement($sql, $params, $types); + } + + public function beginTransaction(): void + { + $this->ensureConnectedToPrimary(); + + parent::beginTransaction(); + } + + public function commit(): void + { + $this->ensureConnectedToPrimary(); + + parent::commit(); + } + + public function rollBack(): void + { + $this->ensureConnectedToPrimary(); + + parent::rollBack(); + } + + public function close(): void + { + unset($this->connections['primary'], $this->connections['replica']); + + parent::close(); + + $this->_conn = null; + $this->connections = ['primary' => null, 'replica' => null]; + } + + public function createSavepoint(string $savepoint): void + { + $this->ensureConnectedToPrimary(); + + parent::createSavepoint($savepoint); + } + + public function releaseSavepoint(string $savepoint): void + { + $this->ensureConnectedToPrimary(); + + parent::releaseSavepoint($savepoint); + } + + public function rollbackSavepoint(string $savepoint): void + { + $this->ensureConnectedToPrimary(); + + parent::rollbackSavepoint($savepoint); + } + + public function prepare(string $sql): Statement + { + $this->ensureConnectedToPrimary(); + + return parent::prepare($sql); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver.php b/backend/vendor/doctrine/dbal/src/Driver.php new file mode 100644 index 0000000..0b8bd16 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver.php @@ -0,0 +1,51 @@ + $params All connection parameters. + * @phpstan-param Params $params All connection parameters. + * + * @return DriverConnection The database connection. + * + * @throws Exception + */ + public function connect( + #[SensitiveParameter] + array $params, + ): DriverConnection; + + /** + * Gets the DatabasePlatform instance that provides all the metadata about + * the platform this driver connects to. + * + * @return AbstractPlatform The database platform. + * + * @throws PlatformException + */ + public function getDatabasePlatform(ServerVersionProvider $versionProvider): AbstractPlatform; + + /** + * Gets the ExceptionConverter that can be used to convert driver-level exceptions into DBAL exceptions. + */ + public function getExceptionConverter(): ExceptionConverter; +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/API/ExceptionConverter.php b/backend/vendor/doctrine/dbal/src/Driver/API/ExceptionConverter.php new file mode 100644 index 0000000..a7bf271 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/API/ExceptionConverter.php @@ -0,0 +1,25 @@ +getCode()) { + -104 => new SyntaxErrorException($exception, $query), + -203 => new NonUniqueFieldNameException($exception, $query), + -204 => new TableNotFoundException($exception, $query), + -206 => new InvalidFieldNameException($exception, $query), + -407 => new NotNullConstraintViolationException($exception, $query), + -530, + -531, + -532, + -20356 => new ForeignKeyConstraintViolationException($exception, $query), + -601 => new TableExistsException($exception, $query), + -803 => new UniqueConstraintViolationException($exception, $query), + -1336, + -30082 => new ConnectionException($exception, $query), + default => new DriverException($exception, $query), + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php b/backend/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php new file mode 100644 index 0000000..56e03d4 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php @@ -0,0 +1,105 @@ +getCode() === 1524 + && str_contains($exception->getMessage(), 'Plugin \'mysql_native_password\' is not loaded') + ) { + // Workaround for MySQL 8.4 if we request an unknown user. + // https://bugs.mysql.com/bug.php?id=114876 + return new ConnectionException($exception, $query); + } + + return match ($exception->getCode()) { + 1008 => new DatabaseDoesNotExist($exception, $query), + 1213 => new DeadlockException($exception, $query), + 1205 => new LockWaitTimeoutException($exception, $query), + 1050 => new TableExistsException($exception, $query), + 1051, + 1146 => new TableNotFoundException($exception, $query), + 1216, + 1217, + 1451, + 1452, + 1701 => new ForeignKeyConstraintViolationException($exception, $query), + 1062, + 1557, + 1569, + 1586 => new UniqueConstraintViolationException($exception, $query), + 1054, + 1166, + 1611 => new InvalidFieldNameException($exception, $query), + 1052, + 1060, + 1110 => new NonUniqueFieldNameException($exception, $query), + 1064, + 1149, + 1287, + 1341, + 1342, + 1343, + 1344, + 1382, + 1479, + 1541, + 1554, + 1626 => new SyntaxErrorException($exception, $query), + 1044, + 1045, + 1046, + 1049, + 1095, + 1142, + 1143, + 1227, + 1370, + 1429, + 2002, + 2005, + 2054 => new ConnectionException($exception, $query), + 2006, + 4031 => new ConnectionLost($exception, $query), + 1048, + 1121, + 1138, + 1171, + 1252, + 1263, + 1364, + 1566 => new NotNullConstraintViolationException($exception, $query), + default => new DriverException($exception, $query), + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/API/OCI/ExceptionConverter.php b/backend/vendor/doctrine/dbal/src/Driver/API/OCI/ExceptionConverter.php new file mode 100644 index 0000000..9bde91e --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/API/OCI/ExceptionConverter.php @@ -0,0 +1,80 @@ +getCode()) { + 1, + 2299, + 38911 => new UniqueConstraintViolationException($exception, $query), + 904 => new InvalidFieldNameException($exception, $query), + 918, + 960 => new NonUniqueFieldNameException($exception, $query), + 923 => new SyntaxErrorException($exception, $query), + 942 => new TableNotFoundException($exception, $query), + 955 => new TableExistsException($exception, $query), + 1017, + 12545 => new ConnectionException($exception, $query), + 1400 => new NotNullConstraintViolationException($exception, $query), + 1918 => new DatabaseDoesNotExist($exception, $query), + 2091 => (function () use ($exception, $query) { + //SQLSTATE[HY000]: General error: 2091 OCITransCommit: ORA-02091: transaction rolled back + //ORA-00001: unique constraint (DOCTRINE.GH3423_UNIQUE) violated + $lines = explode("\n", $exception->getMessage(), 2); + assert(count($lines) >= 2); + + [, $causeError] = $lines; + + [$causeCode] = explode(': ', $causeError, 2); + $code = (int) str_replace('ORA-', '', $causeCode); + + $sqlState = $exception->getSQLState(); + if ($exception instanceof DriverPDOException) { + $why = $this->convert(new DriverPDOException($causeError, $sqlState, $code, $exception), $query); + } else { + $why = $this->convert(new Error($causeError, $sqlState, $code, $exception), $query); + } + + return new TransactionRolledBack($why, $query); + })(), + 2289, + 2443, + 4080 => new DatabaseObjectNotFoundException($exception, $query), + 2266, + 2291, + 2292 => new ForeignKeyConstraintViolationException($exception, $query), + default => new DriverException($exception, $query), + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php b/backend/vendor/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php new file mode 100644 index 0000000..8f22fc7 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php @@ -0,0 +1,87 @@ +getSQLState()) { + case '40001': + case '40P01': + return new DeadlockException($exception, $query); + + case '0A000': + // Foreign key constraint violations during a TRUNCATE operation + // are considered "feature not supported" in PostgreSQL. + if (str_contains($exception->getMessage(), 'truncate')) { + return new ForeignKeyConstraintViolationException($exception, $query); + } + + break; + + case '23502': + return new NotNullConstraintViolationException($exception, $query); + + case '23503': + return new ForeignKeyConstraintViolationException($exception, $query); + + case '23505': + return new UniqueConstraintViolationException($exception, $query); + + case '3D000': + return new DatabaseDoesNotExist($exception, $query); + + case '3F000': + return new SchemaDoesNotExist($exception, $query); + + case '42601': + return new SyntaxErrorException($exception, $query); + + case '42702': + return new NonUniqueFieldNameException($exception, $query); + + case '42703': + return new InvalidFieldNameException($exception, $query); + + case '42P01': + return new TableNotFoundException($exception, $query); + + case '42P07': + return new TableExistsException($exception, $query); + + case '08006': + return new ConnectionException($exception, $query); + } + + if (str_contains($exception->getMessage(), 'terminating connection')) { + return new ConnectionLost($exception, $query); + } + + return new DriverException($exception, $query); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/API/SQLSrv/ExceptionConverter.php b/backend/vendor/doctrine/dbal/src/Driver/API/SQLSrv/ExceptionConverter.php new file mode 100644 index 0000000..561e58b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/API/SQLSrv/ExceptionConverter.php @@ -0,0 +1,49 @@ +getCode()) { + 102 => new SyntaxErrorException($exception, $query), + 207 => new InvalidFieldNameException($exception, $query), + 208 => new TableNotFoundException($exception, $query), + 209 => new NonUniqueFieldNameException($exception, $query), + 515 => new NotNullConstraintViolationException($exception, $query), + 547, + 4712 => new ForeignKeyConstraintViolationException($exception, $query), + 2601, + 2627 => new UniqueConstraintViolationException($exception, $query), + 2714 => new TableExistsException($exception, $query), + 3701, + 15151 => new DatabaseObjectNotFoundException($exception, $query), + 11001, + 18456 => new ConnectionException($exception, $query), + default => new DriverException($exception, $query), + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php b/backend/vendor/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php new file mode 100644 index 0000000..5885195 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php @@ -0,0 +1,85 @@ +getMessage(), 'database is locked')) { + return new LockWaitTimeoutException($exception, $query); + } + + if ( + str_contains($exception->getMessage(), 'must be unique') || + str_contains($exception->getMessage(), 'is not unique') || + str_contains($exception->getMessage(), 'are not unique') || + str_contains($exception->getMessage(), 'UNIQUE constraint failed') + ) { + return new UniqueConstraintViolationException($exception, $query); + } + + if ( + str_contains($exception->getMessage(), 'may not be NULL') || + str_contains($exception->getMessage(), 'NOT NULL constraint failed') + ) { + return new NotNullConstraintViolationException($exception, $query); + } + + if (str_contains($exception->getMessage(), 'no such table:')) { + return new TableNotFoundException($exception, $query); + } + + if (str_contains($exception->getMessage(), 'already exists')) { + return new TableExistsException($exception, $query); + } + + if (str_contains($exception->getMessage(), 'has no column named')) { + return new InvalidFieldNameException($exception, $query); + } + + if (str_contains($exception->getMessage(), 'ambiguous column name')) { + return new NonUniqueFieldNameException($exception, $query); + } + + if (str_contains($exception->getMessage(), 'syntax error')) { + return new SyntaxErrorException($exception, $query); + } + + if (str_contains($exception->getMessage(), 'attempt to write a readonly database')) { + return new ReadOnlyException($exception, $query); + } + + if (str_contains($exception->getMessage(), 'unable to open database file')) { + return new ConnectionException($exception, $query); + } + + if (str_contains($exception->getMessage(), 'FOREIGN KEY constraint failed')) { + return new ForeignKeyConstraintViolationException($exception, $query); + } + + return new DriverException($exception, $query); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/AbstractDB2Driver.php b/backend/vendor/doctrine/dbal/src/Driver/AbstractDB2Driver.php new file mode 100644 index 0000000..9b6b3d8 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/AbstractDB2Driver.php @@ -0,0 +1,27 @@ +sqlState; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/AbstractMySQLDriver.php b/backend/vendor/doctrine/dbal/src/Driver/AbstractMySQLDriver.php new file mode 100644 index 0000000..e3497a0 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/AbstractMySQLDriver.php @@ -0,0 +1,114 @@ +getServerVersion(); + if (stripos($version, 'mariadb') !== false) { + $mariaDbVersion = $this->getMariaDbMysqlVersionNumber($version); + if (version_compare($mariaDbVersion, '11.7.0', '>=')) { + return new MariaDB110700Platform(); + } + + if (version_compare($mariaDbVersion, '10.10.0', '>=')) { + return new MariaDB1010Platform(); + } + + if (version_compare($mariaDbVersion, '10.6.0', '>=')) { + return new MariaDB1060Platform(); + } + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6343', + 'Support for MariaDB < 10.6.0 is deprecated and will be removed in DBAL 5', + ); + + if (version_compare($mariaDbVersion, '10.5.2', '>=')) { + return new MariaDB1052Platform(); + } + + return new MariaDBPlatform(); + } + + if (version_compare($version, '8.4.0', '>=')) { + return new MySQL84Platform(); + } + + if (version_compare($version, '8.0.0', '>=')) { + return new MySQL80Platform(); + } + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6343', + 'Support for MySQL < 8 is deprecated and will be removed in DBAL 5', + ); + + return new MySQLPlatform(); + } + + public function getExceptionConverter(): ExceptionConverterInterface + { + return new ExceptionConverter(); + } + + /** + * Detect MariaDB server version, including hack for some mariadb distributions + * that starts with the prefix '5.5.5-' + * + * @param string $versionString Version string as returned by mariadb server, i.e. '5.5.5-Mariadb-10.0.8-xenial' + * + * @throws InvalidPlatformVersion + */ + private function getMariaDbMysqlVersionNumber(string $versionString): string + { + if ( + preg_match( + '/^(?:5\.5\.5-)?(mariadb-)?(?P\d+)\.(?P\d+)\.(?P\d+)/i', + $versionString, + $versionParts, + ) !== 1 + ) { + throw InvalidPlatformVersion::new( + $versionString, + '^(?:5\.5\.5-)?(mariadb-)?..', + ); + } + + return $versionParts['major'] . '.' . $versionParts['minor'] . '.' . $versionParts['patch']; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/AbstractOracleDriver.php b/backend/vendor/doctrine/dbal/src/Driver/AbstractOracleDriver.php new file mode 100644 index 0000000..cf56cfa --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/AbstractOracleDriver.php @@ -0,0 +1,38 @@ + $params The connection parameters to return the Easy Connect String for. + */ + protected function getEasyConnectString(array $params): string + { + return (string) EasyConnectString::fromConnectionParameters($params); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/AbstractOracleDriver/EasyConnectString.php b/backend/vendor/doctrine/dbal/src/Driver/AbstractOracleDriver/EasyConnectString.php new file mode 100644 index 0000000..0079cf1 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/AbstractOracleDriver/EasyConnectString.php @@ -0,0 +1,123 @@ +string; + } + + /** + * Creates the object from an array representation + * + * @param mixed[] $params + */ + public static function fromArray(array $params): self + { + return new self(self::renderParams($params)); + } + + /** + * Creates the object from the given DBAL connection parameters. + * + * @param mixed[] $params + */ + public static function fromConnectionParameters(array $params): self + { + if (isset($params['connectstring'])) { + return new self($params['connectstring']); + } + + if (! isset($params['host'])) { + return new self($params['dbname'] ?? ''); + } + + $connectData = []; + + if (isset($params['service'])) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7042', + 'Using the "service" parameter to indicate that the value of the "dbname" parameter is the' + . ' service name is deprecated. Use the "servicename" parameter instead.', + ); + } + + if (isset($params['servicename']) || isset($params['dbname'])) { + $serviceKey = 'SID'; + + if (isset($params['service']) || isset($params['servicename'])) { + $serviceKey = 'SERVICE_NAME'; + } + + $serviceName = $params['servicename'] ?? $params['dbname']; + + $connectData[$serviceKey] = $serviceName; + } + + if (isset($params['instancename'])) { + $connectData['INSTANCE_NAME'] = $params['instancename']; + } + + if (! empty($params['pooled'])) { + $connectData['SERVER'] = 'POOLED'; + } + + return self::fromArray([ + 'DESCRIPTION' => [ + 'ADDRESS' => [ + 'PROTOCOL' => $params['driverOptions']['protocol'] ?? 'TCP', + 'HOST' => $params['host'], + 'PORT' => $params['port'] ?? 1521, + ], + 'CONNECT_DATA' => $connectData, + ], + ]); + } + + /** @param mixed[] $params */ + private static function renderParams(array $params): string + { + $chunks = []; + + foreach ($params as $key => $value) { + $string = self::renderValue($value); + + if ($string === '') { + continue; + } + + $chunks[] = sprintf('(%s=%s)', $key, $string); + } + + return implode('', $chunks); + } + + private static function renderValue(mixed $value): string + { + if (is_array($value)) { + return self::renderParams($value); + } + + return (string) $value; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/AbstractPostgreSQLDriver.php b/backend/vendor/doctrine/dbal/src/Driver/AbstractPostgreSQLDriver.php new file mode 100644 index 0000000..7b679c6 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/AbstractPostgreSQLDriver.php @@ -0,0 +1,57 @@ +getServerVersion(); + + if (preg_match('/^(?P\d+)(?:\.(?P\d+)(?:\.(?P\d+))?)?/', $version, $versionParts) !== 1) { + throw InvalidPlatformVersion::new( + $version, + '..', + ); + } + + $majorVersion = $versionParts['major']; + $minorVersion = $versionParts['minor'] ?? 0; + $patchVersion = $versionParts['patch'] ?? 0; + $version = $majorVersion . '.' . $minorVersion . '.' . $patchVersion; + + if (version_compare($version, '12.0', '>=')) { + return new PostgreSQL120Platform(); + } + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6495', + 'Support for Postgres < 12 is deprecated and will be removed in DBAL 5', + ); + + return new PostgreSQLPlatform(); + } + + public function getExceptionConverter(): ExceptionConverterInterface + { + return new ExceptionConverter(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/AbstractSQLServerDriver.php b/backend/vendor/doctrine/dbal/src/Driver/AbstractSQLServerDriver.php new file mode 100644 index 0000000..8c2d012 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/AbstractSQLServerDriver.php @@ -0,0 +1,27 @@ +exec('PRAGMA foreign_keys=ON'); + + return $connection; + } + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Connection.php b/backend/vendor/doctrine/dbal/src/Driver/Connection.php new file mode 100644 index 0000000..68852e9 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Connection.php @@ -0,0 +1,93 @@ +fetchNumeric(); + + if ($row === false) { + return false; + } + + return $row[0]; + } + + /** + * @return list> + * + * @throws Exception + */ + public static function fetchAllNumeric(Result $result): array + { + $rows = []; + + while (($row = $result->fetchNumeric()) !== false) { + $rows[] = $row; + } + + return $rows; + } + + /** + * @return list> + * + * @throws Exception + */ + public static function fetchAllAssociative(Result $result): array + { + $rows = []; + + while (($row = $result->fetchAssociative()) !== false) { + $rows[] = $row; + } + + return $rows; + } + + /** + * @return list + * + * @throws Exception + */ + public static function fetchFirstColumn(Result $result): array + { + $rows = []; + + while (($row = $result->fetchOne()) !== false) { + $rows[] = $row; + } + + return $rows; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Connection.php b/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Connection.php new file mode 100644 index 0000000..2c8783b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Connection.php @@ -0,0 +1,131 @@ +connection); + assert($serverInfo instanceof stdClass); + + return $serverInfo->DBMS_VER; + } + + public function prepare(string $sql): Statement + { + $stmt = @db2_prepare($this->connection, $sql); + + if ($stmt === false) { + throw PrepareFailed::new(error_get_last()); + } + + return new Statement($stmt); + } + + public function query(string $sql): Result + { + return $this->prepare($sql)->execute(); + } + + public function quote(string $value): string + { + return "'" . db2_escape_string($value) . "'"; + } + + public function exec(string $sql): int|string + { + $stmt = @db2_exec($this->connection, $sql); + + if ($stmt === false) { + throw StatementError::new(); + } + + $numRows = db2_num_rows($stmt); + + if ($numRows === false) { + throw StatementError::new(); + } + + return $numRows; + } + + public function lastInsertId(): string + { + $lastInsertId = db2_last_insert_id($this->connection); + + if ($lastInsertId === null) { + throw NoIdentityValue::new(); + } + + return $lastInsertId; + } + + public function beginTransaction(): void + { + if (db2_autocommit($this->connection, DB2_AUTOCOMMIT_OFF) !== true) { + throw ConnectionError::new($this->connection); + } + } + + public function commit(): void + { + if (! db2_commit($this->connection)) { + throw ConnectionError::new($this->connection); + } + + if (db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON) !== true) { + throw ConnectionError::new($this->connection); + } + } + + public function rollBack(): void + { + if (! db2_rollback($this->connection)) { + throw ConnectionError::new($this->connection); + } + + if (db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON) !== true) { + throw ConnectionError::new($this->connection); + } + } + + /** @return resource */ + public function getNativeConnection() + { + return $this->connection; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php b/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php new file mode 100644 index 0000000..f1feb4c --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php @@ -0,0 +1,80 @@ +string; + } + + /** + * Creates the object from an array representation + * + * @param array $params + */ + public static function fromArray( + #[SensitiveParameter] + array $params, + ): self { + $chunks = []; + + foreach ($params as $key => $value) { + $chunks[] = sprintf('%s=%s', $key, $value); + } + + return new self(implode(';', $chunks)); + } + + /** + * Creates the object from the given DBAL connection parameters. + * + * @param array $params + */ + public static function fromConnectionParameters(#[SensitiveParameter] + array $params,): self + { + if (isset($params['dbname']) && str_contains($params['dbname'], '=')) { + return new self($params['dbname']); + } + + $dsnParams = []; + + foreach ( + [ + 'host' => 'HOSTNAME', + 'port' => 'PORT', + 'protocol' => 'PROTOCOL', + 'dbname' => 'DATABASE', + 'user' => 'UID', + 'password' => 'PWD', + ] as $dbalParam => $dsnParam + ) { + if (! isset($params[$dbalParam])) { + continue; + } + + $dsnParams[$dsnParam] = $params[$dbalParam]; + } + + return self::fromArray($dsnParams); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Driver.php b/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Driver.php new file mode 100644 index 0000000..f2f4ed7 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Driver.php @@ -0,0 +1,41 @@ +toString(); + + $username = $params['user'] ?? ''; + $password = $params['password'] ?? ''; + $driverOptions = $params['driverOptions'] ?? []; + + if (! empty($params['persistent'])) { + $connection = db2_pconnect($dataSourceName, $username, $password, $driverOptions); + } else { + $connection = db2_connect($dataSourceName, $username, $password, $driverOptions); + } + + if ($connection === false) { + throw ConnectionFailed::new(); + } + + return new Connection($connection); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Exception/CannotCopyStreamToStream.php b/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Exception/CannotCopyStreamToStream.php new file mode 100644 index 0000000..ee0aaf1 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Exception/CannotCopyStreamToStream.php @@ -0,0 +1,23 @@ +statement); + + if ($row === false && db2_stmt_error($this->statement) !== '02000') { + throw StatementError::new($this->statement); + } + + return $row; + } + + public function fetchAssociative(): array|false + { + $row = @db2_fetch_assoc($this->statement); + + if ($row === false && db2_stmt_error($this->statement) !== '02000') { + throw StatementError::new($this->statement); + } + + return $row; + } + + public function fetchOne(): mixed + { + return FetchUtils::fetchOne($this); + } + + /** + * {@inheritDoc} + */ + public function fetchAllNumeric(): array + { + return FetchUtils::fetchAllNumeric($this); + } + + /** + * {@inheritDoc} + */ + public function fetchAllAssociative(): array + { + return FetchUtils::fetchAllAssociative($this); + } + + /** + * {@inheritDoc} + */ + public function fetchFirstColumn(): array + { + return FetchUtils::fetchFirstColumn($this); + } + + public function rowCount(): int + { + $numRows = @db2_num_rows($this->statement); + + if ($numRows === false) { + throw StatementError::new($this->statement); + } + + return $numRows; + } + + public function columnCount(): int + { + $count = db2_num_fields($this->statement); + + if ($count !== false) { + return $count; + } + + return 0; + } + + public function getColumnName(int $index): string + { + $name = db2_field_name($this->statement, $index); + + if ($name === false) { + throw InvalidColumnIndex::new($index); + } + + return $name; + } + + public function free(): void + { + db2_free_result($this->statement); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Statement.php b/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Statement.php new file mode 100644 index 0000000..dd7e539 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/IBMDB2/Statement.php @@ -0,0 +1,157 @@ + + */ + private array $lobs = []; + + /** + * @internal The statement can be only instantiated by its driver connection. + * + * @param resource $stmt + */ + public function __construct(private readonly mixed $stmt) + { + } + + public function bindValue(int|string $param, mixed $value, ParameterType $type): void + { + assert(is_int($param)); + + switch ($type) { + case ParameterType::INTEGER: + $this->bind($param, $value, DB2_PARAM_IN, DB2_LONG); + break; + + case ParameterType::LARGE_OBJECT: + $this->lobs[$param] = &$value; + break; + + default: + $this->bind($param, $value, DB2_PARAM_IN, DB2_CHAR); + break; + } + } + + /** @throws Exception */ + private function bind(int $position, mixed &$variable, int $parameterType, int $dataType): void + { + $this->parameters[$position] =& $variable; + + if (! db2_bind_param($this->stmt, $position, '', $parameterType, $dataType)) { + throw StatementError::new($this->stmt); + } + } + + public function execute(): Result + { + $handles = $this->bindLobs(); + + $result = @db2_execute($this->stmt, $this->parameters); + + foreach ($handles as $handle) { + fclose($handle); + } + + $this->lobs = []; + + if ($result === false) { + throw StatementError::new($this->stmt); + } + + return new Result($this->stmt); + } + + /** + * @return list + * + * @throws Exception + */ + private function bindLobs(): array + { + $handles = []; + + foreach ($this->lobs as $param => $value) { + if (is_resource($value)) { + $handle = $handles[] = $this->createTemporaryFile(); + $path = stream_get_meta_data($handle)['uri'] ?? null; + assert($path !== null); + + $this->copyStreamToStream($value, $handle); + + $this->bind($param, $path, DB2_PARAM_FILE, DB2_BINARY); + } else { + $this->bind($param, $value, DB2_PARAM_IN, DB2_CHAR); + } + + unset($value); + } + + return $handles; + } + + /** + * @return resource + * + * @throws Exception + */ + private function createTemporaryFile() + { + $handle = @tmpfile(); + + if ($handle === false) { + throw CannotCreateTemporaryFile::new(error_get_last()); + } + + return $handle; + } + + /** + * @param resource $source + * @param resource $target + * + * @throws Exception + */ + private function copyStreamToStream($source, $target): void + { + if (@stream_copy_to_stream($source, $target) === false) { + throw CannotCopyStreamToStream::new(error_get_last()); + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Middleware.php b/backend/vendor/doctrine/dbal/src/Driver/Middleware.php new file mode 100644 index 0000000..4629d9a --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Middleware.php @@ -0,0 +1,12 @@ +wrappedConnection->prepare($sql); + } + + public function query(string $sql): Result + { + return $this->wrappedConnection->query($sql); + } + + public function quote(string $value): string + { + return $this->wrappedConnection->quote($value); + } + + public function exec(string $sql): int|string + { + return $this->wrappedConnection->exec($sql); + } + + public function lastInsertId(): int|string + { + return $this->wrappedConnection->lastInsertId(); + } + + public function beginTransaction(): void + { + $this->wrappedConnection->beginTransaction(); + } + + public function commit(): void + { + $this->wrappedConnection->commit(); + } + + public function rollBack(): void + { + $this->wrappedConnection->rollBack(); + } + + public function getServerVersion(): string + { + return $this->wrappedConnection->getServerVersion(); + } + + /** + * {@inheritDoc} + */ + public function getNativeConnection() + { + return $this->wrappedConnection->getNativeConnection(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php b/backend/vendor/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php new file mode 100644 index 0000000..482f134 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php @@ -0,0 +1,39 @@ +wrappedDriver->connect($params); + } + + public function getDatabasePlatform(ServerVersionProvider $versionProvider): AbstractPlatform + { + return $this->wrappedDriver->getDatabasePlatform($versionProvider); + } + + public function getExceptionConverter(): ExceptionConverter + { + return $this->wrappedDriver->getExceptionConverter(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Middleware/AbstractResultMiddleware.php b/backend/vendor/doctrine/dbal/src/Driver/Middleware/AbstractResultMiddleware.php new file mode 100644 index 0000000..f335c21 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Middleware/AbstractResultMiddleware.php @@ -0,0 +1,85 @@ +wrappedResult->fetchNumeric(); + } + + public function fetchAssociative(): array|false + { + return $this->wrappedResult->fetchAssociative(); + } + + public function fetchOne(): mixed + { + return $this->wrappedResult->fetchOne(); + } + + /** + * {@inheritDoc} + */ + public function fetchAllNumeric(): array + { + return $this->wrappedResult->fetchAllNumeric(); + } + + /** + * {@inheritDoc} + */ + public function fetchAllAssociative(): array + { + return $this->wrappedResult->fetchAllAssociative(); + } + + /** + * {@inheritDoc} + */ + public function fetchFirstColumn(): array + { + return $this->wrappedResult->fetchFirstColumn(); + } + + public function rowCount(): int|string + { + return $this->wrappedResult->rowCount(); + } + + public function columnCount(): int + { + return $this->wrappedResult->columnCount(); + } + + public function getColumnName(int $index): string + { + if (! method_exists($this->wrappedResult, 'getColumnName')) { + throw new LogicException(sprintf( + 'The driver result %s does not support accessing the column name.', + get_debug_type($this->wrappedResult), + )); + } + + return $this->wrappedResult->getColumnName($index); + } + + public function free(): void + { + $this->wrappedResult->free(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php b/backend/vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php new file mode 100644 index 0000000..6eaad50 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php @@ -0,0 +1,26 @@ +wrappedStatement->bindValue($param, $value, $type); + } + + public function execute(): Result + { + return $this->wrappedStatement->execute(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Connection.php b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Connection.php new file mode 100644 index 0000000..a7854a2 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Connection.php @@ -0,0 +1,118 @@ +connection->get_server_info(); + } + + public function prepare(string $sql): Statement + { + try { + $stmt = $this->connection->prepare($sql); + } catch (mysqli_sql_exception $e) { + throw ConnectionError::upcast($e); + } + + if ($stmt === false) { + throw ConnectionError::new($this->connection); + } + + return new Statement($stmt); + } + + public function query(string $sql): Result + { + return $this->prepare($sql)->execute(); + } + + public function quote(string $value): string + { + return "'" . $this->connection->escape_string($value) . "'"; + } + + public function exec(string $sql): int|string + { + try { + $result = $this->connection->query($sql); + } catch (mysqli_sql_exception $e) { + throw ConnectionError::upcast($e); + } + + if ($result === false) { + throw ConnectionError::new($this->connection); + } + + return $this->connection->affected_rows; + } + + public function lastInsertId(): int|string + { + $lastInsertId = $this->connection->insert_id; + + if ($lastInsertId === 0) { + throw Exception\NoIdentityValue::new(); + } + + return $this->connection->insert_id; + } + + public function beginTransaction(): void + { + try { + if (! $this->connection->begin_transaction()) { + throw ConnectionError::new($this->connection); + } + } catch (mysqli_sql_exception $e) { + throw ConnectionError::upcast($e); + } + } + + public function commit(): void + { + try { + if (! $this->connection->commit()) { + throw ConnectionError::new($this->connection); + } + } catch (mysqli_sql_exception $e) { + throw ConnectionError::upcast($e); + } + } + + public function rollBack(): void + { + try { + if (! $this->connection->rollback()) { + throw ConnectionError::new($this->connection); + } + } catch (mysqli_sql_exception $e) { + throw ConnectionError::upcast($e); + } + } + + public function getNativeConnection(): mysqli + { + return $this->connection; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Driver.php b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Driver.php new file mode 100644 index 0000000..9855e56 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Driver.php @@ -0,0 +1,117 @@ +compilePreInitializers($params) as $initializer) { + $initializer->initialize($connection); + } + + try { + $success = @$connection->real_connect( + $host, + $params['user'] ?? '', + $params['password'] ?? '', + $params['dbname'] ?? '', + $params['port'] ?? 0, + $params['unix_socket'] ?? '', + $params['driverOptions'][Connection::OPTION_FLAGS] ?? 0, + ); + } catch (mysqli_sql_exception $e) { + throw ConnectionFailed::upcast($e); + } + + if (! $success) { + throw ConnectionFailed::new($connection); + } + + foreach ($this->compilePostInitializers($params) as $initializer) { + $initializer->initialize($connection); + } + + return new Connection($connection); + } + + /** + * @param array $params + * + * @return Generator + */ + private function compilePreInitializers( + #[SensitiveParameter] + array $params, + ): Generator { + unset($params['driverOptions'][Connection::OPTION_FLAGS]); + + if (isset($params['driverOptions']) && $params['driverOptions'] !== []) { + yield new Options($params['driverOptions']); + } + + if ( + ! isset($params['ssl_key']) && + ! isset($params['ssl_cert']) && + ! isset($params['ssl_ca']) && + ! isset($params['ssl_capath']) && + ! isset($params['ssl_cipher']) + ) { + return; + } + + yield new Secure( + $params['ssl_key'] ?? '', + $params['ssl_cert'] ?? '', + $params['ssl_ca'] ?? '', + $params['ssl_capath'] ?? '', + $params['ssl_cipher'] ?? '', + ); + } + + /** + * @param array $params + * + * @return Generator + */ + private function compilePostInitializers( + #[SensitiveParameter] + array $params, + ): Generator { + if (! isset($params['charset'])) { + return; + } + + yield new Charset($params['charset']); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionError.php b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionError.php new file mode 100644 index 0000000..ccbc6cb --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionError.php @@ -0,0 +1,26 @@ +error, $connection->sqlstate, $connection->errno); + } + + public static function upcast(mysqli_sql_exception $exception): self + { + $p = new ReflectionProperty(mysqli_sql_exception::class, 'sqlstate'); + + return new self($exception->getMessage(), $p->getValue($exception), $exception->getCode(), $exception); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionFailed.php b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionFailed.php new file mode 100644 index 0000000..d34aafb --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionFailed.php @@ -0,0 +1,31 @@ +connect_error; + assert($error !== null); + + return new self($error, 'HY000', $connection->connect_errno); + } + + public static function upcast(mysqli_sql_exception $exception): self + { + $p = new ReflectionProperty(mysqli_sql_exception::class, 'sqlstate'); + + return new self($exception->getMessage(), $p->getValue($exception), $exception->getCode(), $exception); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/FailedReadingStreamOffset.php b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/FailedReadingStreamOffset.php new file mode 100644 index 0000000..f20d8bc --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/FailedReadingStreamOffset.php @@ -0,0 +1,18 @@ +error), + $connection->sqlstate, + $connection->errno, + ); + } + + public static function upcast(mysqli_sql_exception $exception, string $charset): self + { + $p = new ReflectionProperty(mysqli_sql_exception::class, 'sqlstate'); + + return new self( + sprintf('Failed to set charset "%s": %s', $charset, $exception->getMessage()), + $p->getValue($exception), + $exception->getCode(), + $exception, + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidOption.php b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidOption.php new file mode 100644 index 0000000..1f1f7aa --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidOption.php @@ -0,0 +1,20 @@ +error, $statement->sqlstate, $statement->errno); + } + + public static function upcast(mysqli_sql_exception $exception): self + { + $p = new ReflectionProperty(mysqli_sql_exception::class, 'sqlstate'); + + return new self($exception->getMessage(), $p->getValue($exception), $exception->getCode(), $exception); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer.php b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer.php new file mode 100644 index 0000000..efab67e --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer.php @@ -0,0 +1,14 @@ +set_charset($this->charset); + } catch (mysqli_sql_exception $e) { + throw InvalidCharset::upcast($e, $this->charset); + } + + if ($success) { + return; + } + + throw InvalidCharset::fromCharset($connection, $this->charset); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Options.php b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Options.php new file mode 100644 index 0000000..3223951 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Options.php @@ -0,0 +1,28 @@ + $options */ + public function __construct(private readonly array $options) + { + } + + public function initialize(mysqli $connection): void + { + foreach ($this->options as $option => $value) { + if (! mysqli_options($connection, $option, $value)) { + throw InvalidOption::fromOption($option, $value); + } + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Secure.php b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Secure.php new file mode 100644 index 0000000..fa819b5 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Secure.php @@ -0,0 +1,27 @@ +ssl_set($this->key, $this->cert, $this->ca, $this->capath, $this->cipher); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Result.php b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Result.php new file mode 100644 index 0000000..89f94f3 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Result.php @@ -0,0 +1,177 @@ + + */ + private readonly array $columnNames; + + /** @var mixed[] */ + private array $boundValues = []; + + /** + * @internal The result can be only instantiated by its driver connection or statement. + * + * @param Statement|null $statementReference Maintains a reference to the Statement that generated this result. This + * ensures that the lifetime of the Statement is managed in conjunction + * with its associated results, so they are destroyed together at the + * appropriate time, see {@see Statement::__destruct()}. + * + * @throws Exception + */ + public function __construct( + private readonly mysqli_stmt $statement, + private ?Statement $statementReference = null, // @phpstan-ignore property.onlyWritten + ) { + $meta = $statement->result_metadata(); + $this->hasColumns = $meta !== false; + $this->columnNames = $meta !== false ? array_column($meta->fetch_fields(), 'name') : []; + + if ($meta === false) { + return; + } + + $meta->free(); + + // Store result of every execution which has it. Otherwise it will be impossible + // to execute a new statement in case if the previous one has non-fetched rows + // @link http://dev.mysql.com/doc/refman/5.7/en/commands-out-of-sync.html + $this->statement->store_result(); + + // Bind row values _after_ storing the result. Otherwise, if mysqli is compiled with libmysql, + // it will have to allocate as much memory as it may be needed for the given column type + // (e.g. for a LONGBLOB column it's 4 gigabytes) + // @link https://bugs.php.net/bug.php?id=51386#1270673122 + // + // Make sure that the values are bound after each execution. Otherwise, if free() has been + // previously called on the result, the values are unbound making the statement unusable. + // + // It's also important that row values are bound after _each_ call to store_result(). Otherwise, + // if mysqli is compiled with libmysql, subsequently fetched string values will get truncated + // to the length of the ones fetched during the previous execution. + $this->boundValues = array_fill(0, count($this->columnNames), null); + + // The following is necessary as PHP cannot handle references to properties properly + $refs = &$this->boundValues; + + if (! $this->statement->bind_result(...$refs)) { + throw StatementError::new($this->statement); + } + } + + public function fetchNumeric(): array|false + { + try { + $ret = $this->statement->fetch(); + } catch (mysqli_sql_exception $e) { + throw StatementError::upcast($e); + } + + if ($ret === false) { + throw StatementError::new($this->statement); + } + + if ($ret === null) { + return false; + } + + $values = []; + + foreach ($this->boundValues as $v) { + $values[] = $v; + } + + return $values; + } + + public function fetchAssociative(): array|false + { + $values = $this->fetchNumeric(); + + if ($values === false) { + return false; + } + + return array_combine($this->columnNames, $values); + } + + public function fetchOne(): mixed + { + return FetchUtils::fetchOne($this); + } + + /** + * {@inheritDoc} + */ + public function fetchAllNumeric(): array + { + return FetchUtils::fetchAllNumeric($this); + } + + /** + * {@inheritDoc} + */ + public function fetchAllAssociative(): array + { + return FetchUtils::fetchAllAssociative($this); + } + + /** + * {@inheritDoc} + */ + public function fetchFirstColumn(): array + { + return FetchUtils::fetchFirstColumn($this); + } + + public function rowCount(): int|string + { + if ($this->hasColumns) { + return $this->statement->num_rows; + } + + return $this->statement->affected_rows; + } + + public function columnCount(): int + { + return $this->statement->field_count; + } + + public function getColumnName(int $index): string + { + return $this->columnNames[$index] ?? throw InvalidColumnIndex::new($index); + } + + public function free(): void + { + $this->statement->free_result(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Statement.php b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Statement.php new file mode 100644 index 0000000..9a21517 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Mysqli/Statement.php @@ -0,0 +1,159 @@ +stmt->param_count; + $this->types = str_repeat(self::PARAMETER_TYPE_STRING, $paramCount); + $this->boundValues = array_fill(1, $paramCount, null); + } + + public function __destruct() + { + @$this->stmt->close(); + } + + public function bindValue(int|string $param, mixed $value, ParameterType $type): void + { + assert(is_int($param)); + + $this->types[$param - 1] = $this->convertParameterType($type); + $this->values[$param] = $value; + $this->boundValues[$param] =& $this->values[$param]; + } + + public function execute(): Result + { + if (count($this->boundValues) > 0) { + $this->bindParameters(); + } + + try { + if (! $this->stmt->execute()) { + throw StatementError::new($this->stmt); + } + } catch (mysqli_sql_exception $e) { + throw StatementError::upcast($e); + } + + return new Result($this->stmt, $this); + } + + /** + * Binds parameters with known types previously bound to the statement + * + * @throws Exception + */ + private function bindParameters(): void + { + $streams = $values = []; + $types = $this->types; + + foreach ($this->boundValues as $parameter => $value) { + assert(is_int($parameter)); + if (! isset($types[$parameter - 1])) { + $types[$parameter - 1] = self::PARAMETER_TYPE_STRING; + } + + if ($types[$parameter - 1] === self::PARAMETER_TYPE_BINARY) { + if (is_resource($value)) { + if (get_resource_type($value) !== 'stream') { + throw NonStreamResourceUsedAsLargeObject::new($parameter); + } + + $streams[$parameter] = $value; + $values[$parameter] = null; + continue; + } + + $types[$parameter - 1] = self::PARAMETER_TYPE_STRING; + } + + $values[$parameter] = $value; + } + + if (! $this->stmt->bind_param($types, ...$values)) { + throw StatementError::new($this->stmt); + } + + $this->sendLongData($streams); + } + + /** + * Handle $this->_longData after regular query parameters have been bound + * + * @param array $streams + * + * @throws Exception + */ + private function sendLongData(array $streams): void + { + foreach ($streams as $paramNr => $stream) { + while (! feof($stream)) { + $chunk = fread($stream, 8192); + + if ($chunk === false) { + throw FailedReadingStreamOffset::new($paramNr); + } + + if (! $this->stmt->send_long_data($paramNr - 1, $chunk)) { + throw StatementError::new($this->stmt); + } + } + } + } + + private function convertParameterType(ParameterType $type): string + { + return match ($type) { + ParameterType::NULL, + ParameterType::STRING, + ParameterType::ASCII, + ParameterType::BINARY => self::PARAMETER_TYPE_STRING, + ParameterType::INTEGER, + ParameterType::BOOLEAN => self::PARAMETER_TYPE_INTEGER, + ParameterType::LARGE_OBJECT => self::PARAMETER_TYPE_BINARY, + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/OCI8/Connection.php b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Connection.php new file mode 100644 index 0000000..64c210c --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Connection.php @@ -0,0 +1,125 @@ +parser = new Parser(false); + $this->executionMode = new ExecutionMode(); + } + + public function getServerVersion(): string + { + $version = oci_server_version($this->connection); + assert($version !== false); + + $result = preg_match('/\s+(\d+\.\d+\.\d+\.\d+\.\d+)\s+/', $version, $matches); + assert($result === 1); + + return $matches[1]; + } + + /** + * @throws Parser\Exception + * @throws Error + */ + public function prepare(string $sql): Statement + { + $visitor = new ConvertPositionalToNamedPlaceholders(); + + $this->parser->parse($sql, $visitor); + + $statement = @oci_parse($this->connection, $visitor->getSQL()); + + if (! is_resource($statement)) { + throw Error::new($this->connection); + } + + return new Statement($this->connection, $statement, $visitor->getParameterMap(), $this->executionMode); + } + + /** + * @throws Exception + * @throws Parser\Exception + */ + public function query(string $sql): Result + { + return $this->prepare($sql)->execute(); + } + + public function quote(string $value): string + { + return "'" . addcslashes(str_replace("'", "''", $value), "\000\n\r\\\032") . "'"; + } + + /** + * @throws Exception + * @throws Parser\Exception + */ + public function exec(string $sql): int|string + { + return $this->prepare($sql)->execute()->rowCount(); + } + + public function lastInsertId(): int|string + { + throw IdentityColumnsNotSupported::new(); + } + + public function beginTransaction(): void + { + $this->executionMode->disableAutoCommit(); + } + + public function commit(): void + { + if (! @oci_commit($this->connection)) { + throw Error::new($this->connection); + } + + $this->executionMode->enableAutoCommit(); + } + + public function rollBack(): void + { + if (! oci_rollback($this->connection)) { + throw Error::new($this->connection); + } + + $this->executionMode->enableAutoCommit(); + } + + /** @return resource */ + public function getNativeConnection() + { + return $this->connection; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/OCI8/ConvertPositionalToNamedPlaceholders.php b/backend/vendor/doctrine/dbal/src/Driver/OCI8/ConvertPositionalToNamedPlaceholders.php new file mode 100644 index 0000000..5898a2c --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/OCI8/ConvertPositionalToNamedPlaceholders.php @@ -0,0 +1,58 @@ +). + * + * Oracle does not support positional parameters, hence this method converts all + * positional parameters into artificially named parameters. + * + * @internal This class is not covered by the backward compatibility promise + */ +final class ConvertPositionalToNamedPlaceholders implements Visitor +{ + /** @var list */ + private array $buffer = []; + + /** @var array */ + private array $parameterMap = []; + + public function acceptOther(string $sql): void + { + $this->buffer[] = $sql; + } + + public function acceptPositionalParameter(string $sql): void + { + $position = count($this->parameterMap) + 1; + $param = ':param' . $position; + + $this->parameterMap[$position] = $param; + + $this->buffer[] = $param; + } + + public function acceptNamedParameter(string $sql): void + { + $this->buffer[] = $sql; + } + + public function getSQL(): string + { + return implode('', $this->buffer); + } + + /** @return array */ + public function getParameterMap(): array + { + return $this->parameterMap; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/OCI8/Driver.php b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Driver.php new file mode 100644 index 0000000..d519cc9 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Driver.php @@ -0,0 +1,58 @@ +getEasyConnectString($params); + + $persistent = ! empty($params['persistent']); + $exclusive = ! empty($params['driverOptions']['exclusive']); + + if ($persistent && $exclusive) { + throw InvalidConfiguration::forPersistentAndExclusive(); + } + + if ($persistent) { + $connection = @oci_pconnect($username, $password, $connectionString, $charset, $sessionMode); + } elseif ($exclusive) { + $connection = @oci_new_connect($username, $password, $connectionString, $charset, $sessionMode); + } else { + $connection = @oci_connect($username, $password, $connectionString, $charset, $sessionMode); + } + + if ($connection === false) { + throw ConnectionFailed::new(); + } + + return new Connection($connection); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/OCI8/Exception/ConnectionFailed.php b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Exception/ConnectionFailed.php new file mode 100644 index 0000000..691d1e3 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Exception/ConnectionFailed.php @@ -0,0 +1,22 @@ +isAutoCommitEnabled = true; + } + + public function disableAutoCommit(): void + { + $this->isAutoCommitEnabled = false; + } + + public function isAutoCommitEnabled(): bool + { + return $this->isAutoCommitEnabled; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/OCI8/Middleware/InitializeSession.php b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Middleware/InitializeSession.php new file mode 100644 index 0000000..b825a1a --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Middleware/InitializeSession.php @@ -0,0 +1,40 @@ +exec( + 'ALTER SESSION SET' + . " NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS'" + . " NLS_TIME_FORMAT = 'HH24:MI:SS'" + . " NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'" + . " NLS_TIMESTAMP_TZ_FORMAT = 'YYYY-MM-DD HH24:MI:SS TZH:TZM'" + . " NLS_NUMERIC_CHARACTERS = '.,'", + ); + + return $connection; + } + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/OCI8/Result.php b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Result.php new file mode 100644 index 0000000..bafd883 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Result.php @@ -0,0 +1,136 @@ +fetch(OCI_NUM); + } + + public function fetchAssociative(): array|false + { + return $this->fetch(OCI_ASSOC); + } + + public function fetchOne(): mixed + { + return FetchUtils::fetchOne($this); + } + + /** + * {@inheritDoc} + */ + public function fetchAllNumeric(): array + { + return $this->fetchAll(OCI_NUM, OCI_FETCHSTATEMENT_BY_ROW); + } + + /** + * {@inheritDoc} + */ + public function fetchAllAssociative(): array + { + return $this->fetchAll(OCI_ASSOC, OCI_FETCHSTATEMENT_BY_ROW); + } + + /** + * {@inheritDoc} + */ + public function fetchFirstColumn(): array + { + return $this->fetchAll(OCI_NUM, OCI_FETCHSTATEMENT_BY_COLUMN)[0]; + } + + public function rowCount(): int + { + $count = oci_num_rows($this->statement); + + if ($count !== false) { + return $count; + } + + return 0; + } + + public function columnCount(): int + { + return oci_num_fields($this->statement); + } + + public function getColumnName(int $index): string + { + // OCI expects a 1-based index while DBAL works with a O-based index. + $name = @oci_field_name($this->statement, $index + 1); + + if ($name === false) { + throw InvalidColumnIndex::new($index); + } + + return $name; + } + + public function free(): void + { + oci_cancel($this->statement); + } + + /** @throws Exception */ + private function fetch(int $mode): mixed + { + $result = oci_fetch_array($this->statement, $mode | OCI_RETURN_NULLS | OCI_RETURN_LOBS); + + if ($result === false && oci_error($this->statement) !== false) { + throw Error::new($this->statement); + } + + return $result; + } + + /** @return array */ + private function fetchAll(int $mode, int $fetchStructure): array + { + oci_fetch_all( + $this->statement, + $result, + 0, + -1, + $mode | OCI_RETURN_NULLS | $fetchStructure | OCI_RETURN_LOBS, + ); + + return $result; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/OCI8/Statement.php b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Statement.php new file mode 100644 index 0000000..408f0dd --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/OCI8/Statement.php @@ -0,0 +1,103 @@ + $parameterMap + */ + public function __construct( + private readonly mixed $connection, + private readonly mixed $statement, + private readonly array $parameterMap, + private readonly ExecutionMode $executionMode, + ) { + } + + public function bindValue(int|string $param, mixed $value, ParameterType $type): void + { + if (is_int($param)) { + if (! isset($this->parameterMap[$param])) { + throw UnknownParameterIndex::new($param); + } + + $param = $this->parameterMap[$param]; + } + + if ($type === ParameterType::LARGE_OBJECT) { + if ($value !== null) { + $lob = oci_new_descriptor($this->connection, OCI_D_LOB); + $lob->writeTemporary($value, OCI_TEMP_BLOB); + + $value =& $lob; + } else { + $type = ParameterType::STRING; + } + } + + if ( + ! @oci_bind_by_name( + $this->statement, + $param, + $value, + -1, + $this->convertParameterType($type), + ) + ) { + throw Error::new($this->statement); + } + } + + /** + * Converts DBAL parameter type to oci8 parameter type + */ + private function convertParameterType(ParameterType $type): int + { + return match ($type) { + ParameterType::BINARY => OCI_B_BIN, + ParameterType::LARGE_OBJECT => OCI_B_BLOB, + default => SQLT_CHR, + }; + } + + public function execute(): Result + { + if ($this->executionMode->isAutoCommitEnabled()) { + $mode = OCI_COMMIT_ON_SUCCESS; + } else { + $mode = OCI_NO_AUTO_COMMIT; + } + + $ret = @oci_execute($this->statement, $mode); + if (! $ret) { + throw Error::new($this->statement); + } + + return new Result($this->statement); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/Connection.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/Connection.php new file mode 100644 index 0000000..b1faca1 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/Connection.php @@ -0,0 +1,133 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + } + + public function exec(string $sql): int + { + try { + $result = $this->connection->exec($sql); + + assert($result !== false); + + return $result; + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + public function getServerVersion(): string + { + return $this->connection->getAttribute(PDO::ATTR_SERVER_VERSION); + } + + public function prepare(string $sql): Statement + { + try { + $stmt = $this->connection->prepare($sql); + assert($stmt instanceof PDOStatement); + + return new Statement($stmt); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + public function query(string $sql): Result + { + try { + $stmt = $this->connection->query($sql); + assert($stmt instanceof PDOStatement); + + return new Result($stmt); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + public function quote(string $value): string + { + return $this->connection->quote($value); + } + + public function lastInsertId(): int|string + { + try { + $value = $this->connection->lastInsertId(); + } catch (PDOException $exception) { + assert($exception->errorInfo !== null); + [$sqlState] = $exception->errorInfo; + + // if the PDO driver does not support this capability, PDO::lastInsertId() triggers an IM001 SQLSTATE + // see https://www.php.net/manual/en/pdo.lastinsertid.php + if ($sqlState === 'IM001') { + throw IdentityColumnsNotSupported::new(); + } + + // PDO PGSQL throws a 'lastval is not yet defined in this session' error when no identity value is + // available, with SQLSTATE 55000 'Object Not In Prerequisite State' + if ($sqlState === '55000' && $this->connection->getAttribute(PDO::ATTR_DRIVER_NAME) === 'pgsql') { + throw NoIdentityValue::new($exception); + } + + throw Exception::new($exception); + } + + // pdo_mysql & pdo_sqlite return '0', pdo_sqlsrv returns '' or false depending on the PHP version + if ($value === '0' || $value === '' || $value === false) { + throw NoIdentityValue::new(); + } + + return $value; + } + + public function beginTransaction(): void + { + try { + $this->connection->beginTransaction(); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + public function commit(): void + { + try { + $this->connection->commit(); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + public function rollBack(): void + { + try { + $this->connection->rollBack(); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + public function getNativeConnection(): PDO + { + return $this->connection; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/Exception.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/Exception.php new file mode 100644 index 0000000..0c0d155 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/Exception.php @@ -0,0 +1,26 @@ +errorInfo !== null) { + [$sqlState, $code] = $exception->errorInfo; + + $code ??= 0; + } else { + $code = $exception->getCode(); + $sqlState = null; + } + + return new self($exception->getMessage(), $sqlState, $code, $exception); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/Exception/InvalidConfiguration.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/Exception/InvalidConfiguration.php new file mode 100644 index 0000000..e9f0452 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/Exception/InvalidConfiguration.php @@ -0,0 +1,22 @@ +doConnect( + $this->constructPdoDsn($safeParams), + $params['user'] ?? '', + $params['password'] ?? '', + $driverOptions, + ); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + + return new Connection($pdo); + } + + /** + * Constructs the MySQL PDO DSN. + * + * @param mixed[] $params + */ + private function constructPdoDsn(array $params): string + { + $dsn = 'mysql:'; + if (isset($params['host']) && $params['host'] !== '') { + $dsn .= 'host=' . $params['host'] . ';'; + } + + if (isset($params['port'])) { + $dsn .= 'port=' . $params['port'] . ';'; + } + + if (isset($params['dbname'])) { + $dsn .= 'dbname=' . $params['dbname'] . ';'; + } + + if (isset($params['unix_socket'])) { + $dsn .= 'unix_socket=' . $params['unix_socket'] . ';'; + } + + if (isset($params['charset'])) { + $dsn .= 'charset=' . $params['charset'] . ';'; + } + + return $dsn; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/OCI/Driver.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/OCI/Driver.php new file mode 100644 index 0000000..49882b0 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/OCI/Driver.php @@ -0,0 +1,73 @@ +doConnect( + $this->constructPdoDsn($params), + $params['user'] ?? '', + $params['password'] ?? '', + $driverOptions, + ); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + + return new Connection($pdo); + } + + /** + * Constructs the Oracle PDO DSN. + * + * @param mixed[] $params + */ + private function constructPdoDsn(array $params): string + { + $dsn = 'oci:dbname=' . $this->getEasyConnectString($params); + + if (isset($params['charset'])) { + $dsn .= ';charset=' . $params['charset']; + } + + return $dsn; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/PDOConnect.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/PDOConnect.php new file mode 100644 index 0000000..928e774 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/PDOConnect.php @@ -0,0 +1,30 @@ + $options */ + private function doConnect( + #[SensitiveParameter] + string $dsn, + string $username, + #[SensitiveParameter] + string $password, + array $options, + ): PDO { + if (PHP_VERSION_ID < 80400) { + return new PDO($dsn, $username, $password, $options); + } + + return PDO::connect($dsn, $username, $password, $options); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php new file mode 100644 index 0000000..f7016b7 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php @@ -0,0 +1,131 @@ +doConnect( + $this->constructPdoDsn($safeParams), + $params['user'] ?? '', + $params['password'] ?? '', + $driverOptions, + ); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + + $disablePreparesAttr = PHP_VERSION_ID >= 80400 + ? Pgsql::ATTR_DISABLE_PREPARES + : PDO::PGSQL_ATTR_DISABLE_PREPARES; + if ( + ! isset($driverOptions[$disablePreparesAttr]) + || $driverOptions[$disablePreparesAttr] === true + ) { + $pdo->setAttribute($disablePreparesAttr, true); + } + + $connection = new Connection($pdo); + + /* defining client_encoding via SET NAMES to avoid inconsistent DSN support + * - passing client_encoding via the 'options' param breaks pgbouncer support + */ + if (isset($params['charset'])) { + $connection->exec('SET NAMES \'' . $params['charset'] . '\''); + } + + return $connection; + } + + /** + * Constructs the Postgres PDO DSN. + * + * @param array $params + */ + private function constructPdoDsn(array $params): string + { + $dsn = 'pgsql:'; + + if (isset($params['host']) && $params['host'] !== '') { + $dsn .= 'host=' . $params['host'] . ';'; + } + + if (isset($params['port']) && $params['port'] !== '') { + $dsn .= 'port=' . $params['port'] . ';'; + } + + if (isset($params['dbname'])) { + $dsn .= 'dbname=' . $params['dbname'] . ';'; + } + + if (isset($params['sslmode'])) { + $dsn .= 'sslmode=' . $params['sslmode'] . ';'; + } + + if (isset($params['sslrootcert'])) { + $dsn .= 'sslrootcert=' . $params['sslrootcert'] . ';'; + } + + if (isset($params['sslcert'])) { + $dsn .= 'sslcert=' . $params['sslcert'] . ';'; + } + + if (isset($params['sslkey'])) { + $dsn .= 'sslkey=' . $params['sslkey'] . ';'; + } + + if (isset($params['sslcrl'])) { + $dsn .= 'sslcrl=' . $params['sslcrl'] . ';'; + } + + if (isset($params['application_name'])) { + $dsn .= 'application_name=' . $params['application_name'] . ';'; + } + + if (isset($params['gssencmode'])) { + $dsn .= 'gssencmode=' . $params['gssencmode'] . ';'; + } + + return $dsn; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/Result.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/Result.php new file mode 100644 index 0000000..ca2ff45 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/Result.php @@ -0,0 +1,130 @@ +fetch(PDO::FETCH_NUM); + } + + public function fetchAssociative(): array|false + { + return $this->fetch(PDO::FETCH_ASSOC); + } + + public function fetchOne(): mixed + { + return $this->fetch(PDO::FETCH_COLUMN); + } + + /** + * {@inheritDoc} + */ + public function fetchAllNumeric(): array + { + return $this->fetchAll(PDO::FETCH_NUM); + } + + /** + * {@inheritDoc} + */ + public function fetchAllAssociative(): array + { + return $this->fetchAll(PDO::FETCH_ASSOC); + } + + /** + * {@inheritDoc} + */ + public function fetchFirstColumn(): array + { + return $this->fetchAll(PDO::FETCH_COLUMN); + } + + public function rowCount(): int + { + try { + return $this->statement->rowCount(); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + public function columnCount(): int + { + try { + return $this->statement->columnCount(); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + /** @throws Exception */ + public function getColumnName(int $index): string + { + try { + $meta = $this->statement->getColumnMeta($index); + } catch (ValueError $exception) { + throw InvalidColumnIndex::new($index, $exception); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + + if ($meta === false) { + throw InvalidColumnIndex::new($index); + } + + return $meta['name']; + } + + public function free(): void + { + $this->statement->closeCursor(); + } + + /** + * @phpstan-param PDO::FETCH_* $mode + * + * @throws Exception + */ + private function fetch(int $mode): mixed + { + try { + return $this->statement->fetch($mode); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + /** + * @phpstan-param PDO::FETCH_* $mode + * + * @return list + * + * @throws Exception + */ + private function fetchAll(int $mode): array + { + try { + return $this->statement->fetchAll($mode); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php new file mode 100644 index 0000000..78ba7f8 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php @@ -0,0 +1,29 @@ +connection->prepare($sql), + ); + } + + public function getNativeConnection(): PDO + { + return $this->connection->getNativeConnection(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php new file mode 100644 index 0000000..2d7490b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php @@ -0,0 +1,119 @@ + $value) { + if (is_int($option)) { + $driverOptions[$option] = $value; + } else { + $dsnOptions[$option] = $value; + } + } + } + + if (! empty($params['persistent'])) { + $driverOptions[PDO::ATTR_PERSISTENT] = true; + } + + foreach (['user', 'password'] as $key) { + if (isset($params[$key]) && ! is_string($params[$key])) { + throw InvalidConfiguration::notAStringOrNull($key, $params[$key]); + } + } + + $safeParams = $params; + unset($safeParams['password']); + + try { + $pdo = $this->doConnect( + $this->constructDsn($safeParams, $dsnOptions), + $params['user'] ?? '', + $params['password'] ?? '', + $driverOptions, + ); + } catch (\PDOException $exception) { + throw PDOException::new($exception); + } + + return new Connection(new PDOConnection($pdo)); + } + + /** + * Constructs the Sqlsrv PDO DSN. + * + * @param mixed[] $params + * @param string[] $connectionOptions + * + * @throws Exception + */ + private function constructDsn(array $params, array $connectionOptions): string + { + $dsn = 'sqlsrv:server='; + + if (isset($params['host'])) { + $dsn .= $params['host']; + + if (isset($params['port'])) { + $dsn .= ',' . $params['port']; + } + } elseif (isset($params['port'])) { + throw PortWithoutHost::new(); + } + + if (isset($params['dbname'])) { + $connectionOptions['Database'] = $params['dbname']; + } + + if (isset($params['MultipleActiveResultSets'])) { + $connectionOptions['MultipleActiveResultSets'] = $params['MultipleActiveResultSets'] ? 'true' : 'false'; + } + + return $dsn . $this->getConnectionOptionsDsn($connectionOptions); + } + + /** + * Converts a connection options array to the DSN + * + * @param string[] $connectionOptions + */ + private function getConnectionOptionsDsn(array $connectionOptions): string + { + $connectionOptionsDsn = ''; + + foreach ($connectionOptions as $paramName => $paramValue) { + $connectionOptionsDsn .= sprintf(';%s=%s', $paramName, $paramValue); + } + + return $connectionOptionsDsn; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Statement.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Statement.php new file mode 100644 index 0000000..44cecc9 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Statement.php @@ -0,0 +1,46 @@ +statement->bindParamWithDriverOptions( + $param, + $value, + $type, + PDO::SQLSRV_ENCODING_BINARY, + ); + break; + + case ParameterType::ASCII: + $this->statement->bindParamWithDriverOptions( + $param, + $value, + ParameterType::STRING, + PDO::SQLSRV_ENCODING_SYSTEM, + ); + break; + + default: + $this->statement->bindValue($param, $value, $type); + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php new file mode 100644 index 0000000..fbd4187 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php @@ -0,0 +1,65 @@ +doConnect( + $this->constructPdoDsn(array_intersect_key($params, ['path' => true, 'memory' => true])), + $params['user'] ?? '', + $params['password'] ?? '', + $params['driverOptions'] ?? [], + ); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + + return new Connection($pdo); + } + + /** + * Constructs the Sqlite PDO DSN. + * + * @param array $params + */ + private function constructPdoDsn(array $params): string + { + $dsn = 'sqlite:'; + if (isset($params['path'])) { + $dsn .= $params['path']; + } elseif (isset($params['memory'])) { + $dsn .= ':memory:'; + } + + return $dsn; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PDO/Statement.php b/backend/vendor/doctrine/dbal/src/Driver/PDO/Statement.php new file mode 100644 index 0000000..a2694fc --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PDO/Statement.php @@ -0,0 +1,80 @@ +convertParamType($type); + + try { + $this->stmt->bindValue($param, $value, $pdoType); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + /** + * @internal Driver options can be only specified by a PDO-based driver. + * + * @throws ExceptionInterface + */ + public function bindParamWithDriverOptions( + string|int $param, + mixed &$variable, + ParameterType $type, + mixed $driverOptions, + ): void { + $pdoType = $this->convertParamType($type); + + try { + $this->stmt->bindParam($param, $variable, $pdoType, 0, $driverOptions); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + public function execute(): Result + { + try { + $this->stmt->execute(); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + + return new Result($this->stmt); + } + + /** + * Converts DBAL parameter type to PDO parameter type + * + * @phpstan-return PDO::PARAM_* + */ + private function convertParamType(ParameterType $type): int + { + return match ($type) { + ParameterType::NULL => PDO::PARAM_NULL, + ParameterType::INTEGER => PDO::PARAM_INT, + ParameterType::STRING, + ParameterType::ASCII => PDO::PARAM_STR, + ParameterType::BINARY, + ParameterType::LARGE_OBJECT => PDO::PARAM_LOB, + ParameterType::BOOLEAN => PDO::PARAM_BOOL, + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Connection.php b/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Connection.php new file mode 100644 index 0000000..5d7a40d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Connection.php @@ -0,0 +1,132 @@ +parser = new Parser(false); + } + + public function __destruct() + { + // @phpstan-ignore isset.initializedProperty + if (! isset($this->connection)) { + return; + } + + @pg_close($this->connection); + } + + public function prepare(string $sql): Statement + { + $visitor = new ConvertParameters(); + + /** @phpstan-ignore missingType.checkedException */ + $this->parser->parse($sql, $visitor); + + $statementName = uniqid('dbal', true); + if (@pg_send_prepare($this->connection, $statementName, $visitor->getSQL()) !== true) { + throw new Exception(pg_last_error($this->connection)); + } + + $result = @pg_get_result($this->connection); + assert($result !== false); + + if ((bool) pg_result_error($result)) { + throw Exception::fromResult($result); + } + + return new Statement($this->connection, $statementName, $visitor->getParameterMap()); + } + + public function query(string $sql): Result + { + if (@pg_send_query($this->connection, $sql) !== true) { + throw new Exception(pg_last_error($this->connection)); + } + + $result = @pg_get_result($this->connection); + assert($result !== false); + + if ((bool) pg_result_error($result)) { + throw Exception::fromResult($result); + } + + return new Result($result); + } + + /** {@inheritDoc} */ + public function quote(string $value): string + { + $quotedValue = pg_escape_literal($this->connection, $value); + assert($quotedValue !== false); + + return $quotedValue; + } + + public function exec(string $sql): int + { + return $this->query($sql)->rowCount(); + } + + /** {@inheritDoc} */ + public function lastInsertId(): int|string + { + try { + return $this->query('SELECT LASTVAL()')->fetchOne(); + } catch (Exception $exception) { + if ($exception->getSQLState() === '55000') { + throw NoIdentityValue::new($exception); + } + + throw $exception; + } + } + + public function beginTransaction(): void + { + $this->exec('BEGIN'); + } + + public function commit(): void + { + $this->exec('COMMIT'); + } + + public function rollBack(): void + { + $this->exec('ROLLBACK'); + } + + public function getServerVersion(): string + { + return (string) pg_version($this->connection)['server']; + } + + public function getNativeConnection(): PgSqlConnection + { + return $this->connection; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PgSQL/ConvertParameters.php b/backend/vendor/doctrine/dbal/src/Driver/PgSQL/ConvertParameters.php new file mode 100644 index 0000000..795f12d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PgSQL/ConvertParameters.php @@ -0,0 +1,49 @@ + */ + private array $buffer = []; + + /** @var array */ + private array $parameterMap = []; + + public function acceptPositionalParameter(string $sql): void + { + $position = count($this->parameterMap) + 1; + $this->parameterMap[$position] = $position; + $this->buffer[] = '$' . $position; + } + + public function acceptNamedParameter(string $sql): void + { + $position = count($this->parameterMap) + 1; + $this->parameterMap[$sql] = $position; + $this->buffer[] = '$' . $position; + } + + public function acceptOther(string $sql): void + { + $this->buffer[] = $sql; + } + + public function getSQL(): string + { + return implode('', $this->buffer); + } + + /** @return array */ + public function getParameterMap(): array + { + return $this->parameterMap; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Driver.php b/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Driver.php new file mode 100644 index 0000000..6bdcb60 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Driver.php @@ -0,0 +1,98 @@ +constructConnectionString($params), PGSQL_CONNECT_FORCE_NEW); + } catch (ErrorException $e) { + throw new Exception($e->getMessage(), '08006', 0, $e); + } finally { + restore_error_handler(); + } + + if ($connection === false) { + throw new Exception('Unable to connect to Postgres server.'); + } + + $driverConnection = new Connection($connection); + + if (isset($params['application_name'])) { + $driverConnection->exec('SET application_name = ' . $driverConnection->quote($params['application_name'])); + } + + return $driverConnection; + } + + /** + * Constructs the Postgres connection string + * + * @param array $params + */ + private function constructConnectionString( + #[SensitiveParameter] + array $params, + ): string { + // pg_connect used by Doctrine DBAL does not support [...] notation, + // but requires the host address in plain form like `aa:bb:99...` + $matches = []; + if (isset($params['host']) && preg_match('/^\[(.+)\]$/', $params['host'], $matches) === 1) { + $params['hostaddr'] = $matches[1]; + unset($params['host']); + } + + $components = array_filter( + [ + 'host' => $params['host'] ?? null, + 'hostaddr' => $params['hostaddr'] ?? null, + 'port' => $params['port'] ?? null, + 'dbname' => $params['dbname'] ?? 'postgres', + 'user' => $params['user'] ?? null, + 'password' => $params['password'] ?? null, + 'sslmode' => $params['sslmode'] ?? null, + 'gssencmode' => $params['gssencmode'] ?? null, + ], + static fn (int|string|null $value) => $value !== '' && $value !== null, + ); + + return implode(' ', array_map( + static fn (int|string $value, string $key) => sprintf("%s='%s'", $key, addslashes((string) $value)), + array_values($components), + array_keys($components), + )); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Exception.php b/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Exception.php new file mode 100644 index 0000000..91f4e3d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Exception.php @@ -0,0 +1,27 @@ +result = $result; + } + + public function __destruct() + { + if (! isset($this->result)) { + return; + } + + $this->free(); + } + + /** {@inheritDoc} */ + public function fetchNumeric(): array|false + { + if ($this->result === null) { + return false; + } + + $row = pg_fetch_row($this->result); + if ($row === false) { + return false; + } + + return $this->mapNumericRow($row, $this->fetchNumericColumnTypes()); + } + + /** {@inheritDoc} */ + public function fetchAssociative(): array|false + { + if ($this->result === null) { + return false; + } + + $row = pg_fetch_assoc($this->result); + if ($row === false) { + return false; + } + + return $this->mapAssociativeRow($row, $this->fetchAssociativeColumnTypes()); + } + + /** {@inheritDoc} */ + public function fetchOne(): mixed + { + return FetchUtils::fetchOne($this); + } + + /** {@inheritDoc} */ + public function fetchAllNumeric(): array + { + if ($this->result === null) { + return []; + } + + $types = $this->fetchNumericColumnTypes(); + + return array_map( + fn (array $row) => $this->mapNumericRow($row, $types), + pg_fetch_all($this->result, PGSQL_NUM), + ); + } + + /** {@inheritDoc} */ + public function fetchAllAssociative(): array + { + if ($this->result === null) { + return []; + } + + $types = $this->fetchAssociativeColumnTypes(); + + return array_map( + fn (array $row) => $this->mapAssociativeRow($row, $types), + pg_fetch_all($this->result, PGSQL_ASSOC), + ); + } + + /** {@inheritDoc} */ + public function fetchFirstColumn(): array + { + if ($this->result === null) { + return []; + } + + $postgresType = pg_field_type($this->result, 0); + + return array_map( + fn ($value) => $this->mapType($postgresType, $value), + pg_fetch_all_columns($this->result), + ); + } + + public function rowCount(): int + { + if ($this->result === null) { + return 0; + } + + return pg_affected_rows($this->result); + } + + public function columnCount(): int + { + if ($this->result === null) { + return 0; + } + + return pg_num_fields($this->result); + } + + public function getColumnName(int $index): string + { + if ($this->result === null) { + throw InvalidColumnIndex::new($index); + } + + try { + return pg_field_name($this->result, $index); + } catch (ValueError) { + throw InvalidColumnIndex::new($index); + } + } + + public function free(): void + { + if ($this->result === null) { + return; + } + + pg_free_result($this->result); + $this->result = null; + } + + /** @return array */ + private function fetchNumericColumnTypes(): array + { + assert($this->result !== null); + + $types = []; + $numFields = pg_num_fields($this->result); + for ($i = 0; $i < $numFields; ++$i) { + $types[$i] = pg_field_type($this->result, $i); + } + + return $types; + } + + /** @return array */ + private function fetchAssociativeColumnTypes(): array + { + assert($this->result !== null); + + $types = []; + $numFields = pg_num_fields($this->result); + for ($i = 0; $i < $numFields; ++$i) { + $types[pg_field_name($this->result, $i)] = pg_field_type($this->result, $i); + } + + return $types; + } + + /** + * @param list $row + * @param array $types + * + * @return list + */ + private function mapNumericRow(array $row, array $types): array + { + assert($this->result !== null); + + return array_map( + fn ($value, $field) => $this->mapType($types[$field], $value), + $row, + array_keys($row), + ); + } + + /** + * @param array $row + * @param array $types + * + * @return array + */ + private function mapAssociativeRow(array $row, array $types): array + { + assert($this->result !== null); + + $mappedRow = []; + foreach ($row as $field => $value) { + $mappedRow[$field] = $this->mapType($types[$field], $value); + } + + return $mappedRow; + } + + private function mapType(string $postgresType, ?string $value): string|int|float|bool|null + { + if ($value === null) { + return null; + } + + return match ($postgresType) { + 'bool' => match ($value) { + 't' => true, + 'f' => false, + default => throw UnexpectedValue::new($value, $postgresType), + }, + 'bytea' => hex2bin(substr($value, 2)), + 'float4', 'float8' => (float) $value, + 'int2', 'int4' => (int) $value, + 'int8' => PHP_INT_SIZE >= 8 ? (int) $value : $value, + default => $value, + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Statement.php b/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Statement.php new file mode 100644 index 0000000..d6aa2f9 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/PgSQL/Statement.php @@ -0,0 +1,101 @@ + */ + private array $parameters = []; + + /** @phpstan-var array */ + private array $parameterTypes = []; + + /** @param array $parameterMap */ + public function __construct( + private readonly PgSqlConnection $connection, + private readonly string $name, + private readonly array $parameterMap, + ) { + } + + public function __destruct() + { + // @phpstan-ignore isset.initializedProperty + if (! isset($this->connection)) { + return; + } + + @pg_query( + $this->connection, + 'DEALLOCATE ' . pg_escape_identifier($this->connection, $this->name), + ); + } + + /** {@inheritDoc} */ + public function bindValue(int|string $param, mixed $value, ParameterType $type = ParameterType::STRING): void + { + if (! isset($this->parameterMap[$param])) { + throw UnknownParameter::new((string) $param); + } + + if ($value === null) { + $type = ParameterType::NULL; + } + + if ($type === ParameterType::BOOLEAN) { + $this->parameters[$this->parameterMap[$param]] = (bool) $value === false ? 'f' : 't'; + $this->parameterTypes[$this->parameterMap[$param]] = ParameterType::STRING; + } else { + $this->parameters[$this->parameterMap[$param]] = $value; + $this->parameterTypes[$this->parameterMap[$param]] = $type; + } + } + + /** {@inheritDoc} */ + public function execute(): Result + { + ksort($this->parameters); + + $escapedParameters = []; + foreach ($this->parameters as $parameter => $value) { + $escapedParameters[] = match ($this->parameterTypes[$parameter]) { + ParameterType::BINARY, ParameterType::LARGE_OBJECT => $value === null + ? null + : pg_escape_bytea($this->connection, is_resource($value) ? stream_get_contents($value) : $value), + default => $value, + }; + } + + if (@pg_send_execute($this->connection, $this->name, $escapedParameters) !== true) { + throw new Exception(pg_last_error($this->connection)); + } + + $result = @pg_get_result($this->connection); + assert($result !== false); + + if ((bool) pg_result_error($result)) { + throw Exception::fromResult($result); + } + + return new Result($result); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Result.php b/backend/vendor/doctrine/dbal/src/Driver/Result.php new file mode 100644 index 0000000..c26e38c --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Result.php @@ -0,0 +1,95 @@ +|false + * + * @throws Exception + */ + public function fetchNumeric(): array|false; + + /** + * Returns the next row of the result as an associative array or FALSE if there are no more rows. + * + * @return array|false + * + * @throws Exception + */ + public function fetchAssociative(): array|false; + + /** + * Returns the first value of the next row of the result or FALSE if there are no more rows. + * + * @throws Exception + */ + public function fetchOne(): mixed; + + /** + * Returns an array containing all of the result rows represented as numeric arrays. + * + * @return list> + * + * @throws Exception + */ + public function fetchAllNumeric(): array; + + /** + * Returns an array containing all of the result rows represented as associative arrays. + * + * @return list> + * + * @throws Exception + */ + public function fetchAllAssociative(): array; + + /** + * Returns an array containing the values of the first column of the result. + * + * @return list + * + * @throws Exception + */ + public function fetchFirstColumn(): array; + + /** + * Returns the number of rows affected by the DELETE, INSERT, or UPDATE statement that produced the result. + * + * If the statement executed a SELECT query or a similar platform-specific SQL (e.g. DESCRIBE, SHOW, etc.), + * some database drivers may return the number of rows returned by that query. However, this behaviour + * is not guaranteed for all drivers and should not be relied on in portable applications. + * + * If the number of rows exceeds {@see PHP_INT_MAX}, it might be returned as string if the driver supports it. + * + * @return int|numeric-string + * + * @throws Exception + */ + public function rowCount(): int|string; + + /** + * Returns the number of columns in the result + * + * @return int The number of columns in the result. If the columns cannot be counted, + * this method must return 0. + * + * @throws Exception + */ + public function columnCount(): int; + + /** + * Discards the non-fetched portion of the result, enabling the originating statement to be executed again. + */ + public function free(): void; +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/SQLSrv/Connection.php b/backend/vendor/doctrine/dbal/src/Driver/SQLSrv/Connection.php new file mode 100644 index 0000000..71050f1 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/SQLSrv/Connection.php @@ -0,0 +1,108 @@ +connection); + + return $serverInfo['SQLServerVersion']; + } + + public function prepare(string $sql): Statement + { + return new Statement($this->connection, $sql); + } + + public function query(string $sql): Result + { + return $this->prepare($sql)->execute(); + } + + public function quote(string $value): string + { + return "'" . str_replace("'", "''", $value) . "'"; + } + + public function exec(string $sql): int + { + $stmt = sqlsrv_query($this->connection, $sql); + + if ($stmt === false) { + throw Error::new(); + } + + $rowsAffected = sqlsrv_rows_affected($stmt); + + if ($rowsAffected === false) { + throw Error::new(); + } + + return $rowsAffected; + } + + public function lastInsertId(): int|string + { + $result = $this->query('SELECT @@IDENTITY'); + + $lastInsertId = $result->fetchOne(); + + if ($lastInsertId === null) { + throw NoIdentityValue::new(); + } + + return $lastInsertId; + } + + public function beginTransaction(): void + { + if (! sqlsrv_begin_transaction($this->connection)) { + throw Error::new(); + } + } + + public function commit(): void + { + if (! sqlsrv_commit($this->connection)) { + throw Error::new(); + } + } + + public function rollBack(): void + { + if (! sqlsrv_rollback($this->connection)) { + throw Error::new(); + } + } + + /** @return resource */ + public function getNativeConnection() + { + return $this->connection; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/SQLSrv/Driver.php b/backend/vendor/doctrine/dbal/src/Driver/SQLSrv/Driver.php new file mode 100644 index 0000000..c9c2c34 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/SQLSrv/Driver.php @@ -0,0 +1,73 @@ +fetch(SQLSRV_FETCH_NUMERIC); + } + + public function fetchAssociative(): array|false + { + return $this->fetch(SQLSRV_FETCH_ASSOC); + } + + public function fetchOne(): mixed + { + return FetchUtils::fetchOne($this); + } + + /** + * {@inheritDoc} + */ + public function fetchAllNumeric(): array + { + return FetchUtils::fetchAllNumeric($this); + } + + /** + * {@inheritDoc} + */ + public function fetchAllAssociative(): array + { + return FetchUtils::fetchAllAssociative($this); + } + + /** + * {@inheritDoc} + */ + public function fetchFirstColumn(): array + { + return FetchUtils::fetchFirstColumn($this); + } + + public function rowCount(): int + { + $count = sqlsrv_rows_affected($this->statement); + + if ($count !== false) { + return $count; + } + + return 0; + } + + public function columnCount(): int + { + $count = sqlsrv_num_fields($this->statement); + + if ($count !== false) { + return $count; + } + + return 0; + } + + public function getColumnName(int $index): string + { + $meta = sqlsrv_field_metadata($this->statement); + + if ($meta === false || ! isset($meta[$index])) { + throw InvalidColumnIndex::new($index); + } + + return $meta[$index]['Name']; + } + + public function free(): void + { + // emulate it by fetching and discarding rows, similarly to what PDO does in this case + // @link http://php.net/manual/en/pdostatement.closecursor.php + // @link https://github.com/php/php-src/blob/php-7.0.11/ext/pdo/pdo_stmt.c#L2075 + // deliberately do not consider multiple result sets, since doctrine/dbal doesn't support them + while (sqlsrv_fetch($this->statement) === true) { + } + } + + private function fetch(int $fetchType): mixed + { + return sqlsrv_fetch_array($this->statement, $fetchType) ?? false; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/SQLSrv/Statement.php b/backend/vendor/doctrine/dbal/src/Driver/SQLSrv/Statement.php new file mode 100644 index 0000000..dc7827a --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/SQLSrv/Statement.php @@ -0,0 +1,140 @@ + + */ + private array $variables = []; + + /** + * Bound parameter types. + * + * @var array + */ + private array $types = []; + + /** + * Append to any INSERT query to retrieve the last insert id. + */ + private const LAST_INSERT_ID_SQL = ';SELECT SCOPE_IDENTITY() AS LastInsertId;'; + + /** + * @internal The statement can be only instantiated by its driver connection. + * + * @param resource $conn + */ + public function __construct( + private readonly mixed $conn, + private string $sql, + ) { + if (stripos($sql, 'INSERT INTO ') !== 0) { + return; + } + + $this->sql .= self::LAST_INSERT_ID_SQL; + } + + public function bindValue(int|string $param, mixed $value, ParameterType $type): void + { + assert(is_int($param)); + + $this->variables[$param] = $value; + $this->types[$param] = $type; + } + + public function execute(): Result + { + $this->stmt ??= $this->prepare(); + + if (! sqlsrv_execute($this->stmt)) { + throw Error::new(); + } + + return new Result($this->stmt); + } + + /** + * Prepares SQL Server statement resource + * + * @return resource + * + * @throws Exception + */ + private function prepare() + { + $params = []; + + foreach ($this->variables as $column => &$variable) { + switch ($this->types[$column]) { + case ParameterType::LARGE_OBJECT: + $params[$column - 1] = [ + &$variable, + SQLSRV_PARAM_IN, + SQLSRV_PHPTYPE_STREAM(SQLSRV_ENC_BINARY), + SQLSRV_SQLTYPE_VARBINARY('max'), + ]; + break; + + case ParameterType::BINARY: + $params[$column - 1] = [ + &$variable, + SQLSRV_PARAM_IN, + SQLSRV_PHPTYPE_STRING(SQLSRV_ENC_BINARY), + ]; + break; + + case ParameterType::ASCII: + $params[$column - 1] = [ + &$variable, + SQLSRV_PARAM_IN, + SQLSRV_PHPTYPE_STRING(SQLSRV_ENC_CHAR), + ]; + break; + + default: + $params[$column - 1] =& $variable; + break; + } + } + + $stmt = sqlsrv_prepare($this->conn, $this->sql, $params); + + if ($stmt === false) { + throw Error::new(); + } + + return $stmt; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Connection.php b/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Connection.php new file mode 100644 index 0000000..1e9af93 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Connection.php @@ -0,0 +1,109 @@ +connection->prepare($sql); + } catch (\Exception $e) { + throw Exception::new($e); + } + + assert($statement !== false); + + return new Statement($this->connection, $statement); + } + + public function query(string $sql): Result + { + try { + $result = $this->connection->query($sql); + } catch (\Exception $e) { + throw Exception::new($e); + } + + assert($result !== false); + + return new Result($result, $this->connection->changes()); + } + + public function quote(string $value): string + { + return sprintf('\'%s\'', SQLite3::escapeString($value)); + } + + public function exec(string $sql): int + { + try { + $this->connection->exec($sql); + } catch (\Exception $e) { + throw Exception::new($e); + } + + return $this->connection->changes(); + } + + public function lastInsertId(): int + { + $value = $this->connection->lastInsertRowID(); + if ($value === 0) { + throw NoIdentityValue::new(); + } + + return $value; + } + + public function beginTransaction(): void + { + try { + $this->connection->exec('BEGIN'); + } catch (\Exception $e) { + throw Exception::new($e); + } + } + + public function commit(): void + { + try { + $this->connection->exec('COMMIT'); + } catch (\Exception $e) { + throw Exception::new($e); + } + } + + public function rollBack(): void + { + try { + $this->connection->exec('ROLLBACK'); + } catch (\Exception $e) { + throw Exception::new($e); + } + } + + public function getNativeConnection(): SQLite3 + { + return $this->connection; + } + + public function getServerVersion(): string + { + return SQLite3::version()['versionString']; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Driver.php b/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Driver.php new file mode 100644 index 0000000..e6996d3 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Driver.php @@ -0,0 +1,48 @@ +enableExceptions(true); + + return new Connection($connection); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Exception.php b/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Exception.php new file mode 100644 index 0000000..be1a225 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Exception.php @@ -0,0 +1,16 @@ +getMessage(), null, (int) $exception->getCode(), $exception); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Result.php b/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Result.php new file mode 100644 index 0000000..601c026 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Result.php @@ -0,0 +1,104 @@ +result = $result; + } + + public function fetchNumeric(): array|false + { + if ($this->result === null) { + return false; + } + + return $this->result->fetchArray(SQLITE3_NUM); + } + + public function fetchAssociative(): array|false + { + if ($this->result === null) { + return false; + } + + return $this->result->fetchArray(SQLITE3_ASSOC); + } + + public function fetchOne(): mixed + { + return FetchUtils::fetchOne($this); + } + + /** @inheritDoc */ + public function fetchAllNumeric(): array + { + return FetchUtils::fetchAllNumeric($this); + } + + /** @inheritDoc */ + public function fetchAllAssociative(): array + { + return FetchUtils::fetchAllAssociative($this); + } + + /** @inheritDoc */ + public function fetchFirstColumn(): array + { + return FetchUtils::fetchFirstColumn($this); + } + + public function rowCount(): int + { + return $this->changes; + } + + public function columnCount(): int + { + if ($this->result === null) { + return 0; + } + + return $this->result->numColumns(); + } + + public function getColumnName(int $index): string + { + if ($this->result === null) { + throw InvalidColumnIndex::new($index); + } + + $name = $this->result->columnName($index); + + if ($name === false) { + throw InvalidColumnIndex::new($index); + } + + return $name; + } + + public function free(): void + { + if ($this->result === null) { + return; + } + + $this->result->finalize(); + $this->result = null; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Statement.php b/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Statement.php new file mode 100644 index 0000000..eb55667 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/SQLite3/Statement.php @@ -0,0 +1,61 @@ +statement->bindValue($param, $value, $this->convertParamType($type)); + } + + public function execute(): Result + { + try { + $result = $this->statement->execute(); + } catch (\Exception $e) { + throw Exception::new($e); + } + + assert($result !== false); + + return new Result($result, $this->connection->changes()); + } + + /** @phpstan-return self::TYPE_* */ + private function convertParamType(ParameterType $type): int + { + return match ($type) { + ParameterType::NULL => self::TYPE_NULL, + ParameterType::INTEGER, ParameterType::BOOLEAN => self::TYPE_INTEGER, + ParameterType::STRING, ParameterType::ASCII => self::TYPE_TEXT, + ParameterType::BINARY, ParameterType::LARGE_OBJECT => self::TYPE_BLOB, + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Driver/Statement.php b/backend/vendor/doctrine/dbal/src/Driver/Statement.php new file mode 100644 index 0000000..5f91b49 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Driver/Statement.php @@ -0,0 +1,39 @@ +, + * driver?: key-of, + * driverClass?: class-string, + * driverOptions?: array, + * host?: string, + * memory?: bool, + * password?: string, + * path?: string, + * persistent?: bool, + * port?: int, + * serverVersion?: string, + * sessionMode?: int, + * user?: string, + * unix_socket?: string, + * wrapperClass?: class-string, + * } + * @phpstan-type Params = array{ + * application_name?: string, + * charset?: string, + * dbname?: string, + * defaultTableOptions?: array, + * driver?: key-of, + * driverClass?: class-string, + * driverOptions?: array, + * host?: string, + * keepReplica?: bool, + * memory?: bool, + * password?: string, + * path?: string, + * persistent?: bool, + * port?: int, + * primary?: OverrideParams, + * replica?: array, + * serverVersion?: string, + * sessionMode?: int, + * user?: string, + * wrapperClass?: class-string, + * unix_socket?: string, + * } + */ +final class DriverManager +{ + /** + * List of supported drivers and their mappings to the driver classes. + * + * To add your own driver use the 'driverClass' parameter to {@see DriverManager::getConnection()}. + */ + private const DRIVER_MAP = [ + 'pdo_mysql' => PDO\MySQL\Driver::class, + 'pdo_sqlite' => PDO\SQLite\Driver::class, + 'pdo_pgsql' => PDO\PgSQL\Driver::class, + 'pdo_oci' => PDO\OCI\Driver::class, + 'oci8' => OCI8\Driver::class, + 'ibm_db2' => IBMDB2\Driver::class, + 'pdo_sqlsrv' => PDO\SQLSrv\Driver::class, + 'mysqli' => Mysqli\Driver::class, + 'pgsql' => PgSQL\Driver::class, + 'sqlsrv' => SQLSrv\Driver::class, + 'sqlite3' => SQLite3\Driver::class, + ]; + + /** + * Private constructor. This class cannot be instantiated. + * + * @codeCoverageIgnore + */ + private function __construct() + { + } + + /** + * Creates a connection object based on the specified parameters. + * This method returns a Doctrine\DBAL\Connection which wraps the underlying + * driver connection. + * + * $params must contain at least one of the following. + * + * Either 'driver' with one of the array keys of {@see DRIVER_MAP}, + * OR 'driverClass' that contains the full class name (with namespace) of the + * driver class to instantiate. + * + * Other (optional) parameters: + * + * user (string): + * The username to use when connecting. + * + * password (string): + * The password to use when connecting. + * + * driverOptions (array): + * Any additional driver-specific options for the driver. These are just passed + * through to the driver. + * + * wrapperClass: + * You may specify a custom wrapper class through the 'wrapperClass' + * parameter but this class MUST inherit from Doctrine\DBAL\Connection. + * + * driverClass: + * The driver class to use. + * + * @param Configuration|null $config The configuration to use. + * @phpstan-param Params $params + * + * @phpstan-return ($params is array{wrapperClass: class-string} ? T : Connection) + * + * @template T of Connection + */ + public static function getConnection( + #[SensitiveParameter] + array $params, + ?Configuration $config = null, + ): Connection { + $config ??= new Configuration(); + $driver = self::createDriver($params['driver'] ?? null, $params['driverClass'] ?? null); + + foreach ($config->getMiddlewares() as $middleware) { + $driver = $middleware->wrap($driver); + } + + /** @var class-string $wrapperClass */ + $wrapperClass = $params['wrapperClass'] ?? Connection::class; + if (! is_a($wrapperClass, Connection::class, true)) { + throw InvalidWrapperClass::new($wrapperClass); + } + + return new $wrapperClass($params, $driver, $config); + } + + /** + * Returns the list of supported drivers. + * + * @return string[] + * @phpstan-return list> + */ + public static function getAvailableDrivers(): array + { + return array_keys(self::DRIVER_MAP); + } + + /** + * @param class-string|null $driverClass + * @param key-of|null $driver + */ + private static function createDriver(?string $driver, ?string $driverClass): Driver + { + if ($driverClass === null) { + if ($driver === null) { + throw DriverRequired::new(); + } + + if (! isset(self::DRIVER_MAP[$driver])) { + throw UnknownDriver::new($driver, array_keys(self::DRIVER_MAP)); + } + + $driverClass = self::DRIVER_MAP[$driver]; + } elseif (! is_a($driverClass, Driver::class, true)) { + throw InvalidDriverClass::new($driverClass); + } + + return new $driverClass(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Exception.php b/backend/vendor/doctrine/dbal/src/Exception.php new file mode 100644 index 0000000..304fb6b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Exception.php @@ -0,0 +1,11 @@ +getMessage(); + } else { + $message = 'An exception occurred in the driver: ' . $driverException->getMessage(); + } + + parent::__construct($message, $driverException->getCode(), $driverException); + } + + public function getSQLState(): ?string + { + $previous = $this->getPrevious(); + assert($previous instanceof Driver\Exception); + + return $previous->getSQLState(); + } + + public function getQuery(): ?Query + { + return $this->query; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Exception/DriverRequired.php b/backend/vendor/doctrine/dbal/src/Exception/DriverRequired.php new file mode 100644 index 0000000..883f233 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Exception/DriverRequired.php @@ -0,0 +1,29 @@ + */ + private array $convertedSQL = []; + + /** @var list */ + private array $convertedParameters = []; + + /** @var array,string|ParameterType|Type> */ + private array $convertedTypes = []; + + /** + * @param array|array $parameters + * @phpstan-param WrapperParameterTypeArray $types + */ + public function __construct( + private readonly array $parameters, + private readonly array $types, + ) { + } + + public function acceptPositionalParameter(string $sql): void + { + $index = $this->originalParameterIndex; + + if (! array_key_exists($index, $this->parameters)) { + throw MissingPositionalParameter::new($index); + } + + $this->acceptParameter($index, $this->parameters[$index]); + + $this->originalParameterIndex++; + } + + public function acceptNamedParameter(string $sql): void + { + $name = substr($sql, 1); + + if (! array_key_exists($name, $this->parameters)) { + throw MissingNamedParameter::new($name); + } + + $this->acceptParameter($name, $this->parameters[$name]); + } + + public function acceptOther(string $sql): void + { + $this->convertedSQL[] = $sql; + } + + public function getSQL(): string + { + return implode('', $this->convertedSQL); + } + + /** @return list */ + public function getParameters(): array + { + return $this->convertedParameters; + } + + private function acceptParameter(int|string $key, mixed $value): void + { + if (! isset($this->types[$key])) { + $this->convertedSQL[] = '?'; + $this->convertedParameters[] = $value; + + return; + } + + $type = $this->types[$key]; + + if (! $type instanceof ArrayParameterType) { + $this->appendTypedParameter([$value], $type); + + return; + } + + if (count($value) === 0) { + $this->convertedSQL[] = 'NULL'; + + return; + } + + $this->appendTypedParameter($value, ArrayParameterType::toElementParameterType($type)); + } + + /** @return array,string|ParameterType|Type> */ + public function getTypes(): array + { + return $this->convertedTypes; + } + + /** @param list $values */ + private function appendTypedParameter(array $values, string|ParameterType|Type $type): void + { + $this->convertedSQL[] = implode(', ', array_fill(0, count($values), '?')); + + $index = count($this->convertedParameters); + + foreach ($values as $value) { + $this->convertedParameters[] = $value; + $this->convertedTypes[$index] = $type; + + $index++; + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/LockMode.php b/backend/vendor/doctrine/dbal/src/LockMode.php new file mode 100644 index 0000000..035353e --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/LockMode.php @@ -0,0 +1,16 @@ +logger->info('Disconnecting'); + } + + public function prepare(string $sql): DriverStatement + { + return new Statement( + parent::prepare($sql), + $this->logger, + $sql, + ); + } + + public function query(string $sql): Result + { + $this->logger->debug('Executing query: {sql}', ['sql' => $sql]); + + return parent::query($sql); + } + + public function exec(string $sql): int|string + { + $this->logger->debug('Executing statement: {sql}', ['sql' => $sql]); + + return parent::exec($sql); + } + + public function beginTransaction(): void + { + $this->logger->debug('Beginning transaction'); + + parent::beginTransaction(); + } + + public function commit(): void + { + $this->logger->debug('Committing transaction'); + + parent::commit(); + } + + public function rollBack(): void + { + $this->logger->debug('Rolling back transaction'); + + parent::rollBack(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Logging/Driver.php b/backend/vendor/doctrine/dbal/src/Logging/Driver.php new file mode 100644 index 0000000..35acd39 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Logging/Driver.php @@ -0,0 +1,50 @@ +logger->info('Connecting with parameters {params}', ['params' => $this->maskPassword($params)]); + + return new Connection( + parent::connect($params), + $this->logger, + ); + } + + /** + * @param array $params Connection parameters + * + * @return array + */ + private function maskPassword( + #[SensitiveParameter] + array $params, + ): array { + if (isset($params['password'])) { + $params['password'] = ''; + } + + return $params; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Logging/Middleware.php b/backend/vendor/doctrine/dbal/src/Logging/Middleware.php new file mode 100644 index 0000000..989e0ca --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Logging/Middleware.php @@ -0,0 +1,21 @@ +logger); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Logging/Statement.php b/backend/vendor/doctrine/dbal/src/Logging/Statement.php new file mode 100644 index 0000000..ed1ca7f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Logging/Statement.php @@ -0,0 +1,48 @@ +|array */ + private array $params = []; + + /** @var array|array */ + private array $types = []; + + /** @internal This statement can be only instantiated by its connection. */ + public function __construct( + StatementInterface $statement, + private readonly LoggerInterface $logger, + private readonly string $sql, + ) { + parent::__construct($statement); + } + + public function bindValue(int|string $param, mixed $value, ParameterType $type): void + { + $this->params[$param] = $value; + $this->types[$param] = $type; + + parent::bindValue($param, $value, $type); + } + + public function execute(): ResultInterface + { + $this->logger->debug('Executing statement: {sql} (parameters: {params}, types: {types})', [ + 'sql' => $this->sql, + 'params' => $this->params, + 'types' => $this->types, + ]); + + return parent::execute(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/ParameterType.php b/backend/vendor/doctrine/dbal/src/ParameterType.php new file mode 100644 index 0000000..19f577e --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/ParameterType.php @@ -0,0 +1,46 @@ + 0) { + $query .= sprintf(' OFFSET %d', $offset); + } + } elseif ($offset > 0) { + // 2^64-1 is the maximum of unsigned BIGINT, the biggest limit possible + $query .= sprintf(' LIMIT 18446744073709551615 OFFSET %d', $offset); + } + + return $query; + } + + public function quoteSingleIdentifier(string $str): string + { + return '`' . str_replace('`', '``', $str) . '`'; + } + + public function getRegexpExpression(): string + { + return 'RLIKE'; + } + + public function getLocateExpression(string $string, string $substring, ?string $start = null): string + { + if ($start === null) { + return sprintf('LOCATE(%s, %s)', $substring, $string); + } + + return sprintf('LOCATE(%s, %s, %s)', $substring, $string, $start); + } + + public function getConcatExpression(string ...$string): string + { + return sprintf('CONCAT(%s)', implode(', ', $string)); + } + + protected function getDateArithmeticIntervalExpression( + string $date, + string $operator, + string $interval, + DateIntervalUnit $unit, + ): string { + $function = $operator === '+' ? 'DATE_ADD' : 'DATE_SUB'; + + return $function . '(' . $date . ', INTERVAL ' . $interval . ' ' . $unit->value . ')'; + } + + public function getDateDiffExpression(string $date1, string $date2): string + { + return 'DATEDIFF(' . $date1 . ', ' . $date2 . ')'; + } + + public function getCurrentDatabaseExpression(): string + { + return 'DATABASE()'; + } + + public function getLengthExpression(string $string): string + { + return 'CHAR_LENGTH(' . $string . ')'; + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListDatabasesSQL(): string + { + return 'SHOW DATABASES'; + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListViewsSQL(string $database): string + { + return 'SELECT * FROM information_schema.VIEWS WHERE TABLE_SCHEMA = ' . $this->quoteStringLiteral($database); + } + + /** + * {@inheritDoc} + */ + public function getJsonTypeDeclarationSQL(array $column): string + { + if (! empty($column['jsonb'])) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6939', + 'The "jsonb" column platform option is deprecated. Use the "JSONB" type instead.', + ); + } + + return 'JSON'; + } + + /** + * Gets the SQL snippet used to declare a CLOB column type. + * TINYTEXT : 2 ^ 8 - 1 = 255 + * TEXT : 2 ^ 16 - 1 = 65535 + * MEDIUMTEXT : 2 ^ 24 - 1 = 16777215 + * LONGTEXT : 2 ^ 32 - 1 = 4294967295 + * + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $column): string + { + if (! empty($column['length']) && is_numeric($column['length'])) { + $length = $column['length']; + + if ($length <= static::LENGTH_LIMIT_TINYTEXT) { + return 'TINYTEXT'; + } + + if ($length <= static::LENGTH_LIMIT_TEXT) { + return 'TEXT'; + } + + if ($length <= static::LENGTH_LIMIT_MEDIUMTEXT) { + return 'MEDIUMTEXT'; + } + } + + return 'LONGTEXT'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $column): string + { + if (isset($column['version']) && $column['version'] === true) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6940', + 'The "version" column platform option is deprecated.', + ); + + return 'TIMESTAMP'; + } + + return 'DATETIME'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $column): string + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $column): string + { + return 'TIME'; + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $column): string + { + return 'TINYINT'; + } + + /** + * {@inheritDoc} + * + * MySQL supports this through AUTO_INCREMENT columns. + */ + public function supportsIdentityColumns(): bool + { + return true; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function supportsInlineColumnComments(): bool + { + return true; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function supportsColumnCollation(): bool + { + return true; + } + + /** + * The SQL snippet required to elucidate a column type + * + * Returns a column type SELECT snippet string + * + * @internal The method should be only used from within the {@see MySQLSchemaManager} class hierarchy. + */ + public function getColumnTypeSQLSnippet(string $tableAlias, string $databaseName): string + { + return $tableAlias . '.DATA_TYPE'; + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL(string $name, array $columns, array $options = []): array + { + $this->validateCreateTableOptions($options, __METHOD__); + + $queryFields = $this->getColumnDeclarationListSQL($columns); + + if (! empty($options['uniqueConstraints'])) { + foreach ($options['uniqueConstraints'] as $definition) { + $queryFields .= ', ' . $this->getUniqueConstraintDeclarationSQL($definition); + } + } + + // add all indexes + if (! empty($options['indexes'])) { + foreach ($options['indexes'] as $definition) { + $queryFields .= ', ' . $this->getIndexDeclarationSQL($definition); + } + } + + // attach all primary keys + if (! empty($options['primary'])) { + $keyColumns = array_unique(array_values($options['primary'])); + $queryFields .= ', PRIMARY KEY (' . implode(', ', $keyColumns) . ')'; + } + + $sql = ['CREATE']; + + if (! empty($options['temporary'])) { + $sql[] = 'TEMPORARY'; + } + + $sql[] = 'TABLE ' . $name . ' (' . $queryFields . ')'; + + $tableOptions = $this->buildTableOptions($options); + + if ($tableOptions !== '') { + $sql[] = $tableOptions; + } + + if (isset($options['partition_options'])) { + $sql[] = $options['partition_options']; + } + + $sql = [implode(' ', $sql)]; + + if (isset($options['foreignKeys'])) { + foreach ($options['foreignKeys'] as $definition) { + $sql[] = $this->getCreateForeignKeySQL($definition, $name); + } + } + + return $sql; + } + + public function createSelectSQLBuilder(): SelectSQLBuilder + { + return new DefaultSelectSQLBuilder($this, 'FOR UPDATE', null); + } + + /** + * Build SQL for table options + * + * @param mixed[] $options + */ + private function buildTableOptions(array $options): string + { + if (isset($options['table_options'])) { + return $options['table_options']; + } + + $tableOptions = []; + + if (isset($options['charset'])) { + $tableOptions[] = sprintf('DEFAULT CHARACTER SET %s', $options['charset']); + } + + if (isset($options['collation'])) { + $tableOptions[] = $this->getColumnCollationDeclarationSQL($options['collation']); + } + + if (isset($options['engine'])) { + $tableOptions[] = sprintf('ENGINE = %s', $options['engine']); + } + + // Auto increment + if (isset($options['auto_increment'])) { + $tableOptions[] = sprintf('AUTO_INCREMENT = %s', $options['auto_increment']); + } + + // Comment + if (isset($options['comment'])) { + $tableOptions[] = sprintf('COMMENT = %s ', $this->quoteStringLiteral($options['comment'])); + } + + // Row format + if (isset($options['row_format'])) { + $tableOptions[] = sprintf('ROW_FORMAT = %s', $options['row_format']); + } + + return implode(' ', $tableOptions); + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff): array + { + $queryParts = []; + + foreach ($diff->getAddedColumns() as $column) { + $columnProperties = array_merge($column->toArray(), [ + 'comment' => $column->getComment(), + ]); + + $queryParts[] = 'ADD ' . $this->getColumnDeclarationSQL( + $column->getQuotedName($this), + $columnProperties, + ); + } + + foreach ($diff->getDroppedColumns() as $column) { + $queryParts[] = 'DROP ' . $column->getQuotedName($this); + } + + foreach ($diff->getChangedColumns() as $columnDiff) { + $newColumn = $columnDiff->getNewColumn(); + + $newColumnProperties = array_merge($newColumn->toArray(), [ + 'comment' => $newColumn->getComment(), + ]); + + $oldColumn = $columnDiff->getOldColumn(); + + $queryParts[] = 'CHANGE ' . $oldColumn->getQuotedName($this) . ' ' + . $this->getColumnDeclarationSQL($newColumn->getQuotedName($this), $newColumnProperties); + } + + $droppedIndexes = $this->indexIndexesByLowerCaseName($diff->getDroppedIndexes()); + $addedIndexes = $this->indexIndexesByLowerCaseName($diff->getAddedIndexes()); + $diffModified = false; + + $noLongerPrimaryKeyColumns = []; + + if (isset($droppedIndexes['primary'])) { + $queryParts[] = 'DROP PRIMARY KEY'; + + $noLongerPrimaryKeyColumns = $droppedIndexes['primary']->getColumns(); + } + + if (isset($addedIndexes['primary'])) { + $keyColumns = array_values(array_unique($addedIndexes['primary']->getColumns())); + $queryParts[] = 'ADD PRIMARY KEY (' . implode(', ', $keyColumns) . ')'; + + $noLongerPrimaryKeyColumns = array_diff( + $noLongerPrimaryKeyColumns, + $addedIndexes['primary']->getColumns(), + ); + + $diff->unsetAddedIndex($addedIndexes['primary']); + } + + $tableSql = []; + + if (isset($droppedIndexes['primary'])) { + $oldTable = $diff->getOldTable(); + foreach ($noLongerPrimaryKeyColumns as $columnName) { + if (! $oldTable->hasColumn($columnName)) { + continue; + } + + $column = $oldTable->getColumn($columnName); + if ($column->getAutoincrement()) { + $tableSql = array_merge( + $tableSql, + $this->getPreAlterTableAlterPrimaryKeySQL($diff, $droppedIndexes['primary']), + ); + break; + } + } + + $diff->unsetDroppedIndex($droppedIndexes['primary']); + } + + if (count($queryParts) > 0) { + $tableSql[] = 'ALTER TABLE ' . $diff->getOldTable()->getQuotedName($this) . ' ' + . implode(', ', $queryParts); + } + + return array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $tableSql, + $this->getPostAlterTableIndexForeignKeySQL($diff), + ); + } + + /** + * {@inheritDoc} + */ + protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff): array + { + $sql = []; + + $tableNameSQL = $diff->getOldTable()->getQuotedName($this); + + foreach ($diff->getModifiedIndexes() as $changedIndex) { + $sql = array_merge($sql, $this->getPreAlterTableAlterPrimaryKeySQL($diff, $changedIndex)); + } + + foreach ($diff->getDroppedIndexes() as $droppedIndex) { + $sql = array_merge($sql, $this->getPreAlterTableAlterPrimaryKeySQL($diff, $droppedIndex)); + + foreach ($diff->getAddedIndexes() as $addedIndex) { + if ($droppedIndex->getColumns() !== $addedIndex->getColumns()) { + continue; + } + + $indexClause = 'INDEX ' . $addedIndex->getName(); + + if ($addedIndex->isPrimary()) { + $indexClause = 'PRIMARY KEY'; + } elseif ($addedIndex->isUnique()) { + $indexClause = 'UNIQUE INDEX ' . $addedIndex->getName(); + } + + $query = 'ALTER TABLE ' . $tableNameSQL . ' DROP INDEX ' . $droppedIndex->getName() . ', '; + $query .= 'ADD ' . $indexClause; + $query .= ' (' . implode(', ', $addedIndex->getQuotedColumns($this)) . ')'; + + $sql[] = $query; + + $diff->unsetAddedIndex($addedIndex); + $diff->unsetDroppedIndex($droppedIndex); + + break; + } + } + + return array_merge( + $sql, + $this->getPreAlterTableAlterIndexForeignKeySQL($diff), + parent::getPreAlterTableIndexForeignKeySQL($diff), + $this->getPreAlterTableRenameIndexForeignKeySQL($diff), + ); + } + + /** @return list */ + private function getPreAlterTableAlterPrimaryKeySQL(TableDiff $diff, Index $index): array + { + if (! $index->isPrimary()) { + return []; + } + + $table = $diff->getOldTable(); + + $sql = []; + + $tableNameSQL = $table->getQuotedName($this); + + // Dropping primary keys requires to unset autoincrement attribute on the particular column first. + foreach ($index->getColumns() as $columnName) { + if (! $table->hasColumn($columnName)) { + continue; + } + + $column = $table->getColumn($columnName); + + if (! $column->getAutoincrement()) { + continue; + } + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6841', + 'Relying on the auto-increment attribute of a column being automatically dropped once a column' + . ' is no longer part of the primary key constraint is deprecated. Instead, drop the auto-increment' + . ' attribute explicitly.', + ); + + $column->setAutoincrement(false); + + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' MODIFY ' . + $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); + + // original autoincrement information might be needed later on by other parts of the table alteration + $column->setAutoincrement(true); + } + + return $sql; + } + + /** + * @param TableDiff $diff The table diff to gather the SQL for. + * + * @return list + */ + private function getPreAlterTableAlterIndexForeignKeySQL(TableDiff $diff): array + { + $table = $diff->getOldTable(); + + $primaryKey = $table->getPrimaryKey(); + + if ($primaryKey === null) { + return []; + } + + $primaryKeyColumns = []; + + foreach ($primaryKey->getColumns() as $columnName) { + if (! $table->hasColumn($columnName)) { + continue; + } + + $primaryKeyColumns[] = $table->getColumn($columnName); + } + + if (count($primaryKeyColumns) === 0) { + return []; + } + + $sql = []; + + $tableNameSQL = $table->getQuotedName($this); + + foreach ($diff->getModifiedIndexes() as $changedIndex) { + // Changed primary key + if (! $changedIndex->isPrimary()) { + continue; + } + + foreach ($primaryKeyColumns as $column) { + // Check if an autoincrement column was dropped from the primary key. + if (! $column->getAutoincrement() || in_array($column->getName(), $changedIndex->getColumns(), true)) { + continue; + } + + // The autoincrement attribute needs to be removed from the dropped column + // before we can drop and recreate the primary key. + $column->setAutoincrement(false); + + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' MODIFY ' . + $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); + + // Restore the autoincrement attribute as it might be needed later on + // by other parts of the table alteration. + $column->setAutoincrement(true); + } + } + + return $sql; + } + + /** + * @param TableDiff $diff The table diff to gather the SQL for. + * + * @return list + */ + protected function getPreAlterTableRenameIndexForeignKeySQL(TableDiff $diff): array + { + return []; + } + + protected function getCreateIndexSQLFlags(Index $index): string + { + $type = ''; + if ($index->isUnique()) { + $type .= 'UNIQUE '; + } elseif ($index->hasFlag('fulltext')) { + $type .= 'FULLTEXT '; + } elseif ($index->hasFlag('spatial')) { + $type .= 'SPATIAL '; + } + + return $type; + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $column): string + { + return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $column): string + { + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $column): string + { + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getFloatDeclarationSQL(array $column): string + { + return 'DOUBLE PRECISION' . $this->getUnsignedDeclaration($column); + } + + /** + * {@inheritDoc} + */ + public function getSmallFloatDeclarationSQL(array $column): string + { + return 'FLOAT' . $this->getUnsignedDeclaration($column); + } + + /** + * {@inheritDoc} + */ + public function getDecimalTypeDeclarationSQL(array $column): string + { + return parent::getDecimalTypeDeclarationSQL($column) . $this->getUnsignedDeclaration($column); + } + + /** + * {@inheritDoc} + */ + public function getEnumDeclarationSQL(array $column): string + { + if (! isset($column['values']) || ! is_array($column['values']) || $column['values'] === []) { + throw ColumnValuesRequired::new($this, 'ENUM'); + } + + return sprintf('ENUM(%s)', implode(', ', array_map( + $this->quoteStringLiteral(...), + $column['values'], + ))); + } + + /** + * Get unsigned declaration for a column. + * + * @param mixed[] $columnDef + */ + private function getUnsignedDeclaration(array $columnDef): string + { + return ! empty($columnDef['unsigned']) ? ' UNSIGNED' : ''; + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $column): string + { + $sql = $this->getUnsignedDeclaration($column); + + if (! empty($column['autoincrement'])) { + $sql .= ' AUTO_INCREMENT'; + } + + return $sql; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function getColumnCharsetDeclarationSQL(string $charset): string + { + return 'CHARACTER SET ' . $charset; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey): string + { + $query = ''; + if ($foreignKey->hasOption('match')) { + $query .= ' MATCH ' . $foreignKey->getOption('match'); + } + + $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey); + + return $query; + } + + public function getDropIndexSQL(string $name, string $table): string + { + return 'DROP INDEX ' . $name . ' ON ' . $table; + } + + /** + * The `ALTER TABLE ... DROP CONSTRAINT` syntax is only available as of MySQL 8.0.19. + * + * @link https://dev.mysql.com/doc/refman/8.0/en/alter-table.html + */ + public function getDropUniqueConstraintSQL(string $name, string $tableName): string + { + return $this->getDropIndexSQL($name, $tableName); + } + + public function getSetTransactionIsolationSQL(TransactionIsolationLevel $level): string + { + return 'SET SESSION TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSQL($level); + } + + protected function initializeDoctrineTypeMappings(): void + { + $this->doctrineTypeMapping = [ + 'bigint' => Types::BIGINT, + 'binary' => Types::BINARY, + 'blob' => Types::BLOB, + 'char' => Types::STRING, + 'date' => Types::DATE_MUTABLE, + 'datetime' => Types::DATETIME_MUTABLE, + 'decimal' => Types::DECIMAL, + 'double' => Types::FLOAT, + 'enum' => Types::ENUM, + 'float' => Types::SMALLFLOAT, + 'int' => Types::INTEGER, + 'integer' => Types::INTEGER, + 'json' => Types::JSON, + 'longblob' => Types::BLOB, + 'longtext' => Types::TEXT, + 'mediumblob' => Types::BLOB, + 'mediumint' => Types::INTEGER, + 'mediumtext' => Types::TEXT, + 'numeric' => Types::DECIMAL, + 'real' => Types::FLOAT, + 'set' => Types::SIMPLE_ARRAY, + 'smallint' => Types::SMALLINT, + 'string' => Types::STRING, + 'text' => Types::TEXT, + 'time' => Types::TIME_MUTABLE, + 'timestamp' => Types::DATETIME_MUTABLE, + 'tinyblob' => Types::BLOB, + 'tinyint' => Types::BOOLEAN, + 'tinytext' => Types::TEXT, + 'varbinary' => Types::BINARY, + 'varchar' => Types::STRING, + 'year' => Types::DATE_MUTABLE, + ]; + } + + /** @deprecated */ + protected function createReservedKeywordsList(): KeywordList + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6607', + '%s is deprecated.', + __METHOD__, + ); + + return new MySQLKeywords(); + } + + /** + * {@inheritDoc} + * + * MySQL commits a transaction implicitly when DROP TABLE is executed, however not + * if DROP TEMPORARY TABLE is executed. + */ + public function getDropTemporaryTableSQL(string $table): string + { + return 'DROP TEMPORARY TABLE ' . $table; + } + + /** + * Gets the SQL Snippet used to declare a BLOB column type. + * TINYBLOB : 2 ^ 8 - 1 = 255 + * BLOB : 2 ^ 16 - 1 = 65535 + * MEDIUMBLOB : 2 ^ 24 - 1 = 16777215 + * LONGBLOB : 2 ^ 32 - 1 = 4294967295 + * + * {@inheritDoc} + */ + public function getBlobTypeDeclarationSQL(array $column): string + { + if (! empty($column['length']) && is_numeric($column['length'])) { + $length = $column['length']; + + if ($length <= static::LENGTH_LIMIT_TINYBLOB) { + return 'TINYBLOB'; + } + + if ($length <= static::LENGTH_LIMIT_BLOB) { + return 'BLOB'; + } + + if ($length <= static::LENGTH_LIMIT_MEDIUMBLOB) { + return 'MEDIUMBLOB'; + } + } + + return 'LONGBLOB'; + } + + public function quoteStringLiteral(string $str): string + { + // MySQL requires backslashes to be escaped as well. + $str = str_replace('\\', '\\\\', $str); + + return parent::quoteStringLiteral($str); + } + + public function getDefaultTransactionIsolationLevel(): TransactionIsolationLevel + { + return TransactionIsolationLevel::REPEATABLE_READ; + } + + /** @deprecated */ + public function supportsColumnLengthIndexes(): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated.', + __METHOD__, + ); + + return true; + } + + public function createMetadataProvider(Connection $connection): MySQLMetadataProvider + { + return new MySQLMetadataProvider($connection, $this); + } + + public function createSchemaManager(Connection $connection): MySQLSchemaManager + { + return new MySQLSchemaManager($connection, $this); + } + + /** + * @param array $indexes + * + * @return array + */ + private function indexIndexesByLowerCaseName(array $indexes): array + { + $result = []; + + foreach ($indexes as $index) { + $result[strtolower($index->getName())] = $index; + } + + return $result; + } + + /** @internal The method should be only used from within the {@see MySQLSchemaManager} class hierarchy. */ + public function fetchTableOptionsByTable(bool $includeTableName): string + { + $sql = <<<'SQL' + SELECT t.TABLE_NAME, + t.ENGINE, + t.AUTO_INCREMENT, + t.TABLE_COMMENT, + t.CREATE_OPTIONS, + t.TABLE_COLLATION, + ccsa.CHARACTER_SET_NAME + FROM information_schema.TABLES t + INNER JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ccsa + ON ccsa.COLLATION_NAME = t.TABLE_COLLATION +SQL; + + $conditions = ['t.TABLE_SCHEMA = ?']; + + if ($includeTableName) { + $conditions[] = 't.TABLE_NAME = ?'; + } + + $conditions[] = "t.TABLE_TYPE = 'BASE TABLE'"; + + return $sql . ' WHERE ' . implode(' AND ', $conditions); + } + + public function createSQLParser(): Parser + { + return new Parser(true); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php b/backend/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php new file mode 100644 index 0000000..f29f8fe --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php @@ -0,0 +1,2487 @@ +, + * primary_index?: Index, + * indexes?: list, + * uniqueConstraints?: list, + * foreignKeys?: list, + * comment?: string, + * } + */ +abstract class AbstractPlatform +{ + /** @deprecated */ + public const CREATE_INDEXES = 1; + + /** @deprecated */ + public const CREATE_FOREIGNKEYS = 2; + + /** @var string[]|null */ + protected ?array $doctrineTypeMapping = null; + + /** + * Holds the KeywordList instance for the current platform. + * + * @deprecated + */ + protected ?KeywordList $_keywords = null; + + /** + * Defines how the platform folds the case of unquoted identifiers. + */ + private ?UnquotedIdentifierFolding $unquotedIdentifierFolding = null; + + public function __construct(?UnquotedIdentifierFolding $unquotedIdentifierFolding = null) + { + if ($unquotedIdentifierFolding === null) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6823', + 'Not passing $unquotedIdentifierFolding to %s() is deprecated.', + __METHOD__, + ); + } + + $this->unquotedIdentifierFolding = $unquotedIdentifierFolding ?? UnquotedIdentifierFolding::UPPER; + } + + /** + * Returns the SQL snippet that declares a boolean column. + * + * @param array $column + */ + abstract public function getBooleanTypeDeclarationSQL(array $column): string; + + /** + * Returns the SQL snippet that declares a 4 byte integer column. + * + * @param array $column + */ + abstract public function getIntegerTypeDeclarationSQL(array $column): string; + + /** + * Returns the SQL snippet that declares an 8 byte integer column. + * + * @param array $column + */ + abstract public function getBigIntTypeDeclarationSQL(array $column): string; + + /** + * Returns the SQL snippet that declares a 2 byte integer column. + * + * @param array $column + */ + abstract public function getSmallIntTypeDeclarationSQL(array $column): string; + + /** + * Returns the SQL snippet that declares common properties of an integer column. + * + * @param array $column + */ + abstract protected function _getCommonIntegerTypeDeclarationSQL(array $column): string; + + /** + * Lazy load Doctrine Type Mappings. + */ + abstract protected function initializeDoctrineTypeMappings(): void; + + /** + * Initializes Doctrine Type Mappings with the platform defaults + * and with all additional type mappings. + * + * @throws TypesException + */ + private function initializeAllDoctrineTypeMappings(): void + { + $this->initializeDoctrineTypeMappings(); + + foreach (Type::getTypesMap() as $typeName => $className) { + foreach (Type::getType($typeName)->getMappedDatabaseTypes($this) as $dbType) { + $dbType = strtolower($dbType); + $this->doctrineTypeMapping[$dbType] = $typeName; + } + } + } + + /** + * Returns the SQL snippet used to declare a column that can + * store characters in the ASCII character set + * + * @param array $column The column definition. + */ + public function getAsciiStringTypeDeclarationSQL(array $column): string + { + return $this->getStringTypeDeclarationSQL($column); + } + + /** + * Returns the SQL snippet used to declare a string column type. + * + * @param array $column The column definition. + */ + public function getStringTypeDeclarationSQL(array $column): string + { + $length = $column['length'] ?? null; + + if (empty($column['fixed'])) { + try { + return $this->getVarcharTypeDeclarationSQLSnippet($length); + } catch (InvalidColumnType $e) { + throw InvalidColumnDeclaration::fromInvalidColumnType($column['name'], $e); + } + } + + return $this->getCharTypeDeclarationSQLSnippet($length); + } + + /** + * Returns the SQL snippet used to declare a binary string column type. + * + * @param array $column The column definition. + */ + public function getBinaryTypeDeclarationSQL(array $column): string + { + $length = $column['length'] ?? null; + + try { + if (empty($column['fixed'])) { + return $this->getVarbinaryTypeDeclarationSQLSnippet($length); + } + + return $this->getBinaryTypeDeclarationSQLSnippet($length); + } catch (InvalidColumnType $e) { + throw InvalidColumnDeclaration::fromInvalidColumnType($column['name'], $e); + } + } + + /** + * Returns the SQL snippet to declare an ENUM column. + * + * Enum is a non-standard type that is especially popular in MySQL and MariaDB. By default, this method map to + * a simple VARCHAR field which allows us to deploy it on any platform, e.g. SQLite. + * + * @param array $column + * + * @throws ColumnValuesRequired If the column definition does not contain any values. + */ + public function getEnumDeclarationSQL(array $column): string + { + if (! isset($column['values']) || ! is_array($column['values']) || $column['values'] === []) { + throw ColumnValuesRequired::new($this, 'ENUM'); + } + + $length = count($column['values']) > 1 + ? max(...array_map(mb_strlen(...), $column['values'])) + : mb_strlen($column['values'][key($column['values'])]); + + if (isset($column['length'])) { + if ($length > $column['length']) { + throw new InvalidArgumentException(sprintf( + 'Specified column length (%d) is less than the maximum length of provided values (%d).', + $column['length'], + $length, + )); + } + + $length = $column['length']; + } + + return $this->getStringTypeDeclarationSQL(['length' => $length]); + } + + /** + * Returns the SQL snippet to declare a GUID/UUID column. + * + * By default this maps directly to a CHAR(36) and only maps to more + * special datatypes when the underlying databases support this datatype. + * + * @param array $column The column definition. + */ + public function getGuidTypeDeclarationSQL(array $column): string + { + $column['length'] = 36; + $column['fixed'] = true; + + return $this->getStringTypeDeclarationSQL($column); + } + + /** + * Returns the SQL snippet to declare a JSON column. + * + * By default this maps directly to a CLOB and only maps to more + * special datatypes when the underlying databases support this datatype. + * + * @param array $column + */ + public function getJsonTypeDeclarationSQL(array $column): string + { + if (! empty($column['jsonb'])) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6939', + 'The "jsonb" column platform option is deprecated. Use the "JSONB" type instead.', + ); + } + + return $this->getClobTypeDeclarationSQL($column); + } + + /** + * Returns the SQL snippet to declare a JSONB column. + * + * @param array $column + */ + public function getJsonbTypeDeclarationSQL(array $column): string + { + return $this->getJsonTypeDeclarationSQL($column); + } + + /** + * @param int|null $length The length of the column in characters + * or NULL if the length should be omitted. + */ + protected function getCharTypeDeclarationSQLSnippet(?int $length): string + { + $sql = 'CHAR'; + + if ($length !== null) { + $sql .= sprintf('(%d)', $length); + } + + return $sql; + } + + /** + * @param int|null $length The length of the column in characters + * or NULL if the length should be omitted. + */ + protected function getVarcharTypeDeclarationSQLSnippet(?int $length): string + { + if ($length === null) { + throw ColumnLengthRequired::new($this, 'VARCHAR'); + } + + return sprintf('VARCHAR(%d)', $length); + } + + /** + * Returns the SQL snippet used to declare a fixed length binary column type. + * + * @param int|null $length The length of the column in bytes + * or NULL if the length should be omitted. + */ + protected function getBinaryTypeDeclarationSQLSnippet(?int $length): string + { + $sql = 'BINARY'; + + if ($length !== null) { + $sql .= sprintf('(%d)', $length); + } + + return $sql; + } + + /** + * Returns the SQL snippet used to declare a variable length binary column type. + * + * @param int|null $length The length of the column in bytes + * or NULL if the length should be omitted. + */ + protected function getVarbinaryTypeDeclarationSQLSnippet(?int $length): string + { + if ($length === null) { + throw ColumnLengthRequired::new($this, 'VARBINARY'); + } + + return sprintf('VARBINARY(%d)', $length); + } + + /** + * Returns the SQL snippet used to declare a CLOB column type. + * + * @param array $column + */ + abstract public function getClobTypeDeclarationSQL(array $column): string; + + /** + * Returns the SQL Snippet used to declare a BLOB column type. + * + * @param array $column + */ + abstract public function getBlobTypeDeclarationSQL(array $column): string; + + /** + * Registers a doctrine type to be used in conjunction with a column type of this platform. + * + * @throws Exception If the type is not found. + */ + public function registerDoctrineTypeMapping(string $dbType, string $doctrineType): void + { + if ($this->doctrineTypeMapping === null) { + $this->initializeAllDoctrineTypeMappings(); + } + + if (! Types\Type::hasType($doctrineType)) { + throw TypeNotFound::new($doctrineType); + } + + $dbType = strtolower($dbType); + $this->doctrineTypeMapping[$dbType] = $doctrineType; + } + + /** + * Gets the Doctrine type that is mapped for the given database column type. + * + * @throws TypesException + */ + public function getDoctrineTypeMapping(string $dbType): string + { + if ($this->doctrineTypeMapping === null) { + $this->initializeAllDoctrineTypeMappings(); + } + + $dbType = strtolower($dbType); + + if (! isset($this->doctrineTypeMapping[$dbType])) { + throw new InvalidArgumentException(sprintf( + 'Unknown database type "%s" requested, %s may not support it.', + $dbType, + static::class, + )); + } + + return $this->doctrineTypeMapping[$dbType]; + } + + /** + * Checks if a database type is currently supported by this platform. + * + * @throws TypesException + */ + public function hasDoctrineTypeMappingFor(string $dbType): bool + { + if ($this->doctrineTypeMapping === null) { + $this->initializeAllDoctrineTypeMappings(); + } + + $dbType = strtolower($dbType); + + return isset($this->doctrineTypeMapping[$dbType]); + } + + /** + * Returns the regular expression operator. + */ + public function getRegexpExpression(): string + { + throw NotSupported::new(__METHOD__); + } + + /** + * Returns the SQL snippet to get the length of a text column in characters. + * + * @param string $string SQL expression producing the string. + */ + public function getLengthExpression(string $string): string + { + return 'LENGTH(' . $string . ')'; + } + + /** + * Returns the SQL snippet to get the remainder of the operation of division of dividend by divisor. + * + * @param string $dividend SQL expression producing the dividend. + * @param string $divisor SQL expression producing the divisor. + */ + public function getModExpression(string $dividend, string $divisor): string + { + return 'MOD(' . $dividend . ', ' . $divisor . ')'; + } + + /** + * Returns the SQL snippet to trim a string. + * + * @param string $str The expression to apply the trim to. + * @param TrimMode $mode The position of the trim. + * @param string|null $char The char to trim, has to be quoted already. Defaults to space. + */ + public function getTrimExpression( + string $str, + TrimMode $mode = TrimMode::UNSPECIFIED, + ?string $char = null, + ): string { + $tokens = []; + + switch ($mode) { + case TrimMode::UNSPECIFIED: + break; + + case TrimMode::LEADING: + $tokens[] = 'LEADING'; + break; + + case TrimMode::TRAILING: + $tokens[] = 'TRAILING'; + break; + + case TrimMode::BOTH: + $tokens[] = 'BOTH'; + break; + } + + if ($char !== null) { + $tokens[] = $char; + } + + if (count($tokens) > 0) { + $tokens[] = 'FROM'; + } + + $tokens[] = $str; + + return sprintf('TRIM(%s)', implode(' ', $tokens)); + } + + /** + * Returns the SQL snippet to get the position of the first occurrence of the substring in the string. + * + * @param string $string SQL expression producing the string to locate the substring in. + * @param string $substring SQL expression producing the substring to locate. + * @param string|null $start SQL expression producing the position to start at. + * Defaults to the beginning of the string. + */ + abstract public function getLocateExpression(string $string, string $substring, ?string $start = null): string; + + /** + * Returns an SQL snippet to get a substring inside the string. + * + * Note: Not SQL92, but common functionality. + * + * @param string $string SQL expression producing the string from which a substring should be extracted. + * @param string $start SQL expression producing the position to start at, + * @param string|null $length SQL expression producing the length of the substring portion to be returned. + * By default, the entire substring is returned. + */ + public function getSubstringExpression(string $string, string $start, ?string $length = null): string + { + if ($length === null) { + return sprintf('SUBSTRING(%s FROM %s)', $string, $start); + } + + return sprintf('SUBSTRING(%s FROM %s FOR %s)', $string, $start, $length); + } + + /** + * Returns a SQL snippet to concatenate the given strings. + */ + public function getConcatExpression(string ...$string): string + { + return implode(' || ', $string); + } + + /** + * Returns the SQL to calculate the difference in days between the two passed dates. + * + * Computes diff = date1 - date2. + */ + abstract public function getDateDiffExpression(string $date1, string $date2): string; + + /** + * Returns the SQL to add the number of given seconds to a date. + * + * @param string $date SQL expression producing the date. + * @param string $seconds SQL expression producing the number of seconds. + */ + public function getDateAddSecondsExpression(string $date, string $seconds): string + { + return $this->getDateArithmeticIntervalExpression($date, '+', $seconds, DateIntervalUnit::SECOND); + } + + /** + * Returns the SQL to subtract the number of given seconds from a date. + * + * @param string $date SQL expression producing the date. + * @param string $seconds SQL expression producing the number of seconds. + */ + public function getDateSubSecondsExpression(string $date, string $seconds): string + { + return $this->getDateArithmeticIntervalExpression($date, '-', $seconds, DateIntervalUnit::SECOND); + } + + /** + * Returns the SQL to add the number of given minutes to a date. + * + * @param string $date SQL expression producing the date. + * @param string $minutes SQL expression producing the number of minutes. + */ + public function getDateAddMinutesExpression(string $date, string $minutes): string + { + return $this->getDateArithmeticIntervalExpression($date, '+', $minutes, DateIntervalUnit::MINUTE); + } + + /** + * Returns the SQL to subtract the number of given minutes from a date. + * + * @param string $date SQL expression producing the date. + * @param string $minutes SQL expression producing the number of minutes. + */ + public function getDateSubMinutesExpression(string $date, string $minutes): string + { + return $this->getDateArithmeticIntervalExpression($date, '-', $minutes, DateIntervalUnit::MINUTE); + } + + /** + * Returns the SQL to add the number of given hours to a date. + * + * @param string $date SQL expression producing the date. + * @param string $hours SQL expression producing the number of hours. + */ + public function getDateAddHourExpression(string $date, string $hours): string + { + return $this->getDateArithmeticIntervalExpression($date, '+', $hours, DateIntervalUnit::HOUR); + } + + /** + * Returns the SQL to subtract the number of given hours to a date. + * + * @param string $date SQL expression producing the date. + * @param string $hours SQL expression producing the number of hours. + */ + public function getDateSubHourExpression(string $date, string $hours): string + { + return $this->getDateArithmeticIntervalExpression($date, '-', $hours, DateIntervalUnit::HOUR); + } + + /** + * Returns the SQL to add the number of given days to a date. + * + * @param string $date SQL expression producing the date. + * @param string $days SQL expression producing the number of days. + */ + public function getDateAddDaysExpression(string $date, string $days): string + { + return $this->getDateArithmeticIntervalExpression($date, '+', $days, DateIntervalUnit::DAY); + } + + /** + * Returns the SQL to subtract the number of given days to a date. + * + * @param string $date SQL expression producing the date. + * @param string $days SQL expression producing the number of days. + */ + public function getDateSubDaysExpression(string $date, string $days): string + { + return $this->getDateArithmeticIntervalExpression($date, '-', $days, DateIntervalUnit::DAY); + } + + /** + * Returns the SQL to add the number of given weeks to a date. + * + * @param string $date SQL expression producing the date. + * @param string $weeks SQL expression producing the number of weeks. + */ + public function getDateAddWeeksExpression(string $date, string $weeks): string + { + return $this->getDateArithmeticIntervalExpression($date, '+', $weeks, DateIntervalUnit::WEEK); + } + + /** + * Returns the SQL to subtract the number of given weeks from a date. + * + * @param string $date SQL expression producing the date. + * @param string $weeks SQL expression producing the number of weeks. + */ + public function getDateSubWeeksExpression(string $date, string $weeks): string + { + return $this->getDateArithmeticIntervalExpression($date, '-', $weeks, DateIntervalUnit::WEEK); + } + + /** + * Returns the SQL to add the number of given months to a date. + * + * @param string $date SQL expression producing the date. + * @param string $months SQL expression producing the number of months. + */ + public function getDateAddMonthExpression(string $date, string $months): string + { + return $this->getDateArithmeticIntervalExpression($date, '+', $months, DateIntervalUnit::MONTH); + } + + /** + * Returns the SQL to subtract the number of given months to a date. + * + * @param string $date SQL expression producing the date. + * @param string $months SQL expression producing the number of months. + */ + public function getDateSubMonthExpression(string $date, string $months): string + { + return $this->getDateArithmeticIntervalExpression($date, '-', $months, DateIntervalUnit::MONTH); + } + + /** + * Returns the SQL to add the number of given quarters to a date. + * + * @param string $date SQL expression producing the date. + * @param string $quarters SQL expression producing the number of quarters. + */ + public function getDateAddQuartersExpression(string $date, string $quarters): string + { + return $this->getDateArithmeticIntervalExpression($date, '+', $quarters, DateIntervalUnit::QUARTER); + } + + /** + * Returns the SQL to subtract the number of given quarters from a date. + * + * @param string $date SQL expression producing the date. + * @param string $quarters SQL expression producing the number of quarters. + */ + public function getDateSubQuartersExpression(string $date, string $quarters): string + { + return $this->getDateArithmeticIntervalExpression($date, '-', $quarters, DateIntervalUnit::QUARTER); + } + + /** + * Returns the SQL to add the number of given years to a date. + * + * @param string $date SQL expression producing the date. + * @param string $years SQL expression producing the number of years. + */ + public function getDateAddYearsExpression(string $date, string $years): string + { + return $this->getDateArithmeticIntervalExpression($date, '+', $years, DateIntervalUnit::YEAR); + } + + /** + * Returns the SQL to subtract the number of given years from a date. + * + * @param string $date SQL expression producing the date. + * @param string $years SQL expression producing the number of years. + */ + public function getDateSubYearsExpression(string $date, string $years): string + { + return $this->getDateArithmeticIntervalExpression($date, '-', $years, DateIntervalUnit::YEAR); + } + + /** + * Returns the SQL for a date arithmetic expression. + * + * @param string $date SQL expression representing a date to perform the arithmetic operation on. + * @param string $operator The arithmetic operator (+ or -). + * @param string $interval SQL expression representing the value of the interval that shall be calculated + * into the date. + * @param DateIntervalUnit $unit The unit of the interval that shall be calculated into the date. + */ + abstract protected function getDateArithmeticIntervalExpression( + string $date, + string $operator, + string $interval, + DateIntervalUnit $unit, + ): string; + + /** + * Generates the SQL expression which represents the given date interval multiplied by a number + * + * @param string $interval SQL expression describing the interval value + * @param int $multiplier Interval multiplier + */ + protected function multiplyInterval(string $interval, int $multiplier): string + { + return sprintf('(%s * %d)', $interval, $multiplier); + } + + /** + * Returns the SQL bit AND comparison expression. + * + * @param string $value1 SQL expression producing the first value. + * @param string $value2 SQL expression producing the second value. + */ + public function getBitAndComparisonExpression(string $value1, string $value2): string + { + return '(' . $value1 . ' & ' . $value2 . ')'; + } + + /** + * Returns the SQL bit OR comparison expression. + * + * @param string $value1 SQL expression producing the first value. + * @param string $value2 SQL expression producing the second value. + */ + public function getBitOrComparisonExpression(string $value1, string $value2): string + { + return '(' . $value1 . ' | ' . $value2 . ')'; + } + + /** + * Returns the SQL expression which represents the currently selected database. + */ + abstract public function getCurrentDatabaseExpression(): string; + + /** + * Honors that some SQL vendors such as MsSql use table hints for locking instead of the + * ANSI SQL FOR UPDATE specification. + * + * @param string $fromClause The FROM clause to append the hint for the given lock mode to + */ + public function appendLockHint(string $fromClause, LockMode $lockMode): string + { + return $fromClause; + } + + /** + * Returns the SQL snippet to drop an existing table. + */ + public function getDropTableSQL(string $table): string + { + return 'DROP TABLE ' . $table; + } + + /** + * Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction. + */ + public function getDropTemporaryTableSQL(string $table): string + { + return $this->getDropTableSQL($table); + } + + /** + * Returns the SQL to drop an index from a table. + */ + public function getDropIndexSQL(string $name, string $table): string + { + return 'DROP INDEX ' . $name; + } + + /** + * Returns the SQL to drop a constraint. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + */ + protected function getDropConstraintSQL(string $name, string $table): string + { + return 'ALTER TABLE ' . $table . ' DROP CONSTRAINT ' . $name; + } + + /** + * Returns the SQL to drop a foreign key. + */ + public function getDropForeignKeySQL(string $foreignKey, string $table): string + { + return 'ALTER TABLE ' . $table . ' DROP FOREIGN KEY ' . $foreignKey; + } + + /** + * Returns the SQL to drop a unique constraint. + */ + public function getDropUniqueConstraintSQL(string $name, string $tableName): string + { + return $this->getDropConstraintSQL($name, $tableName); + } + + /** + * Returns the SQL statement(s) to create a table with the specified name, columns and constraints + * on this platform. + * + * @return list The list of SQL statements. + */ + public function getCreateTableSQL(Table $table): array + { + return $this->buildCreateTableSQL($table, true); + } + + public function createSelectSQLBuilder(): SelectSQLBuilder + { + return new DefaultSelectSQLBuilder($this, 'FOR UPDATE', 'SKIP LOCKED'); + } + + public function createUnionSQLBuilder(): UnionSQLBuilder + { + return new DefaultUnionSQLBuilder($this); + } + + public function createWithSQLBuilder(): WithSQLBuilder + { + return new WithSQLBuilder(); + } + + /** + * @internal + * + * @return list + */ + final protected function getCreateTableWithoutForeignKeysSQL(Table $table): array + { + return $this->buildCreateTableSQL($table, false); + } + + /** @return list */ + private function buildCreateTableSQL(Table $table, bool $createForeignKeys): array + { + if (count($table->getColumns()) === 0) { + throw NoColumnsSpecifiedForTable::new($table->getName()); + } + + $tableName = $table->getQuotedName($this); + $options = $table->getOptions(); + $options['primary'] = []; + $options['indexes'] = []; + $options['uniqueConstraints'] = []; + $options['foreignKeys'] = []; + + foreach ($table->getIndexes() as $index) { + if (! $index->isPrimary()) { + $options['indexes'][] = $index; + + continue; + } + + $options['primary'] = $index->getQuotedColumns($this); + $options['primary_index'] = $index; + } + + foreach ($table->getUniqueConstraints() as $uniqueConstraint) { + $options['uniqueConstraints'][] = $uniqueConstraint; + } + + if ($createForeignKeys) { + foreach ($table->getForeignKeys() as $fkConstraint) { + $options['foreignKeys'][] = $fkConstraint; + } + } + + $columns = []; + + foreach ($table->getColumns() as $column) { + $columns[] = $this->columnToArray($column); + } + + $sql = $this->_getCreateTableSQL($tableName, $columns, $options); + + if ($this->supportsCommentOnStatement()) { + if ($table->hasOption('comment')) { + $sql[] = $this->getCommentOnTableSQL($tableName, $table->getOption('comment')); + } + + foreach ($table->getColumns() as $column) { + $comment = $column->getComment(); + + if ($comment === '') { + continue; + } + + $sql[] = $this->getCommentOnColumnSQL($tableName, $column->getQuotedName($this), $comment); + } + } + + return $sql; + } + + /** + * @param array $tables + * + * @return list + */ + public function getCreateTablesSQL(array $tables): array + { + $sql = []; + + foreach ($tables as $table) { + $sql = array_merge($sql, $this->getCreateTableWithoutForeignKeysSQL($table)); + } + + foreach ($tables as $table) { + foreach ($table->getForeignKeys() as $foreignKey) { + $sql[] = $this->getCreateForeignKeySQL( + $foreignKey, + $table->getQuotedName($this), + ); + } + } + + return $sql; + } + + /** + * @param array
$tables + * + * @return list + */ + public function getDropTablesSQL(array $tables): array + { + $sql = []; + + foreach ($tables as $table) { + foreach ($table->getForeignKeys() as $foreignKey) { + $sql[] = $this->getDropForeignKeySQL( + $foreignKey->getQuotedName($this), + $table->getQuotedName($this), + ); + } + } + + foreach ($tables as $table) { + $sql[] = $this->getDropTableSQL($table->getQuotedName($this)); + } + + return $sql; + } + + protected function getCommentOnTableSQL(string $tableName, string $comment): string + { + $tableName = new Identifier($tableName); + + return sprintf( + 'COMMENT ON TABLE %s IS %s', + $tableName->getQuotedName($this), + $this->quoteStringLiteral($comment), + ); + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function getCommentOnColumnSQL(string $tableName, string $columnName, string $comment): string + { + $tableName = new Identifier($tableName); + $columnName = new Identifier($columnName); + + return sprintf( + 'COMMENT ON COLUMN %s.%s IS %s', + $tableName->getQuotedName($this), + $columnName->getQuotedName($this), + $this->quoteStringLiteral($comment), + ); + } + + /** + * Returns the SQL to create inline comment on a column. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + */ + public function getInlineColumnCommentSQL(string $comment): string + { + if (! $this->supportsInlineColumnComments()) { + throw NotSupported::new(__METHOD__); + } + + return 'COMMENT ' . $this->quoteStringLiteral($comment); + } + + /** + * Returns the SQL used to create a table. + * + * @param list $columns + * @param CreateTableParameters $options + * + * @return list + */ + protected function _getCreateTableSQL(string $name, array $columns, array $options = []): array + { + $this->validateCreateTableOptions($options, __METHOD__); + + $columnListSql = $this->getColumnDeclarationListSQL($columns); + + if (! empty($options['uniqueConstraints'])) { + foreach ($options['uniqueConstraints'] as $definition) { + $columnListSql .= ', ' . $this->getUniqueConstraintDeclarationSQL($definition); + } + } + + if (! empty($options['primary'])) { + $columnListSql .= ', PRIMARY KEY (' . implode(', ', array_unique(array_values($options['primary']))) . ')'; + } + + if (! empty($options['indexes'])) { + foreach ($options['indexes'] as $definition) { + $columnListSql .= ', ' . $this->getIndexDeclarationSQL($definition); + } + } + + $query = 'CREATE TABLE ' . $name . ' (' . $columnListSql; + $check = $this->getCheckDeclarationSQL($columns); + + if (! empty($check)) { + $query .= ', ' . $check; + } + + $query .= ')'; + + $sql = [$query]; + + if (isset($options['foreignKeys'])) { + foreach ($options['foreignKeys'] as $definition) { + $sql[] = $this->getCreateForeignKeySQL($definition, $name); + } + } + + return $sql; + } + + /** + * @internal + * + * @param CreateTableParameters $options + */ + final protected function validateCreateTableOptions(array $options, string $methodName): void + { + if ( + isset( + $options['primary'], + $options['indexes'], + $options['uniqueConstraints'], + $options['foreignKeys'], + ) + ) { + return; + } + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6805', + 'Not passing $options or any of its following keys to %s() is deprecated:' + . ' "primary", "indexes", "uniqueConstraints", "foreignKeys".', + $methodName, + ); + } + + public function getCreateTemporaryTableSnippetSQL(): string + { + return 'CREATE TEMPORARY TABLE'; + } + + /** + * Generates SQL statements that can be used to apply the diff. + * + * @return list + */ + public function getAlterSchemaSQL(SchemaDiff $diff): array + { + $sql = []; + + if ($this->supportsSchemas()) { + foreach ($diff->getCreatedSchemas() as $schema) { + $sql[] = $this->getCreateSchemaSQL($schema); + } + } + + if ($this->supportsSequences()) { + foreach ($diff->getAlteredSequences() as $sequence) { + $sql[] = $this->getAlterSequenceSQL($sequence); + } + + foreach ($diff->getDroppedSequences() as $sequence) { + $sql[] = $this->getDropSequenceSQL($sequence->getQuotedName($this)); + } + + foreach ($diff->getCreatedSequences() as $sequence) { + $sql[] = $this->getCreateSequenceSQL($sequence); + } + } + + $sql = array_merge( + $sql, + $this->getCreateTablesSQL( + $diff->getCreatedTables(), + ), + $this->getDropTablesSQL( + $diff->getDroppedTables(), + ), + ); + + foreach ($diff->getAlteredTables() as $tableDiff) { + $sql = array_merge($sql, $this->getAlterTableSQL($tableDiff)); + } + + return $sql; + } + + /** + * Returns the SQL to create a sequence on this platform. + */ + public function getCreateSequenceSQL(Sequence $sequence): string + { + throw NotSupported::new(__METHOD__); + } + + /** + * Returns the SQL to change a sequence on this platform. + */ + public function getAlterSequenceSQL(Sequence $sequence): string + { + throw NotSupported::new(__METHOD__); + } + + /** + * Returns the SQL snippet to drop an existing sequence. + */ + public function getDropSequenceSQL(string $name): string + { + if (! $this->supportsSequences()) { + throw NotSupported::new(__METHOD__); + } + + return 'DROP SEQUENCE ' . $name; + } + + /** + * Returns the SQL to create an index on a table on this platform. + */ + public function getCreateIndexSQL(Index $index, string $table): string + { + $name = $index->getQuotedName($this); + $columns = $index->getColumns(); + + if (count($columns) === 0) { + throw new InvalidArgumentException(sprintf( + 'Incomplete or invalid index definition %s on table %s', + $name, + $table, + )); + } + + if ($index->isPrimary()) { + return $this->getCreatePrimaryKeySQL($index, $table); + } + + $query = 'CREATE ' . $this->getCreateIndexSQLFlags($index) . 'INDEX ' . $name . ' ON ' . $table; + $query .= ' (' . implode(', ', $index->getQuotedColumns($this)) . ')' . $this->getPartialIndexSQL($index); + + return $query; + } + + /** + * Adds condition for partial index. + */ + protected function getPartialIndexSQL(Index $index): string + { + if ($this->supportsPartialIndexes() && $index->hasOption('where')) { + return ' WHERE ' . $index->getOption('where'); + } + + return ''; + } + + /** + * Adds additional flags for index generation. + */ + protected function getCreateIndexSQLFlags(Index $index): string + { + return $index->isUnique() ? 'UNIQUE ' : ''; + } + + /** + * Returns the SQL to create an unnamed primary key constraint. + * + * @deprecated + */ + public function getCreatePrimaryKeySQL(Index $index, string $table): string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6867', + '%s() is deprecated.', + __METHOD__, + ); + + return 'ALTER TABLE ' . $table . ' ADD PRIMARY KEY (' . implode(', ', $index->getQuotedColumns($this)) . ')'; + } + + /** + * Returns the SQL to create a named schema. + */ + public function getCreateSchemaSQL(string $schemaName): string + { + if (! $this->supportsSchemas()) { + throw NotSupported::new(__METHOD__); + } + + return 'CREATE SCHEMA ' . $schemaName; + } + + /** + * Returns the SQL to create a unique constraint on a table on this platform. + */ + public function getCreateUniqueConstraintSQL(UniqueConstraint $constraint, string $tableName): string + { + return 'ALTER TABLE ' . $tableName . ' ADD ' . $this->getUniqueConstraintDeclarationSQL($constraint); + } + + /** + * Returns the SQL snippet to drop a schema. + */ + public function getDropSchemaSQL(string $schemaName): string + { + if (! $this->supportsSchemas()) { + throw NotSupported::new(__METHOD__); + } + + return 'DROP SCHEMA ' . $schemaName; + } + + /** + * Quotes a string so that it can be safely used as a table or column name, + * even if it is a reserved word of the platform. This also detects identifier + * chains separated by dot and quotes them independently. + * + * NOTE: Just because you CAN use quoted identifiers doesn't mean + * you SHOULD use them. In general, they end up causing way more + * problems than they solve. + * + * @deprecated Use {@link quoteSingleIdentifier()} individually for each part of a qualified name instead. + * + * @param string $identifier The identifier name to be quoted. + * + * @return string The quoted identifier string. + */ + public function quoteIdentifier(string $identifier): string + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6590', + <<<'DEPRECATION' + Method %s is deprecated and will be removed in 5.0. + Use quoteSingleIdentifier() individually for each part of a qualified name instead. + DEPRECATION, + __METHOD__, + ); + + if (str_contains($identifier, '.')) { + $parts = array_map($this->quoteSingleIdentifier(...), explode('.', $identifier)); + + return implode('.', $parts); + } + + return $this->quoteSingleIdentifier($identifier); + } + + /** + * Quotes a single identifier (no dot chain separation). + * + * @param string $str The identifier name to be quoted. + * + * @return string The quoted identifier string. + */ + public function quoteSingleIdentifier(string $str): string + { + return '"' . str_replace('"', '""', $str) . '"'; + } + + /** + * Returns the SQL to create a new foreign key. + * + * @param ForeignKeyConstraint $foreignKey The foreign key constraint. + * @param string $table The name of the table on which the foreign key is to be created. + */ + public function getCreateForeignKeySQL(ForeignKeyConstraint $foreignKey, string $table): string + { + return 'ALTER TABLE ' . $table . ' ADD ' . $this->getForeignKeyDeclarationSQL($foreignKey); + } + + /** + * Gets the SQL statements for altering an existing table. + * + * This method returns an array of SQL statements, since some platforms need several statements. + * + * @return list + */ + abstract public function getAlterTableSQL(TableDiff $diff): array; + + public function getRenameTableSQL(string $oldName, string $newName): string + { + return sprintf('ALTER TABLE %s RENAME TO %s', $oldName, $newName); + } + + /** @return list */ + protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff): array + { + $tableNameSQL = $diff->getOldTable()->getQuotedName($this); + + $sql = []; + + foreach ($diff->getDroppedForeignKeys() as $foreignKey) { + $sql[] = $this->getDropForeignKeySQL($foreignKey->getQuotedName($this), $tableNameSQL); + } + + foreach ($diff->getModifiedForeignKeys() as $foreignKey) { + $sql[] = $this->getDropForeignKeySQL($foreignKey->getQuotedName($this), $tableNameSQL); + } + + foreach ($diff->getDroppedIndexes() as $index) { + $sql[] = $this->getDropIndexSQL($index->getQuotedName($this), $tableNameSQL); + } + + foreach ($diff->getModifiedIndexes() as $index) { + $sql[] = $this->getDropIndexSQL($index->getQuotedName($this), $tableNameSQL); + } + + return $sql; + } + + /** @return list */ + protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff): array + { + $sql = []; + + $tableNameSQL = $diff->getOldTable()->getQuotedName($this); + + foreach ($diff->getAddedForeignKeys() as $foreignKey) { + $sql[] = $this->getCreateForeignKeySQL($foreignKey, $tableNameSQL); + } + + foreach ($diff->getModifiedForeignKeys() as $foreignKey) { + $sql[] = $this->getCreateForeignKeySQL($foreignKey, $tableNameSQL); + } + + foreach ($diff->getAddedIndexes() as $index) { + $sql[] = $this->getCreateIndexSQL($index, $tableNameSQL); + } + + foreach ($diff->getModifiedIndexes() as $index) { + $sql[] = $this->getCreateIndexSQL($index, $tableNameSQL); + } + + foreach ($diff->getRenamedIndexes() as $oldIndexName => $index) { + $oldIndexName = new Identifier($oldIndexName); + $sql = array_merge( + $sql, + $this->getRenameIndexSQL($oldIndexName->getQuotedName($this), $index, $tableNameSQL), + ); + } + + return $sql; + } + + /** + * Returns the SQL for renaming an index on a table. + * + * @param string $oldIndexName The name of the index to rename from. + * @param Index $index The definition of the index to rename to. + * @param string $tableName The table to rename the given index on. + * + * @return list The sequence of SQL statements for renaming the given index. + */ + protected function getRenameIndexSQL(string $oldIndexName, Index $index, string $tableName): array + { + return [ + $this->getDropIndexSQL($oldIndexName, $tableName), + $this->getCreateIndexSQL($index, $tableName), + ]; + } + + /** + * Returns the SQL for renaming a column + * + * @param string $tableName The table to rename the column on. + * @param string $oldColumnName The name of the column we want to rename. + * @param string $newColumnName The name we should rename it to. + * + * @return list The sequence of SQL statements for renaming the given column. + */ + protected function getRenameColumnSQL(string $tableName, string $oldColumnName, string $newColumnName): array + { + return [sprintf('ALTER TABLE %s RENAME COLUMN %s TO %s', $tableName, $oldColumnName, $newColumnName)]; + } + + /** + * Gets declaration of a number of columns in bulk. + * + * @param list $columns The properties of the columns to be declared. + */ + public function getColumnDeclarationListSQL(array $columns): string + { + $declarations = []; + + foreach ($columns as $column) { + $declarations[] = $this->getColumnDeclarationSQL($column['name'], $column); + } + + return implode(', ', $declarations); + } + + /** + * Obtains DBMS specific SQL code portion needed to declare a generic type + * column to be used in statements like CREATE TABLE. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + * + * @param string $name The name of the column to be declared. + * @param ColumnProperties $column Column properties. + * + * @return string DBMS specific SQL code portion that should be used to declare the column. + */ + public function getColumnDeclarationSQL(string $name, array $column): string + { + if (isset($column['columnDefinition'])) { + $declaration = $column['columnDefinition']; + } else { + $default = $this->getDefaultValueDeclarationSQL($column); + + $charset = ! empty($column['charset']) ? + ' ' . $this->getColumnCharsetDeclarationSQL($column['charset']) : ''; + + $collation = ! empty($column['collation']) ? + ' ' . $this->getColumnCollationDeclarationSQL($column['collation']) : ''; + + $notnull = ! empty($column['notnull']) ? ' NOT NULL' : ''; + + $typeDecl = $column['type']->getSQLDeclaration($column, $this); + $declaration = $typeDecl . $charset . $default . $notnull . $collation; + + if ($this->supportsInlineColumnComments() && isset($column['comment']) && $column['comment'] !== '') { + $declaration .= ' ' . $this->getInlineColumnCommentSQL($column['comment']); + } + } + + return $name . ' ' . $declaration; + } + + /** + * Returns the SQL snippet that declares a floating point column of arbitrary precision. + * + * @param array $column + */ + public function getDecimalTypeDeclarationSQL(array $column): string + { + if (! isset($column['precision'])) { + throw InvalidColumnDeclaration::fromInvalidColumnType($column['name'], ColumnPrecisionRequired::new()); + } + + if (! isset($column['scale'])) { + throw InvalidColumnDeclaration::fromInvalidColumnType($column['name'], ColumnScaleRequired::new()); + } + + return 'NUMERIC(' . $column['precision'] . ', ' . $column['scale'] . ')'; + } + + /** + * Obtains DBMS specific SQL code portion needed to set a default value + * declaration to be used in statements like CREATE TABLE. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + * + * @param array $column The column definition array. + * + * @return string DBMS specific SQL code portion needed to set a default value. + */ + public function getDefaultValueDeclarationSQL(array $column): string + { + if (! isset($column['default'])) { + return empty($column['notnull']) ? ' DEFAULT NULL' : ''; + } + + $default = $column['default']; + + if ($default instanceof DefaultExpression) { + return ' DEFAULT ' . $default->toSQL($this); + } + + if (! isset($column['type'])) { + return " DEFAULT '" . $default . "'"; + } + + $type = $column['type']; + + if ($type instanceof Types\PhpIntegerMappingType) { + return ' DEFAULT ' . $default; + } + + if ($type instanceof Types\PhpDateTimeMappingType && $default === $this->getCurrentTimestampSQL()) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7195', + 'Using "%s" as a column default value is deprecated. Use a CurrentTimestamp instance instead.', + $default, + ); + + return ' DEFAULT ' . $this->getCurrentTimestampSQL(); + } + + if ($type instanceof Types\PhpTimeMappingType && $default === $this->getCurrentTimeSQL()) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7195', + 'Using "%s" as a column default value is deprecated. Use a CurrentTime instance instead.', + $default, + ); + + return ' DEFAULT ' . $this->getCurrentTimeSQL(); + } + + if ($type instanceof Types\PhpDateMappingType && $default === $this->getCurrentDateSQL()) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7195', + 'Using "%s" as a column default value is deprecated. Use a CurrentDate instance instead.', + $default, + ); + + return ' DEFAULT ' . $this->getCurrentDateSQL(); + } + + if ($type instanceof Types\BooleanType) { + return ' DEFAULT ' . $this->convertBooleans($default); + } + + if (is_int($default) || is_float($default)) { + return ' DEFAULT ' . $default; + } + + return ' DEFAULT ' . $this->quoteStringLiteral($default); + } + + /** + * Obtains DBMS specific SQL code portion needed to set a CHECK constraint + * declaration to be used in statements like CREATE TABLE. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + * + * @param list $definition The check definition. + * + * @return string DBMS specific SQL code portion needed to set a CHECK constraint. + */ + public function getCheckDeclarationSQL(array $definition): string + { + $constraints = []; + foreach ($definition as $def) { + if (is_string($def)) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6805', + 'Passing column definition to %s() as string is deprecated. Pass the definition as array' + . ' instead.', + __METHOD__, + ); + + $constraints[] = 'CHECK (' . $def . ')'; + } else { + if (isset($def['min'])) { + $constraints[] = 'CHECK (' . $def['name'] . ' >= ' . $def['min'] . ')'; + } + + if (! isset($def['max'])) { + continue; + } + + $constraints[] = 'CHECK (' . $def['name'] . ' <= ' . $def['max'] . ')'; + } + } + + return implode(', ', $constraints); + } + + /** + * Obtains DBMS specific DDL fragment that defines a unique constraint to be used in statements like CREATE + * TABLE or ALTER TABLE. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + * + * @param UniqueConstraint $constraint The unique constraint definition. + * + * @return string DBMS specific DDL fragment that defines the constraint. + */ + public function getUniqueConstraintDeclarationSQL(UniqueConstraint $constraint): string + { + $columns = $constraint->getQuotedColumns($this); + + if (count($columns) === 0) { + throw new InvalidArgumentException('Incomplete definition. "columns" required.'); + } + + $chunks = []; + + if ($constraint->getName() !== '') { + $chunks[] = 'CONSTRAINT'; + $chunks[] = $constraint->getQuotedName($this); + } + + $chunks[] = 'UNIQUE'; + + if ($constraint->hasFlag('clustered')) { + $chunks[] = 'CLUSTERED'; + } + + $chunks[] = sprintf('(%s)', implode(', ', $columns)); + + return implode(' ', $chunks); + } + + /** + * Obtains DBMS specific SQL code portion needed to set an index + * declaration to be used in statements like CREATE TABLE. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + * + * @param Index $index The index definition. + * + * @return string DBMS specific SQL code portion needed to set an index. + */ + public function getIndexDeclarationSQL(Index $index): string + { + $columns = $index->getColumns(); + + if (count($columns) === 0) { + throw new InvalidArgumentException('Incomplete definition. "columns" required.'); + } + + return $this->getCreateIndexSQLFlags($index) . 'INDEX ' . $index->getQuotedName($this) + . ' (' . implode(', ', $index->getQuotedColumns($this)) . ')' . $this->getPartialIndexSQL($index); + } + + /** + * Some vendors require temporary table names to be qualified specially. + */ + public function getTemporaryTableName(string $tableName): string + { + return $tableName; + } + + /** + * Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint + * of a column declaration to be used in statements like CREATE TABLE. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + * + * @return string DBMS specific SQL code portion needed to set the FOREIGN KEY constraint + * of a column declaration. + */ + public function getForeignKeyDeclarationSQL(ForeignKeyConstraint $foreignKey): string + { + $sql = $this->getForeignKeyBaseDeclarationSQL($foreignKey); + $sql .= $this->getAdvancedForeignKeyOptionsSQL($foreignKey); + + return $sql; + } + + /** + * Returns the FOREIGN KEY query section dealing with non-standard options + * as MATCH, INITIALLY DEFERRED, ON UPDATE, ... + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + * + * @param ForeignKeyConstraint $foreignKey The foreign key definition. + */ + public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey): string + { + $query = ''; + if ($foreignKey->hasOption('onUpdate')) { + $query .= ' ON UPDATE ' . $this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onUpdate')); + } + + if ($foreignKey->hasOption('onDelete')) { + $query .= ' ON DELETE ' . $this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onDelete')); + } + + return $query; + } + + /** + * Returns the SQL fragment representing the deferrability of a constraint. + */ + protected function getConstraintDeferrabilitySQL(ForeignKeyConstraint $foreignKey): string + { + $sql = ''; + + if ($foreignKey->hasOption('deferrable')) { + if ($foreignKey->getOption('deferrable') !== false) { + $sql .= ' DEFERRABLE'; + } else { + $sql .= ' NOT DEFERRABLE'; + } + } + + if ($foreignKey->hasOption('deferred')) { + if ($foreignKey->getOption('deferred') !== false) { + $sql .= ' INITIALLY DEFERRED'; + } else { + $sql .= ' INITIALLY IMMEDIATE'; + } + } + + return $sql; + } + + /** + * Returns the given referential action in uppercase if valid, otherwise throws an exception. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + * + * @param string $action The foreign key referential action. + */ + public function getForeignKeyReferentialActionSQL(string $action): string + { + $upper = strtoupper($action); + + return match ($upper) { + 'CASCADE', + 'SET NULL', + 'NO ACTION', + 'RESTRICT', + 'SET DEFAULT' => $upper, + default => throw new InvalidArgumentException(sprintf('Invalid foreign key action "%s".', $upper)), + }; + } + + /** + * Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint + * of a column declaration to be used in statements like CREATE TABLE. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + */ + public function getForeignKeyBaseDeclarationSQL(ForeignKeyConstraint $foreignKey): string + { + $sql = ''; + if ($foreignKey->getName() !== '') { + $sql .= 'CONSTRAINT ' . $foreignKey->getQuotedName($this) . ' '; + } + + $sql .= 'FOREIGN KEY ('; + + if (count($foreignKey->getLocalColumns()) === 0) { + throw new InvalidArgumentException('Incomplete definition. "local" required.'); + } + + if (count($foreignKey->getForeignColumns()) === 0) { + throw new InvalidArgumentException('Incomplete definition. "foreign" required.'); + } + + if (strlen($foreignKey->getForeignTableName()) === 0) { + throw new InvalidArgumentException('Incomplete definition. "foreignTable" required.'); + } + + return $sql . implode(', ', $foreignKey->getQuotedLocalColumns($this)) + . ') REFERENCES ' + . $foreignKey->getQuotedForeignTableName($this) . ' (' + . implode(', ', $foreignKey->getQuotedForeignColumns($this)) . ')'; + } + + /** + * Obtains DBMS specific SQL code portion needed to set the CHARACTER SET + * of a column declaration to be used in statements like CREATE TABLE. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + * + * @param string $charset The name of the charset. + * + * @return string DBMS specific SQL code portion needed to set the CHARACTER SET + * of a column declaration. + */ + public function getColumnCharsetDeclarationSQL(string $charset): string + { + return ''; + } + + /** + * Obtains DBMS specific SQL code portion needed to set the COLLATION + * of a column declaration to be used in statements like CREATE TABLE. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + * + * @param string $collation The name of the collation. + * + * @return string DBMS specific SQL code portion needed to set the COLLATION + * of a column declaration. + */ + public function getColumnCollationDeclarationSQL(string $collation): string + { + return $this->supportsColumnCollation() ? 'COLLATE ' . $this->quoteSingleIdentifier($collation) : ''; + } + + /** + * Some platforms need the boolean values to be converted. + * + * The default conversion in this implementation converts to integers (false => 0, true => 1). + * + * Note: if the input is not a boolean the original input might be returned. + * + * There are two contexts when converting booleans: Literals and Prepared Statements. + * This method should handle the literal case + * + * @param mixed $item A boolean or an array of them. + * + * @return mixed A boolean database value or an array of them. + */ + public function convertBooleans(mixed $item): mixed + { + if (is_array($item)) { + foreach ($item as $k => $value) { + if (! is_bool($value)) { + continue; + } + + $item[$k] = (int) $value; + } + } elseif (is_bool($item)) { + $item = (int) $item; + } + + return $item; + } + + /** + * Some platforms have boolean literals that needs to be correctly converted + * + * The default conversion tries to convert value into bool "(bool)$item" + * + * @param T $item + * + * @return (T is null ? null : bool) + * + * @template T + */ + public function convertFromBoolean(mixed $item): ?bool + { + if ($item === null) { + return null; + } + + return (bool) $item; + } + + /** + * This method should handle the prepared statements case. When there is no + * distinction, it's OK to use the same method. + * + * Note: if the input is not a boolean the original input might be returned. + * + * @param mixed $item A boolean or an array of them. + * + * @return mixed A boolean database value or an array of them. + */ + public function convertBooleansToDatabaseValue(mixed $item): mixed + { + return $this->convertBooleans($item); + } + + /** + * Returns the SQL specific for the platform to get the current date. + */ + public function getCurrentDateSQL(): string + { + return 'CURRENT_DATE'; + } + + /** + * Returns the SQL specific for the platform to get the current time. + */ + public function getCurrentTimeSQL(): string + { + return 'CURRENT_TIME'; + } + + /** + * Returns the SQL specific for the platform to get the current timestamp + */ + public function getCurrentTimestampSQL(): string + { + return 'CURRENT_TIMESTAMP'; + } + + /** + * Returns the SQL for a given transaction isolation level Connection constant. + */ + protected function _getTransactionIsolationLevelSQL(TransactionIsolationLevel $level): string + { + return match ($level) { + TransactionIsolationLevel::READ_UNCOMMITTED => 'READ UNCOMMITTED', + TransactionIsolationLevel::READ_COMMITTED => 'READ COMMITTED', + TransactionIsolationLevel::REPEATABLE_READ => 'REPEATABLE READ', + TransactionIsolationLevel::SERIALIZABLE => 'SERIALIZABLE', + }; + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListDatabasesSQL(): string + { + throw NotSupported::new(__METHOD__); + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListSequencesSQL(string $database): string + { + throw NotSupported::new(__METHOD__); + } + + /** + * Returns the SQL to list all views of a database or user. + * + * @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. + */ + abstract public function getListViewsSQL(string $database): string; + + public function getCreateViewSQL(string $name, string $sql): string + { + return 'CREATE VIEW ' . $name . ' AS ' . $sql; + } + + public function getDropViewSQL(string $name): string + { + return 'DROP VIEW ' . $name; + } + + public function getSequenceNextValSQL(string $sequence): string + { + throw NotSupported::new(__METHOD__); + } + + /** + * Returns the SQL to create a new database. + * + * @param string $name The name of the database that should be created. + */ + public function getCreateDatabaseSQL(string $name): string + { + return 'CREATE DATABASE ' . $name; + } + + /** + * Returns the SQL snippet to drop an existing database. + * + * @param string $name The name of the database that should be dropped. + */ + public function getDropDatabaseSQL(string $name): string + { + return 'DROP DATABASE ' . $name; + } + + /** + * Returns the SQL to set the transaction isolation level. + */ + abstract public function getSetTransactionIsolationSQL(TransactionIsolationLevel $level): string; + + /** + * Obtains DBMS specific SQL to be used to create datetime columns in + * statements like CREATE TABLE. + * + * @param array $column + */ + abstract public function getDateTimeTypeDeclarationSQL(array $column): string; + + /** + * Obtains DBMS specific SQL to be used to create datetime with timezone offset columns. + * + * @param array $column + */ + public function getDateTimeTzTypeDeclarationSQL(array $column): string + { + return $this->getDateTimeTypeDeclarationSQL($column); + } + + /** + * Obtains DBMS specific SQL to be used to create date columns in statements + * like CREATE TABLE. + * + * @param array $column + */ + abstract public function getDateTypeDeclarationSQL(array $column): string; + + /** + * Obtains DBMS specific SQL to be used to create time columns in statements + * like CREATE TABLE. + * + * @param array $column + */ + abstract public function getTimeTypeDeclarationSQL(array $column): string; + + /** @param array $column */ + public function getFloatDeclarationSQL(array $column): string + { + return 'DOUBLE PRECISION'; + } + + /** @param array $column */ + public function getSmallFloatDeclarationSQL(array $column): string + { + return 'REAL'; + } + + /** + * Gets the default transaction isolation level of the platform. + * + * @return TransactionIsolationLevel The default isolation level. + */ + public function getDefaultTransactionIsolationLevel(): TransactionIsolationLevel + { + return TransactionIsolationLevel::READ_COMMITTED; + } + + /* supports*() methods */ + + /** + * Whether the platform supports sequences. + */ + public function supportsSequences(): bool + { + return false; + } + + /** + * Whether the platform supports identity columns. + * + * Identity columns are columns that receive an auto-generated value from the + * database on insert of a row. + */ + public function supportsIdentityColumns(): bool + { + return false; + } + + /** + * Whether the platform supports partial indexes. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + */ + public function supportsPartialIndexes(): bool + { + return false; + } + + /** + * Whether the platform supports indexes with column length definitions. + * + * @deprecated + */ + public function supportsColumnLengthIndexes(): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated.', + __METHOD__, + ); + + return false; + } + + /** + * Whether the platform supports savepoints. + */ + public function supportsSavepoints(): bool + { + return true; + } + + /** + * Whether the platform supports releasing savepoints. + */ + public function supportsReleaseSavepoints(): bool + { + return $this->supportsSavepoints(); + } + + /** + * Whether the platform supports database schemas. + */ + public function supportsSchemas(): bool + { + return false; + } + + /** + * Whether this platform support to add inline column comments as postfix. + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + */ + public function supportsInlineColumnComments(): bool + { + return false; + } + + /** + * Whether this platform support the proprietary syntax "COMMENT ON asset". + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + */ + public function supportsCommentOnStatement(): bool + { + return false; + } + + /** + * Does this platform support column collation? + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + */ + public function supportsColumnCollation(): bool + { + return false; + } + + /** + * Gets the format string, as accepted by the date() function, that describes + * the format of a stored datetime value of this platform. + * + * @return string The format string. + */ + public function getDateTimeFormatString(): string + { + return 'Y-m-d H:i:s'; + } + + /** + * Gets the format string, as accepted by the date() function, that describes + * the format of a stored datetime with timezone value of this platform. + * + * @return string The format string. + */ + public function getDateTimeTzFormatString(): string + { + return 'Y-m-d H:i:s'; + } + + /** + * Gets the format string, as accepted by the date() function, that describes + * the format of a stored date value of this platform. + * + * @return string The format string. + */ + public function getDateFormatString(): string + { + return 'Y-m-d'; + } + + /** + * Gets the format string, as accepted by the date() function, that describes + * the format of a stored time value of this platform. + * + * @return string The format string. + */ + public function getTimeFormatString(): string + { + return 'H:i:s'; + } + + /** + * Adds an driver-specific LIMIT clause to the query. + */ + final public function modifyLimitQuery(string $query, ?int $limit, int $offset = 0): string + { + if ($offset < 0) { + throw new InvalidArgumentException(sprintf( + 'Offset must be a positive integer or zero, %d given.', + $offset, + )); + } + + return $this->doModifyLimitQuery($query, $limit, $offset); + } + + /** + * Adds an platform-specific LIMIT clause to the query. + */ + protected function doModifyLimitQuery(string $query, ?int $limit, int $offset): string + { + if ($limit !== null) { + $query .= sprintf(' LIMIT %d', $limit); + } + + if ($offset > 0) { + $query .= sprintf(' OFFSET %d', $offset); + } + + return $query; + } + + /** + * Maximum length of any given database identifier, like tables or column names. + * + * @return positive-int + */ + public function getMaxIdentifierLength(): int + { + return 63; + } + + /** + * Returns the insert SQL for an empty insert statement. + */ + public function getEmptyIdentityInsertSQL(string $quotedTableName, string $quotedIdentifierColumnName): string + { + return 'INSERT INTO ' . $quotedTableName . ' (' . $quotedIdentifierColumnName . ') VALUES (null)'; + } + + /** + * Generates a Truncate Table SQL statement for a given table. + * + * Cascade is not supported on many platforms but would optionally cascade the truncate by + * following the foreign keys. + */ + public function getTruncateTableSQL(string $tableName, bool $cascade = false): string + { + $tableIdentifier = new Identifier($tableName); + + return 'TRUNCATE ' . $tableIdentifier->getQuotedName($this); + } + + /** + * This is for test reasons, many vendors have special requirements for dummy statements. + */ + public function getDummySelectSQL(string $expression = '1'): string + { + return sprintf('SELECT %s', $expression); + } + + /** + * Returns the SQL to create a new savepoint. + */ + public function createSavePoint(string $savepoint): string + { + return 'SAVEPOINT ' . $savepoint; + } + + /** + * Returns the SQL to release a savepoint. + */ + public function releaseSavePoint(string $savepoint): string + { + return 'RELEASE SAVEPOINT ' . $savepoint; + } + + /** + * Returns the SQL to rollback a savepoint. + */ + public function rollbackSavePoint(string $savepoint): string + { + return 'ROLLBACK TO SAVEPOINT ' . $savepoint; + } + + /** + * Returns the keyword list instance of this platform. + * + * @deprecated + */ + final public function getReservedKeywordsList(): KeywordList + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6607', + '%s is deprecated.', + __METHOD__, + ); + + // Store the instance so it doesn't need to be generated on every request. + return $this->_keywords ??= $this->createReservedKeywordsList(); + } + + /** + * Creates an instance of the reserved keyword list of this platform. + * + * @deprecated + */ + abstract protected function createReservedKeywordsList(): KeywordList; + + /** + * Quotes a literal string. + * This method is NOT meant to fix SQL injections! + * It is only meant to escape this platform's string literal + * quote character inside the given literal string. + * + * @param string $str The literal string to be quoted. + * + * @return string The quoted literal string. + */ + public function quoteStringLiteral(string $str): string + { + return "'" . str_replace("'", "''", $str) . "'"; + } + + /** + * Escapes metacharacters in a string intended to be used with a LIKE + * operator. + * + * @param string $inputString a literal, unquoted string + * @param string $escapeChar should be reused by the caller in the LIKE + * expression. + */ + final public function escapeStringForLike(string $inputString, string $escapeChar): string + { + $sql = preg_replace( + '~([' . preg_quote($this->getLikeWildcardCharacters() . $escapeChar, '~') . '])~u', + addcslashes($escapeChar, '\\') . '$1', + $inputString, + ); + + assert(is_string($sql)); + + return $sql; + } + + /** + * @return ColumnProperties An associative array with the name of the properties of the column being declared as + * array keys. + */ + private function columnToArray(Column $column): array + { + return array_merge($column->toArray(), [ + 'name' => $column->getQuotedName($this), + 'version' => $column->hasPlatformOption('version') ? $column->getPlatformOption('version') : false, + 'comment' => $column->getComment(), + ]); + } + + /** @internal */ + public function createSQLParser(): Parser + { + return new Parser(false); + } + + protected function getLikeWildcardCharacters(): string + { + return '%_'; + } + + /** + * Compares the definitions of the given columns in the context of this platform. + */ + public function columnsEqual(Column $column1, Column $column2): bool + { + $column1Array = $this->columnToArray($column1); + $column2Array = $this->columnToArray($column2); + + // ignore explicit columnDefinition since it's not set on the Column generated by the SchemaManager + $column1Array['columnDefinition'] = null; + $column2Array['columnDefinition'] = null; + + if ( + $this->getColumnDeclarationSQL('', $column1Array) + !== $this->getColumnDeclarationSQL('', $column2Array) + ) { + return false; + } + + // If the platform supports inline comments, all comparison is already done above + if ($this->supportsInlineColumnComments()) { + return true; + } + + return $column1->getComment() === $column2->getComment(); + } + + /** + * Returns the union select query part surrounded by parenthesis if possible for platform. + */ + public function getUnionSelectPartSQL(string $subQuery): string + { + return sprintf('(%s)', $subQuery); + } + + /** + * Returns the `UNION ALL` keyword. + */ + public function getUnionAllSQL(): string + { + return 'UNION ALL'; + } + + /** + * Returns the compatible `UNION DISTINCT` keyword. + */ + public function getUnionDistinctSQL(): string + { + return 'UNION'; + } + + public function getUnquotedIdentifierFolding(): UnquotedIdentifierFolding + { + if ($this->unquotedIdentifierFolding === null) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6823', + 'Not calling the %s constructor from child class constructors is deprecated.', + self::class, + ); + + $this->unquotedIdentifierFolding = UnquotedIdentifierFolding::UPPER; + } + + return $this->unquotedIdentifierFolding; + } + + /** + * Creates a metadata provider that can be used access the metadata of the underlying database schema. + * + * @throws Exception + */ + public function createMetadataProvider(Connection $connection): MetadataProvider + { + throw NotSupported::new(__METHOD__); + } + + /** + * Creates the schema manager that can be used to inspect and change the underlying + * database schema according to the dialect of the platform. + */ + abstract public function createSchemaManager(Connection $connection): AbstractSchemaManager; +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/DB2Platform.php b/backend/vendor/doctrine/dbal/src/Platforms/DB2Platform.php new file mode 100644 index 0000000..f9caa53 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/DB2Platform.php @@ -0,0 +1,602 @@ +doctrineTypeMapping = [ + 'bigint' => Types::BIGINT, + 'binary' => Types::BINARY, + 'blob' => Types::BLOB, + 'character' => Types::STRING, + 'clob' => Types::TEXT, + 'date' => Types::DATE_MUTABLE, + 'decimal' => Types::DECIMAL, + 'double' => Types::FLOAT, + 'integer' => Types::INTEGER, + 'real' => Types::SMALLFLOAT, + 'smallint' => Types::SMALLINT, + 'time' => Types::TIME_MUTABLE, + 'timestamp' => Types::DATETIME_MUTABLE, + 'varbinary' => Types::BINARY, + 'varchar' => Types::STRING, + ]; + } + + protected function getBinaryTypeDeclarationSQLSnippet(?int $length): string + { + return $this->getCharTypeDeclarationSQLSnippet($length) . ' FOR BIT DATA'; + } + + protected function getVarbinaryTypeDeclarationSQLSnippet(?int $length): string + { + return $this->getVarcharTypeDeclarationSQLSnippet($length) . ' FOR BIT DATA'; + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $column): string + { + // todo clob(n) with $column['length']; + return 'CLOB(1M)'; + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $column): string + { + return 'SMALLINT'; + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $column): string + { + return 'INTEGER' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $column): string + { + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $column): string + { + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $column): string + { + if (! empty($column['autoincrement'])) { + return ' GENERATED BY DEFAULT AS IDENTITY'; + } + + return ''; + } + + public function getBitAndComparisonExpression(string $value1, string $value2): string + { + return 'BITAND(' . $value1 . ', ' . $value2 . ')'; + } + + public function getBitOrComparisonExpression(string $value1, string $value2): string + { + return 'BITOR(' . $value1 . ', ' . $value2 . ')'; + } + + protected function getDateArithmeticIntervalExpression( + string $date, + string $operator, + string $interval, + DateIntervalUnit $unit, + ): string { + switch ($unit) { + case DateIntervalUnit::WEEK: + $interval = $this->multiplyInterval($interval, 7); + $unit = DateIntervalUnit::DAY; + break; + + case DateIntervalUnit::QUARTER: + $interval = $this->multiplyInterval($interval, 3); + $unit = DateIntervalUnit::MONTH; + break; + } + + return $date . ' ' . $operator . ' ' . $interval . ' ' . $unit->value; + } + + public function getDateDiffExpression(string $date1, string $date2): string + { + return 'DAYS(' . $date1 . ') - DAYS(' . $date2 . ')'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $column): string + { + if (isset($column['version']) && $column['version'] === true) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6940', + 'The "version" column platform option is deprecated.', + ); + + return 'TIMESTAMP(0) WITH DEFAULT'; + } + + return 'TIMESTAMP(0)'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $column): string + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $column): string + { + return 'TIME'; + } + + public function getTruncateTableSQL(string $tableName, bool $cascade = false): string + { + $tableIdentifier = new Identifier($tableName); + + return 'TRUNCATE ' . $tableIdentifier->getQuotedName($this) . ' IMMEDIATE'; + } + + public function getSetTransactionIsolationSQL(TransactionIsolationLevel $level): string + { + throw NotSupported::new(__METHOD__); + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListViewsSQL(string $database): string + { + return 'SELECT NAME, TEXT FROM SYSIBM.SYSVIEWS'; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function supportsCommentOnStatement(): bool + { + return true; + } + + public function getCurrentDateSQL(): string + { + return 'CURRENT DATE'; + } + + public function getCurrentTimeSQL(): string + { + return 'CURRENT TIME'; + } + + public function getCurrentTimestampSQL(): string + { + return 'CURRENT TIMESTAMP'; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function getIndexDeclarationSQL(Index $index): string + { + // Index declaration in statements like CREATE TABLE is not supported. + throw NotSupported::new(__METHOD__); + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL(string $name, array $columns, array $options = []): array + { + $this->validateCreateTableOptions($options, __METHOD__); + + $indexes = []; + if (isset($options['indexes'])) { + $indexes = $options['indexes']; + } + + $options['indexes'] = []; + + $sqls = parent::_getCreateTableSQL($name, $columns, $options); + + foreach ($indexes as $definition) { + $sqls[] = $this->getCreateIndexSQL($definition, $name); + } + + return $sqls; + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff): array + { + $sql = []; + $commentsSQL = []; + + $tableNameSQL = $diff->getOldTable()->getQuotedName($this); + + $queryParts = []; + foreach ($diff->getAddedColumns() as $column) { + $columnDef = $column->toArray(); + $queryPart = 'ADD COLUMN ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnDef); + + // Adding non-nullable columns to a table requires a default value to be specified. + if ( + ! empty($columnDef['notnull']) && + ! isset($columnDef['default']) && + empty($columnDef['autoincrement']) + ) { + $queryPart .= ' WITH DEFAULT'; + } + + $queryParts[] = $queryPart; + + $comment = $column->getComment(); + + if ($comment === '') { + continue; + } + + $commentsSQL[] = $this->getCommentOnColumnSQL( + $tableNameSQL, + $column->getQuotedName($this), + $comment, + ); + } + + $needsReorg = false; + foreach ($diff->getDroppedColumns() as $column) { + $queryParts[] = 'DROP COLUMN ' . $column->getQuotedName($this); + $needsReorg = true; + } + + foreach ($diff->getChangedColumns() as $columnDiff) { + if ($columnDiff->hasCommentChanged()) { + $newColumn = $columnDiff->getNewColumn(); + $commentsSQL[] = $this->getCommentOnColumnSQL( + $tableNameSQL, + $newColumn->getQuotedName($this), + $newColumn->getComment(), + ); + } + + $this->gatherAlterColumnSQL( + $tableNameSQL, + $columnDiff, + $sql, + $queryParts, + $needsReorg, + ); + } + + if (count($queryParts) > 0) { + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . implode(' ', $queryParts); + } + + // Some table alteration operations require a table reorganization. + if ($needsReorg) { + $sql[] = "CALL SYSPROC.ADMIN_CMD ('REORG TABLE " . $tableNameSQL . "')"; + } + + return array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $commentsSQL, + $this->getPostAlterTableIndexForeignKeySQL($diff), + ); + } + + public function getRenameTableSQL(string $oldName, string $newName): string + { + return sprintf('RENAME TABLE %s TO %s', $oldName, $newName); + } + + /** + * Gathers the table alteration SQL for a given column diff. + * + * @param string $table The table to gather the SQL for. + * @param ColumnDiff $columnDiff The column diff to evaluate. + * @param list $sql The sequence of table alteration statements to fill. + * @param list $queryParts The sequence of column alteration clauses to fill. + */ + private function gatherAlterColumnSQL( + string $table, + ColumnDiff $columnDiff, + array &$sql, + array &$queryParts, + bool &$needsReorg, + ): void { + $alterColumnClauses = $this->getAlterColumnClausesSQL($columnDiff, $needsReorg); + + if (count($alterColumnClauses) < 1) { + return; + } + + // If we have a single column alteration, we can append the clause to the main query. + if (count($alterColumnClauses) === 1) { + $queryParts[] = current($alterColumnClauses); + + return; + } + + // We have multiple alterations for the same column, + // so we need to trigger a complete ALTER TABLE statement + // for each ALTER COLUMN clause. + foreach ($alterColumnClauses as $alterColumnClause) { + $sql[] = 'ALTER TABLE ' . $table . ' ' . $alterColumnClause; + } + } + + /** + * Returns the ALTER COLUMN SQL clauses for altering a column described by the given column diff. + * + * @return string[] + */ + private function getAlterColumnClausesSQL(ColumnDiff $columnDiff, bool &$needsReorg): array + { + $newColumn = $columnDiff->getNewColumn(); + $columnArray = $newColumn->toArray(); + + $newName = $columnDiff->getNewColumn()->getQuotedName($this); + $oldName = $columnDiff->getOldColumn()->getQuotedName($this); + + $alterClause = 'ALTER COLUMN ' . $newName; + + if ($newColumn->getColumnDefinition() !== null) { + $needsReorg = true; + + return [$alterClause . ' ' . $newColumn->getColumnDefinition()]; + } + + $clauses = []; + + if ($columnDiff->hasNameChanged()) { + $clauses[] = 'RENAME COLUMN ' . $oldName . ' TO ' . $newName; + } + + if ( + $columnDiff->hasTypeChanged() || + $columnDiff->hasLengthChanged() || + $columnDiff->hasPrecisionChanged() || + $columnDiff->hasScaleChanged() || + $columnDiff->hasFixedChanged() + ) { + $needsReorg = true; + $clauses[] = $alterClause . ' SET DATA TYPE ' . $newColumn->getType() + ->getSQLDeclaration($columnArray, $this); + } + + if ($columnDiff->hasNotNullChanged()) { + $needsReorg = true; + $clauses[] = $newColumn->getNotnull() ? $alterClause . ' SET NOT NULL' : $alterClause . ' DROP NOT NULL'; + } + + if ($columnDiff->hasDefaultChanged()) { + if ($newColumn->getDefault() !== null) { + $defaultClause = $this->getDefaultValueDeclarationSQL($columnArray); + + if ($defaultClause !== '') { + $needsReorg = true; + $clauses[] = $alterClause . ' SET' . $defaultClause; + } + } else { + $needsReorg = true; + $clauses[] = $alterClause . ' DROP DEFAULT'; + } + } + + return $clauses; + } + + /** + * {@inheritDoc} + */ + protected function getRenameIndexSQL(string $oldIndexName, Index $index, string $tableName): array + { + if (str_contains($tableName, '.')) { + [$schema] = explode('.', $tableName); + $oldIndexName = $schema . '.' . $oldIndexName; + } + + return ['RENAME INDEX ' . $oldIndexName . ' TO ' . $index->getQuotedName($this)]; + } + + /** + * {@inheritDoc} + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + */ + public function getDefaultValueDeclarationSQL(array $column): string + { + if (isset($column['autoincrement']) && $column['autoincrement'] === true) { + return ''; + } + + if (isset($column['version']) && $column['version'] === true) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6940', + 'The "version" column platform option is deprecated.', + ); + + if ($column['type'] instanceof DateTimeType) { + $column['default'] = '1'; + } + } + + return parent::getDefaultValueDeclarationSQL($column); + } + + public function getEmptyIdentityInsertSQL(string $quotedTableName, string $quotedIdentifierColumnName): string + { + return 'INSERT INTO ' . $quotedTableName . ' (' . $quotedIdentifierColumnName . ') VALUES (DEFAULT)'; + } + + public function getCreateTemporaryTableSnippetSQL(): string + { + return 'DECLARE GLOBAL TEMPORARY TABLE'; + } + + public function getTemporaryTableName(string $tableName): string + { + return 'SESSION.' . $tableName; + } + + protected function doModifyLimitQuery(string $query, ?int $limit, int $offset): string + { + if ($offset > 0) { + $query .= sprintf(' OFFSET %d ROWS', $offset); + } + + if ($limit !== null) { + $query .= sprintf(' FETCH NEXT %d ROWS ONLY', $limit); + } + + return $query; + } + + public function getLocateExpression(string $string, string $substring, ?string $start = null): string + { + if ($start === null) { + return sprintf('LOCATE(%s, %s)', $substring, $string); + } + + return sprintf('LOCATE(%s, %s, %s)', $substring, $string, $start); + } + + public function getSubstringExpression(string $string, string $start, ?string $length = null): string + { + if ($length === null) { + return sprintf('SUBSTR(%s, %s)', $string, $start); + } + + return sprintf('SUBSTR(%s, %s, %s)', $string, $start, $length); + } + + public function getLengthExpression(string $string): string + { + return 'LENGTH(' . $string . ', CODEUNITS32)'; + } + + public function getCurrentDatabaseExpression(): string + { + return 'CURRENT_USER'; + } + + public function supportsIdentityColumns(): bool + { + return true; + } + + public function createSelectSQLBuilder(): SelectSQLBuilder + { + return new DefaultSelectSQLBuilder($this, 'WITH RR USE AND KEEP UPDATE LOCKS', null); + } + + public function getDummySelectSQL(string $expression = '1'): string + { + return sprintf('SELECT %s FROM sysibm.sysdummy1', $expression); + } + + /** + * {@inheritDoc} + * + * Db2 supports savepoints, but they work semantically different than on other vendor platforms. + * + * TODO: We have to investigate how to get Db2 up and running with savepoints. + */ + public function supportsSavepoints(): bool + { + return false; + } + + /** @deprecated */ + protected function createReservedKeywordsList(): KeywordList + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6607', + '%s is deprecated.', + __METHOD__, + ); + + return new DB2Keywords(); + } + + public function createMetadataProvider(Connection $connection): Db2MetadataProvider + { + return new Db2MetadataProvider($connection, $this); + } + + public function createSchemaManager(Connection $connection): DB2SchemaManager + { + return new DB2SchemaManager($connection, $this); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/DateIntervalUnit.php b/backend/vendor/doctrine/dbal/src/Platforms/DateIntervalUnit.php new file mode 100644 index 0000000..ba783f3 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/DateIntervalUnit.php @@ -0,0 +1,17 @@ + ReferentialAction::NO_ACTION, + 'C' => ReferentialAction::CASCADE, + 'N' => ReferentialAction::SET_NULL, + 'R' => ReferentialAction::RESTRICT, + ]; + + /** @internal This class can be instantiated only by a database platform. */ + public function __construct(private Connection $connection, private DB2Platform $platform) + { + } + + /** {@inheritDoc} */ + public function getAllDatabaseNames(): iterable + { + throw NotSupported::new(__METHOD__); + } + + /** {@inheritDoc} */ + public function getAllSchemaNames(): iterable + { + throw NotSupported::new(__METHOD__); + } + + /** + * {@inheritDoc} + * + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscattables + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=registers-current-user + */ + public function getAllTableNames(): iterable + { + $sql = <<<'SQL' + SELECT TABNAME + FROM SYSCAT.TABLES + WHERE TABSCHEMA = CURRENT USER + AND TYPE = 'T' + ORDER BY TABNAME + SQL; + + foreach ($this->connection->iterateNumeric($sql) as $row) { + yield new TableMetadataRow(null, $row[0], []); + } + } + + /** {@inheritDoc} */ + public function getTableColumnsForAllTables(): iterable + { + return $this->getTableColumns(null); + } + + /** {@inheritDoc} */ + public function getTableColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getTableColumns($tableName); + } + + /** + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscatcolumns + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscattables + * + * @return iterable + * + * @throws Exception + */ + private function getTableColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT C.TABNAME, + C.COLNAME, + C.TYPENAME, + C.CODEPAGE, + C.NULLS, + C.LENGTH, + C.SCALE, + C.REMARKS, + C.GENERATED, + C.DEFAULT + FROM SYSCAT.COLUMNS C + JOIN SYSCAT.TABLES AS T + ON T.TABSCHEMA = C.TABSCHEMA + AND T.TABNAME = C.TABNAME + WHERE %s + AND T.TYPE = 'T' + ORDER BY C.TABNAME, + C.COLNO + SQL, + $this->buildTableQueryPredicate('C', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield $this->createTableColumn($row); + } + } + + /** + * @param list $row + * + * @throws TypesException + */ + private function createTableColumn(array $row): TableColumnMetadataRow + { + [ + $tableName, + $columnName, + $typeName, + $codePage, + $nulls, + $length, + $scale, + $remarks, + $generated, + $default, + ] = $row; + + $editor = Column::editor() + ->setQuotedName($columnName); + + $type = $this->platform->getDoctrineTypeMapping($typeName); + + switch (strtolower($typeName)) { + case 'varchar': + if ($codePage === 0) { + $type = Types::BINARY; + } + + $editor->setLength($length); + break; + + case 'character': + if ($codePage === 0) { + $type = Types::BINARY; + } + + $editor + ->setLength($length) + ->setFixed(true); + break; + + case 'clob': + $editor->setLength($length); + break; + + case 'decimal': + case 'double': + case 'real': + $editor + ->setPrecision($length) + ->setScale($scale); + break; + } + + $editor + ->setTypeName($type) + ->setNotNull($nulls === 'N') + ->setDefaultValue($this->parseDefaultExpression($default)) + ->setAutoincrement($generated === 'D'); + + if ($remarks !== null) { + $editor->setComment($remarks); + } + + return new TableColumnMetadataRow(null, $tableName, $editor->create()); + } + + private function parseDefaultExpression(?string $expression): ?string + { + if ($expression === null || $expression === 'NULL') { + return null; + } + + if (preg_match('/^\'(.*)\'$/s', $expression, $matches) === 1) { + return str_replace("''", "'", $matches[1]); + } + + return $expression; + } + + /** {@inheritDoc} */ + public function getIndexColumnsForAllTables(): iterable + { + return $this->getIndexColumns(null); + } + + /** {@inheritDoc} */ + public function getIndexColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getIndexColumns($tableName); + } + + /** + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscatindexcoluse + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscatindexes + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscattables + * + * @return iterable + * + * @throws Exception + */ + private function getIndexColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT I.TABNAME, + I.INDNAME, + I.UNIQUERULE, + ICU.COLNAME + FROM SYSCAT.INDEXES AS I + JOIN SYSCAT.TABLES AS T + ON I.TABSCHEMA = T.TABSCHEMA + AND I.TABNAME = T.TABNAME + JOIN SYSCAT.INDEXCOLUSE AS ICU + ON I.INDSCHEMA = ICU.INDSCHEMA + AND I.INDNAME = ICU.INDNAME + WHERE %s + AND T.TYPE = 'T' + AND I.UNIQUERULE != 'P' + ORDER BY I.TABNAME, + I.INDNAME, + ICU.COLSEQ + SQL, + $this->buildTableQueryPredicate('I', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new IndexColumnMetadataRow( + schemaName: null, + tableName: $row[0], + indexName: $row[1], + type: $row[2] === 'U' ? IndexType::UNIQUE : IndexType::REGULAR, + isClustered: false, + predicate: null, + columnName: $row[3], + columnLength: null, + ); + } + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForAllTables(): iterable + { + return $this->getPrimaryKeyConstraintColumns(null); + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getPrimaryKeyConstraintColumns($tableName); + } + + /** + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscatcoluse + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscattabconst + * + * @return iterable + * + * @throws Exception + */ + private function getPrimaryKeyConstraintColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT TC.TABNAME, + TC.CONSTNAME, + KCU.COLNAME + FROM SYSCAT.TABCONST TC + JOIN SYSCAT.KEYCOLUSE KCU + ON KCU.TABSCHEMA = TC.TABSCHEMA + AND KCU.TABNAME = TC.TABNAME + AND KCU.CONSTNAME = TC.CONSTNAME + WHERE %s + AND TC.TYPE = 'P' + ORDER BY TC.TABNAME, + TC.CONSTNAME, + KCU.COLSEQ + SQL, + $this->buildTableQueryPredicate('TC', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new PrimaryKeyConstraintColumnRow( + schemaName: null, + tableName: $row[0], + constraintName: $row[1], + isClustered: true, + columnName: $row[2], + ); + } + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForAllTables(): iterable + { + return $this->getForeignKeyConstraintColumns(null); + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getForeignKeyConstraintColumns($tableName); + } + + /** + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscatkeycoluse + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscatreferences + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscattables + * + * @return iterable + * + * @throws Exception + */ + private function getForeignKeyConstraintColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT R.TABNAME, + R.CONSTNAME, + R.REFTABNAME, + R.UPDATERULE, + R.DELETERULE, + PKCU.COLNAME, + FKCU.COLNAME + FROM SYSCAT.REFERENCES AS R + JOIN SYSCAT.TABLES AS T + ON T.TABSCHEMA = R.TABSCHEMA + AND T.TABNAME = R.TABNAME + JOIN SYSCAT.KEYCOLUSE AS PKCU + ON PKCU.CONSTNAME = R.CONSTNAME + AND PKCU.TABSCHEMA = R.TABSCHEMA + AND PKCU.TABNAME = R.TABNAME + JOIN SYSCAT.KEYCOLUSE AS FKCU + ON FKCU.CONSTNAME = R.REFKEYNAME + AND FKCU.TABSCHEMA = R.REFTABSCHEMA + AND FKCU.TABNAME = R.REFTABNAME + AND FKCU.COLSEQ = PKCU.COLSEQ + WHERE %s + AND T.TYPE = 'T' + ORDER BY R.TABNAME, + R.CONSTNAME, + PKCU.COLSEQ + SQL, + $this->buildTableQueryPredicate('R', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new ForeignKeyConstraintColumnMetadataRow( + referencingSchemaName: null, + referencingTableName: $row[0], + id: null, + name: $row[1], + referencedSchemaName: null, + referencedTableName: $row[2], + matchType: MatchType::SIMPLE, + onUpdateAction: self::REFERENTIAL_ACTIONS[$row[3]], + onDeleteAction: self::REFERENTIAL_ACTIONS[$row[4]], + isDeferrable: false, + isDeferred: false, + referencingColumnName: $row[5], + referencedColumnName: $row[6], + ); + } + } + + /** {@inheritDoc} */ + public function getTableOptionsForAllTables(): iterable + { + return $this->getTableOptions(null); + } + + /** {@inheritDoc} */ + public function getTableOptionsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getTableOptions($tableName); + } + + /** + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscattables + * + * @return iterable + * + * @throws Exception + */ + private function getTableOptions(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT TABNAME, + REMARKS + FROM SYSCAT.TABLES T + WHERE %s + AND TYPE = 'T' + ORDER BY TABNAME + SQL, + $this->buildTableQueryPredicate(null, $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new TableMetadataRow(null, $row[0], [ + 'comment' => $row[1], + ]); + } + } + + /** + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=registers-current-user + * + * @param ?non-empty-string $relation + * @param list $params + * + * @return non-empty-string + */ + private function buildTableQueryPredicate(?string $relation, ?string $tableName, array &$params): string + { + $qualifier = $relation !== null ? $relation . '.' : ''; + + $conditions = [$qualifier . 'TABSCHEMA = CURRENT USER']; + + if ($tableName !== null) { + $conditions[] = $qualifier . 'TABNAME = ?'; + $params[] = $tableName; + } + + return implode(' AND ', $conditions); + } + + /** + * {@inheritDoc} + * + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=views-syscatviews + * @link https://www.ibm.com/docs/en/db2/12.1.0?topic=registers-current-user + */ + public function getAllViews(): iterable + { + $sql = <<<'SQL' + SELECT VIEWNAME, + TEXT + FROM SYSCAT.VIEWS + WHERE VIEWSCHEMA = CURRENT USER + ORDER BY VIEWNAME + SQL; + + foreach ($this->connection->iterateNumeric($sql) as $row) { + yield new ViewMetadataRow(null, ...$row); + } + } + + /** {@inheritDoc} */ + public function getAllSequences(): iterable + { + throw NotSupported::new(__METHOD__); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/Exception/InvalidPlatformVersion.php b/backend/vendor/doctrine/dbal/src/Platforms/Exception/InvalidPlatformVersion.php new file mode 100644 index 0000000..ac7c43f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/Exception/InvalidPlatformVersion.php @@ -0,0 +1,27 @@ +keywords === null) { + $this->initializeKeywords(); + } + + return isset($this->keywords[strtoupper($word)]); + } + + protected function initializeKeywords(): void + { + $this->keywords = array_flip(array_map('strtoupper', $this->getKeywords())); + } + + /** + * Returns the list of keywords. + * + * @return string[] + */ + abstract protected function getKeywords(): array; +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/Keywords/MariaDB117Keywords.php b/backend/vendor/doctrine/dbal/src/Platforms/Keywords/MariaDB117Keywords.php new file mode 100644 index 0000000..c714a34 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/Keywords/MariaDB117Keywords.php @@ -0,0 +1,26 @@ +getQuotedName($this)]; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/MariaDB1060Platform.php b/backend/vendor/doctrine/dbal/src/Platforms/MariaDB1060Platform.php new file mode 100644 index 0000000..15eb803 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/MariaDB1060Platform.php @@ -0,0 +1,20 @@ +quoteStringLiteral($databaseName); + + // The check for `CONSTRAINT_SCHEMA = $databaseName` is mandatory here to prevent performance issues + return <<getOldTable()->getQuotedName($this); + + $modifiedForeignKeys = $diff->getModifiedForeignKeys(); + + foreach ($this->getRemainingForeignKeyConstraintsRequiringRenamedIndexes($diff) as $foreignKey) { + if (in_array($foreignKey, $modifiedForeignKeys, true)) { + continue; + } + + $sql[] = $this->getDropForeignKeySQL($foreignKey->getQuotedName($this), $tableName); + } + + return $sql; + } + + /** + * {@inheritDoc} + */ + protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff): array + { + return array_merge( + parent::getPostAlterTableIndexForeignKeySQL($diff), + $this->getPostAlterTableRenameIndexForeignKeySQL($diff), + ); + } + + /** @return list */ + private function getPostAlterTableRenameIndexForeignKeySQL(TableDiff $diff): array + { + $sql = []; + + $tableName = $diff->getOldTable()->getQuotedName($this); + + $modifiedForeignKeys = $diff->getModifiedForeignKeys(); + + foreach ($this->getRemainingForeignKeyConstraintsRequiringRenamedIndexes($diff) as $foreignKey) { + if (in_array($foreignKey, $modifiedForeignKeys, true)) { + continue; + } + + $sql[] = $this->getCreateForeignKeySQL($foreignKey, $tableName); + } + + return $sql; + } + + /** + * Returns the remaining foreign key constraints that require one of the renamed indexes. + * + * "Remaining" here refers to the diff between the foreign keys currently defined in the associated + * table and the foreign keys to be removed. + * + * @param TableDiff $diff The table diff to evaluate. + * + * @return ForeignKeyConstraint[] + */ + private function getRemainingForeignKeyConstraintsRequiringRenamedIndexes(TableDiff $diff): array + { + $renamedIndexes = $diff->getRenamedIndexes(); + + if (count($renamedIndexes) === 0) { + return []; + } + + $foreignKeys = []; + + $remainingForeignKeys = array_diff_key( + $diff->getOldTable()->getForeignKeys(), + $diff->getDroppedForeignKeys(), + ); + + foreach ($remainingForeignKeys as $foreignKey) { + foreach ($renamedIndexes as $index) { + if ($foreignKey->intersectsIndexColumns($index)) { + $foreignKeys[] = $foreignKey; + + break; + } + } + } + + return $foreignKeys; + } + + /** {@inheritDoc} */ + public function getColumnDeclarationSQL(string $name, array $column): string + { + // MariaDb forces column collation to utf8mb4_bin where the column was declared as JSON so ignore + // collation and character set for json columns as attempting to set them can cause an error. + if ($this->getJsonTypeDeclarationSQL([]) === 'JSON' && ($column['type'] ?? null) instanceof JsonType) { + unset($column['collation']); + unset($column['charset']); + } + + return parent::getColumnDeclarationSQL($name, $column); + } + + /** @deprecated */ + protected function createReservedKeywordsList(): KeywordList + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6607', + '%s is deprecated.', + __METHOD__, + ); + + return new MariaDBKeywords(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider.php b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider.php new file mode 100644 index 0000000..305a7e3 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider.php @@ -0,0 +1,12 @@ + */ + private array $cache = []; + + public function __construct(private readonly CharsetMetadataProvider $charsetMetadataProvider) + { + } + + public function getDefaultCharsetCollation(string $charset): ?string + { + if (array_key_exists($charset, $this->cache)) { + return $this->cache[$charset]; + } + + return $this->cache[$charset] = $this->charsetMetadataProvider->getDefaultCharsetCollation($charset); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/ConnectionCharsetMetadataProvider.php b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/ConnectionCharsetMetadataProvider.php new file mode 100644 index 0000000..65b63df --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/ConnectionCharsetMetadataProvider.php @@ -0,0 +1,37 @@ +connection->fetchOne( + <<<'SQL' + SELECT DEFAULT_COLLATE_NAME + FROM information_schema.CHARACTER_SETS + WHERE CHARACTER_SET_NAME = ?; + SQL + , + [$charset], + ); + + if ($collation !== false) { + return $collation; + } + + return null; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider.php b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider.php new file mode 100644 index 0000000..028edf9 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider.php @@ -0,0 +1,16 @@ + */ + private array $cache = []; + + public function __construct(private readonly CollationMetadataProvider $collationMetadataProvider) + { + } + + public function getCollationCharset(string $collation): ?string + { + if (array_key_exists($collation, $this->cache)) { + return $this->cache[$collation]; + } + + return $this->cache[$collation] = $this->collationMetadataProvider->getCollationCharset($collation); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider/ConnectionCollationMetadataProvider.php b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider/ConnectionCollationMetadataProvider.php new file mode 100644 index 0000000..fcd9995 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider/ConnectionCollationMetadataProvider.php @@ -0,0 +1,37 @@ +connection->fetchOne( + <<<'SQL' +SELECT CHARACTER_SET_NAME +FROM information_schema.COLLATIONS +WHERE COLLATION_NAME = ?; +SQL + , + [$collation], + ); + + if ($charset !== false) { + return $charset; + } + + return null; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/MySQL/Comparator.php b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/Comparator.php new file mode 100644 index 0000000..30956ec --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/Comparator.php @@ -0,0 +1,99 @@ +normalizeTable($oldTable), + $this->normalizeTable($newTable), + ); + } + + private function normalizeTable(Table $table): Table + { + $charset = $table->getOption('charset'); + $collation = $table->getOption('collation'); + + if ($charset === null && $collation !== null) { + $charset = $this->collationMetadataProvider->getCollationCharset($collation); + } elseif ($charset !== null && $collation === null) { + $collation = $this->charsetMetadataProvider->getDefaultCharsetCollation($charset); + } elseif ($charset === null && $collation === null) { + $charset = $this->defaultTableOptions->getCharset(); + $collation = $this->defaultTableOptions->getCollation(); + } + + $tableOptions = [ + 'charset' => $charset, + 'collation' => $collation, + ]; + + $table = clone $table; + + foreach ($table->getColumns() as $column) { + $originalOptions = $column->getPlatformOptions(); + $normalizedOptions = $this->normalizeOptions($originalOptions); + + $overrideOptions = array_diff_assoc($normalizedOptions, $tableOptions); + + if ($overrideOptions === $originalOptions) { + continue; + } + + /** @phpstan-ignore argument.type */ + $column->setPlatformOptions($overrideOptions); + } + + return $table; + } + + /** + * @param PlatformOptions $options + * + * @return PlatformOptions + */ + private function normalizeOptions(array $options): array + { + if (isset($options['charset']) && ! isset($options['collation'])) { + $options['collation'] = $this->charsetMetadataProvider->getDefaultCharsetCollation($options['charset']); + } elseif (isset($options['collation']) && ! isset($options['charset'])) { + $options['charset'] = $this->collationMetadataProvider->getCollationCharset($options['collation']); + } + + return $options; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/MySQL/DefaultTableOptions.php b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/DefaultTableOptions.php new file mode 100644 index 0000000..efa399d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/DefaultTableOptions.php @@ -0,0 +1,23 @@ +charset; + } + + public function getCollation(): string + { + return $this->collation; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/MySQL/MySQLMetadataProvider.php b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/MySQLMetadataProvider.php new file mode 100644 index 0000000..7720164 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/MySQL/MySQLMetadataProvider.php @@ -0,0 +1,677 @@ + "\0", + "\\'" => "'", + '\\"' => '"', + '\\b' => "\b", + '\\n' => "\n", + '\\r' => "\r", + '\\t' => "\t", + '\\Z' => "\x1a", + '\\\\' => '\\', + '\\%' => '%', + '\\_' => '_', + + // Internally, MariaDB escapes single quotes using the standard syntax + "''" => "'", + ]; + + /** @var non-empty-string */ + private string $databaseName; + + /** + * @internal This class can be instantiated only by a database platform. + * + * @throws Exception + */ + public function __construct(private Connection $connection, private AbstractMySQLPlatform $platform) + { + $databaseName = $connection->fetchOne('SELECT DATABASE()'); + + if ($databaseName === null) { + throw DatabaseRequired::new(__METHOD__); + } + + $this->databaseName = $databaseName; + } + + /** + * {@inheritDoc} + * + * @link https://dev.mysql.com/doc/refman/8.4/en/information-schema-schemata-table.html + */ + public function getAllDatabaseNames(): iterable + { + $sql = <<<'SQL' + SELECT SCHEMA_NAME + FROM information_schema.SCHEMATA + ORDER BY SCHEMA_NAME + SQL; + + foreach ($this->connection->iterateColumn($sql) as $databaseName) { + yield new DatabaseMetadataRow($databaseName); + } + } + + /** {@inheritDoc} */ + public function getAllSchemaNames(): iterable + { + throw NotSupported::new(__METHOD__); + } + + /** + * {@inheritDoc} + * + * @link https://dev.mysql.com/doc/refman/8.4/en/information-schema-tables-table.html + */ + public function getAllTableNames(): iterable + { + $sql = <<<'SQL' + SELECT TABLE_NAME + FROM information_schema.TABLES + WHERE TABLE_SCHEMA = ? + AND TABLE_TYPE = 'BASE TABLE' + ORDER BY TABLE_NAME + SQL; + + foreach ($this->connection->iterateNumeric($sql, [$this->databaseName]) as $row) { + yield new TableMetadataRow(null, $row[0], []); + } + } + + /** {@inheritDoc} */ + public function getTableColumnsForAllTables(): iterable + { + return $this->getTableColumns(null); + } + + /** {@inheritDoc} */ + public function getTableColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getTableColumns($tableName); + } + + /** + * @link https://dev.mysql.com/doc/refman/8.4/en/information-schema-columns-table.html + * @link https://dev.mysql.com/doc/refman/8.4/en/information-schema-tables-table.html + * + * @return iterable + * + * @throws Exception + */ + private function getTableColumns(?string $tableName): iterable + { + // The schema name is passed multiple times in the WHERE clause instead of using a JOIN condition to avoid + // performance issues on MySQL older than 8.0 and the corresponding MariaDB versions caused by + // https://bugs.mysql.com/bug.php?id=81347 + $conditions = ['c.TABLE_SCHEMA = ?', 't.TABLE_SCHEMA = ?']; + $params = [$this->databaseName, $this->databaseName]; + + if ($tableName !== null) { + $conditions[] = 't.TABLE_NAME = ?'; + $params[] = $tableName; + } + + $sql = sprintf( + <<<'SQL' + SELECT c.TABLE_NAME, + c.COLUMN_NAME, + %s, + c.COLUMN_TYPE, + c.CHARACTER_MAXIMUM_LENGTH, + c.CHARACTER_OCTET_LENGTH, + c.NUMERIC_PRECISION, + c.NUMERIC_SCALE, + c.IS_NULLABLE, + c.COLUMN_DEFAULT, + c.EXTRA, + c.COLUMN_COMMENT, + c.CHARACTER_SET_NAME, + c.COLLATION_NAME + FROM information_schema.COLUMNS c + INNER JOIN information_schema.TABLES t + ON t.TABLE_NAME = c.TABLE_NAME + WHERE %s + AND t.TABLE_TYPE = 'BASE TABLE' + ORDER BY c.TABLE_NAME, + c.ORDINAL_POSITION + SQL, + $this->platform->getColumnTypeSQLSnippet('c', $this->databaseName), + implode(' AND ', $conditions), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield $this->createTableColumn($row); + } + } + + /** + * @param list $row + * + * @throws TypesException + */ + private function createTableColumn(array $row): TableColumnMetadataRow + { + [ + $tableName, + $columnName, + $dbType, + $columnType, + $characterMaximumLength, + $characterOctetLength, + $numericPrecision, + $numericScale, + $isNullable, + $columnDefault, + $extra, + $columnComment, + $characterSetName, + $collationName, + ] = $row; + + $editor = Column::editor() + ->setQuotedName($columnName) + ->setTypeName( + $this->platform->getDoctrineTypeMapping($dbType), + ); + + if (str_contains($columnType, 'unsigned')) { + $editor->setUnsigned(true); + } + + switch ($dbType) { + case 'char': + case 'varchar': + $editor->setLength((int) $characterMaximumLength); + break; + + case 'binary': + case 'varbinary': + $editor->setLength((int) $characterOctetLength); + break; + + case 'tinytext': + $editor->setLength(AbstractMySQLPlatform::LENGTH_LIMIT_TINYTEXT); + break; + + case 'text': + $editor->setLength(AbstractMySQLPlatform::LENGTH_LIMIT_TEXT); + break; + + case 'mediumtext': + $editor->setLength(AbstractMySQLPlatform::LENGTH_LIMIT_MEDIUMTEXT); + break; + + case 'tinyblob': + $editor->setLength(AbstractMySQLPlatform::LENGTH_LIMIT_TINYBLOB); + break; + + case 'blob': + $editor->setLength(AbstractMySQLPlatform::LENGTH_LIMIT_BLOB); + break; + + case 'mediumblob': + $editor->setLength(AbstractMySQLPlatform::LENGTH_LIMIT_MEDIUMBLOB); + break; + + case 'float': + case 'double': + case 'real': + case 'numeric': + case 'decimal': + $editor->setPrecision((int) $numericPrecision); + + if ($numericScale !== null) { + $editor->setScale((int) $numericScale); + } + + break; + } + + switch ($dbType) { + case 'char': + case 'binary': + $editor->setFixed(true); + break; + + case 'enum': + $editor->setValues($this->parseEnumExpression($columnType)); + break; + } + + if ($this->platform instanceof MariaDBPlatform) { + $default = $this->parseMariaDBColumnDefault($this->platform, $columnDefault); + } else { + $default = $columnDefault; + } + + $editor + ->setDefaultValue($default) + ->setNotNull($isNullable !== 'YES') + ->setComment($columnComment) + ->setCharset($characterSetName) + ->setCollation($collationName); + + if (str_contains($extra, 'auto_increment')) { + $editor->setAutoincrement(true); + } + + return new TableColumnMetadataRow(null, $tableName, $editor->create()); + } + + /** @return list */ + private function parseEnumExpression(string $expression): array + { + $result = preg_match_all("/'([^']*(?:''[^']*)*)'/", $expression, $matches); + assert($result !== false); + + return array_map( + static fn (string $match): string => strtr($match, ["''" => "'"]), + $matches[1], + ); + } + + /** + * Return Doctrine/Mysql-compatible column default values for MariaDB 10.2.7+ servers. + * + * - Since MariaDB 10.2.7 column defaults stored in information_schema are quoted to distinguish them from + * expressions. + * - The CURRENT_TIMESTAMP, CURRENT_TIME and CURRENT_DATE expressions + * are represented as "current_timestamp()", "curdate()" and "curtime()" respectively. + * - Quoted 'NULL' is not enforced. It is technically possible to have "null" in some circumstances. + * - Single quotes are always escaped by doubling, even if the original DDL used backslash escaping. + * + * @link https://mariadb.com/kb/en/library/information-schema-columns-table/ + * @link https://jira.mariadb.org/browse/MDEV-10134 + * @link https://jira.mariadb.org/browse/MDEV-13132 + * @link https://jira.mariadb.org/browse/MDEV-14053 + * + * @param string|null $columnDefault default value as stored in information_schema for MariaDB >= 10.2.7 + */ + private function parseMariaDBColumnDefault(MariaDBPlatform $platform, ?string $columnDefault): ?string + { + if ($columnDefault === 'NULL' || $columnDefault === null) { + return null; + } + + if (preg_match('/^\'(.*)\'$/', $columnDefault, $matches) === 1) { + return strtr($matches[1], self::MARIADB_ESCAPE_SEQUENCES); + } + + return match ($columnDefault) { + 'current_timestamp()' => $platform->getCurrentTimestampSQL(), + 'curdate()' => $platform->getCurrentDateSQL(), + 'curtime()' => $platform->getCurrentTimeSQL(), + default => $columnDefault, + }; + } + + /** {@inheritDoc} */ + public function getIndexColumnsForAllTables(): iterable + { + return $this->getIndexColumns(null); + } + + /** {@inheritDoc} */ + public function getIndexColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getIndexColumns($tableName); + } + + /** + * @link https://dev.mysql.com/doc/refman/8.4/en/information-schema-statistics-table.html + * + * @return iterable + * + * @throws Exception + */ + private function getIndexColumns(?string $tableName): iterable + { + $conditions = ['TABLE_SCHEMA = ?']; + $params = [$this->databaseName]; + + if ($tableName !== null) { + $conditions[] = 'TABLE_NAME = ?'; + $params[] = $tableName; + } + + $sql = sprintf( + <<<'SQL' + SELECT TABLE_NAME, + INDEX_NAME, + INDEX_TYPE, + NON_UNIQUE, + COLUMN_NAME, + SUB_PART + FROM information_schema.STATISTICS + WHERE %s + AND INDEX_NAME != 'PRIMARY' + ORDER BY TABLE_NAME, + SEQ_IN_INDEX + SQL, + implode(' AND ', $conditions), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + if ($row[5] !== null) { + $length = (int) $row[5]; + assert($length > 0); + } else { + $length = null; + } + + if ($row[2] === 'FULLTEXT') { + $type = IndexType::FULLTEXT; + } elseif ($row[2] === 'SPATIAL') { + $type = IndexType::SPATIAL; + + // the SUB_PART column may contain a non-null value for spatial indexes, + // but this is not the prefix length + $length = null; + } elseif ($row[3]) { + $type = IndexType::REGULAR; + } else { + $type = IndexType::UNIQUE; + } + + yield new IndexColumnMetadataRow( + schemaName: null, + tableName: $row[0], + indexName: $row[1], + type: $type, + isClustered: false, + predicate: null, + columnName: $row[4], + columnLength: $length, + ); + } + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForAllTables(): iterable + { + return $this->getPrimaryKeyConstraintColumns(null); + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getPrimaryKeyConstraintColumns($tableName); + } + + /** + * @link https://dev.mysql.com/doc/refman/8.4/en/information-schema-table-constraints-table.html + * @link https://dev.mysql.com/doc/refman/8.4/en/information-schema-key-column-usage-table.html + * + * @return iterable + * + * @throws Exception + */ + private function getPrimaryKeyConstraintColumns(?string $tableName): iterable + { + // The schema name is passed multiple times in the WHERE clause instead of using a JOIN condition to avoid + // performance issues on MySQL older than 8.0 and the corresponding MariaDB versions caused by + // https://bugs.mysql.com/bug.php?id=81347 + $conditions = ['tc.TABLE_SCHEMA = ?', 'kcu.TABLE_SCHEMA = ?']; + $params = [$this->databaseName, $this->databaseName]; + + if ($tableName !== null) { + $conditions[] = 'tc.TABLE_NAME = ?'; + $params[] = $tableName; + } + + $sql = sprintf( + <<<'SQL' + SELECT tc.TABLE_NAME, + tc.CONSTRAINT_NAME, + kcu.COLUMN_NAME + FROM information_schema.TABLE_CONSTRAINTS tc + INNER JOIN information_schema.KEY_COLUMN_USAGE kcu + ON kcu.TABLE_NAME = tc.TABLE_NAME + AND kcu.CONSTRAINT_NAME = tc.CONSTRAINT_NAME + WHERE %s + AND tc.CONSTRAINT_TYPE = 'PRIMARY KEY' + ORDER BY TABLE_NAME, + kcu.ORDINAL_POSITION + SQL, + implode(' AND ', $conditions), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new PrimaryKeyConstraintColumnRow( + schemaName: null, + tableName: $row[0], + constraintName: $row[1], + isClustered: true, + columnName: $row[2], + ); + } + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForAllTables(): iterable + { + return $this->getForeignKeyConstraintColumns(null); + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getForeignKeyConstraintColumns($tableName); + } + + /** + * @link https://dev.mysql.com/doc/refman/8.4/en/information-schema-key-column-usage-table.html + * @link https://dev.mysql.com/doc/refman/8.4/en/information-schema-referential-constraints-table.html + * + * @return iterable + * + * @throws Exception + */ + private function getForeignKeyConstraintColumns(?string $tableName): iterable + { + // The schema name is passed multiple times in the WHERE clause instead of using a JOIN condition + // to avoid performance issues on MySQL older than 8.0 and the corresponding MariaDB versions caused by + // https://bugs.mysql.com/bug.php?id=81347 + $conditions = ['k.TABLE_SCHEMA = ?', 'c.CONSTRAINT_SCHEMA = ?']; + $params = [$this->databaseName, $this->databaseName]; + + if ($tableName !== null) { + $conditions[] = 'k.TABLE_NAME = ?'; + $params[] = $tableName; + } + + $sql = sprintf( + <<<'SQL' + SELECT k.TABLE_NAME, + k.CONSTRAINT_NAME, + k.REFERENCED_TABLE_NAME, + c.UPDATE_RULE, + c.DELETE_RULE, + k.COLUMN_NAME, + k.REFERENCED_COLUMN_NAME + FROM information_schema.KEY_COLUMN_USAGE k + INNER JOIN information_schema.REFERENTIAL_CONSTRAINTS c + ON c.CONSTRAINT_NAME = k.CONSTRAINT_NAME + AND c.TABLE_NAME = k.TABLE_NAME + WHERE %s + AND k.REFERENCED_COLUMN_NAME IS NOT NULL + ORDER BY k.TABLE_NAME, + k.CONSTRAINT_NAME, + k.ORDINAL_POSITION + SQL, + implode(' AND ', $conditions), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new ForeignKeyConstraintColumnMetadataRow( + referencingSchemaName: null, + referencingTableName: $row[0], + id: null, + name: $row[1], + referencedSchemaName: null, + referencedTableName: $row[2], + matchType: MatchType::SIMPLE, + onUpdateAction: $this->createReferentialAction($row[3]), + onDeleteAction: $this->createReferentialAction($row[4]), + isDeferrable: false, + isDeferred: false, + referencingColumnName: $row[5], + referencedColumnName: $row[6], + ); + } + } + + private function createReferentialAction(string $value): ReferentialAction + { + $action = ReferentialAction::tryFrom($value); + assert($action !== null); + + return $action; + } + + /** {@inheritDoc} */ + public function getTableOptionsForAllTables(): iterable + { + return $this->getTableOptions(null); + } + + /** {@inheritDoc} */ + public function getTableOptionsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getTableOptions($tableName); + } + + /** + * @return iterable + * + * @throws Exception + */ + private function getTableOptions(?string $tableName): iterable + { + $sql = $this->platform->fetchTableOptionsByTable($tableName !== null); + + $params = [$this->databaseName]; + if ($tableName !== null) { + $params[] = $tableName; + } + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new TableMetadataRow(null, $row[0], [ + 'engine' => $row[1], + 'autoincrement' => $row[2], + 'comment' => $row[3], + 'create_options' => $this->parseCreateOptions($row[4]), + 'collation' => $row[5], + 'charset' => $row[6], + ]); + } + } + + /** @return array|array */ + private function parseCreateOptions(?string $string): array + { + $options = []; + + if ($string === null || $string === '') { + return $options; + } + + foreach (explode(' ', $string) as $pair) { + $parts = explode('=', $pair, 2); + + $options[$parts[0]] = $parts[1] ?? true; + } + + return $options; + } + + /** + * {@inheritDoc} + * + * @link https://dev.mysql.com/doc/refman/8.4/en/information-schema-views-table.html + */ + public function getAllViews(): iterable + { + $sql = <<<'SQL' + SELECT TABLE_NAME, + VIEW_DEFINITION + FROM information_schema.VIEWS + WHERE TABLE_SCHEMA = ? + ORDER BY TABLE_NAME + SQL; + + foreach ($this->connection->iterateNumeric($sql, [$this->databaseName]) as $row) { + yield new ViewMetadataRow(null, ...$row); + } + } + + /** {@inheritDoc} */ + public function getAllSequences(): iterable + { + throw NotSupported::new(__METHOD__); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/MySQL80Platform.php b/backend/vendor/doctrine/dbal/src/Platforms/MySQL80Platform.php new file mode 100644 index 0000000..01dcfb4 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/MySQL80Platform.php @@ -0,0 +1,41 @@ +getQuotedName($this)]; + } + + /** @deprecated */ + protected function createReservedKeywordsList(): KeywordList + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6607', + '%s is deprecated.', + __METHOD__, + ); + + return new MySQLKeywords(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/Oracle/OracleMetadataProvider.php b/backend/vendor/doctrine/dbal/src/Platforms/Oracle/OracleMetadataProvider.php new file mode 100644 index 0000000..eea1581 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/Oracle/OracleMetadataProvider.php @@ -0,0 +1,581 @@ +connection->iterateColumn($sql) as $databaseName) { + yield new DatabaseMetadataRow($databaseName); + } + } + + /** {@inheritDoc} */ + public function getAllSchemaNames(): iterable + { + throw NotSupported::new(__METHOD__); + } + + /** + * {@inheritDoc} + * + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_TABLES.html + */ + public function getAllTableNames(): iterable + { + $sql = <<<'SQL' + SELECT TABLE_NAME + FROM USER_TABLES + ORDER BY TABLE_NAME + SQL; + + foreach ($this->connection->iterateNumeric($sql) as $row) { + yield new TableMetadataRow(null, $row[0], []); + } + } + + /** {@inheritDoc} */ + public function getTableColumnsForAllTables(): iterable + { + return $this->getTableColumns(null); + } + + /** {@inheritDoc} */ + public function getTableColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getTableColumns($tableName); + } + + /** + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_TAB_COLUMNS.html + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_TABLES.html + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_COL_COMMENTS.html + * + * @return iterable + * + * @throws Exception + */ + private function getTableColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT C.TABLE_NAME, + C.COLUMN_NAME, + C.DATA_TYPE, + C.DATA_DEFAULT, + C.DATA_PRECISION, + C.DATA_SCALE, + C.CHAR_LENGTH, + C.DATA_LENGTH, + C.NULLABLE, + D.COMMENTS + FROM USER_TAB_COLUMNS C + INNER JOIN USER_TABLES T + ON T.TABLE_NAME = C.TABLE_NAME + LEFT JOIN USER_COL_COMMENTS D + ON D.TABLE_NAME = C.TABLE_NAME + AND D.COLUMN_NAME = C.COLUMN_NAME + WHERE %s + ORDER BY C.TABLE_NAME, + C.COLUMN_ID + SQL, + $this->buildTableQueryPredicate('C', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield $this->createTableColumn($row); + } + } + + /** + * @param list $row + * + * @throws TypesException + */ + private function createTableColumn(array $row): TableColumnMetadataRow + { + [ + $tableName, + $columnName, + $dataType, + $dataDefault, + $dataPrecision, + $dataScale, + $characterLength, + $dataLength, + $nullable, + $comments, + ] = $row; + + $dbType = strtolower($dataType); + if (str_starts_with($dbType, 'timestamp(')) { + if (str_contains($dbType, 'with time zone')) { + $dbType = 'timestamptz'; + } else { + $dbType = 'timestamp'; + } + } + + $editor = Column::editor() + ->setQuotedName($columnName); + + $precision = null; + $scale = 0; + + if ($dataPrecision !== null) { + $precision = (int) $dataPrecision; + } + + if ($dataScale !== null) { + $scale = (int) $dataScale; + } + + $type = $this->platform->getDoctrineTypeMapping($dbType); + + switch ($dbType) { + case 'number': + if ($precision === 20 && $scale === 0) { + $type = 'bigint'; + } elseif ($precision === 5 && $scale === 0) { + $type = 'smallint'; + } elseif ($precision === 1 && $scale === 0) { + $type = 'boolean'; + } elseif ($scale > 0) { + $type = 'decimal'; + } + + break; + + case 'float': + if ($precision === 63) { + $type = 'smallfloat'; + } + + break; + + case 'varchar': + case 'varchar2': + case 'nvarchar2': + $editor->setLength((int) $characterLength); + break; + + case 'raw': + $editor + ->setLength((int) $dataLength) + ->setFixed(true); + break; + + case 'char': + case 'nchar': + $editor + ->setLength((int) $characterLength) + ->setFixed(true); + break; + } + + $editor + ->setTypeName($type) + ->setPrecision($precision) + ->setScale($scale) + ->setNotNull($nullable === 'N') + ->setDefaultValue($this->parseDefaultExpression($dataDefault)); + + if ($comments !== null) { + $editor->setComment($comments); + } + + return new TableColumnMetadataRow(null, $tableName, $editor->create()); + } + + private function parseDefaultExpression(?string $expression): ?string + { + // Default values returned from the database sometimes have trailing spaces. + if (is_string($expression)) { + $expression = trim($expression); + } + + if ($expression === null || $expression === 'NULL') { + return null; + } + + // Default values returned from the database are represented as literal expressions + if (preg_match('/^\'(.*)\'$/s', $expression, $matches) === 1) { + return str_replace("''", "'", $matches[1]); + } + + return $expression; + } + + /** {@inheritDoc} */ + public function getIndexColumnsForAllTables(): iterable + { + return $this->getIndexColumns(null); + } + + /** {@inheritDoc} */ + public function getIndexColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getIndexColumns($tableName); + } + + /** + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_INDEXES.html + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_CONSTRAINTS.html + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_IND_COLUMNS.html + * + * @return iterable + * + * @throws Exception + */ + private function getIndexColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT I.TABLE_NAME, + I.INDEX_NAME, + I.UNIQUENESS, + IC.COLUMN_NAME + FROM USER_INDEXES I + LEFT JOIN USER_CONSTRAINTS C + ON C.INDEX_NAME = I.INDEX_NAME + JOIN USER_IND_COLUMNS IC + ON IC.INDEX_NAME = I.INDEX_NAME + WHERE %s + AND (C.CONSTRAINT_TYPE IS NULL OR C.CONSTRAINT_TYPE != 'P') + ORDER BY I.TABLE_NAME, + I.INDEX_NAME, + IC.COLUMN_POSITION + SQL, + $this->buildTableQueryPredicate('I', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new IndexColumnMetadataRow( + schemaName: null, + tableName: $row[0], + indexName: $row[1], + type: $row[2] === 'UNIQUE' ? IndexType::UNIQUE : IndexType::REGULAR, + isClustered: false, + predicate: null, + columnName: $row[3], + columnLength: null, + ); + } + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForAllTables(): iterable + { + return $this->getPrimaryKeyConstraintColumns(null); + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getPrimaryKeyConstraintColumns($tableName); + } + + /** + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_CONSTRAINTS.html + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_CONS_COLUMNS.html + * + * @return iterable + * + * @throws Exception + */ + private function getPrimaryKeyConstraintColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT C.TABLE_NAME, + C.CONSTRAINT_NAME, + CC.COLUMN_NAME + FROM USER_CONSTRAINTS C + JOIN USER_CONS_COLUMNS CC + ON CC.TABLE_NAME = C.TABLE_NAME + AND CC.CONSTRAINT_NAME = C.CONSTRAINT_NAME + WHERE %s + AND C.CONSTRAINT_TYPE = 'P' + ORDER BY C.TABLE_NAME, + C.CONSTRAINT_NAME, + CC.POSITION + SQL, + $this->buildTableQueryPredicate('C', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new PrimaryKeyConstraintColumnRow( + schemaName: null, + tableName: $row[0], + constraintName: $row[1], + isClustered: true, + columnName: $row[2], + ); + } + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForAllTables(): iterable + { + return $this->getForeignKeyConstraintColumns(null); + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getForeignKeyConstraintColumns($tableName); + } + + /** + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_CONSTRAINTS.html + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_CONS_COLUMNS.html + * + * @return iterable + * + * @throws Exception + */ + private function getForeignKeyConstraintColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT C.TABLE_NAME, + C.CONSTRAINT_NAME, + FKC.TABLE_NAME, + C.DELETE_RULE, + C.DEFERRABLE, + C.DEFERRED, + PKC.COLUMN_NAME, + FKC.COLUMN_NAME + FROM USER_CONSTRAINTS C + JOIN USER_CONS_COLUMNS PKC + ON PKC.CONSTRAINT_NAME = C.CONSTRAINT_NAME + JOIN USER_CONS_COLUMNS FKC + ON FKC.CONSTRAINT_NAME = C.R_CONSTRAINT_NAME + AND FKC.POSITION = PKC.POSITION + WHERE %s + AND C.CONSTRAINT_TYPE = 'R' + ORDER BY PKC.TABLE_NAME, + PKC.CONSTRAINT_NAME, + PKC.POSITION +SQL, + $this->buildTableQueryPredicate('C', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new ForeignKeyConstraintColumnMetadataRow( + referencingSchemaName: null, + referencingTableName: $row[0], + id: null, + name: $row[1], + referencedSchemaName: null, + referencedTableName: $row[2], + matchType: MatchType::SIMPLE, + onUpdateAction: ReferentialAction::NO_ACTION, + onDeleteAction: $this->createReferentialAction($row[3]), + isDeferrable: $row[4] === 'DEFERRABLE', + isDeferred: $row[5] === 'DEFERRED', + referencingColumnName: $row[6], + referencedColumnName: $row[7], + ); + } + } + + private function createReferentialAction(string $value): ReferentialAction + { + $action = ReferentialAction::tryFrom($value); + assert($action !== null); + + return $action; + } + + /** {@inheritDoc} */ + public function getTableOptionsForAllTables(): iterable + { + return $this->getTableOptions(null); + } + + /** {@inheritDoc} */ + public function getTableOptionsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getTableOptions($tableName); + } + + /** + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_TAB_COMMENTS.html + * + * @return iterable + * + * @throws Exception + */ + private function getTableOptions(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT TABLE_NAME, + COMMENTS + FROM ALL_TAB_COMMENTS + WHERE %s + ORDER BY TABLE_NAME + SQL, + $this->buildTableQueryPredicate(null, $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new TableMetadataRow(null, $row[0], [ + 'comment' => $row[1], + ]); + } + } + + /** + * @param ?non-empty-string $relation + * @param array $params + * + * @return non-empty-string + */ + private function buildTableQueryPredicate(?string $relation, ?string $tableName, array &$params): string + { + $conditions = []; + + if ($tableName !== null) { + $qualifier = $relation !== null ? $relation . '.' : ''; + $conditions[] = $qualifier . 'TABLE_NAME = :TABLE_NAME'; + + $params['TABLE_NAME'] = $tableName; + } else { + $conditions[] = '1 = 1'; + } + + return implode(' AND ', $conditions); + } + + /** + * {@inheritDoc} + * + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_VIEWS.html + */ + public function getAllViews(): iterable + { + $sql = <<<'SQL' + SELECT VIEW_NAME, + TEXT + FROM USER_VIEWS + ORDER BY VIEW_NAME + SQL; + + foreach ($this->connection->iterateNumeric($sql) as $row) { + yield new ViewMetadataRow(null, ...$row); + } + } + + /** + * {@inheritDoc} + * + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/USER_SEQUENCES.html + */ + public function getAllSequences(): iterable + { + $sql = <<<'SQL' + SELECT SEQUENCE_NAME, + INCREMENT_BY, + MIN_VALUE, + CACHE_SIZE + FROM USER_SEQUENCES + ORDER BY SEQUENCE_NAME + SQL; + + foreach ($this->connection->iterateNumeric($sql) as $row) { + $cacheSize = (int) $row[3]; + assert($cacheSize > 0); + + yield new SequenceMetadataRow( + schemaName: null, + sequenceName: $row[0], + allocationSize: (int) $row[1], + initialValue: (int) $row[2], + cacheSize: $cacheSize, + ); + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/OraclePlatform.php b/backend/vendor/doctrine/dbal/src/Platforms/OraclePlatform.php new file mode 100644 index 0000000..a2b555e --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/OraclePlatform.php @@ -0,0 +1,867 @@ +multiplyInterval($interval, 3); + break; + + case DateIntervalUnit::YEAR: + $interval = $this->multiplyInterval($interval, 12); + break; + } + + return 'ADD_MONTHS(' . $date . ', ' . $operator . $interval . ')'; + + default: + $calculationClause = ''; + + switch ($unit) { + case DateIntervalUnit::SECOND: + $calculationClause = '/24/60/60'; + break; + + case DateIntervalUnit::MINUTE: + $calculationClause = '/24/60'; + break; + + case DateIntervalUnit::HOUR: + $calculationClause = '/24'; + break; + + case DateIntervalUnit::WEEK: + $calculationClause = '*7'; + break; + } + + return '(' . $date . $operator . $interval . $calculationClause . ')'; + } + } + + public function getDateDiffExpression(string $date1, string $date2): string + { + return sprintf('TRUNC(%s) - TRUNC(%s)', $date1, $date2); + } + + public function getBitAndComparisonExpression(string $value1, string $value2): string + { + return 'BITAND(' . $value1 . ', ' . $value2 . ')'; + } + + public function getCurrentDatabaseExpression(): string + { + return "SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA')"; + } + + public function getBitOrComparisonExpression(string $value1, string $value2): string + { + return '(' . $value1 . '-' . + $this->getBitAndComparisonExpression($value1, $value2) + . '+' . $value2 . ')'; + } + + /** @deprecated */ + public function getCreatePrimaryKeySQL(Index $index, string $table): string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6867', + '%s() is deprecated.', + __METHOD__, + ); + + return 'ALTER TABLE ' . $table . ' ADD CONSTRAINT ' . $index->getQuotedName($this) + . ' PRIMARY KEY (' . implode(', ', $index->getQuotedColumns($this)) . ')'; + } + + /** + * {@inheritDoc} + * + * Need to specifiy minvalue, since start with is hidden in the system and MINVALUE <= START WITH. + * Therefore we can use MINVALUE to be able to get a hint what START WITH was for later introspection + * in {@see listSequences()} + */ + public function getCreateSequenceSQL(Sequence $sequence): string + { + return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) . + ' START WITH ' . $sequence->getInitialValue() . + ' MINVALUE ' . $sequence->getInitialValue() . + ' INCREMENT BY ' . $sequence->getAllocationSize() . + $this->getSequenceCacheSQL($sequence->getCacheSize()); + } + + public function getAlterSequenceSQL(Sequence $sequence): string + { + return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . + ' INCREMENT BY ' . $sequence->getAllocationSize() + . $this->getSequenceCacheSQL($sequence->getCacheSize()); + } + + /** + * Cache definition for sequences + */ + private function getSequenceCacheSQL(?int $cacheSize): string + { + if ($cacheSize === 0 || $cacheSize === 1) { + return ' NOCACHE'; + } + + if ($cacheSize > 1) { + return ' CACHE ' . $cacheSize; + } + + return ''; + } + + public function getSequenceNextValSQL(string $sequence): string + { + return 'SELECT ' . $sequence . '.nextval FROM DUAL'; + } + + public function getSetTransactionIsolationSQL(TransactionIsolationLevel $level): string + { + return 'SET TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSQL($level); + } + + protected function _getTransactionIsolationLevelSQL(TransactionIsolationLevel $level): string + { + return match ($level) { + TransactionIsolationLevel::READ_UNCOMMITTED => 'READ UNCOMMITTED', + TransactionIsolationLevel::READ_COMMITTED => 'READ COMMITTED', + TransactionIsolationLevel::REPEATABLE_READ, + TransactionIsolationLevel::SERIALIZABLE => 'SERIALIZABLE', + }; + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $column): string + { + return 'NUMBER(1)'; + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $column): string + { + return 'NUMBER(10)'; + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $column): string + { + return 'NUMBER(20)'; + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $column): string + { + return 'NUMBER(5)'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $column): string + { + return 'TIMESTAMP(0)'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTzTypeDeclarationSQL(array $column): string + { + return 'TIMESTAMP(0) WITH TIME ZONE'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $column): string + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $column): string + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $column): string + { + return ''; + } + + protected function getVarcharTypeDeclarationSQLSnippet(?int $length): string + { + if ($length === null) { + throw ColumnLengthRequired::new($this, 'VARCHAR2'); + } + + return sprintf('VARCHAR2(%d)', $length); + } + + protected function getBinaryTypeDeclarationSQLSnippet(?int $length): string + { + if ($length === null) { + throw ColumnLengthRequired::new($this, 'RAW'); + } + + return sprintf('RAW(%d)', $length); + } + + protected function getVarbinaryTypeDeclarationSQLSnippet(?int $length): string + { + return $this->getBinaryTypeDeclarationSQLSnippet($length); + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $column): string + { + return 'CLOB'; + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListDatabasesSQL(): string + { + return 'SELECT username FROM all_users'; + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListSequencesSQL(string $database): string + { + return 'SELECT SEQUENCE_NAME, MIN_VALUE, INCREMENT_BY FROM SYS.ALL_SEQUENCES WHERE SEQUENCE_OWNER = ' + . $this->quoteStringLiteral( + $this->normalizeIdentifier($database)->getName(), + ); + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL(string $name, array $columns, array $options = []): array + { + $this->validateCreateTableOptions($options, __METHOD__); + + $indexes = $options['indexes'] ?? []; + $options['indexes'] = []; + $sql = parent::_getCreateTableSQL($name, $columns, $options); + + foreach ($columns as $column) { + if (isset($column['sequence'])) { + $sql[] = $this->getCreateSequenceSQL($column['sequence']); + } + + if ( + ! isset($column['autoincrement']) || $column['autoincrement'] === false + ) { + continue; + } + + $sql = array_merge($sql, $this->getCreateAutoincrementSql($column['name'], $name)); + } + + foreach ($indexes as $index) { + $sql[] = $this->getCreateIndexSQL($index, $name); + } + + return $sql; + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListViewsSQL(string $database): string + { + return 'SELECT view_name, text FROM sys.user_views'; + } + + /** + * @internal The method should be only used by the {@see OraclePlatform} class. + * + * @return array + */ + protected function getCreateAutoincrementSql(string $name, string $table, int $start = 1): array + { + $tableIdentifier = $this->normalizeIdentifier($table); + $quotedTableName = $tableIdentifier->getQuotedName($this); + $unquotedTableName = $tableIdentifier->getName(); + + $nameIdentifier = $this->normalizeIdentifier($name); + $quotedName = $nameIdentifier->getQuotedName($this); + + $sql = []; + + $autoincrementIdentifierName = $this->getAutoincrementIdentifierName($tableIdentifier); + + $idx = new Index($autoincrementIdentifierName, [$quotedName], true, true); + + $sql[] = sprintf( + <<<'SQL' +DECLARE + CONSTRAINTS_COUNT NUMBER; +BEGIN + SELECT COUNT(CONSTRAINT_NAME) INTO CONSTRAINTS_COUNT + FROM USER_CONSTRAINTS + WHERE TABLE_NAME = %s + AND CONSTRAINT_TYPE = 'P'; + IF CONSTRAINTS_COUNT = 0 THEN + EXECUTE IMMEDIATE %s; + END IF; +END; +SQL, + $this->quoteStringLiteral($unquotedTableName), + $this->quoteStringLiteral($this->getCreateIndexSQL($idx, $quotedTableName)), + ); + + $sequenceName = $this->getIdentitySequenceName( + $tableIdentifier->isQuoted() ? $quotedTableName : $unquotedTableName, + ); + $sequence = new Sequence($sequenceName, $start); + $sql[] = $this->getCreateSequenceSQL($sequence); + + $sql[] = sprintf( + <<<'SQL' +CREATE TRIGGER %1$s + BEFORE INSERT + ON %2$s + FOR EACH ROW +DECLARE + last_Sequence NUMBER; + last_InsertID NUMBER; +BEGIN + IF (:NEW.%3$s IS NULL OR :NEW.%3$s = 0) THEN + SELECT %4$s.NEXTVAL INTO :NEW.%3$s FROM DUAL; + ELSE + SELECT NVL(Last_Number, 0) INTO last_Sequence + FROM USER_SEQUENCES + WHERE Sequence_Name = %5$s; + SELECT :NEW.%3$s INTO last_InsertID FROM DUAL; + WHILE (last_InsertID > last_Sequence) LOOP + SELECT %4$s.NEXTVAL INTO last_Sequence FROM DUAL; + END LOOP; + END IF; +END; +SQL, + $autoincrementIdentifierName, + $quotedTableName, + $quotedName, + $sequenceName, + $this->quoteStringLiteral($sequence->getName()), + ); + + return $sql; + } + + /** + * @internal The method should be only used from within the OracleSchemaManager class hierarchy. + * + * Returns the SQL statements to drop the autoincrement for the given table name. + * + * @param string $table The table name to drop the autoincrement for. + * + * @return string[] + */ + public function getDropAutoincrementSql(string $table): array + { + $table = $this->normalizeIdentifier($table); + $autoincrementIdentifierName = $this->getAutoincrementIdentifierName($table); + $identitySequenceName = $this->getIdentitySequenceName( + $table->isQuoted() ? $table->getQuotedName($this) : $table->getName(), + ); + + return [ + 'DROP TRIGGER ' . $autoincrementIdentifierName, + $this->getDropSequenceSQL($identitySequenceName), + $this->getDropConstraintSQL($autoincrementIdentifierName, $table->getQuotedName($this)), + ]; + } + + /** + * Normalizes the given identifier. + * + * Uppercases the given identifier if it is not quoted by intention + * to reflect Oracle's internal auto uppercasing strategy of unquoted identifiers. + * + * @param string $name The identifier to normalize. + */ + private function normalizeIdentifier(string $name): Identifier + { + $identifier = new Identifier($name); + + return $identifier->isQuoted() ? $identifier : new Identifier(strtoupper($name)); + } + + /** + * Adds suffix to identifier, + * + * if the new string exceeds max identifier length, + * keeps $suffix, cuts from $identifier as much as the part exceeding. + * + * @param non-empty-string $suffix + */ + private function addSuffix(string $identifier, string $suffix): string + { + $maxPossibleLengthWithoutSuffix = $this->getMaxIdentifierLength() - strlen($suffix); + if (strlen($identifier) > $maxPossibleLengthWithoutSuffix) { + $identifier = substr($identifier, 0, $maxPossibleLengthWithoutSuffix); + } + + return $identifier . $suffix; + } + + /** + * Returns the autoincrement primary key identifier name for the given table identifier. + * + * Quotes the autoincrement primary key identifier name + * if the given table name is quoted by intention. + */ + private function getAutoincrementIdentifierName(Identifier $table): string + { + $identifierName = $this->addSuffix($table->getName(), '_AI_PK'); + + return $table->isQuoted() + ? $this->quoteSingleIdentifier($identifierName) + : $identifierName; + } + + public function getDropForeignKeySQL(string $foreignKey, string $table): string + { + return $this->getDropConstraintSQL($foreignKey, $table); + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey): string + { + $sql = ''; + + if ($foreignKey->hasOption('onDelete')) { + $referentialAction = $this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onDelete')); + + if ($referentialAction !== '') { + $sql .= ' ON DELETE ' . $referentialAction; + } + } + + $deferrabilitySQL = $this->getConstraintDeferrabilitySQL($foreignKey); + + if ($deferrabilitySQL !== '') { + $sql .= $deferrabilitySQL; + } + + return $sql; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function getForeignKeyReferentialActionSQL(string $action): string + { + $action = strtoupper($action); + + if ($action === 'RESTRICT') { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6707', + 'Relying on automatic conversion of RESTRICT to NO ACTION for Oracle is deprecated.' + . ' Use NO ACTION explicitly instead.', + ); + } + + return match ($action) { + 'RESTRICT', + 'NO ACTION' => '', + 'CASCADE', + 'SET NULL' => $action, + default => throw new InvalidArgumentException(sprintf('Invalid foreign key action "%s".', $action)), + }; + } + + public function getCreateDatabaseSQL(string $name): string + { + return 'CREATE USER ' . $name; + } + + public function getDropDatabaseSQL(string $name): string + { + return 'DROP USER ' . $name . ' CASCADE'; + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff): array + { + $sql = []; + $commentsSQL = []; + $addColumnSQL = []; + + $tableNameSQL = $diff->getOldTable()->getQuotedName($this); + + foreach ($diff->getAddedColumns() as $column) { + $addColumnSQL[] = $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); + $comment = $column->getComment(); + + if ($comment === '') { + continue; + } + + $commentsSQL[] = $this->getCommentOnColumnSQL( + $tableNameSQL, + $column->getQuotedName($this), + $comment, + ); + } + + if (count($addColumnSQL) > 0) { + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ADD (' . implode(', ', $addColumnSQL) . ')'; + } + + $modifyColumnSQL = []; + foreach ($diff->getChangedColumns() as $columnDiff) { + $newColumn = $columnDiff->getNewColumn(); + $oldColumn = $columnDiff->getOldColumn(); + + // Column names in Oracle are case insensitive and automatically uppercased on the server. + if ($columnDiff->hasNameChanged()) { + $newColumnName = $newColumn->getQuotedName($this); + $oldColumnName = $oldColumn->getQuotedName($this); + + $sql = array_merge( + $sql, + $this->getRenameColumnSQL($tableNameSQL, $oldColumnName, $newColumnName), + ); + } + + $countChangedProperties = $columnDiff->countChangedProperties(); + // Do not generate column alteration clause if type is binary and only fixed property has changed. + // Oracle only supports binary type columns with variable length. + // Avoids unnecessary table alteration statements. + if ( + $newColumn->getType() instanceof BinaryType && + $columnDiff->hasFixedChanged() && + $countChangedProperties === 1 + ) { + continue; + } + + $columnHasChangedComment = $columnDiff->hasCommentChanged(); + + /** + * Do not add query part if only comment has changed + */ + if ($countChangedProperties > ($columnHasChangedComment ? 1 : 0)) { + $newColumnProperties = $newColumn->toArray(); + + $oldSQL = $this->getColumnDeclarationSQL('', $oldColumn->toArray()); + $newSQL = $this->getColumnDeclarationSQL('', $newColumnProperties); + + if ($newSQL !== $oldSQL) { + if (! $columnDiff->hasNotNullChanged()) { + unset($newColumnProperties['notnull']); + $newSQL = $this->getColumnDeclarationSQL('', $newColumnProperties); + } + + $modifyColumnSQL[] = $newColumn->getQuotedName($this) . $newSQL; + } + } + + if (! $columnDiff->hasCommentChanged()) { + continue; + } + + $commentsSQL[] = $this->getCommentOnColumnSQL( + $tableNameSQL, + $newColumn->getQuotedName($this), + $newColumn->getComment(), + ); + } + + if (count($modifyColumnSQL) > 0) { + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' MODIFY (' . implode(', ', $modifyColumnSQL) . ')'; + } + + $dropColumnSQL = []; + foreach ($diff->getDroppedColumns() as $column) { + $dropColumnSQL[] = $column->getQuotedName($this); + } + + if (count($dropColumnSQL) > 0) { + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' DROP (' . implode(', ', $dropColumnSQL) . ')'; + } + + return array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $commentsSQL, + $this->getPostAlterTableIndexForeignKeySQL($diff), + ); + } + + /** + * {@inheritDoc} + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + */ + public function getColumnDeclarationSQL(string $name, array $column): string + { + if (isset($column['columnDefinition'])) { + $declaration = $column['columnDefinition']; + } else { + $default = $this->getDefaultValueDeclarationSQL($column); + + $notnull = ''; + + if (isset($column['notnull'])) { + $notnull = $column['notnull'] ? ' NOT NULL' : ' NULL'; + } + + $typeDecl = $column['type']->getSQLDeclaration($column, $this); + $declaration = $typeDecl . $default . $notnull; + } + + return $name . ' ' . $declaration; + } + + /** + * {@inheritDoc} + */ + protected function getRenameIndexSQL(string $oldIndexName, Index $index, string $tableName): array + { + if (str_contains($tableName, '.')) { + [$schema] = explode('.', $tableName); + $oldIndexName = $schema . '.' . $oldIndexName; + } + + return ['ALTER INDEX ' . $oldIndexName . ' RENAME TO ' . $index->getQuotedName($this)]; + } + + /** @internal The method should be only used by the {@see OraclePlatform} class. */ + protected function getIdentitySequenceName(string $tableName): string + { + $table = new Identifier($tableName); + + // No usage of column name to preserve BC compatibility with <2.5 + $identitySequenceName = $this->addSuffix($table->getName(), '_SEQ'); + + if ($table->isQuoted()) { + $identitySequenceName = '"' . $identitySequenceName . '"'; + } + + $identitySequenceIdentifier = $this->normalizeIdentifier($identitySequenceName); + + return $identitySequenceIdentifier->getQuotedName($this); + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function supportsCommentOnStatement(): bool + { + return true; + } + + protected function doModifyLimitQuery(string $query, ?int $limit, int $offset): string + { + if ($offset > 0) { + $query .= sprintf(' OFFSET %d ROWS', $offset); + } + + if ($limit !== null) { + $query .= sprintf(' FETCH NEXT %d ROWS ONLY', $limit); + } + + return $query; + } + + public function getCreateTemporaryTableSnippetSQL(): string + { + return 'CREATE GLOBAL TEMPORARY TABLE'; + } + + public function getDateTimeTzFormatString(): string + { + return 'Y-m-d H:i:sP'; + } + + public function getDateFormatString(): string + { + return 'Y-m-d 00:00:00'; + } + + public function getTimeFormatString(): string + { + return '1900-01-01 H:i:s'; + } + + public function getMaxIdentifierLength(): int + { + return 128; + } + + public function supportsSequences(): bool + { + return true; + } + + public function supportsReleaseSavepoints(): bool + { + return false; + } + + public function getTruncateTableSQL(string $tableName, bool $cascade = false): string + { + $tableIdentifier = new Identifier($tableName); + + return 'TRUNCATE TABLE ' . $tableIdentifier->getQuotedName($this); + } + + public function getDummySelectSQL(string $expression = '1'): string + { + return sprintf('SELECT %s FROM DUAL', $expression); + } + + protected function initializeDoctrineTypeMappings(): void + { + $this->doctrineTypeMapping = [ + 'binary_double' => Types::FLOAT, + 'binary_float' => Types::FLOAT, + 'binary_integer' => Types::BOOLEAN, + 'blob' => Types::BLOB, + 'char' => Types::STRING, + 'clob' => Types::TEXT, + 'date' => Types::DATE_MUTABLE, + 'float' => Types::FLOAT, + 'integer' => Types::INTEGER, + 'long' => Types::STRING, + 'long raw' => Types::BLOB, + 'nchar' => Types::STRING, + 'nclob' => Types::TEXT, + 'number' => Types::INTEGER, + 'nvarchar2' => Types::STRING, + 'pls_integer' => Types::BOOLEAN, + 'raw' => Types::BINARY, + 'real' => Types::SMALLFLOAT, + 'rowid' => Types::STRING, + 'timestamp' => Types::DATETIME_MUTABLE, + 'timestamptz' => Types::DATETIMETZ_MUTABLE, + 'urowid' => Types::STRING, + 'varchar' => Types::STRING, + 'varchar2' => Types::STRING, + ]; + } + + public function releaseSavePoint(string $savepoint): string + { + return ''; + } + + /** @deprecated */ + protected function createReservedKeywordsList(): KeywordList + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6607', + '%s is deprecated.', + __METHOD__, + ); + + return new OracleKeywords(); + } + + /** + * {@inheritDoc} + */ + public function getBlobTypeDeclarationSQL(array $column): string + { + return 'BLOB'; + } + + public function createMetadataProvider(Connection $connection): OracleMetadataProvider + { + return new OracleMetadataProvider($connection, $this); + } + + public function createSchemaManager(Connection $connection): OracleSchemaManager + { + return new OracleSchemaManager($connection, $this); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/PostgreSQL/PostgreSQLMetadataProvider.php b/backend/vendor/doctrine/dbal/src/Platforms/PostgreSQL/PostgreSQLMetadataProvider.php new file mode 100644 index 0000000..6b6e91a --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/PostgreSQL/PostgreSQLMetadataProvider.php @@ -0,0 +1,729 @@ + ReferentialAction::NO_ACTION, + 'c' => ReferentialAction::CASCADE, + 'd' => ReferentialAction::SET_DEFAULT, + 'n' => ReferentialAction::SET_NULL, + 'r' => ReferentialAction::RESTRICT, + ]; + + /** @internal This class can be instantiated only by a database platform. */ + public function __construct(private Connection $connection, private PostgreSQLPlatform $platform) + { + } + + /** + * {@inheritDoc} + * + * @link https://www.postgresql.org/docs/current/catalog-pg-database.html + */ + public function getAllDatabaseNames(): iterable + { + $sql = <<<'SQL' + SELECT datname + FROM pg_database + ORDER BY datname + SQL; + + foreach ($this->connection->iterateColumn($sql) as $databaseName) { + yield new DatabaseMetadataRow($databaseName); + } + } + + /** + * {@inheritDoc} + * + * @link https://www.postgresql.org/docs/current/catalog-pg-namespace.html + */ + public function getAllSchemaNames(): iterable + { + $sql = sprintf( + <<<'SQL' + SELECT nspname + FROM pg_namespace + WHERE %s + ORDER BY nspname + SQL, + $this->buildNamespaceNamePredicate('nspname'), + ); + + foreach ($this->connection->iterateColumn($sql) as $schemaName) { + yield new SchemaMetadataRow($schemaName); + } + } + + /** + * {@inheritDoc} + * + * @link https://www.postgresql.org/docs/current/catalog-pg-class.html + * @link https://www.postgresql.org/docs/current/catalog-pg-namespace.html + */ + public function getAllTableNames(): iterable + { + $sql = sprintf( + <<<'SQL' + SELECT n.nspname, + c.relname + FROM pg_class c + INNER JOIN pg_namespace n + ON n.oid = c.relnamespace + WHERE %s + AND %s + ORDER BY n.nspname, + c.relname + SQL, + $this->buildNamespaceNamePredicate('n.nspname'), + $this->buildTablePredicate('c.relkind', 'c.relname'), + ); + + foreach ($this->connection->iterateNumeric($sql) as $row) { + yield new TableMetadataRow($row[0], $row[1], []); + } + } + + /** {@inheritDoc} */ + public function getTableColumnsForAllTables(): iterable + { + return $this->getTableColumns(null, null); + } + + /** {@inheritDoc} */ + public function getTableColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName === null) { + throw UnsupportedName::fromNullSchemaName(__METHOD__); + } + + return $this->getTableColumns($schemaName, $tableName); + } + + /** + * @link https://www.postgresql.org/docs/current/catalog-pg-attrdef.html + * @link https://www.postgresql.org/docs/current/catalog-pg-attribute.html + * @link https://www.postgresql.org/docs/current/catalog-pg-class.html + * @link https://www.postgresql.org/docs/current/catalog-pg-namespace.html + * @link https://www.postgresql.org/docs/current/catalog-pg-type.html + * @link https://www.postgresql.org/docs/current/catalog-pg-collation.html + * @link https://www.postgresql.org/docs/current/catalog-pg-depend.html + * @link https://www.postgresql.org/docs/current/catalog-pg-description.html + * @link https://www.postgresql.org/docs/current/catalog-pg-inherits.html + * + * @return iterable + * + * @throws Exception + */ + private function getTableColumns(?string $schemaName, ?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT n.nspname, + c.relname, + a.attname, + t.typname, + format_type(a.atttypid, a.atttypmod), + bt.typname, + format_type(bt.oid, t.typtypmod), + a.attnotnull, + a.attidentity, + (%s), + dsc.description, + CASE + WHEN coll.collprovider = 'c' + THEN coll.collcollate + WHEN coll.collprovider = 'd' + THEN NULL + ELSE coll.collname + END + FROM pg_attribute a + JOIN pg_class c + ON c.oid = a.attrelid + JOIN pg_namespace n + ON n.oid = c.relnamespace + JOIN pg_type t + ON t.oid = a.atttypid + LEFT JOIN pg_type bt + ON t.typtype = 'd' + AND bt.oid = t.typbasetype + LEFT JOIN pg_collation coll + ON coll.oid = a.attcollation + LEFT JOIN pg_depend dep + ON dep.objid = c.oid + AND dep.deptype = 'e' + AND dep.classid = (SELECT oid FROM pg_class WHERE relname = 'pg_class') + LEFT JOIN pg_description dsc + ON dsc.objoid = c.oid AND dsc.objsubid = a.attnum + LEFT JOIN pg_inherits i + ON i.inhrelid = c.oid + LEFT JOIN pg_class p + ON i.inhparent = p.oid + AND p.relkind = 'p' + WHERE %s + AND a.attnum > 0 + AND dep.refobjid IS NULL + -- exclude partitions (tables that inherit from partitioned tables) + AND p.oid IS NULL + ORDER BY n.nspname, + c.relname, + a.attnum + SQL, + $this->platform->getDefaultColumnValueSQLSnippet(), + $this->buildTableQueryPredicate('n', $schemaName, 'c', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield $this->createTableColumn($row); + } + } + + /** + * @param list $row + * + * @throws TypesException + */ + private function createTableColumn(array $row): TableColumnMetadataRow + { + [ + $namespaceName, + $relationName, + $attributeName, + $typeName, + $completeType, + $domainTypeName, + $domainCompleteType, + $isNotNull, + $identity, + $defaultExpression, + $description, + $collationName, + ] = $row; + + $editor = Column::editor() + ->setQuotedName($attributeName); + + if ($domainTypeName !== null && ! $this->platform->hasDoctrineTypeMappingFor($typeName)) { + $typeName = $domainTypeName; + $completeType = $domainCompleteType; + } + + $editor->setTypeName( + $this->platform->getDoctrineTypeMapping($typeName), + ); + + switch ($typeName) { + case 'bpchar': + case 'varchar': + $parameters = $this->parseColumnTypeParameters($completeType); + if (count($parameters) > 0) { + $editor->setLength($parameters[0]); + } + + break; + + case 'double': + case 'decimal': + case 'money': + case 'numeric': + $parameters = $this->parseColumnTypeParameters($completeType); + if (count($parameters) > 0) { + $editor->setPrecision($parameters[0]); + } + + if (count($parameters) > 1) { + $editor->setScale($parameters[1]); + } + + break; + } + + if ($typeName === 'bpchar') { + $editor->setFixed(true); + } + + $editor + ->setNotNull((bool) $isNotNull) + ->setDefaultValue($this->parseDefaultExpression($defaultExpression)) + ->setAutoincrement($identity === 'd'); + + if ($description !== null) { + $editor->setComment($description); + } + + $editor->setCollation($collationName); + + return new TableColumnMetadataRow($namespaceName, $relationName, $editor->create()); + } + + /** + * Parses the parameters between parenthesis in the data type. + * + * @return list + */ + private function parseColumnTypeParameters(string $type): array + { + if (preg_match('/\((\d+)(?:,(\d+))?\)/', $type, $matches) !== 1) { + return []; + } + + $parameters = [(int) $matches[1]]; + + if (isset($matches[2])) { + $parameters[] = (int) $matches[2]; + } + + return $parameters; + } + + /** + * Parses a default value expression as given by PostgreSQL + */ + private function parseDefaultExpression(?string $expression): mixed + { + if ($expression === null || str_starts_with($expression, 'NULL::')) { + return null; + } + + if ($expression === 'true') { + return true; + } + + if ($expression === 'false') { + return false; + } + + if (preg_match("/^'(.*)'::/s", $expression, $matches) === 1) { + return str_replace("''", "'", $matches[1]); + } + + return $expression; + } + + /** {@inheritDoc} */ + public function getIndexColumnsForAllTables(): iterable + { + return $this->getIndexColumns(null, null); + } + + /** {@inheritDoc} */ + public function getIndexColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName === null) { + throw UnsupportedName::fromNullSchemaName(__METHOD__); + } + + return $this->getIndexColumns($schemaName, $tableName); + } + + /** + * @link https://www.postgresql.org/docs/current/catalog-pg-index.html + * @link https://www.postgresql.org/docs/current/catalog-pg-class.html + * @link https://www.postgresql.org/docs/current/catalog-pg-namespace.html + * @link https://www.postgresql.org/docs/current/catalog-pg-class.html + * + * @return iterable + * + * @throws Exception + */ + private function getIndexColumns(?string $schemaName, ?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT n.nspname, + c.relname, + ic.relname, + i.indisunique, + pg_get_expr(indpred, indrelid), + attname + FROM pg_index i + JOIN pg_class AS c ON c.oid = i.indrelid + JOIN pg_namespace n ON n.oid = c.relnamespace + JOIN pg_class AS ic ON ic.oid = i.indexrelid + JOIN LATERAL unnest(i.indkey) WITH ORDINALITY AS keys(attnum, ord) + ON TRUE + JOIN pg_attribute a + ON a.attrelid = c.oid + AND a.attnum = keys.attnum + WHERE %s + AND i.indisprimary = false + ORDER BY n.nspname, + c.relname, + ic.relname, + keys.ord + SQL, + $this->buildTableQueryPredicate('n', $schemaName, 'c', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new IndexColumnMetadataRow( + schemaName: $row[0], + tableName: $row[1], + indexName: $row[2], + type: $row[3] ? IndexType::UNIQUE : IndexType::REGULAR, + isClustered: false, + predicate: $row[4], + columnName: $row[5], + columnLength: null, + ); + } + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForAllTables(): iterable + { + return $this->getPrimaryKeyConstraintColumns(null, null); + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName === null) { + throw UnsupportedName::fromNullSchemaName(__METHOD__); + } + + return $this->getPrimaryKeyConstraintColumns($schemaName, $tableName); + } + + /** + * @link https://www.postgresql.org/docs/current/catalog-pg-namespace.html + * @link https://www.postgresql.org/docs/current/catalog-pg-class.html + * @link https://www.postgresql.org/docs/current/catalog-pg-constraint.html + * @link https://www.postgresql.org/docs/current/catalog-pg-index.html + * + * @return iterable + * + * @throws Exception + */ + private function getPrimaryKeyConstraintColumns(?string $schemaName, ?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT n.nspname, + c.relname, + ct.conname, + a.attname + FROM pg_namespace n + INNER JOIN pg_class c + ON c.relnamespace = n.oid + INNER JOIN pg_constraint ct + ON ct.conrelid = c.oid + INNER JOIN pg_index i + ON i.indrelid = c.oid + AND i.indexrelid = ct.conindid + INNER JOIN LATERAL unnest(i.indkey) WITH ORDINALITY AS keys(attnum, ord) + ON true + INNER JOIN + pg_attribute a + ON a.attrelid = c.oid + AND a.attnum = keys.attnum + WHERE %s + AND ct.contype = 'p' + ORDER BY n.nspname, + c.relname, + ct.conname, + keys.ord + SQL, + $this->buildTableQueryPredicate('n', $schemaName, 'c', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new PrimaryKeyConstraintColumnRow( + schemaName: $row[0], + tableName: $row[1], + constraintName: $row[2], + isClustered: true, + columnName: $row[3], + ); + } + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForAllTables(): iterable + { + return $this->getForeignKeyConstraintColumns(null, null); + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName === null) { + throw UnsupportedName::fromNullSchemaName(__METHOD__); + } + + return $this->getForeignKeyConstraintColumns($schemaName, $tableName); + } + + /** + * @link https://www.postgresql.org/docs/current/catalog-pg-constraint.html + * @link https://www.postgresql.org/docs/current/catalog-pg-class.html + * @link https://www.postgresql.org/docs/current/catalog-pg-namespace.html + * @link https://www.postgresql.org/docs/current/catalog-pg-attribute.html + * + * @return iterable + * + * @throws Exception + */ + private function getForeignKeyConstraintColumns(?string $schemaName, ?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT pkn.nspname, + pkc.relname, + r.conname, + fkn.nspname, + fkc.relname, + r.confupdtype, + r.confdeltype, + r.condeferrable, + r.condeferred, + pka.attname, + fka.attname + FROM pg_constraint r + JOIN pg_class fkc + ON fkc.oid = r.confrelid + JOIN pg_namespace fkn + ON fkn.oid = fkc.relnamespace + JOIN unnest(r.confkey) WITH ORDINALITY AS fk_attnum(attnum, ord) + ON TRUE + JOIN pg_attribute fka + ON fka.attrelid = fkc.oid + AND fka.attnum = fk_attnum.attnum + JOIN pg_class pkc + ON pkc.oid = r.conrelid + JOIN pg_namespace pkn + ON pkn.oid = pkc.relnamespace + JOIN unnest(r.conkey) WITH ORDINALITY AS pk_attnum(attnum, ord) + ON pk_attnum.ord = fk_attnum.ord + JOIN pg_attribute pka + ON pka.attrelid = pkc.oid + AND pka.attnum = pk_attnum.attnum + WHERE %s + AND r.contype = 'f' + ORDER BY pkn.nspname, + pkc.relname, + r.conname + SQL, + $this->buildTableQueryPredicate('pkn', $schemaName, 'pkc', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new ForeignKeyConstraintColumnMetadataRow( + $row[0], + $row[1], + null, + $row[2], + $row[3], + $row[4], + MatchType::SIMPLE, + self::REFERENTIAL_ACTIONS[$row[5]], + self::REFERENTIAL_ACTIONS[$row[6]], + (bool) $row[7], + (bool) $row[8], + $row[9], + $row[10], + ); + } + } + + /** {@inheritDoc} */ + public function getTableOptionsForAllTables(): iterable + { + return $this->getTableOptions(null, null); + } + + /** {@inheritDoc} */ + public function getTableOptionsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName === null) { + throw UnsupportedName::fromNullSchemaName(__METHOD__); + } + + return $this->getTableOptions($schemaName, $tableName); + } + + /** + * @link https://www.postgresql.org/docs/current/catalog-pg-class.html + * @link https://www.postgresql.org/docs/current/catalog-pg-namespace.html + * + * @return iterable + * + * @throws Exception + */ + private function getTableOptions(?string $schemaName, ?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT n.nspname, + c.relname, + CASE c.relpersistence WHEN 'u' THEN true ELSE false END, + obj_description(c.oid, 'pg_class') + FROM pg_class c + INNER JOIN pg_namespace n + ON n.oid = c.relnamespace + WHERE %s + SQL, + $this->buildTableQueryPredicate('n', $schemaName, 'c', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new TableMetadataRow($row[0], $row[1], [ + 'unlogged' => $row[2], + 'comment' => $row[3], + ]); + } + } + + /** + * @param list $params + * + * @return non-empty-string + */ + private function buildTableQueryPredicate( + string $namespaceRelation, + ?string $schemaName, + string $tableRelation, + ?string $tableName, + array &$params, + ): string { + $conditions = []; + + assert(($tableName === null) === ($schemaName === null)); + + if ($tableName !== null && $schemaName !== null) { + $conditions[] = sprintf('%s.nspname = ?', $namespaceRelation); + $params[] = $schemaName; + + $conditions[] = sprintf('%s.relname = ?', $tableRelation); + $params[] = $tableName; + } + + $conditions[] = $this->buildNamespaceNamePredicate($namespaceRelation . '.nspname'); + $conditions[] = $this->buildTablePredicate($tableRelation . '.relkind', $tableRelation . '.relname'); + + return implode(' AND ', $conditions); + } + + /** + * {@inheritDoc} + * + * @link https://www.postgresql.org/docs/current/catalog-pg-views.html + */ + public function getAllViews(): iterable + { + $sql = sprintf( + <<<'SQL' + SELECT schemaname, + viewname, + definition + FROM pg_views + WHERE %s + ORDER BY schemaname, + viewname + SQL, + $this->buildNamespaceNamePredicate('schemaname'), + ); + + foreach ($this->connection->iterateNumeric($sql) as $row) { + yield new ViewMetadataRow(...$row); + } + } + + /** {@inheritDoc} */ + public function getAllSequences(): iterable + { + // Using information_schema here instead of pg_sequences since the latter also includes sequences that are owned + // by serial columns. We want to include only the user-defined ones. + $sql = sprintf( + <<<'SQL' + SELECT sequence_schema, + sequence_name, + increment, + minimum_value + FROM information_schema.sequences + WHERE sequence_catalog = CURRENT_DATABASE() + AND %s + ORDER BY sequence_schema, + sequence_name + SQL, + $this->buildNamespaceNamePredicate('sequence_schema'), + ); + + foreach ($this->connection->iterateNumeric($sql) as $row) { + yield new SequenceMetadataRow( + schemaName: $row[0], + sequenceName: $row[1], + allocationSize: (int) $row[2], + initialValue: (int) $row[3], + cacheSize: null, + ); + } + } + + private function buildNamespaceNamePredicate(string $columnName): string + { + return sprintf("%1\$s NOT LIKE 'pg\_%%' AND %1\$s != 'information_schema'", $columnName); + } + + /** + * * @link https://www.postgresql.org/docs/current/catalog-pg-class.html + */ + private function buildTablePredicate(string $kindColumnName, string $nameColumnName): string + { + return sprintf( + // r = ordinary table, p = partitioned table, + "%s IN ('r', 'p') AND %s NOT IN ('geometry_columns', 'spatial_ref_sys')", + $kindColumnName, + $nameColumnName, + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/PostgreSQL120Platform.php b/backend/vendor/doctrine/dbal/src/Platforms/PostgreSQL120Platform.php new file mode 100644 index 0000000..3fff90e --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/PostgreSQL120Platform.php @@ -0,0 +1,32 @@ + [ + 't', + 'true', + 'y', + 'yes', + 'on', + '1', + ], + 'false' => [ + 'f', + 'false', + 'n', + 'no', + 'off', + '0', + ], + ]; + + public function __construct() + { + parent::__construct(UnquotedIdentifierFolding::LOWER); + } + + /** + * PostgreSQL has different behavior with some drivers + * with regard to how booleans have to be handled. + * + * Enables use of 'true'/'false' or otherwise 1 and 0 instead. + */ + public function setUseBooleanTrueFalseStrings(bool $flag): void + { + $this->useBooleanTrueFalseStrings = $flag; + } + + public function getRegexpExpression(): string + { + return 'SIMILAR TO'; + } + + public function getLocateExpression(string $string, string $substring, ?string $start = null): string + { + if ($start !== null) { + $string = $this->getSubstringExpression($string, $start); + + return 'CASE WHEN (POSITION(' . $substring . ' IN ' . $string . ') = 0) THEN 0' + . ' ELSE (POSITION(' . $substring . ' IN ' . $string . ') + ' . $start . ' - 1) END'; + } + + return sprintf('POSITION(%s IN %s)', $substring, $string); + } + + protected function getDateArithmeticIntervalExpression( + string $date, + string $operator, + string $interval, + DateIntervalUnit $unit, + ): string { + if ($unit === DateIntervalUnit::QUARTER) { + $interval = $this->multiplyInterval($interval, 3); + $unit = DateIntervalUnit::MONTH; + } + + return '(' . $date . ' ' . $operator . ' (' . $interval . " || ' " . $unit->value . "')::interval)"; + } + + public function getDateDiffExpression(string $date1, string $date2): string + { + return '(DATE(' . $date1 . ')-DATE(' . $date2 . '))'; + } + + public function getCurrentDatabaseExpression(): string + { + return 'CURRENT_DATABASE()'; + } + + public function supportsSequences(): bool + { + return true; + } + + public function supportsSchemas(): bool + { + return true; + } + + public function supportsIdentityColumns(): bool + { + return true; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function supportsPartialIndexes(): bool + { + return true; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function supportsCommentOnStatement(): bool + { + return true; + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListDatabasesSQL(): string + { + return 'SELECT datname FROM pg_database'; + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListSequencesSQL(string $database): string + { + return 'SELECT sequence_name AS relname, + sequence_schema AS schemaname, + minimum_value AS min_value, + increment AS increment_by + FROM information_schema.sequences + WHERE sequence_catalog = ' . $this->quoteStringLiteral($database) . " + AND sequence_schema NOT LIKE 'pg\_%' + AND sequence_schema != 'information_schema'"; + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListViewsSQL(string $database): string + { + return 'SELECT quote_ident(table_name) AS viewname, + table_schema AS schemaname, + view_definition AS definition + FROM information_schema.views + WHERE view_definition IS NOT NULL'; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey): string + { + $query = ''; + + if ($foreignKey->hasOption('match')) { + $query .= ' MATCH ' . $foreignKey->getOption('match'); + } + + $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey); + + $deferrabilitySQL = $this->getConstraintDeferrabilitySQL($foreignKey); + + if ($deferrabilitySQL !== '') { + $query .= $deferrabilitySQL; + } + + return $query; + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff): array + { + $sql = []; + $commentsSQL = []; + + $table = $diff->getOldTable(); + + $tableNameSQL = $table->getQuotedName($this); + + foreach ($diff->getAddedColumns() as $addedColumn) { + $query = 'ADD ' . $this->getColumnDeclarationSQL( + $addedColumn->getQuotedName($this), + $addedColumn->toArray(), + ); + + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; + + $comment = $addedColumn->getComment(); + + if ($comment === '') { + continue; + } + + $commentsSQL[] = $this->getCommentOnColumnSQL( + $tableNameSQL, + $addedColumn->getQuotedName($this), + $comment, + ); + } + + foreach ($diff->getDroppedColumns() as $droppedColumn) { + $query = 'DROP ' . $droppedColumn->getQuotedName($this); + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; + } + + foreach ($diff->getChangedColumns() as $columnDiff) { + $oldColumn = $columnDiff->getOldColumn(); + $newColumn = $columnDiff->getNewColumn(); + + $oldColumnName = $oldColumn->getQuotedName($this); + $newColumnName = $newColumn->getQuotedName($this); + + if ($columnDiff->hasNameChanged()) { + $sql = array_merge( + $sql, + $this->getRenameColumnSQL($tableNameSQL, $oldColumnName, $newColumnName), + ); + } + + $newTypeSQLDeclaration = $this->getTypeSQLDeclaration($newColumn); + $oldTypeSQLDeclaration = $this->getTypeSQLDeclaration($oldColumn); + if ($oldTypeSQLDeclaration !== $newTypeSQLDeclaration) { + $query = 'ALTER ' . $newColumnName . ' TYPE ' . $newTypeSQLDeclaration; + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; + } + + if ($columnDiff->hasDefaultChanged()) { + $defaultClause = $newColumn->getDefault() === null + ? ' DROP DEFAULT' + : ' SET' . $this->getDefaultValueDeclarationSQL($newColumn->toArray()); + + $query = 'ALTER ' . $newColumnName . $defaultClause; + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; + } + + if ($columnDiff->hasNotNullChanged()) { + $query = 'ALTER ' . $newColumnName . ' ' . ($newColumn->getNotnull() ? 'SET' : 'DROP') . ' NOT NULL'; + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; + } + + if ($columnDiff->hasAutoIncrementChanged()) { + if ($newColumn->getAutoincrement()) { + $query = 'ADD GENERATED BY DEFAULT AS IDENTITY'; + } else { + $query = 'DROP IDENTITY'; + } + + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ALTER ' . $newColumnName . ' ' . $query; + } + + if (! $columnDiff->hasCommentChanged()) { + continue; + } + + $commentsSQL[] = $this->getCommentOnColumnSQL( + $tableNameSQL, + $newColumn->getQuotedName($this), + $newColumn->getComment(), + ); + } + + return array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $commentsSQL, + $this->getPostAlterTableIndexForeignKeySQL($diff), + ); + } + + private function getTypeSQLDeclaration(Column $column): string + { + $type = $column->getType(); + + // SERIAL/BIGSERIAL are not "real" types and we can't alter a column to that type + $columnDefinition = $column->toArray(); + $columnDefinition['autoincrement'] = false; + + return $type->getSQLDeclaration($columnDefinition, $this); + } + + /** + * {@inheritDoc} + */ + protected function getRenameIndexSQL(string $oldIndexName, Index $index, string $tableName): array + { + if (str_contains($tableName, '.')) { + [$schema] = explode('.', $tableName); + $oldIndexName = $schema . '.' . $oldIndexName; + } + + return ['ALTER INDEX ' . $oldIndexName . ' RENAME TO ' . $index->getQuotedName($this)]; + } + + public function getCreateSequenceSQL(Sequence $sequence): string + { + return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) . + ' INCREMENT BY ' . $sequence->getAllocationSize() . + ' MINVALUE ' . $sequence->getInitialValue() . + ' START ' . $sequence->getInitialValue() . + $this->getSequenceCacheSQL($sequence->getCacheSize()); + } + + public function getAlterSequenceSQL(Sequence $sequence): string + { + return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . + ' INCREMENT BY ' . $sequence->getAllocationSize() . + $this->getSequenceCacheSQL($sequence->getCacheSize()); + } + + /** + * Cache definition for sequences + */ + private function getSequenceCacheSQL(?int $cacheSize): string + { + if ($cacheSize > 1) { + return ' CACHE ' . $cacheSize; + } + + return ''; + } + + public function getDropSequenceSQL(string $name): string + { + return parent::getDropSequenceSQL($name) . ' CASCADE'; + } + + public function getDropForeignKeySQL(string $foreignKey, string $table): string + { + return $this->getDropConstraintSQL($foreignKey, $table); + } + + public function getDropIndexSQL(string $name, string $table): string + { + if (str_ends_with($table, '"')) { + $primaryKeyName = substr($table, 0, -1) . '_pkey"'; + } else { + $primaryKeyName = $table . '_pkey'; + } + + if ($name === '"primary"' || $name === $primaryKeyName) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6867', + 'Building the SQL for dropping primary key constraint via %s() is deprecated. Use' + . ' getDropConstraintSQL() instead.', + __METHOD__, + ); + + return $this->getDropConstraintSQL($primaryKeyName, $table); + } + + if (str_contains($table, '.')) { + [$schema] = explode('.', $table); + $name = $schema . '.' . $name; + } + + return parent::getDropIndexSQL($name, $table); + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL(string $name, array $columns, array $options = []): array + { + $this->validateCreateTableOptions($options, __METHOD__); + + $queryFields = $this->getColumnDeclarationListSQL($columns); + + if (! empty($options['primary'])) { + $keyColumns = array_unique(array_values($options['primary'])); + $queryFields .= ', PRIMARY KEY (' . implode(', ', $keyColumns) . ')'; + } + + $unlogged = isset($options['unlogged']) && $options['unlogged'] === true ? ' UNLOGGED' : ''; + + $query = 'CREATE' . $unlogged . ' TABLE ' . $name . ' (' . $queryFields . ')'; + + $sql = [$query]; + + if (! empty($options['indexes'])) { + foreach ($options['indexes'] as $index) { + $sql[] = $this->getCreateIndexSQL($index, $name); + } + } + + if (isset($options['uniqueConstraints'])) { + foreach ($options['uniqueConstraints'] as $uniqueConstraint) { + $sql[] = $this->getCreateUniqueConstraintSQL($uniqueConstraint, $name); + } + } + + if (isset($options['foreignKeys'])) { + foreach ($options['foreignKeys'] as $definition) { + $sql[] = $this->getCreateForeignKeySQL($definition, $name); + } + } + + return $sql; + } + + /** + * Converts a single boolean value. + * + * First converts the value to its native PHP boolean type + * and passes it to the given callback function to be reconverted + * into any custom representation. + * + * @param mixed $value The value to convert. + * @param callable $callback The callback function to use for converting the real boolean value. + * + * @throws UnexpectedValueException + */ + private function convertSingleBooleanValue(mixed $value, callable $callback): mixed + { + if ($value === null) { + return $callback(null); + } + + if (is_bool($value) || is_numeric($value)) { + return $callback((bool) $value); + } + + if (! is_string($value)) { + return $callback(true); + } + + /** + * Better safe than sorry: http://php.net/in_array#106319 + */ + if (in_array(strtolower(trim($value)), $this->booleanLiterals['false'], true)) { + return $callback(false); + } + + if (in_array(strtolower(trim($value)), $this->booleanLiterals['true'], true)) { + return $callback(true); + } + + throw new UnexpectedValueException(sprintf( + 'Unrecognized boolean literal, %s given.', + $value, + )); + } + + /** + * Converts one or multiple boolean values. + * + * First converts the value(s) to their native PHP boolean type + * and passes them to the given callback function to be reconverted + * into any custom representation. + * + * @param mixed $item The value(s) to convert. + * @param callable $callback The callback function to use for converting the real boolean value(s). + */ + private function doConvertBooleans(mixed $item, callable $callback): mixed + { + if (is_array($item)) { + foreach ($item as $key => $value) { + $item[$key] = $this->convertSingleBooleanValue($value, $callback); + } + + return $item; + } + + return $this->convertSingleBooleanValue($item, $callback); + } + + /** + * {@inheritDoc} + * + * Postgres wants boolean values converted to the strings 'true'/'false'. + */ + public function convertBooleans(mixed $item): mixed + { + if (! $this->useBooleanTrueFalseStrings) { + return parent::convertBooleans($item); + } + + return $this->doConvertBooleans( + $item, + /** @param mixed $value */ + static function ($value): string { + if ($value === null) { + return 'NULL'; + } + + return $value === true ? 'true' : 'false'; + }, + ); + } + + public function convertBooleansToDatabaseValue(mixed $item): mixed + { + if (! $this->useBooleanTrueFalseStrings) { + return parent::convertBooleansToDatabaseValue($item); + } + + return $this->doConvertBooleans( + $item, + /** @param mixed $value */ + static function ($value): ?int { + return $value === null ? null : (int) $value; + }, + ); + } + + /** + * @param T $item + * + * @return (T is null ? null : bool) + * + * @template T + */ + public function convertFromBoolean(mixed $item): ?bool + { + if (in_array($item, $this->booleanLiterals['false'], true)) { + return false; + } + + return parent::convertFromBoolean($item); + } + + public function getSequenceNextValSQL(string $sequence): string + { + return "SELECT NEXTVAL('" . $sequence . "')"; + } + + public function getSetTransactionIsolationSQL(TransactionIsolationLevel $level): string + { + return 'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL ' + . $this->_getTransactionIsolationLevelSQL($level); + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $column): string + { + return 'BOOLEAN'; + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $column): string + { + return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $column): string + { + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $column): string + { + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getGuidTypeDeclarationSQL(array $column): string + { + return 'UUID'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $column): string + { + return 'TIMESTAMP(0) WITHOUT TIME ZONE'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTzTypeDeclarationSQL(array $column): string + { + return 'TIMESTAMP(0) WITH TIME ZONE'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $column): string + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $column): string + { + return 'TIME(0) WITHOUT TIME ZONE'; + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $column): string + { + if (! empty($column['autoincrement'])) { + return ' GENERATED BY DEFAULT AS IDENTITY'; + } + + return ''; + } + + protected function getVarcharTypeDeclarationSQLSnippet(?int $length): string + { + $sql = 'VARCHAR'; + + if ($length !== null) { + $sql .= sprintf('(%d)', $length); + } + + return $sql; + } + + protected function getBinaryTypeDeclarationSQLSnippet(?int $length): string + { + return 'BYTEA'; + } + + protected function getVarbinaryTypeDeclarationSQLSnippet(?int $length): string + { + return 'BYTEA'; + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $column): string + { + return 'TEXT'; + } + + public function getDateTimeTzFormatString(): string + { + return 'Y-m-d H:i:sO'; + } + + public function getEmptyIdentityInsertSQL(string $quotedTableName, string $quotedIdentifierColumnName): string + { + return 'INSERT INTO ' . $quotedTableName . ' (' . $quotedIdentifierColumnName . ') VALUES (DEFAULT)'; + } + + public function getTruncateTableSQL(string $tableName, bool $cascade = false): string + { + $tableIdentifier = new Identifier($tableName); + $sql = 'TRUNCATE ' . $tableIdentifier->getQuotedName($this); + + if ($cascade) { + $sql .= ' CASCADE'; + } + + return $sql; + } + + /** + * Get the snippet used to retrieve the default value for a given column + * + * @internal The method should be only used from within the {@see PostgreSQLSchemaManager} class hierarchy. + */ + public function getDefaultColumnValueSQLSnippet(): string + { + return <<<'SQL' + SELECT pg_get_expr(adbin, adrelid) + FROM pg_attrdef + WHERE c.oid = pg_attrdef.adrelid + AND pg_attrdef.adnum=a.attnum + SQL; + } + + protected function initializeDoctrineTypeMappings(): void + { + $this->doctrineTypeMapping = [ + 'bigint' => Types::BIGINT, + 'bigserial' => Types::BIGINT, + 'bool' => Types::BOOLEAN, + 'boolean' => Types::BOOLEAN, + 'bpchar' => Types::STRING, + 'bytea' => Types::BLOB, + 'char' => Types::STRING, + 'date' => Types::DATE_MUTABLE, + 'decimal' => Types::DECIMAL, + 'double precision' => Types::FLOAT, + 'float' => Types::FLOAT, + 'float4' => Types::SMALLFLOAT, + 'float8' => Types::FLOAT, + 'inet' => Types::STRING, + 'int' => Types::INTEGER, + 'int2' => Types::SMALLINT, + 'int4' => Types::INTEGER, + 'int8' => Types::BIGINT, + 'integer' => Types::INTEGER, + 'interval' => Types::STRING, + 'json' => Types::JSON, + 'jsonb' => Types::JSON, + 'money' => Types::DECIMAL, + 'numeric' => Types::DECIMAL, + 'serial' => Types::INTEGER, + 'serial4' => Types::INTEGER, + 'serial8' => Types::BIGINT, + 'real' => Types::SMALLFLOAT, + 'smallint' => Types::SMALLINT, + 'text' => Types::TEXT, + 'time' => Types::TIME_MUTABLE, + 'timestamp' => Types::DATETIME_MUTABLE, + 'timestamptz' => Types::DATETIMETZ_MUTABLE, + 'timetz' => Types::TIME_MUTABLE, + 'tsvector' => Types::TEXT, + 'uuid' => Types::GUID, + 'varchar' => Types::STRING, + '_varchar' => Types::STRING, + ]; + } + + /** @deprecated */ + protected function createReservedKeywordsList(): KeywordList + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6607', + '%s is deprecated.', + __METHOD__, + ); + + return new PostgreSQLKeywords(); + } + + /** + * {@inheritDoc} + */ + public function getBlobTypeDeclarationSQL(array $column): string + { + return 'BYTEA'; + } + + /** + * {@inheritDoc} + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + */ + public function getDefaultValueDeclarationSQL(array $column): string + { + if (isset($column['autoincrement']) && $column['autoincrement'] === true) { + return ''; + } + + return parent::getDefaultValueDeclarationSQL($column); + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function supportsColumnCollation(): bool + { + return true; + } + + /** + * {@inheritDoc} + */ + public function getJsonTypeDeclarationSQL(array $column): string + { + if (! empty($column['jsonb'])) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6939', + 'The "jsonb" column platform option is deprecated. Use the "JSONB" type instead.', + ); + + return 'JSONB'; + } + + return 'JSON'; + } + + /** + * {@inheritDoc} + */ + public function getJsonbTypeDeclarationSQL(array $column): string + { + return 'JSONB'; + } + + public function createMetadataProvider(Connection $connection): PostgreSQLMetadataProvider + { + return new PostgreSQLMetadataProvider($connection, $this); + } + + public function createSchemaManager(Connection $connection): PostgreSQLSchemaManager + { + return new PostgreSQLSchemaManager($connection, $this); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/SQLServer/Comparator.php b/backend/vendor/doctrine/dbal/src/Platforms/SQLServer/Comparator.php new file mode 100644 index 0000000..079e70e --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/SQLServer/Comparator.php @@ -0,0 +1,54 @@ +normalizeColumns($oldTable), + $this->normalizeColumns($newTable), + ); + } + + private function normalizeColumns(Table $table): Table + { + $table = clone $table; + + foreach ($table->getColumns() as $column) { + $options = $column->getPlatformOptions(); + + if (! isset($options['collation']) || $options['collation'] !== $this->databaseCollation) { + continue; + } + + unset($options['collation']); + $column->setPlatformOptions($options); + } + + return $table; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/SQLServer/SQL/Builder/SQLServerSelectSQLBuilder.php b/backend/vendor/doctrine/dbal/src/Platforms/SQLServer/SQL/Builder/SQLServerSelectSQLBuilder.php new file mode 100644 index 0000000..ea6bb60 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/SQLServer/SQL/Builder/SQLServerSelectSQLBuilder.php @@ -0,0 +1,84 @@ +isDistinct()) { + $parts[] = 'DISTINCT'; + } + + $parts[] = implode(', ', $query->getColumns()); + + $from = $query->getFrom(); + + if (count($from) > 0) { + $parts[] = 'FROM ' . implode(', ', $from); + } + + $forUpdate = $query->getForUpdate(); + + if ($forUpdate !== null) { + $with = ['UPDLOCK', 'ROWLOCK']; + + if ($forUpdate->getConflictResolutionMode() === ConflictResolutionMode::SKIP_LOCKED) { + $with[] = 'READPAST'; + } + + $parts[] = 'WITH (' . implode(', ', $with) . ')'; + } + + $where = $query->getWhere(); + + if ($where !== null) { + $parts[] = 'WHERE ' . $where; + } + + $groupBy = $query->getGroupBy(); + + if (count($groupBy) > 0) { + $parts[] = 'GROUP BY ' . implode(', ', $groupBy); + } + + $having = $query->getHaving(); + + if ($having !== null) { + $parts[] = 'HAVING ' . $having; + } + + $orderBy = $query->getOrderBy(); + + if (count($orderBy) > 0) { + $parts[] = 'ORDER BY ' . implode(', ', $orderBy); + } + + $sql = implode(' ', $parts); + $limit = $query->getLimit(); + + if ($limit->isDefined()) { + $sql = $this->platform->modifyLimitQuery($sql, $limit->getMaxResults(), $limit->getFirstResult()); + } + + return $sql; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/SQLServer/SQLServerMetadataProvider.php b/backend/vendor/doctrine/dbal/src/Platforms/SQLServer/SQLServerMetadataProvider.php new file mode 100644 index 0000000..1835e6a --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/SQLServer/SQLServerMetadataProvider.php @@ -0,0 +1,658 @@ +connection->iterateColumn($sql) as $databaseName) { + yield new DatabaseMetadataRow($databaseName); + } + } + + /** {@inheritDoc} */ + public function getAllSchemaNames(): iterable + { + $sql = <<<'SQL' + SELECT name + FROM sys.schemas + WHERE name NOT LIKE 'db_%' + AND name NOT IN ('guest', 'INFORMATION_SCHEMA', 'sys') + SQL; + + foreach ($this->connection->iterateColumn($sql) as $schemaName) { + yield new SchemaMetadataRow($schemaName); + } + } + + /** {@inheritDoc} */ + public function getAllTableNames(): iterable + { + $sql = sprintf( + <<<'SQL' + SELECT s.name, + t.name + FROM sys.tables AS t + JOIN sys.schemas AS s + ON t.schema_id = s.schema_id + WHERE %s + AND %s + ORDER BY s.name, + t.name + SQL, + $this->buildSchemaNamePredicate('s.name'), + $this->buildTableNamePredicate('t.name'), + ); + + foreach ($this->connection->iterateNumeric($sql) as $row) { + yield new TableMetadataRow($row[0], $row[1], []); + } + } + + /** {@inheritDoc} */ + public function getTableColumnsForAllTables(): iterable + { + return $this->getTableColumns(null, null); + } + + /** {@inheritDoc} */ + public function getTableColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName === null) { + throw UnsupportedName::fromNullSchemaName(__METHOD__); + } + + return $this->getTableColumns($schemaName, $tableName); + } + + /** + * @link https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/extended-properties-catalog-views-sys-extended-properties + * + * @return iterable + * + * @throws Exception + */ + private function getTableColumns(?string $schemaName, ?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT scm.name, + tbl.name, + col.name, + type.name, + col.max_length, + col.is_nullable, + def.definition, + def.name, + col.precision, + col.scale, + col.is_identity, + col.collation_name, + -- CAST avoids driver error for sql_variant type + CAST(prop.value AS NVARCHAR(MAX)) + FROM sys.columns AS col + JOIN sys.types AS type + ON col.user_type_id = type.user_type_id + JOIN sys.tables AS tbl + ON col.object_id = tbl.object_id + JOIN sys.schemas AS scm + ON tbl.schema_id = scm.schema_id + LEFT JOIN sys.default_constraints def + ON col.default_object_id = def.object_id + AND col.object_id = def.parent_object_id + LEFT JOIN sys.extended_properties AS prop + ON tbl.object_id = prop.major_id + AND col.column_id = prop.minor_id + AND prop.name = N'MS_Description' + WHERE %s + ORDER BY scm.name, + tbl.name, + col.column_id + SQL, + $this->buildTableQueryPredicate('scm', $schemaName, 'tbl', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield $this->createTableColumn($row); + } + } + + /** + * @param list $row + * + * @throws TypesException + */ + private function createTableColumn(array $row): TableColumnMetadataRow + { + [ + $schemaName, + $tableName, + $columnName, + $dbType, + $length, + $isNullable, + $defaultExpression, + $defaultConstraintName, + $precision, + $scale, + $isIdentity, + $collationName, + $description, + ] = $row; + + $length = (int) $length; + + switch ($dbType) { + case 'nchar': + case 'ntext': + // Unicode data requires 2 bytes per character + $length = (int) ($length / 2); + break; + + case 'nvarchar': + if ($length === -1) { + break; + } + + // Unicode data requires 2 bytes per character + $length = (int) ($length / 2); + break; + + case 'varchar': + // TEXT type is returned as VARCHAR(MAX) with a length of -1 + if ($length === -1) { + $dbType = 'text'; + } + + break; + + case 'varbinary': + if ($length === -1) { + $dbType = 'blob'; + } + + break; + } + + $type = $this->platform->getDoctrineTypeMapping($dbType); + + $editor = Column::editor() + ->setQuotedName($columnName) + ->setTypeName( + $this->platform->getDoctrineTypeMapping($dbType), + ) + ->setNotNull(! $isNullable) + ->setAutoincrement((bool) $isIdentity); + + if ($precision !== null) { + $editor->setPrecision((int) $precision); + } + + if ($scale !== null) { + $editor->setScale((int) $scale); + } + + if ($dbType === 'char' || $dbType === 'nchar' || $dbType === 'binary') { + $editor->setFixed(true); + } + + if ($description !== null) { + $editor->setComment($description); + } + + if ($length !== 0 && ($type === 'text' || $type === 'string' || $type === 'binary')) { + $editor->setLength($length); + } + + if ($defaultExpression !== null) { + $editor + ->setDefaultValue($this->parseDefaultExpression($defaultExpression)) + ->setDefaultConstraintName($defaultConstraintName); + } + + $editor->setCollation($collationName); + + return new TableColumnMetadataRow($schemaName, $tableName, $editor->create()); + } + + private function parseDefaultExpression(string $value): ?string + { + while (preg_match('/^\((.*)\)$/s', $value, $matches) === 1) { + $value = $matches[1]; + } + + if ($value === 'NULL') { + return null; + } + + if (preg_match('/^\'(.*)\'$/s', $value, $matches) === 1) { + $value = str_replace("''", "'", $matches[1]); + } + + if ($value === 'getdate()') { + return $this->platform->getCurrentTimestampSQL(); + } + + return $value; + } + + /** {@inheritDoc} */ + public function getIndexColumnsForAllTables(): iterable + { + return $this->getIndexColumns(null, null); + } + + /** {@inheritDoc} */ + public function getIndexColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName === null) { + throw UnsupportedName::fromNullSchemaName(__METHOD__); + } + + return $this->getIndexColumns($schemaName, $tableName); + } + + /** + * @return iterable + * + * @throws Exception + */ + private function getIndexColumns(?string $schemaName, ?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT s.name, + t.name, + i.name, + i.is_unique, + i.type, + c.name + FROM sys.tables AS t + JOIN sys.schemas AS s + ON t.schema_id = s.schema_id + JOIN sys.indexes AS i + ON t.object_id = i.object_id + JOIN sys.index_columns AS idxcol + ON i.object_id = idxcol.object_id + AND i.index_id = idxcol.index_id + JOIN sys.columns AS c + ON idxcol.object_id = c.object_id + AND idxcol.column_id = c.column_id + WHERE %s + AND i.is_primary_key = 0 + ORDER BY s.name, + t.name, + i.name, + idxcol.key_ordinal + SQL, + $this->buildTableQueryPredicate('s', $schemaName, 't', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new IndexColumnMetadataRow( + schemaName: $row[0], + tableName: $row[1], + indexName: $row[2], + type: $row[3] ? IndexType::UNIQUE : IndexType::REGULAR, + isClustered: (int) $row[4] === 1, + predicate: null, + columnName: $row[5], + columnLength: null, + ); + } + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForAllTables(): iterable + { + return $this->getPrimaryKeyConstraintColumns(null, null); + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName === null) { + throw UnsupportedName::fromNullSchemaName(__METHOD__); + } + + return $this->getPrimaryKeyConstraintColumns($schemaName, $tableName); + } + + /** + * @return iterable + * + * @throws Exception + */ + private function getPrimaryKeyConstraintColumns(?string $schemaName, ?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT s.name, + t.name, + i.name, + i.type, + c.name + FROM sys.schemas s + INNER JOIN sys.tables t + ON t.schema_id = s.schema_id + INNER JOIN sys.indexes i + ON i.object_id = t.object_id + AND i.is_primary_key = 1 + INNER JOIN sys.index_columns ic + ON ic.object_id = t.object_id + AND ic.index_id = i.index_id + INNER JOIN sys.columns c + ON c.object_id = t.object_id + AND c.column_id = ic.column_id + WHERE %s + ORDER BY s.name, + t.name, + ic.key_ordinal + SQL, + $this->buildTableQueryPredicate('s', $schemaName, 't', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new PrimaryKeyConstraintColumnRow( + schemaName: $row[0], + tableName: $row[1], + constraintName: $row[2], + isClustered: (int) $row[3] === 1, + columnName: $row[4], + ); + } + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForAllTables(): iterable + { + return $this->getForeignKeyConstraintColumns(null, null); + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName === null) { + throw UnsupportedName::fromNullSchemaName(__METHOD__); + } + + return $this->getForeignKeyConstraintColumns($schemaName, $tableName); + } + + /** + * @return iterable + * + * @throws Exception + */ + private function getForeignKeyConstraintColumns(?string $schemaName, ?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT pks.name, + pkt.name, + fk.name, + fks.name, + fkt.name, + fk.update_referential_action_desc, + fk.delete_referential_action_desc, + pkc.name, + fkc.name + FROM sys.foreign_keys AS fk + JOIN sys.foreign_key_columns AS c + ON fk.object_id = c.constraint_object_id + JOIN sys.tables AS pkt + ON pkt.object_id = fk.parent_object_id + JOIN sys.schemas AS pks + ON pks.schema_id = pkt.schema_id + JOIN sys.columns AS pkc + ON pkc.object_id = c.parent_object_id + AND pkc.column_id = c.parent_column_id + JOIN sys.tables AS fkt + ON fkt.object_id = fk.referenced_object_id + JOIN sys.schemas AS fks + ON fks.schema_id = fkt.schema_id + JOIN sys.columns AS fkc + ON fkc.object_id = c.referenced_object_id + AND fkc.column_id = c.referenced_column_id + WHERE %s + ORDER BY pks.name, + pkt.name, + fk.name, + c.constraint_column_id +SQL, + $this->buildTableQueryPredicate('pks', $schemaName, 'pkt', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new ForeignKeyConstraintColumnMetadataRow( + referencingSchemaName: $row[0], + referencingTableName: $row[1], + id: null, + name: $row[2], + referencedSchemaName: $row[3], + referencedTableName: $row[4], + matchType: MatchType::SIMPLE, + onUpdateAction: $this->createReferentialAction($row[5]), + onDeleteAction: $this->createReferentialAction($row[6]), + isDeferrable: false, + isDeferred: false, + referencingColumnName: $row[7], + referencedColumnName: $row[8], + ); + } + } + + private function createReferentialAction(string $value): ReferentialAction + { + $action = ReferentialAction::tryFrom(str_replace('_', ' ', $value)); + assert($action !== null); + + return $action; + } + + /** {@inheritDoc} */ + public function getTableOptionsForAllTables(): iterable + { + return $this->getTableOptions(null, null); + } + + /** {@inheritDoc} */ + public function getTableOptionsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName === null) { + throw UnsupportedName::fromNullSchemaName(__METHOD__); + } + + return $this->getTableOptions($schemaName, $tableName); + } + + /** + * @return iterable + * + * @throws Exception + */ + private function getTableOptions(?string $schemaName, ?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT scm.name, + tbl.name, + p.value + FROM sys.tables AS tbl + JOIN sys.schemas AS scm + ON tbl.schema_id = scm.schema_id + LEFT JOIN sys.extended_properties AS p + ON p.major_id = tbl.object_id + AND p.minor_id = 0 + AND p.class = 1 + AND p.name = N'MS_Description' + WHERE %s + SQL, + $this->buildTableQueryPredicate('scm', $schemaName, 'tbl', $tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new TableMetadataRow($row[0], $row[1], [ + 'comment' => $row[2], + ]); + } + } + + /** + * @param list $params + * + * @return non-empty-string + */ + private function buildTableQueryPredicate( + string $schemaRelation, + ?string $schemaName, + string $tableRelation, + ?string $tableName, + array &$params, + ): string { + assert(($tableName === null) === ($schemaName === null)); + + $conditions = []; + + if ($tableName !== null && $schemaName !== null) { + $conditions = [sprintf('%s.name = ?', $schemaRelation)]; + $params[] = $schemaName; + + $conditions[] = sprintf('%s.name = ?', $tableRelation); + $params[] = $tableName; + } + + $conditions[] = $this->buildSchemaNamePredicate($schemaRelation . '.name'); + $conditions[] = $this->buildTableNamePredicate($tableRelation . '.name'); + + return implode(' AND ', $conditions); + } + + /** + * {@inheritDoc} + * + * @link https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-views-transact-sql + */ + public function getAllViews(): iterable + { + $sql = sprintf( + <<<'SQL' + SELECT s.name, + v.name, + m.definition + FROM sys.views v + JOIN sys.schemas s + ON v.schema_id = s.schema_id + JOIN sys.sql_modules m + ON v.object_id = m.object_id + WHERE %s + ORDER BY s.name, + v.name + SQL, + $this->buildSchemaNamePredicate('s.name'), + ); + + foreach ($this->connection->iterateNumeric($sql) as $row) { + yield new ViewMetadataRow(...$row); + } + } + + /** + * {@inheritDoc} + * + * @link https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-sequences-transact-sql + */ + public function getAllSequences(): iterable + { + $sql = <<<'SQL' + SELECT scm.name, + seq.name, + seq.increment, + seq.start_value + FROM sys.sequences AS seq + JOIN sys.schemas AS scm + ON scm.schema_id = seq.schema_id + SQL; + + foreach ($this->connection->iterateNumeric($sql) as $row) { + yield new SequenceMetadataRow( + schemaName: $row[0], + sequenceName: $row[1], + allocationSize: (int) $row[2], + initialValue: (int) $row[3], + cacheSize: null, + ); + } + } + + private function buildSchemaNamePredicate(string $columnName): string + { + return sprintf( + "%1\$s NOT LIKE 'db\_%%' AND %1\$s NOT IN ('guest', 'INFORMATION_SCHEMA', 'sys')", + $columnName, + ); + } + + private function buildTableNamePredicate(string $columnName): string + { + // The "sysdiagrams" table must be ignored as it's internal SQL Server table for Database Diagrams + return sprintf("%s != 'sysdiagrams'", $columnName); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/SQLServerPlatform.php b/backend/vendor/doctrine/dbal/src/Platforms/SQLServerPlatform.php new file mode 100644 index 0000000..325a5fe --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/SQLServerPlatform.php @@ -0,0 +1,1345 @@ +getConvertExpression('date', 'GETDATE()'); + } + + public function getCurrentTimeSQL(): string + { + return $this->getConvertExpression('time', 'GETDATE()'); + } + + /** + * Returns an expression that converts an expression of one data type to another. + * + * @param string $dataType The target native data type. Alias data types cannot be used. + * @param string $expression The SQL expression to convert. + */ + private function getConvertExpression(string $dataType, string $expression): string + { + return sprintf('CONVERT(%s, %s)', $dataType, $expression); + } + + protected function getDateArithmeticIntervalExpression( + string $date, + string $operator, + string $interval, + DateIntervalUnit $unit, + ): string { + $factorClause = ''; + + if ($operator === '-') { + $factorClause = '-1 * '; + } + + return 'DATEADD(' . $unit->value . ', ' . $factorClause . $interval . ', ' . $date . ')'; + } + + public function getDateDiffExpression(string $date1, string $date2): string + { + return 'DATEDIFF(day, ' . $date2 . ',' . $date1 . ')'; + } + + /** + * {@inheritDoc} + * + * Microsoft SQL Server supports this through AUTO_INCREMENT columns. + */ + public function supportsIdentityColumns(): bool + { + return true; + } + + public function supportsReleaseSavepoints(): bool + { + return false; + } + + public function supportsSchemas(): bool + { + return true; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function supportsColumnCollation(): bool + { + return true; + } + + public function supportsSequences(): bool + { + return true; + } + + public function getAlterSequenceSQL(Sequence $sequence): string + { + return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . + ' INCREMENT BY ' . $sequence->getAllocationSize(); + } + + public function getCreateSequenceSQL(Sequence $sequence): string + { + return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) . + ' START WITH ' . $sequence->getInitialValue() . + ' INCREMENT BY ' . $sequence->getAllocationSize() . + ' MINVALUE ' . $sequence->getInitialValue(); + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListSequencesSQL(string $database): string + { + return 'SELECT seq.name, + CAST( + seq.increment AS VARCHAR(MAX) + ) AS increment, -- CAST avoids driver error for sql_variant type + CAST( + seq.start_value AS VARCHAR(MAX) + ) AS start_value -- CAST avoids driver error for sql_variant type + FROM sys.sequences AS seq'; + } + + public function getSequenceNextValSQL(string $sequence): string + { + return 'SELECT NEXT VALUE FOR ' . $sequence; + } + + public function getDropForeignKeySQL(string $foreignKey, string $table): string + { + return $this->getDropConstraintSQL($foreignKey, $table); + } + + public function getDropIndexSQL(string $name, string $table): string + { + return 'DROP INDEX ' . $name . ' ON ' . $table; + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL(string $name, array $columns, array $options = []): array + { + $this->validateCreateTableOptions($options, __METHOD__); + + $defaultConstraintsSql = []; + $commentsSql = []; + + $tableComment = $options['comment'] ?? null; + if ($tableComment !== null) { + $commentsSql[] = $this->getCommentOnTableSQL($name, $tableComment); + } + + // @todo does other code breaks because of this? + // force primary keys to be not null + foreach ($columns as &$column) { + if (! empty($column['primary'])) { + $column['notnull'] = true; + } + + // Build default constraints SQL statements. + if (isset($column['default'])) { + $defaultConstraintsSql[] = 'ALTER TABLE ' . $name . + ' ADD' . $this->getDefaultConstraintDeclarationSQL($column); + } + + if (empty($column['comment']) && ! is_numeric($column['comment'])) { + continue; + } + + $commentsSql[] = $this->getCreateColumnCommentSQL($name, $column['name'], $column['comment']); + } + + $columnListSql = $this->getColumnDeclarationListSQL($columns); + + if (! empty($options['uniqueConstraints'])) { + foreach ($options['uniqueConstraints'] as $definition) { + $columnListSql .= ', ' . $this->getUniqueConstraintDeclarationSQL($definition); + } + } + + if (! empty($options['primary'])) { + $flags = ''; + if (isset($options['primary_index']) && $options['primary_index']->hasFlag('nonclustered')) { + $flags = ' NONCLUSTERED'; + } + + $columnListSql .= ', PRIMARY KEY' . $flags + . ' (' . implode(', ', array_unique(array_values($options['primary']))) . ')'; + } + + $query = 'CREATE TABLE ' . $name . ' (' . $columnListSql; + + $check = $this->getCheckDeclarationSQL($columns); + if (! empty($check)) { + $query .= ', ' . $check; + } + + $query .= ')'; + + $sql = [$query]; + + if (! empty($options['indexes'])) { + foreach ($options['indexes'] as $index) { + $sql[] = $this->getCreateIndexSQL($index, $name); + } + } + + if (isset($options['foreignKeys'])) { + foreach ($options['foreignKeys'] as $definition) { + $sql[] = $this->getCreateForeignKeySQL($definition, $name); + } + } + + return array_merge($sql, $commentsSql, $defaultConstraintsSql); + } + + /** @deprecated */ + public function getCreatePrimaryKeySQL(Index $index, string $table): string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6867', + '%s() is deprecated.', + __METHOD__, + ); + + $sql = 'ALTER TABLE ' . $table . ' ADD PRIMARY KEY'; + + if ($index->hasFlag('nonclustered')) { + $sql .= ' NONCLUSTERED'; + } + + return $sql . ' (' . implode(', ', $index->getQuotedColumns($this)) . ')'; + } + + private function unquoteSingleIdentifier(string $possiblyQuotedName): string + { + return str_starts_with($possiblyQuotedName, '[') && str_ends_with($possiblyQuotedName, ']') + ? substr($possiblyQuotedName, 1, -1) + : $possiblyQuotedName; + } + + /** + * Returns the SQL statement for creating a column comment. + * + * SQL Server does not support native column comments, + * therefore the extended properties functionality is used + * as a workaround to store them. + * The property name used to store column comments is "MS_Description" + * which provides compatibility with SQL Server Management Studio, + * as column comments are stored in the same property there when + * specifying a column's "Description" attribute. + * + * @internal The method should be only used by the {@see SQLServerPlatform} class. + * + * @param string $tableName The quoted table name to which the column belongs. + * @param string $columnName The quoted column name to create the comment for. + * @param string $comment The column's comment. + */ + protected function getCreateColumnCommentSQL(string $tableName, string $columnName, string $comment): string + { + if (str_contains($tableName, '.')) { + [$schemaName, $tableName] = explode('.', $tableName); + } else { + $schemaName = 'dbo'; + } + + return $this->getAddExtendedPropertySQL( + 'MS_Description', + $comment, + 'SCHEMA', + $this->quoteStringLiteral($this->unquoteSingleIdentifier($schemaName)), + 'TABLE', + $this->quoteStringLiteral($this->unquoteSingleIdentifier($tableName)), + 'COLUMN', + $this->quoteStringLiteral($this->unquoteSingleIdentifier($columnName)), + ); + } + + /** + * Returns the SQL snippet for declaring a default constraint. + * + * @internal The method should be only used by the {@see SQLServerPlatform} class. + * + * @param mixed[] $column Column definition. + */ + protected function getDefaultConstraintDeclarationSQL(array $column): string + { + if (! isset($column['default'])) { + throw new InvalidArgumentException('Incomplete column definition. "default" required.'); + } + + $columnName = new Identifier($column['name']); + + return $this->getDefaultValueDeclarationSQL($column) . ' FOR ' . $columnName->getQuotedName($this); + } + + public function getCreateIndexSQL(Index $index, string $table): string + { + $constraint = parent::getCreateIndexSQL($index, $table); + + if ($index->isUnique() && ! $index->isPrimary()) { + $constraint = $this->_appendUniqueConstraintDefinition($constraint, $index); + } + + return $constraint; + } + + protected function getCreateIndexSQLFlags(Index $index): string + { + $type = ''; + if ($index->isUnique()) { + $type .= 'UNIQUE '; + } + + if ($index->hasFlag('clustered')) { + $type .= 'CLUSTERED '; + } elseif ($index->hasFlag('nonclustered')) { + $type .= 'NONCLUSTERED '; + } + + return $type; + } + + /** + * Extend unique key constraint with required filters + */ + private function _appendUniqueConstraintDefinition(string $sql, Index $index): string + { + $fields = []; + + foreach ($index->getQuotedColumns($this) as $field) { + $fields[] = $field . ' IS NOT NULL'; + } + + return $sql . ' WHERE ' . implode(' AND ', $fields); + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff): array + { + $queryParts = []; + $sql = []; + $commentsSql = []; + + $table = $diff->getOldTable(); + + $tableName = $table->getName(); + + foreach ($diff->getAddedColumns() as $column) { + $columnProperties = $column->toArray(); + + $addColumnSql = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnProperties); + + if (isset($columnProperties['default'])) { + $addColumnSql .= $this->getDefaultValueDeclarationSQL($columnProperties); + } + + $queryParts[] = $addColumnSql; + + $comment = $column->getComment(); + + if ($comment === '') { + continue; + } + + $commentsSql[] = $this->getCreateColumnCommentSQL( + $tableName, + $column->getQuotedName($this), + $comment, + ); + } + + foreach ($diff->getDroppedColumns() as $column) { + if ($column->getDefault() !== null) { + $queryParts[] = $this->getAlterTableDropDefaultConstraintClause($column); + } + + $queryParts[] = 'DROP COLUMN ' . $column->getQuotedName($this); + } + + $tableNameSQL = $table->getQuotedName($this); + + foreach ($diff->getChangedColumns() as $columnDiff) { + $newColumn = $columnDiff->getNewColumn(); + $oldColumn = $columnDiff->getOldColumn(); + $nameChanged = $columnDiff->hasNameChanged(); + + if ($nameChanged) { + // sp_rename accepts the old name as a qualified name, so it should be quoted. + $oldColumnNameSQL = $oldColumn->getQuotedName($this); + + // sp_rename accepts the new name as a literal value, so it cannot be quoted. + $newColumnName = $newColumn->getName(); + + $sql = array_merge( + $sql, + $this->getRenameColumnSQL($tableNameSQL, $oldColumnNameSQL, $newColumnName), + ); + } + + $newComment = $newColumn->getComment(); + $hasNewComment = $newComment !== ''; + + $oldComment = $oldColumn->getComment(); + $hasOldComment = $oldComment !== ''; + + if ($hasOldComment && $hasNewComment && $oldComment !== $newComment) { + $commentsSql[] = $this->getAlterColumnCommentSQL( + $tableName, + $newColumn->getQuotedName($this), + $newComment, + ); + } elseif ($hasOldComment && ! $hasNewComment) { + $commentsSql[] = $this->getDropColumnCommentSQL( + $tableName, + $newColumn->getQuotedName($this), + ); + } elseif (! $hasOldComment && $hasNewComment) { + $commentsSql[] = $this->getCreateColumnCommentSQL( + $tableName, + $newColumn->getQuotedName($this), + $newComment, + ); + } + + $columnNameSQL = $newColumn->getQuotedName($this); + + $newDeclarationSQL = $this->getColumnDeclarationSQL($columnNameSQL, $newColumn->toArray()); + $oldDeclarationSQL = $this->getColumnDeclarationSQL($columnNameSQL, $oldColumn->toArray()); + $declarationSQLChanged = $newDeclarationSQL !== $oldDeclarationSQL; + + $defaultChanged = $columnDiff->hasDefaultChanged(); + + if (! $declarationSQLChanged && ! $defaultChanged && ! $nameChanged) { + continue; + } + + $requireDropDefaultConstraint = $this->alterColumnRequiresDropDefaultConstraint($columnDiff); + + if ($requireDropDefaultConstraint) { + $queryParts[] = $this->getAlterTableDropDefaultConstraintClause($oldColumn); + } + + if ($declarationSQLChanged) { + $queryParts[] = 'ALTER COLUMN ' . $newDeclarationSQL; + } + + if ( + $newColumn->getDefault() === null + || (! $requireDropDefaultConstraint && ! $defaultChanged) + ) { + continue; + } + + $queryParts[] = $this->getAlterTableAddDefaultConstraintClause($tableName, $newColumn); + } + + foreach ($queryParts as $query) { + $sql[] = 'ALTER TABLE ' . $tableNameSQL . ' ' . $query; + } + + return array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $commentsSql, + $this->getPostAlterTableIndexForeignKeySQL($diff), + ); + } + + public function getRenameTableSQL(string $oldName, string $newName): string + { + return $this->getRenameSQL($oldName, $newName); + } + + /** + * Returns the SQL clause for adding a default constraint in an ALTER TABLE statement. + * + * @param string $tableName The name of the table to generate the clause for. + * @param Column $column The column to generate the clause for. + */ + private function getAlterTableAddDefaultConstraintClause(string $tableName, Column $column): string + { + $columnDef = $column->toArray(); + $columnDef['name'] = $column->getQuotedName($this); + + return 'ADD' . $this->getDefaultConstraintDeclarationSQL($columnDef); + } + + /** + * Returns the SQL clause for dropping an existing default constraint in an ALTER TABLE statement. + */ + private function getAlterTableDropDefaultConstraintClause(Column $column): string + { + if (! $column->hasPlatformOption(self::OPTION_DEFAULT_CONSTRAINT_NAME)) { + throw new InvalidArgumentException( + 'Column ' . $column->getName() . ' was not properly introspected as it has a default value' + . ' but does not have the default constraint name.', + ); + } + + return 'DROP CONSTRAINT ' . $this->quoteSingleIdentifier( + $column->getPlatformOption(self::OPTION_DEFAULT_CONSTRAINT_NAME), + ); + } + + /** + * Checks whether a column alteration requires dropping its default constraint first. + * + * Different to other database vendors SQL Server implements column default values + * as constraints and therefore changes in a column's default value as well as changes + * in a column's type require dropping the default constraint first before being to + * alter the particular column to the new definition. + */ + private function alterColumnRequiresDropDefaultConstraint(ColumnDiff $columnDiff): bool + { + // We only need to drop an existing default constraint if we know the + // column was defined with a default value before. + if ($columnDiff->getOldColumn()->getDefault() === null) { + return false; + } + + // We need to drop an existing default constraint if the column was + // defined with a default value before and it has changed. + if ($columnDiff->hasDefaultChanged()) { + return true; + } + + // We need to drop an existing default constraint if the column was + // defined with a default value before and the native column type has changed. + return $columnDiff->hasTypeChanged() || $columnDiff->hasFixedChanged(); + } + + /** + * Returns the SQL statement for altering a column comment. + * + * SQL Server does not support native column comments, + * therefore the extended properties functionality is used + * as a workaround to store them. + * The property name used to store column comments is "MS_Description" + * which provides compatibility with SQL Server Management Studio, + * as column comments are stored in the same property there when + * specifying a column's "Description" attribute. + * + * @internal The method should be only used by the {@see SQLServerPlatform} class. + * + * @param string $tableName The quoted table name to which the column belongs. + * @param string $columnName The quoted column name to alter the comment for. + * @param string $comment The column's comment. + */ + protected function getAlterColumnCommentSQL(string $tableName, string $columnName, string $comment): string + { + if (str_contains($tableName, '.')) { + [$schemaName, $tableName] = explode('.', $tableName); + } else { + $schemaName = 'dbo'; + } + + return $this->getUpdateExtendedPropertySQL( + 'MS_Description', + $comment, + 'SCHEMA', + $this->quoteStringLiteral($this->unquoteSingleIdentifier($schemaName)), + 'TABLE', + $this->quoteStringLiteral($this->unquoteSingleIdentifier($tableName)), + 'COLUMN', + $this->quoteStringLiteral($this->unquoteSingleIdentifier($columnName)), + ); + } + + /** + * Returns the SQL statement for dropping a column comment. + * + * SQL Server does not support native column comments, + * therefore the extended properties functionality is used + * as a workaround to store them. + * The property name used to store column comments is "MS_Description" + * which provides compatibility with SQL Server Management Studio, + * as column comments are stored in the same property there when + * specifying a column's "Description" attribute. + * + * @internal The method should be only used by the {@see SQLServerPlatform} class. + * + * @param string $tableName The quoted table name to which the column belongs. + * @param string $columnName The quoted column name to drop the comment for. + */ + protected function getDropColumnCommentSQL(string $tableName, string $columnName): string + { + if (str_contains($tableName, '.')) { + [$schemaName, $tableName] = explode('.', $tableName); + } else { + $schemaName = 'dbo'; + } + + return $this->getDropExtendedPropertySQL( + 'MS_Description', + 'SCHEMA', + $this->quoteStringLiteral($this->unquoteSingleIdentifier($schemaName)), + 'TABLE', + $this->quoteStringLiteral($this->unquoteSingleIdentifier($tableName)), + 'COLUMN', + $this->quoteStringLiteral($this->unquoteSingleIdentifier($columnName)), + ); + } + + /** + * {@inheritDoc} + */ + protected function getRenameIndexSQL(string $oldIndexName, Index $index, string $tableName): array + { + return [$this->getRenameSQL($tableName . '.' . $oldIndexName, $index->getName(), 'INDEX')]; + } + + /** + * Returns the SQL for renaming a column + * + * @param string $tableName The table to rename the column on. + * @param string $oldColumnName The name of the column we want to rename. + * @param string $newColumnName The name we should rename it to. + * + * @return list The sequence of SQL statements for renaming the given column. + */ + protected function getRenameColumnSQL(string $tableName, string $oldColumnName, string $newColumnName): array + { + return [$this->getRenameSQL($tableName . '.' . $oldColumnName, $newColumnName)]; + } + + /** + * Returns the SQL statement that will execute sp_rename with the given arguments. + */ + private function getRenameSQL(string ...$arguments): string + { + return $this->getExecSQL('sp_rename', ...array_map(function (string $argument): string { + return $this->quoteNationalStringLiteral($argument); + }, $arguments)); + } + + /** + * Returns the SQL statement for adding an extended property to a database object. + * + * @internal The method should be only used by the {@see SQLServerPlatform} class. + * + * @link http://msdn.microsoft.com/en-us/library/ms180047%28v=sql.90%29.aspx + * + * @param string $name The name of the property to add. + * @param string|null $value The value of the property to add. + * @param string|null $level0Type The type of the object at level 0 the property belongs to. + * @param string|null $level0Name The name of the object at level 0 the property belongs to. + * @param string|null $level1Type The type of the object at level 1 the property belongs to. + * @param string|null $level1Name The name of the object at level 1 the property belongs to. + * @param string|null $level2Type The type of the object at level 2 the property belongs to. + * @param string|null $level2Name The name of the object at level 2 the property belongs to. + */ + protected function getAddExtendedPropertySQL( + string $name, + ?string $value = null, + ?string $level0Type = null, + ?string $level0Name = null, + ?string $level1Type = null, + ?string $level1Name = null, + ?string $level2Type = null, + ?string $level2Name = null, + ): string { + $arguments = [ + $this->quoteNationalStringLiteral($name), + $this->quoteNationalStringLiteral($value ?? ''), + $this->quoteNationalStringLiteral($level0Type ?? ''), + $level0Name ?? '', + $this->quoteNationalStringLiteral($level1Type ?? ''), + $level1Name ?? '', + ]; + + if ($level2Type !== null || $level2Name !== null) { + $arguments[] = $this->quoteNationalStringLiteral($level2Type ?? ''); + $arguments[] = $level2Name ?? ''; + } + + return $this->getExecSQL('sp_addextendedproperty', ...$arguments); + } + + /** + * Returns the SQL statement for dropping an extended property from a database object. + * + * @internal The method should be only used by the {@see SQLServerPlatform} class. + * + * @link http://technet.microsoft.com/en-gb/library/ms178595%28v=sql.90%29.aspx + * + * @param string $name The name of the property to drop. + * @param string|null $level0Type The type of the object at level 0 the property belongs to. + * @param string|null $level0Name The name of the object at level 0 the property belongs to. + * @param string|null $level1Type The type of the object at level 1 the property belongs to. + * @param string|null $level1Name The name of the object at level 1 the property belongs to. + * @param string|null $level2Type The type of the object at level 2 the property belongs to. + * @param string|null $level2Name The name of the object at level 2 the property belongs to. + */ + protected function getDropExtendedPropertySQL( + string $name, + ?string $level0Type = null, + ?string $level0Name = null, + ?string $level1Type = null, + ?string $level1Name = null, + ?string $level2Type = null, + ?string $level2Name = null, + ): string { + $arguments = [ + $this->quoteNationalStringLiteral($name), + $this->quoteNationalStringLiteral($level0Type ?? ''), + $level0Name ?? '', + $this->quoteNationalStringLiteral($level1Type ?? ''), + $level1Name ?? '', + ]; + + if ($level2Type !== null || $level2Name !== null) { + $arguments[] = $this->quoteNationalStringLiteral($level2Type ?? ''); + $arguments[] = $level2Name ?? ''; + } + + return $this->getExecSQL('sp_dropextendedproperty', ...$arguments); + } + + /** + * Returns the SQL statement for updating an extended property of a database object. + * + * @internal The method should be only used by the {@see SQLServerPlatform} class. + * + * @link http://msdn.microsoft.com/en-us/library/ms186885%28v=sql.90%29.aspx + * + * @param string $name The name of the property to update. + * @param string|null $value The value of the property to update. + * @param string|null $level0Type The type of the object at level 0 the property belongs to. + * @param string|null $level0Name The name of the object at level 0 the property belongs to. + * @param string|null $level1Type The type of the object at level 1 the property belongs to. + * @param string|null $level1Name The name of the object at level 1 the property belongs to. + * @param string|null $level2Type The type of the object at level 2 the property belongs to. + * @param string|null $level2Name The name of the object at level 2 the property belongs to. + */ + protected function getUpdateExtendedPropertySQL( + string $name, + ?string $value = null, + ?string $level0Type = null, + ?string $level0Name = null, + ?string $level1Type = null, + ?string $level1Name = null, + ?string $level2Type = null, + ?string $level2Name = null, + ): string { + $arguments = [ + $this->quoteNationalStringLiteral($name), + $this->quoteNationalStringLiteral($value ?? ''), + $this->quoteNationalStringLiteral($level0Type ?? ''), + $level0Name ?? '', + $this->quoteNationalStringLiteral($level1Type ?? ''), + $level1Name ?? '', + ]; + + if ($level2Type !== null || $level2Name !== null) { + $arguments[] = $this->quoteNationalStringLiteral($level2Type ?? ''); + $arguments[] = $level2Name ?? ''; + } + + return $this->getExecSQL('sp_updateextendedproperty', ...$arguments); + } + + /** + * Returns the SQL statement that will execute the given stored procedure with the given arguments. + * + * @param string $procedureName The name of the stored procedure to execute. + * @param string ...$arguments The SQL fragments representing the arguments to pass to the stored procedure. + */ + private function getExecSQL(string $procedureName, string ...$arguments): string + { + return 'EXEC ' . $this->quoteSingleIdentifier($procedureName) . ' ' . implode(', ', $arguments); + } + + private function quoteNationalStringLiteral(string $value): string + { + return 'N' . $this->quoteStringLiteral($value); + } + + public function getEmptyIdentityInsertSQL(string $quotedTableName, string $quotedIdentifierColumnName): string + { + return 'INSERT INTO ' . $quotedTableName . ' DEFAULT VALUES'; + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListViewsSQL(string $database): string + { + return "SELECT name, definition FROM sysobjects + INNER JOIN sys.sql_modules ON sysobjects.id = sys.sql_modules.object_id + WHERE type = 'V' ORDER BY name"; + } + + public function getLocateExpression(string $string, string $substring, ?string $start = null): string + { + if ($start === null) { + return sprintf('CHARINDEX(%s, %s)', $substring, $string); + } + + return sprintf('CHARINDEX(%s, %s, %s)', $substring, $string, $start); + } + + public function getModExpression(string $dividend, string $divisor): string + { + return $dividend . ' % ' . $divisor; + } + + public function getTrimExpression( + string $str, + TrimMode $mode = TrimMode::UNSPECIFIED, + ?string $char = null, + ): string { + if ($char === null) { + return match ($mode) { + TrimMode::LEADING => 'LTRIM(' . $str . ')', + TrimMode::TRAILING => 'RTRIM(' . $str . ')', + default => 'LTRIM(RTRIM(' . $str . '))', + }; + } + + $pattern = "'%[^' + " . $char . " + ']%'"; + + if ($mode === TrimMode::LEADING) { + return 'stuff(' . $str . ', 1, patindex(' . $pattern . ', ' . $str . ') - 1, null)'; + } + + if ($mode === TrimMode::TRAILING) { + return 'reverse(stuff(reverse(' . $str . '), 1, ' + . 'patindex(' . $pattern . ', reverse(' . $str . ')) - 1, null))'; + } + + return 'reverse(stuff(reverse(stuff(' . $str . ', 1, patindex(' . $pattern . ', ' . $str . ') - 1, null)), 1, ' + . 'patindex(' . $pattern . ', reverse(stuff(' . $str . ', 1, patindex(' . $pattern . ', ' . $str + . ') - 1, null))) - 1, null))'; + } + + public function getConcatExpression(string ...$string): string + { + return sprintf('CONCAT(%s)', implode(', ', $string)); + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListDatabasesSQL(): string + { + return 'SELECT * FROM sys.databases'; + } + + public function getSubstringExpression(string $string, string $start, ?string $length = null): string + { + if ($length === null) { + return sprintf('SUBSTRING(%s, %s, LEN(%s) - %s + 1)', $string, $start, $string, $start); + } + + return sprintf('SUBSTRING(%s, %s, %s)', $string, $start, $length); + } + + public function getLengthExpression(string $string): string + { + return 'LEN(' . $string . ')'; + } + + public function getCurrentDatabaseExpression(): string + { + return 'DB_NAME()'; + } + + public function getSetTransactionIsolationSQL(TransactionIsolationLevel $level): string + { + return 'SET TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSQL($level); + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $column): string + { + return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $column): string + { + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $column): string + { + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getGuidTypeDeclarationSQL(array $column): string + { + return 'UNIQUEIDENTIFIER'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTzTypeDeclarationSQL(array $column): string + { + return 'DATETIMEOFFSET(6)'; + } + + protected function getCharTypeDeclarationSQLSnippet(?int $length): string + { + $sql = 'NCHAR'; + + if ($length !== null) { + $sql .= sprintf('(%d)', $length); + } + + return $sql; + } + + protected function getVarcharTypeDeclarationSQLSnippet(?int $length): string + { + if ($length === null) { + throw ColumnLengthRequired::new($this, 'NVARCHAR'); + } + + return sprintf('NVARCHAR(%d)', $length); + } + + /** + * {@inheritDoc} + */ + public function getAsciiStringTypeDeclarationSQL(array $column): string + { + $length = $column['length'] ?? null; + + if (empty($column['fixed'])) { + return parent::getVarcharTypeDeclarationSQLSnippet($length); + } + + return parent::getCharTypeDeclarationSQLSnippet($length); + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $column): string + { + return 'VARCHAR(MAX)'; + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $column): string + { + if (! empty($column['autoincrement'])) { + return ' IDENTITY'; + } + + return ''; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $column): string + { + // 3 - microseconds precision length + // http://msdn.microsoft.com/en-us/library/ms187819.aspx + return 'DATETIME2(6)'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $column): string + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $column): string + { + return 'TIME(0)'; + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $column): string + { + return 'BIT'; + } + + protected function doModifyLimitQuery(string $query, ?int $limit, int $offset): string + { + if ($limit === null && $offset <= 0) { + return $query; + } + + if ($this->shouldAddOrderBy($query)) { + if (preg_match('/^SELECT\s+DISTINCT/im', $query) > 0) { + // SQL Server won't let us order by a non-selected column in a DISTINCT query, + // so we have to do this madness. This says, order by the first column in the + // result. SQL Server's docs say that a nonordered query's result order is non- + // deterministic anyway, so this won't do anything that a bunch of update and + // deletes to the table wouldn't do anyway. + $query .= ' ORDER BY 1'; + } else { + // In another DBMS, we could do ORDER BY 0, but SQL Server gets angry if you + // use constant expressions in the order by list. + $query .= ' ORDER BY (SELECT 0)'; + } + } + + // This looks somewhat like MYSQL, but limit/offset are in inverse positions + // Supposedly SQL:2008 core standard. + // Per TSQL spec, FETCH NEXT n ROWS ONLY is not valid without OFFSET n ROWS. + $query .= sprintf(' OFFSET %d ROWS', $offset); + + if ($limit !== null) { + $query .= sprintf(' FETCH NEXT %d ROWS ONLY', $limit); + } + + return $query; + } + + public function convertBooleans(mixed $item): mixed + { + if (is_array($item)) { + foreach ($item as $key => $value) { + if (! is_bool($value) && ! is_numeric($value)) { + continue; + } + + $item[$key] = (int) (bool) $value; + } + } elseif (is_bool($item) || is_numeric($item)) { + $item = (int) (bool) $item; + } + + return $item; + } + + public function getCreateTemporaryTableSnippetSQL(): string + { + return 'CREATE TABLE'; + } + + public function getTemporaryTableName(string $tableName): string + { + return '#' . $tableName; + } + + public function getDateTimeFormatString(): string + { + return 'Y-m-d H:i:s.u'; + } + + public function getDateFormatString(): string + { + return 'Y-m-d'; + } + + public function getTimeFormatString(): string + { + return 'H:i:s'; + } + + public function getDateTimeTzFormatString(): string + { + return 'Y-m-d H:i:s.u P'; + } + + protected function initializeDoctrineTypeMappings(): void + { + $this->doctrineTypeMapping = [ + 'bigint' => Types::BIGINT, + 'binary' => Types::BINARY, + 'bit' => Types::BOOLEAN, + 'blob' => Types::BLOB, + 'char' => Types::STRING, + 'date' => Types::DATE_MUTABLE, + 'datetime' => Types::DATETIME_MUTABLE, + 'datetime2' => Types::DATETIME_MUTABLE, + 'datetimeoffset' => Types::DATETIMETZ_MUTABLE, + 'decimal' => Types::DECIMAL, + 'double' => Types::FLOAT, + 'double precision' => Types::FLOAT, + 'float' => Types::FLOAT, + 'image' => Types::BLOB, + 'int' => Types::INTEGER, + 'money' => Types::INTEGER, + 'nchar' => Types::STRING, + 'ntext' => Types::TEXT, + 'numeric' => Types::DECIMAL, + 'nvarchar' => Types::STRING, + 'real' => Types::SMALLFLOAT, + 'smalldatetime' => Types::DATETIME_MUTABLE, + 'smallint' => Types::SMALLINT, + 'smallmoney' => Types::INTEGER, + 'sysname' => Types::STRING, + 'text' => Types::TEXT, + 'time' => Types::TIME_MUTABLE, + 'tinyint' => Types::SMALLINT, + 'uniqueidentifier' => Types::GUID, + 'varbinary' => Types::BINARY, + 'varchar' => Types::STRING, + 'xml' => Types::TEXT, + ]; + } + + public function createSavePoint(string $savepoint): string + { + return 'SAVE TRANSACTION ' . $savepoint; + } + + public function releaseSavePoint(string $savepoint): string + { + return ''; + } + + public function rollbackSavePoint(string $savepoint): string + { + return 'ROLLBACK TRANSACTION ' . $savepoint; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function getForeignKeyReferentialActionSQL(string $action): string + { + // RESTRICT is not supported, therefore falling back to NO ACTION. + if (strtoupper($action) === 'RESTRICT') { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6707', + 'Relying on automatic conversion of RESTRICT to NO ACTION for SQL Server is deprecated.' + . ' Use NO ACTION explicitly instead.', + ); + + return 'NO ACTION'; + } + + return parent::getForeignKeyReferentialActionSQL($action); + } + + public function appendLockHint(string $fromClause, LockMode $lockMode): string + { + return match ($lockMode) { + LockMode::NONE, + LockMode::OPTIMISTIC => $fromClause, + LockMode::PESSIMISTIC_READ => $fromClause . ' WITH (HOLDLOCK, ROWLOCK)', + LockMode::PESSIMISTIC_WRITE => $fromClause . ' WITH (UPDLOCK, ROWLOCK)', + }; + } + + /** @deprecated */ + protected function createReservedKeywordsList(): KeywordList + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6607', + '%s is deprecated.', + __METHOD__, + ); + + return new SQLServerKeywords(); + } + + public function quoteSingleIdentifier(string $str): string + { + return '[' . str_replace(']', ']]', $str) . ']'; + } + + public function getTruncateTableSQL(string $tableName, bool $cascade = false): string + { + $tableIdentifier = new Identifier($tableName); + + return 'TRUNCATE TABLE ' . $tableIdentifier->getQuotedName($this); + } + + /** + * {@inheritDoc} + */ + public function getBlobTypeDeclarationSQL(array $column): string + { + return 'VARBINARY(MAX)'; + } + + /** + * {@inheritDoc} + * + * @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. + */ + public function getColumnDeclarationSQL(string $name, array $column): string + { + if (isset($column['columnDefinition'])) { + $declaration = $column['columnDefinition']; + } else { + $collation = ! empty($column['collation']) ? + ' ' . $this->getColumnCollationDeclarationSQL($column['collation']) : ''; + + $notnull = ! empty($column['notnull']) ? ' NOT NULL' : ''; + + $typeDecl = $column['type']->getSQLDeclaration($column, $this); + $declaration = $typeDecl . $collation . $notnull; + } + + return $name . ' ' . $declaration; + } + + /** + * SQL Server does not support quoting collation identifiers. + */ + public function getColumnCollationDeclarationSQL(string $collation): string + { + return 'COLLATE ' . $collation; + } + + public function columnsEqual(Column $column1, Column $column2): bool + { + if (! parent::columnsEqual($column1, $column2)) { + return false; + } + + return $this->getDefaultValueDeclarationSQL($column1->toArray()) + === $this->getDefaultValueDeclarationSQL($column2->toArray()); + } + + /** + * The [ character is used in SQL Server's extended pattern syntax to define character ranges or sets. + * + * @link https://learn.microsoft.com/en-us/sql/t-sql/language-elements/like-transact-sql#pattern + */ + protected function getLikeWildcardCharacters(): string + { + return parent::getLikeWildcardCharacters() . '['; + } + + protected function getCommentOnTableSQL(string $tableName, string $comment): string + { + if (str_contains($tableName, '.')) { + [$schemaName, $tableName] = explode('.', $tableName); + } else { + $schemaName = 'dbo'; + } + + return $this->getAddExtendedPropertySQL( + 'MS_Description', + $comment, + 'SCHEMA', + $this->quoteStringLiteral($schemaName), + 'TABLE', + $this->quoteStringLiteral($this->unquoteSingleIdentifier($tableName)), + ); + } + + private function shouldAddOrderBy(string $query): bool + { + // Find the position of the last instance of ORDER BY and ensure it is not within a parenthetical statement + // but can be in a newline + $matches = []; + $matchesCount = preg_match_all('/[\\s]+order\\s+by\\s/im', $query, $matches, PREG_OFFSET_CAPTURE); + if ($matchesCount === 0) { + return true; + } + + // ORDER BY instance may be in a subquery after ORDER BY + // e.g. SELECT col1 FROM test ORDER BY (SELECT col2 from test ORDER BY col2) + // if in the searched query ORDER BY clause was found where + // number of open parentheses after the occurrence of the clause is equal to + // number of closed brackets after the occurrence of the clause, + // it means that ORDER BY is included in the query being checked + while ($matchesCount > 0) { + $orderByPos = $matches[0][--$matchesCount][1]; + $openBracketsCount = substr_count($query, '(', $orderByPos); + $closedBracketsCount = substr_count($query, ')', $orderByPos); + if ($openBracketsCount === $closedBracketsCount) { + return false; + } + } + + return true; + } + + public function createMetadataProvider(Connection $connection): SQLServerMetadataProvider + { + return new SQLServerMetadataProvider($connection, $this); + } + + public function createSchemaManager(Connection $connection): SQLServerSchemaManager + { + return new SQLServerSchemaManager($connection, $this); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/SQLite/Comparator.php b/backend/vendor/doctrine/dbal/src/Platforms/SQLite/Comparator.php new file mode 100644 index 0000000..d14aefb --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/SQLite/Comparator.php @@ -0,0 +1,53 @@ +normalizeColumns($oldTable), + $this->normalizeColumns($newTable), + ); + } + + private function normalizeColumns(Table $table): Table + { + $table = clone $table; + + foreach ($table->getColumns() as $column) { + $options = $column->getPlatformOptions(); + + if (! isset($options['collation']) || strcasecmp($options['collation'], 'binary') !== 0) { + continue; + } + + unset($options['collation']); + $column->setPlatformOptions($options); + } + + return $table; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/SQLite/SQLiteMetadataProvider.php b/backend/vendor/doctrine/dbal/src/Platforms/SQLite/SQLiteMetadataProvider.php new file mode 100644 index 0000000..04ed054 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/SQLite/SQLiteMetadataProvider.php @@ -0,0 +1,710 @@ +getTableNames() as $tableName) { + yield new TableMetadataRow(null, $tableName, []); + } + } + + /** + * @return iterable + * + * @throws Exception + */ + private function getTableNames(): iterable + { + $sql = sprintf( + <<<'SQL' + SELECT name + FROM sqlite_master + WHERE type = 'table' + AND %s + SQL, + $this->buildTableNamePredicate('name'), + ); + + yield from $this->connection->iterateColumn($sql); + } + + /** {@inheritDoc} */ + public function getTableColumnsForAllTables(): iterable + { + return $this->getTableColumns(null); + } + + /** {@inheritDoc} */ + public function getTableColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getTableColumns($tableName); + } + + /** + * @link https://www.sqlite.org/pragma.html#pragma_table_info + * + * @return iterable + * + * @throws Exception + */ + private function getTableColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT t.name, + c.name, + c.type, + c."notnull", + c.dflt_value + FROM sqlite_master t + JOIN pragma_table_info(t.name) c + WHERE %s + ORDER BY t.name, + c.cid + SQL, + $this->buildTableQueryPredicate($tableName, $params), + ); + + $rows = $sqlByTableName = []; + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + [$tableName] = $row; + $rows[] = $row; + + $sqlByTableName[$tableName] ??= $this->getCreateTableSQL($tableName); + } + + foreach ($rows as $row) { + yield $this->createTableColumn($row, $sqlByTableName); + } + } + + /** + * @param list $row + * @param array $sqlByTableName + * + * @throws TypesException + */ + private function createTableColumn(array $row, array $sqlByTableName): TableColumnMetadataRow + { + [$tableName, $columnName, $type, $notNull, $defaultExpression] = $row; + + $matchResult = preg_match('/^([A-Z\s]+?)(?:\s*\((\d+)(?:,\s*(\d+))?\))?$/i', $type, $matches); + assert($matchResult === 1); + + $editor = Column::editor() + ->setQuotedName($columnName); + + $dbType = strtolower($matches[1]); + + if (str_contains($dbType, ' unsigned')) { + $dbType = str_replace(' unsigned', '', $dbType); + $editor->setUnsigned(true); + } + + $typeName = $this->platform->getDoctrineTypeMapping($dbType); + + $editor->setTypeName($typeName); + + if ($dbType === 'char') { + $editor->setFixed(true); + } + + if (isset($matches[2])) { + if (isset($matches[3])) { + $editor + ->setPrecision((int) $matches[2]) + ->setScale((int) $matches[3]); + } else { + $editor->setLength((int) $matches[2]); + } + } + + if ($defaultExpression !== null) { + $editor->setDefaultValue( + $this->parseDefaultExpression($defaultExpression), + ); + } + + $tableSQL = $sqlByTableName[$tableName]; + + $editor + ->setAutoincrement( + $this->parseColumnAutoIncrementFromSQL($columnName, $tableSQL), + ) + ->setComment( + $this->parseColumnCommentFromSQL($columnName, $tableSQL), + ) + ->setNotNull((bool) $notNull); + + if ($typeName === Types::STRING || $typeName === Types::TEXT) { + $editor->setCollation( + $this->parseColumnCollationFromSQL($columnName, $tableSQL) ?? 'BINARY', + ); + } + + return new TableColumnMetadataRow(null, $tableName, $editor->create()); + } + + private function parseDefaultExpression(string $value): ?string + { + if ($value === 'NULL') { + return null; + } + + if (preg_match('/^\'(.*)\'$/s', $value, $matches) === 1) { + $value = str_replace("''", "'", $matches[1]); + } + + return $value; + } + + /** @link https://www.sqlite.org/autoinc.html#the_autoincrement_keyword */ + private function parseColumnAutoIncrementFromSQL(string $column, string $sql): bool + { + $pattern = '/' . $this->buildIdentifierPattern($column) . 'INTEGER\s+PRIMARY\s+KEY\s+AUTOINCREMENT/i'; + + return preg_match($pattern, $sql) === 1; + } + + /** @return ?non-empty-string */ + private function parseColumnCollationFromSQL(string $column, string $sql): ?string + { + $pattern = '{' . $this->buildIdentifierPattern($column) + . '[^,(]+(?:\([^()]+\)[^,]*)?(?:(?:DEFAULT|CHECK)\s*(?:\(.*?\))?[^,]*)*COLLATE\s+["\']?([^\s,"\')]+)}is'; + + if (preg_match($pattern, $sql, $match) !== 1) { + return null; + } + + assert(strlen($match[1]) > 0); + + return $match[1]; + } + + private function parseColumnCommentFromSQL(string $column, string $sql): string + { + $pattern = '{[\s(,]' . $this->buildIdentifierPattern($column) . '(?:\([^)]*?\)|[^,(])*?,?(\s*--[^\n]*\n?)+}i'; + + if (preg_match($pattern, $sql, $match) !== 1) { + return ''; + } + + $comment = preg_replace('{^\s*--}m', '', rtrim($match[1], "\n")); + assert(is_string($comment)); + + return $comment; + } + + /** + * Returns a regular expression pattern that matches the given unquoted or quoted identifier. + */ + private function buildIdentifierPattern(string $identifier): string + { + return '(?:' . implode('|', array_map( + static function (string $sql): string { + return '\W' . preg_quote($sql, '/') . '\W'; + }, + [ + $identifier, + $this->platform->quoteSingleIdentifier($identifier), + ], + )) . ')'; + } + + /** {@inheritDoc} */ + public function getIndexColumnsForAllTables(): iterable + { + return $this->getIndexColumns(null); + } + + /** {@inheritDoc} */ + public function getIndexColumnsForTable(?string $schemaName, string $tableName): iterable + { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getIndexColumns($tableName); + } + + /** + * @link https://www.sqlite.org/pragma.html#pragma_index_info + * @link https://www.sqlite.org/pragma.html#pragma_index_list + * @link https://www.sqlite.org/fileformat2.html#internal_schema_objects + * + * @return iterable + * + * @throws Exception + */ + private function getIndexColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT t.name, + i.name, + i."unique", + c.name + FROM sqlite_master t + JOIN pragma_index_list(t.name) i + JOIN pragma_index_info(i.name) c + WHERE %s + AND i.name NOT LIKE 'sqlite_%%' + ORDER BY t.name, + i.name, + c.seqno + SQL, + $this->buildTableQueryPredicate($tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new IndexColumnMetadataRow( + schemaName: null, + tableName: $row[0], + indexName: $row[1], + type: $row[2] ? IndexType::UNIQUE : IndexType::REGULAR, + isClustered: false, + predicate: null, + columnName: $row[3], + columnLength: null, + ); + } + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForAllTables(): iterable + { + return $this->getPrimaryKeyConstraintColumns(null); + } + + /** {@inheritDoc} */ + public function getPrimaryKeyConstraintColumnsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getPrimaryKeyConstraintColumns($tableName); + } + + /** + * @link https://www.sqlite.org/pragma.html#pragma_table_info + * + * @return iterable + * + * @throws Exception + */ + private function getPrimaryKeyConstraintColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT t.name, + c.name + FROM sqlite_master t + JOIN pragma_table_info(t.name) c + WHERE %s + AND c.pk > 0 + ORDER BY t.name, + c.pk + SQL, + $this->buildTableQueryPredicate($tableName, $params), + ); + + foreach ($this->connection->iterateNumeric($sql, $params) as $row) { + yield new PrimaryKeyConstraintColumnRow( + schemaName: null, + tableName: $row[0], + constraintName: null, + isClustered: true, + columnName: $row[1], + ); + } + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForAllTables(): iterable + { + return $this->getForeignKeyConstraintColumns(null); + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintColumnsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getForeignKeyConstraintColumns($tableName); + } + + /** + * @link https://sqlite.org/pragma.html#pragma_foreign_key_list + * + * @return iterable + * + * @throws Exception + */ + private function getForeignKeyConstraintColumns(?string $tableName): iterable + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT t.name, + c.id, + c."table", + c.on_update, + c.on_delete, + c."from", + c."to" + FROM sqlite_master t + JOIN pragma_foreign_key_list(t.name) c + WHERE %s + ORDER BY t.name, + c.id DESC, + c.seq +SQL, + $this->buildTableQueryPredicate($tableName, $params), + ); + + return $this->generateForeignKeyConstraintColumns( + $this->connection->iterateNumeric($sql, $params), + ); + } + + /** + * @param iterable> $rows + * + * @return iterable + * + * @throws Exception + */ + private function generateForeignKeyConstraintColumns(iterable $rows): iterable + { + $currentTableName = null; + $currentDetails = []; + + foreach ($rows as $row) { + $tableName = $row[0]; + $id = $row[1]; + + if ($tableName !== $currentTableName) { + $currentDetails = $this->getForeignKeyConstraintDetails($tableName); + $currentTableName = $tableName; + } + + // SQLite identifies foreign keys in reverse order of appearance in SQL + $details = $currentDetails[count($currentDetails) - $id - 1]; + + $name = $details->getName(); + + if ($row[6] !== null) { + $referencedColumnNames = [$row[6]]; + } else { + // inferring a shorthand form for the foreign key constraint, + // where the referenced column names are omitted + $referencedColumnNames = []; + + foreach ($this->getPrimaryKeyConstraintColumns($row[2]) as $primaryKeyConstraintColumn) { + $referencedColumnNames[] = $primaryKeyConstraintColumn->getColumnName(); + } + + if (count($referencedColumnNames) === 0) { + throw UnsupportedSchema::sqliteMissingForeignKeyConstraintReferencedColumns( + $name, + $tableName, + $row[2], + ); + } + } + + foreach ($referencedColumnNames as $referencedColumnName) { + yield new ForeignKeyConstraintColumnMetadataRow( + referencingSchemaName: null, + referencingTableName: $tableName, + id: $row[1], + name: $name, + referencedSchemaName: null, + referencedTableName: $row[2], + matchType: MatchType::SIMPLE, + onUpdateAction: $this->createReferentialAction($row[3]), + onDeleteAction: $this->createReferentialAction($row[4]), + isDeferrable: $details->isDeferrable(), + isDeferred: $details->isDeferred(), + referencingColumnName: $row[5], + referencedColumnName: $referencedColumnName, + ); + } + } + } + + private function createReferentialAction(string $value): ReferentialAction + { + $action = ReferentialAction::tryFrom($value); + assert($action !== null); + + return $action; + } + + /** + * @return list + * + * @throws Exception + */ + private function getForeignKeyConstraintDetails(string $tableName): array + { + $sql = $this->getCreateTableSQL($tableName); + + if ( + preg_match_all( + '# + (?:CONSTRAINT\s+(\S+)\s+)? + (?:FOREIGN\s+KEY[^)]+\)\s*)? + REFERENCES\s+\S+\s*(?:\([^)]+\))? + (?: + [^,]*? + (NOT\s+DEFERRABLE|DEFERRABLE) + (?:\s+INITIALLY\s+(DEFERRED|IMMEDIATE))? + )?#isx', + $sql, + $matches, + ) === 0 + ) { + return []; + } + + $names = $matches[1]; + $deferrable = $matches[2]; + $deferred = $matches[3]; + $details = []; + + for ($i = 0, $count = count($matches[0]); $i < $count; $i++) { + $details[] = new ForeignKeyConstraintDetails( + $this->parseOptionallyQuotedName($names[$i]), + strcasecmp($deferrable[$i], 'deferrable') === 0, + strcasecmp($deferred[$i], 'deferred') === 0, + ); + } + + return $details; + } + + /** @return ?non-empty-string */ + private function parseOptionallyQuotedName(string $sql): ?string + { + if ($sql === '') { + return null; + } + + if (str_starts_with($sql, '"') && str_ends_with($sql, '"')) { + $name = str_replace('""', '"', substr($sql, 1, -1)); + assert(strlen($name) > 0); + + return $name; + } + + return $sql; + } + + /** @throws Exception */ + private function getCreateTableSQL(string $tableName): string + { + $sql = $this->connection->fetchOne( + <<<'SQL' + SELECT sql + FROM sqlite_master + WHERE type = 'table' + AND name = ? + SQL, + [$tableName], + ); + + assert($sql !== false); + + return $sql; + } + + /** {@inheritDoc} */ + public function getTableOptionsForAllTables(): iterable + { + return $this->getTableOptions($this->getTableNames()); + } + + /** {@inheritDoc} */ + public function getTableOptionsForTable( + ?string $schemaName, + string $tableName, + ): iterable { + if ($schemaName !== null) { + throw UnsupportedName::fromNonNullSchemaName($schemaName, __METHOD__); + } + + return $this->getTableOptions([$tableName]); + } + + /** + * @param iterable $tableNames + * + * @return iterable + * + * @throws Exception + */ + private function getTableOptions(iterable $tableNames): iterable + { + foreach ($tableNames as $tableName) { + yield new TableMetadataRow(null, $tableName, [ + 'comment' => $this->parseTableCommentFromSQL( + $tableName, + $this->getCreateTableSQL($tableName), + ), + ]); + } + } + + /** + * @param list $params + * + * @return non-empty-string + */ + private function buildTableQueryPredicate(?string $tableName, array &$params): string + { + $conditions = [ + "t.type = 'table'", + $this->buildTableNamePredicate('t.name'), + ]; + + if ($tableName !== null) { + $conditions[] = 't.name = ?'; + $params[] = $tableName; + } + + return implode(' AND ', $conditions); + } + + private function parseTableCommentFromSQL(string $table, string $sql): ?string + { + $pattern = sprintf( + <<<'PATTERN' + /CREATE\s+TABLE%s + ( # Start capture + (?:\s*--[^\n]*\n?)+ # Capture anything that starts with whitespaces followed by -- until the end + # of the line(s) + )/ix + PATTERN, + $this->buildIdentifierPattern($table), + ); + + if (preg_match($pattern, $sql, $match) !== 1) { + return null; + } + + $comment = preg_replace('{^\s*--}m', '', rtrim($match[1], "\n")); + + return $comment === '' ? null : $comment; + } + + /** {@inheritDoc} */ + public function getAllViews(): iterable + { + $sql = <<<'SQL' + SELECT name, + sql + FROM sqlite_master + WHERE type = 'view' + ORDER BY name + SQL; + + foreach ($this->connection->iterateNumeric($sql) as $row) { + yield new ViewMetadataRow(null, ...$row); + } + } + + /** {@inheritDoc} */ + public function getAllSequences(): iterable + { + throw NotSupported::new(__METHOD__); + } + + private function buildTableNamePredicate(string $columnName): string + { + return sprintf("%s NOT IN ('geometry_columns', 'spatial_ref_sys', 'sqlite_sequence')", $columnName); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/SQLite/SQLiteMetadataProvider/ForeignKeyConstraintDetails.php b/backend/vendor/doctrine/dbal/src/Platforms/SQLite/SQLiteMetadataProvider/ForeignKeyConstraintDetails.php new file mode 100644 index 0000000..521762e --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/SQLite/SQLiteMetadataProvider/ForeignKeyConstraintDetails.php @@ -0,0 +1,38 @@ +name; + } + + public function isDeferrable(): bool + { + return $this->isDeferrable; + } + + public function isDeferred(): bool + { + return $this->isDeferred; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/SQLitePlatform.php b/backend/vendor/doctrine/dbal/src/Platforms/SQLitePlatform.php new file mode 100644 index 0000000..6fcce9a --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/SQLitePlatform.php @@ -0,0 +1,990 @@ + 'TRIM', + TrimMode::LEADING => 'LTRIM', + TrimMode::TRAILING => 'RTRIM', + }; + + $arguments = [$str]; + + if ($char !== null) { + $arguments[] = $char; + } + + return sprintf('%s(%s)', $trimFn, implode(', ', $arguments)); + } + + public function getSubstringExpression(string $string, string $start, ?string $length = null): string + { + if ($length === null) { + return sprintf('SUBSTR(%s, %s)', $string, $start); + } + + return sprintf('SUBSTR(%s, %s, %s)', $string, $start, $length); + } + + public function getLocateExpression(string $string, string $substring, ?string $start = null): string + { + if ($start === null || $start === '1') { + return sprintf('INSTR(%s, %s)', $string, $substring); + } + + return sprintf( + 'CASE WHEN INSTR(SUBSTR(%1$s, %3$s), %2$s) > 0 THEN INSTR(SUBSTR(%1$s, %3$s), %2$s) + %3$s - 1 ELSE 0 END', + $string, + $substring, + $start, + ); + } + + protected function getDateArithmeticIntervalExpression( + string $date, + string $operator, + string $interval, + DateIntervalUnit $unit, + ): string { + switch ($unit) { + case DateIntervalUnit::WEEK: + $interval = $this->multiplyInterval($interval, 7); + $unit = DateIntervalUnit::DAY; + break; + + case DateIntervalUnit::QUARTER: + $interval = $this->multiplyInterval($interval, 3); + $unit = DateIntervalUnit::MONTH; + break; + } + + return 'DATETIME(' . $date . ',' . $this->getConcatExpression( + $this->quoteStringLiteral($operator), + $interval, + $this->quoteStringLiteral(' ' . $unit->value), + ) . ')'; + } + + public function getDateDiffExpression(string $date1, string $date2): string + { + return sprintf("JULIANDAY(%s, 'start of day') - JULIANDAY(%s, 'start of day')", $date1, $date2); + } + + /** + * {@inheritDoc} + * + * The DBAL doesn't support databases on the SQLite platform. The expression here always returns a fixed string + * as an indicator of an implicitly selected database. + * + * @link https://www.sqlite.org/lang_select.html + * @see Connection::getDatabase() + */ + public function getCurrentDatabaseExpression(): string + { + return "'main'"; + } + + /** @link https://www2.sqlite.org/cvstrac/wiki?p=UnsupportedSql */ + public function createSelectSQLBuilder(): SelectSQLBuilder + { + return new DefaultSelectSQLBuilder($this, null, null); + } + + protected function _getTransactionIsolationLevelSQL(TransactionIsolationLevel $level): string + { + return match ($level) { + TransactionIsolationLevel::READ_UNCOMMITTED => '0', + TransactionIsolationLevel::READ_COMMITTED, + TransactionIsolationLevel::REPEATABLE_READ, + TransactionIsolationLevel::SERIALIZABLE => '1', + }; + } + + public function getSetTransactionIsolationSQL(TransactionIsolationLevel $level): string + { + return 'PRAGMA read_uncommitted = ' . $this->_getTransactionIsolationLevelSQL($level); + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $column): string + { + return 'BOOLEAN'; + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $column): string + { + return 'INTEGER' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $column): string + { + // SQLite autoincrement is implicit for INTEGER PKs, but not for BIGINT fields. + if (! empty($column['autoincrement'])) { + return $this->getIntegerTypeDeclarationSQL($column); + } + + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $column): string + { + // SQLite autoincrement is implicit for INTEGER PKs, but not for SMALLINT fields. + if (! empty($column['autoincrement'])) { + return $this->getIntegerTypeDeclarationSQL($column); + } + + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $column): string + { + return 'DATETIME'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $column): string + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $column): string + { + return 'TIME'; + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $column): string + { + // SQLite autoincrement is only possible for the primary key + if (! empty($column['autoincrement'])) { + return ' PRIMARY KEY AUTOINCREMENT'; + } + + return ! empty($column['unsigned']) ? ' UNSIGNED' : ''; + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL(string $name, array $columns, array $options = []): array + { + $this->validateCreateTableOptions($options, __METHOD__); + + if ($this->hasAutoIncrementColumn($columns, $options)) { + $options['primary'] = []; + } + + $queryFields = $this->getColumnDeclarationListSQL($columns); + + if (! empty($options['uniqueConstraints'])) { + foreach ($options['uniqueConstraints'] as $definition) { + $queryFields .= ', ' . $this->getUniqueConstraintDeclarationSQL($definition); + } + } + + if (! empty($options['primary'])) { + $keyColumns = array_unique(array_values($options['primary'])); + $queryFields .= ', PRIMARY KEY (' . implode(', ', $keyColumns) . ')'; + } + + if (isset($options['foreignKeys'])) { + foreach ($options['foreignKeys'] as $foreignKey) { + $queryFields .= ', ' . $this->getForeignKeyDeclarationSQL($foreignKey); + } + } + + $tableComment = ''; + if (isset($options['comment'])) { + $tableComment = $this->getInlineCommentSQL($options['comment']); + } + + $query = ['CREATE TABLE ' . $name . ' ' . $tableComment . '(' . $queryFields . ')']; + + if (isset($options['alter']) && $options['alter'] === true) { + return $query; + } + + if (! empty($options['indexes'])) { + foreach ($options['indexes'] as $indexDef) { + $query[] = $this->getCreateIndexSQL($indexDef, $name); + } + } + + return $query; + } + + /** + * @param list $columns + * @param CreateTableParameters $options + */ + private function hasAutoIncrementColumn(array $columns, array $options): bool + { + $primaryKeyColumnNames = array_fill_keys($options['primary'] ?? [], true); + + foreach ($columns as $column) { + if (empty($column['autoincrement'])) { + continue; + } + + if (! isset($primaryKeyColumnNames[$column['name']])) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6849', + 'Declaring a column that is not part of the primary key as auto-increment is deprecated.', + ); + } elseif (count($primaryKeyColumnNames) > 1) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6849', + 'Declaring a column that is part of a composite primary key as auto-increment is deprecated.', + ); + } + + return true; + } + + return false; + } + + protected function getBinaryTypeDeclarationSQLSnippet(?int $length): string + { + return 'BLOB'; + } + + protected function getVarcharTypeDeclarationSQLSnippet(?int $length): string + { + $sql = 'VARCHAR'; + + if ($length !== null) { + $sql .= sprintf('(%d)', $length); + } + + return $sql; + } + + protected function getVarbinaryTypeDeclarationSQLSnippet(?int $length): string + { + return 'BLOB'; + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $column): string + { + return 'CLOB'; + } + + /** @internal The method should be only used from within the {@see AbstractSchemaManager} class hierarchy. */ + public function getListViewsSQL(string $database): string + { + return "SELECT name, sql FROM sqlite_master WHERE type='view' AND sql NOT NULL"; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey): string + { + $query = parent::getAdvancedForeignKeyOptionsSQL($foreignKey); + + if (! $foreignKey->hasOption('deferrable') || $foreignKey->getOption('deferrable') === false) { + $query .= ' NOT'; + } + + $query .= ' DEFERRABLE'; + $query .= ' INITIALLY'; + + if ($foreignKey->hasOption('deferred') && $foreignKey->getOption('deferred') !== false) { + $query .= ' DEFERRED'; + } else { + $query .= ' IMMEDIATE'; + } + + return $query; + } + + public function supportsIdentityColumns(): bool + { + return true; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function supportsColumnCollation(): bool + { + return true; + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function supportsInlineColumnComments(): bool + { + return true; + } + + public function getTruncateTableSQL(string $tableName, bool $cascade = false): string + { + $tableIdentifier = new Identifier($tableName); + + return 'DELETE FROM ' . $tableIdentifier->getQuotedName($this); + } + + /** @internal The method should be only used from within the {@see AbstractPlatform} class hierarchy. */ + public function getInlineColumnCommentSQL(string $comment): string + { + return $this->getInlineCommentSQL($comment); + } + + private function getInlineCommentSQL(string $comment): string + { + if ($comment === '') { + return ''; + } + + return '--' . str_replace("\n", "\n--", $comment) . "\n"; + } + + protected function initializeDoctrineTypeMappings(): void + { + $this->doctrineTypeMapping = [ + 'bigint' => 'bigint', + 'bigserial' => 'bigint', + 'blob' => 'blob', + 'boolean' => 'boolean', + 'char' => 'string', + 'clob' => 'text', + 'date' => 'date', + 'datetime' => 'datetime', + 'decimal' => 'decimal', + 'double' => 'float', + 'double precision' => 'float', + 'float' => 'float', + 'image' => 'string', + 'int' => 'integer', + 'integer' => 'integer', + 'longtext' => 'text', + 'longvarchar' => 'string', + 'mediumint' => 'integer', + 'mediumtext' => 'text', + 'ntext' => 'string', + 'numeric' => 'decimal', + 'nvarchar' => 'string', + 'real' => 'smallfloat', + 'serial' => 'integer', + 'smallint' => 'smallint', + 'string' => 'string', + 'text' => 'text', + 'time' => 'time', + 'timestamp' => 'datetime', + 'tinyint' => 'boolean', + 'tinytext' => 'text', + 'varchar' => 'string', + 'varchar2' => 'string', + ]; + } + + /** @deprecated */ + protected function createReservedKeywordsList(): KeywordList + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6607', + '%s is deprecated.', + __METHOD__, + ); + + return new SQLiteKeywords(); + } + + /** + * {@inheritDoc} + */ + protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff): array + { + return []; + } + + /** + * {@inheritDoc} + */ + protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff): array + { + $table = $diff->getOldTable(); + + $sql = []; + + foreach ($this->getIndexesInAlteredTable($diff) as $index) { + if ($index->isPrimary()) { + continue; + } + + $sql[] = $this->getCreateIndexSQL($index, $table->getQuotedName($this)); + } + + return $sql; + } + + protected function doModifyLimitQuery(string $query, ?int $limit, int $offset): string + { + if ($limit === null && $offset > 0) { + $limit = -1; + } + + return parent::doModifyLimitQuery($query, $limit, $offset); + } + + /** + * {@inheritDoc} + */ + public function getBlobTypeDeclarationSQL(array $column): string + { + return 'BLOB'; + } + + public function getTemporaryTableName(string $tableName): string + { + return $tableName; + } + + /** + * {@inheritDoc} + */ + public function getCreateTablesSQL(array $tables): array + { + $sql = []; + + foreach ($tables as $table) { + $sql = array_merge($sql, $this->getCreateTableSQL($table)); + } + + return $sql; + } + + /** {@inheritDoc} */ + public function getCreateIndexSQL(Index $index, string $table): string + { + $name = $index->getQuotedName($this); + $columns = $index->getColumns(); + + if (count($columns) === 0) { + throw new InvalidArgumentException(sprintf( + 'Incomplete or invalid index definition %s on table %s', + $name, + $table, + )); + } + + if ($index->isPrimary()) { + return $this->getCreatePrimaryKeySQL($index, $table); + } + + if (strpos($table, '.') !== false) { + [$schema, $table] = explode('.', $table); + $name = $schema . '.' . $name; + } + + $query = 'CREATE ' . $this->getCreateIndexSQLFlags($index) . 'INDEX ' . $name . ' ON ' . $table; + $query .= ' (' . implode(', ', $index->getQuotedColumns($this)) . ')' . $this->getPartialIndexSQL($index); + + return $query; + } + + /** + * {@inheritDoc} + */ + public function getDropTablesSQL(array $tables): array + { + $sql = []; + + foreach ($tables as $table) { + $sql[] = $this->getDropTableSQL($table->getQuotedName($this)); + } + + return $sql; + } + + /** @deprecated */ + public function getCreatePrimaryKeySQL(Index $index, string $table): string + { + throw NotSupported::new(__METHOD__); + } + + public function getCreateForeignKeySQL(ForeignKeyConstraint $foreignKey, string $table): string + { + throw NotSupported::new(__METHOD__); + } + + public function getDropForeignKeySQL(string $foreignKey, string $table): string + { + throw NotSupported::new(__METHOD__); + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff): array + { + $sql = $this->getSimpleAlterTableSQL($diff); + if ($sql !== false) { + return $sql; + } + + $table = $diff->getOldTable(); + + $columns = []; + $oldColumnNames = []; + $newColumnNames = []; + + foreach ($table->getColumns() as $column) { + $columnName = strtolower($column->getName()); + $columns[$columnName] = $column; + $oldColumnNames[$columnName] = $newColumnNames[$columnName] = $column->getQuotedName($this); + } + + foreach ($diff->getDroppedColumns() as $column) { + $columnName = strtolower($column->getName()); + if (! isset($columns[$columnName])) { + continue; + } + + unset( + $columns[$columnName], + $oldColumnNames[$columnName], + $newColumnNames[$columnName], + ); + } + + foreach ($diff->getChangedColumns() as $columnDiff) { + $oldColumnName = strtolower($columnDiff->getOldColumn()->getName()); + $newColumn = $columnDiff->getNewColumn(); + + $columns = $this->replaceColumn( + $table->getName(), + $columns, + $oldColumnName, + $newColumn, + ); + + if (! isset($newColumnNames[$oldColumnName])) { + continue; + } + + $newColumnNames[$oldColumnName] = $newColumn->getQuotedName($this); + } + + foreach ($diff->getAddedColumns() as $column) { + $columns[strtolower($column->getName())] = $column; + } + + $tableName = $table->getName(); + $pos = strpos($tableName, '.'); + if ($pos !== false) { + $tableName = substr($tableName, $pos + 1); + } + + $dataTable = new Table('__temp__' . $tableName); + + $newTable = new Table( + $table->getQuotedName($this), + $columns, + $this->getPrimaryIndexInAlteredTable($diff), + [], + $this->getForeignKeysInAlteredTable($diff), + $table->getOptions(), + ); + + $newTable->addOption('alter', true); + + $sql = $this->getPreAlterTableIndexForeignKeySQL($diff); + + $sql[] = sprintf( + 'CREATE TEMPORARY TABLE %s AS SELECT %s FROM %s', + $dataTable->getQuotedName($this), + implode(', ', $oldColumnNames), + $table->getQuotedName($this), + ); + $sql[] = $this->getDropTableSQL($table->getQuotedName($this)); + + $sql = array_merge($sql, $this->getCreateTableSQL($newTable)); + $sql[] = sprintf( + 'INSERT INTO %s (%s) SELECT %s FROM %s', + $newTable->getQuotedName($this), + implode(', ', $newColumnNames), + implode(', ', $oldColumnNames), + $dataTable->getQuotedName($this), + ); + $sql[] = $this->getDropTableSQL($dataTable->getQuotedName($this)); + + return array_merge($sql, $this->getPostAlterTableIndexForeignKeySQL($diff)); + } + + /** + * Replace the column with the given name with the new column. + * + * @param array $columns + * + * @return array + */ + private function replaceColumn(string $tableName, array $columns, string $columnName, Column $column): array + { + $keys = array_keys($columns); + $index = array_search($columnName, $keys, true); + + if ($index === false) { + throw ColumnDoesNotExist::new($columnName, $tableName); + } + + $values = array_values($columns); + + $keys[$index] = strtolower($column->getName()); + $values[$index] = $column; + + return array_combine($keys, $values); + } + + /** @return list|false */ + private function getSimpleAlterTableSQL(TableDiff $diff): array|false + { + if ( + count($diff->getChangedColumns()) > 0 + || count($diff->getDroppedColumns()) > 0 + || count($diff->getAddedIndexes()) > 0 + || count($diff->getModifiedIndexes()) > 0 + || count($diff->getDroppedIndexes()) > 0 + || count($diff->getRenamedIndexes()) > 0 + || count($diff->getAddedForeignKeys()) > 0 + || count($diff->getModifiedForeignKeys()) > 0 + || count($diff->getDroppedForeignKeys()) > 0 + ) { + return false; + } + + $table = $diff->getOldTable(); + + $sql = []; + + foreach ($diff->getAddedColumns() as $column) { + $definition = $column->toArray(); + + $type = $definition['type']; + + switch (true) { + case isset($definition['columnDefinition']) || $definition['autoincrement']: + case $type instanceof Types\DateTimeType && $definition['default'] === $this->getCurrentTimestampSQL(): + case $type instanceof Types\DateType && $definition['default'] === $this->getCurrentDateSQL(): + case $type instanceof Types\TimeType && $definition['default'] === $this->getCurrentTimeSQL(): + return false; + } + + $definition['name'] = $column->getQuotedName($this); + + $sql[] = 'ALTER TABLE ' . $table->getQuotedName($this) . ' ADD COLUMN ' + . $this->getColumnDeclarationSQL($definition['name'], $definition); + } + + return $sql; + } + + /** + * Based on the table diff, returns a map where the keys are the lower-case old column names and the values are the + * new column names. If the column was dropped, it is not present in the map. + * + * @return array + */ + private function getDiffColumnNameMap(TableDiff $diff): array + { + $oldTable = $diff->getOldTable(); + + $map = []; + + foreach ($oldTable->getColumns() as $column) { + $columnName = $column->getName(); + $map[strtolower($columnName)] = $columnName; + } + + foreach ($diff->getDroppedColumns() as $column) { + unset($map[strtolower($column->getName())]); + } + + foreach ($diff->getChangedColumns() as $columnDiff) { + $columnName = $columnDiff->getOldColumn()->getName(); + $map[strtolower($columnName)] = $columnDiff->getNewColumn()->getName(); + } + + foreach ($diff->getAddedColumns() as $column) { + $columnName = $column->getName(); + $map[strtolower($columnName)] = $columnName; + } + + // @phpstan-ignore return.type + return $map; + } + + /** @return array */ + private function getIndexesInAlteredTable(TableDiff $diff): array + { + $oldTable = $diff->getOldTable(); + $indexes = $oldTable->getIndexes(); + $nameMap = $this->getDiffColumnNameMap($diff); + + foreach ($indexes as $key => $index) { + $indexName = $index->getName(); + foreach ($diff->getRenamedIndexes() as $oldIndexName => $renamedIndex) { + if (strtolower($indexName) !== strtolower($oldIndexName)) { + continue; + } + + unset($indexes[$key]); + } + + $changed = false; + $indexColumns = []; + foreach ($index->getColumns() as $columnName) { + $normalizedColumnName = strtolower($columnName); + if (! isset($nameMap[$normalizedColumnName])) { + unset($indexes[$key]); + continue 2; + } + + $indexColumns[] = $nameMap[$normalizedColumnName]; + if ($columnName === $nameMap[$normalizedColumnName]) { + continue; + } + + $changed = true; + } + + if (! $changed) { + continue; + } + + $indexes[$key] = new Index( + $index->getName(), + $indexColumns, + $index->isUnique(), + $index->isPrimary(), + $index->getFlags(), + ); + } + + foreach ($diff->getDroppedIndexes() as $index) { + $indexName = $index->getName(); + + if ($indexName === '') { + continue; + } + + unset($indexes[strtolower($indexName)]); + } + + foreach ( + array_merge( + $diff->getModifiedIndexes(), + $diff->getAddedIndexes(), + $diff->getRenamedIndexes(), + ) as $index + ) { + $indexName = $index->getName(); + + if ($indexName !== '') { + $indexes[strtolower($indexName)] = $index; + } else { + $indexes[] = $index; + } + } + + return $indexes; + } + + /** @return array */ + private function getForeignKeysInAlteredTable(TableDiff $diff): array + { + $oldTable = $diff->getOldTable(); + $foreignKeys = $oldTable->getForeignKeys(); + $nameMap = $this->getDiffColumnNameMap($diff); + + foreach ($foreignKeys as $key => $constraint) { + $changed = false; + $localColumns = []; + foreach ($constraint->getLocalColumns() as $columnName) { + $normalizedColumnName = strtolower($columnName); + if (! isset($nameMap[$normalizedColumnName])) { + unset($foreignKeys[$key]); + continue 2; + } + + $localColumns[] = $nameMap[$normalizedColumnName]; + if ($columnName === $nameMap[$normalizedColumnName]) { + continue; + } + + $changed = true; + } + + if (! $changed) { + continue; + } + + $foreignKeys[$key] = new ForeignKeyConstraint( + $localColumns, // @phpstan-ignore argument.type + $constraint->getForeignTableName(), + $constraint->getForeignColumns(), // @phpstan-ignore argument.type + $constraint->getName(), + $constraint->getOptions(), + ); + } + + foreach ($diff->getDroppedForeignKeys() as $constraint) { + $constraintName = $constraint->getName(); + + if ($constraintName === '') { + continue; + } + + unset($foreignKeys[strtolower($constraintName)]); + } + + foreach (array_merge($diff->getModifiedForeignKeys(), $diff->getAddedForeignKeys()) as $constraint) { + $constraintName = $constraint->getName(); + + if ($constraintName !== '') { + $foreignKeys[strtolower($constraintName)] = $constraint; + } else { + $foreignKeys[] = $constraint; + } + } + + return $foreignKeys; + } + + /** @return array */ + private function getPrimaryIndexInAlteredTable(TableDiff $diff): array + { + $primaryIndex = []; + + foreach ($this->getIndexesInAlteredTable($diff) as $index) { + if (! $index->isPrimary()) { + continue; + } + + $primaryIndex = [$index->getName() => $index]; + } + + return $primaryIndex; + } + + public function createMetadataProvider(Connection $connection): SQLiteMetadataProvider + { + return new SQLiteMetadataProvider($connection, $this); + } + + public function createSchemaManager(Connection $connection): SQLiteSchemaManager + { + return new SQLiteSchemaManager($connection, $this); + } + + /** + * Returns the union select query part surrounded by parenthesis if possible for platform. + */ + public function getUnionSelectPartSQL(string $subQuery): string + { + return $subQuery; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Platforms/TrimMode.php b/backend/vendor/doctrine/dbal/src/Platforms/TrimMode.php new file mode 100644 index 0000000..31c2375 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Platforms/TrimMode.php @@ -0,0 +1,13 @@ +converter, + ); + } + + public function query(string $sql): Result + { + return new Result( + parent::query($sql), + $this->converter, + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Portability/Converter.php b/backend/vendor/doctrine/dbal/src/Portability/Converter.php new file mode 100644 index 0000000..d26e85f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Portability/Converter.php @@ -0,0 +1,294 @@ +createConvertValue($convertEmptyStringToNull, $rightTrimString); + $convertNumeric = $this->createConvertRow($convertValue, null); + $convertAssociative = $this->createConvertRow($convertValue, $case); + + $this->convertNumeric = $this->createConvert($convertNumeric); + $this->convertAssociative = $this->createConvert($convertAssociative); + $this->convertOne = $this->createConvert($convertValue); + + $this->convertAllNumeric = $this->createConvertAll($convertNumeric); + $this->convertAllAssociative = $this->createConvertAll($convertAssociative); + $this->convertFirstColumn = $this->createConvertAll($convertValue); + + $this->convertColumnName = match ($case) { + null => static fn (string $name) => $name, + self::CASE_LOWER => strtolower(...), + self::CASE_UPPER => strtoupper(...), + }; + } + + /** + * @param array|false $row + * + * @return list|false + */ + public function convertNumeric(array|false $row): array|false + { + return ($this->convertNumeric)($row); + } + + /** + * @param array|false $row + * + * @return array|false + */ + public function convertAssociative(array|false $row): array|false + { + return ($this->convertAssociative)($row); + } + + public function convertOne(mixed $value): mixed + { + return ($this->convertOne)($value); + } + + /** + * @param list> $data + * + * @return list> + */ + public function convertAllNumeric(array $data): array + { + return ($this->convertAllNumeric)($data); + } + + /** + * @param list> $data + * + * @return list> + */ + public function convertAllAssociative(array $data): array + { + return ($this->convertAllAssociative)($data); + } + + /** + * @param list $data + * + * @return list + */ + public function convertFirstColumn(array $data): array + { + return ($this->convertFirstColumn)($data); + } + + public function convertColumnName(string $name): string + { + return ($this->convertColumnName)($name); + } + + /** + * @param T $value + * + * @return T + * + * @template T + */ + private static function id(mixed $value): mixed + { + return $value; + } + + /** + * @param T $value + * + * @return T|null + * + * @template T + */ + private static function convertEmptyStringToNull(mixed $value): mixed + { + if ($value === '') { + return null; + } + + return $value; + } + + /** + * @param T $value + * + * @return T|string + * @phpstan-return (T is string ? string : T) + * + * @template T + */ + private static function rightTrimString(mixed $value): mixed + { + if (! is_string($value)) { + return $value; + } + + return rtrim($value); + } + + /** + * Creates a function that will convert each individual value retrieved from the database + * + * @param bool $convertEmptyStringToNull Whether each empty string should be converted to NULL + * @param bool $rightTrimString Whether each string should right-trimmed + * + * @return Closure|null The resulting function or NULL if no conversion is needed + */ + private function createConvertValue(bool $convertEmptyStringToNull, bool $rightTrimString): ?Closure + { + $functions = []; + + if ($convertEmptyStringToNull) { + $functions[] = self::convertEmptyStringToNull(...); + } + + if ($rightTrimString) { + $functions[] = self::rightTrimString(...); + } + + return $this->compose(...$functions); + } + + /** + * Creates a function that will convert each array-row retrieved from the database + * + * @param Closure|null $function The function that will convert each value + * @param self::CASE_LOWER|self::CASE_UPPER|null $case Column name case + * + * @return Closure|null The resulting function or NULL if no conversion is needed + */ + private function createConvertRow(?Closure $function, ?int $case): ?Closure + { + $functions = []; + + if ($function !== null) { + $functions[] = $this->createMapper($function); + } + + if ($case !== null) { + $functions[] = static fn (array $row): array => array_change_key_case($row, $case); + } + + return $this->compose(...$functions); + } + + /** + * Creates a function that will be applied to the return value of Statement::fetch*() + * or an identity function if no conversion is needed + * + * @param Closure|null $function The function that will convert each tow + */ + private function createConvert(?Closure $function): Closure + { + if ($function === null) { + return self::id(...); + } + + return /** + * @param T $value + * + * @phpstan-return (T is false ? false : T) + * + * @template T + */ + static function (mixed $value) use ($function): mixed { + if ($value === false) { + return false; + } + + return $function($value); + }; + } + + /** + * Creates a function that will be applied to the return value of Statement::fetchAll*() + * or an identity function if no transformation is required + * + * @param Closure|null $function The function that will transform each value + */ + private function createConvertAll(?Closure $function): Closure + { + if ($function === null) { + return self::id(...); + } + + return $this->createMapper($function); + } + + /** + * Creates a function that maps each value of the array using the given function + * + * @param Closure $function The function that maps each value of the array + * + * @return Closure(array):array + */ + private function createMapper(Closure $function): Closure + { + return static fn (array $array): array => array_map($function, $array); + } + + /** + * Creates a composition of the given set of functions + * + * @param Closure(T):T ...$functions The functions to compose + * + * @return Closure(T):T|null + * + * @template T + */ + private function compose(Closure ...$functions): ?Closure + { + return array_reduce($functions, static function (?Closure $carry, Closure $item): Closure { + if ($carry === null) { + return $item; + } + + return /** + * @param T $value + * + * @return T + * + * @template T + */ + static fn (mixed $value): mixed => $item($carry($value)); + }); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Portability/Driver.php b/backend/vendor/doctrine/dbal/src/Portability/Driver.php new file mode 100644 index 0000000..d2f7de6 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Portability/Driver.php @@ -0,0 +1,74 @@ +getDatabasePlatform($connection), + $this->mode, + ); + + $case = null; + + if ($this->case !== null && ($portability & Connection::PORTABILITY_FIX_CASE) !== 0) { + $nativeConnection = $connection->getNativeConnection(); + + $case = match ($this->case) { + ColumnCase::LOWER => CASE_LOWER, + ColumnCase::UPPER => CASE_UPPER, + }; + + if ($nativeConnection instanceof PDO) { + $portability &= ~Connection::PORTABILITY_FIX_CASE; + $nativeConnection->setAttribute(PDO::ATTR_CASE, $case); + } + } + + $convertEmptyStringToNull = ($portability & Connection::PORTABILITY_EMPTY_TO_NULL) !== 0; + $rightTrimString = ($portability & Connection::PORTABILITY_RTRIM) !== 0; + + if (! $convertEmptyStringToNull && ! $rightTrimString && $case === null) { + return $connection; + } + + return new Connection( + $connection, + new Converter($convertEmptyStringToNull, $rightTrimString, $case), + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Portability/Middleware.php b/backend/vendor/doctrine/dbal/src/Portability/Middleware.php new file mode 100644 index 0000000..b97897c --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Portability/Middleware.php @@ -0,0 +1,25 @@ +mode !== 0) { + return new Driver($driver, $this->mode, $this->case); + } + + return $driver; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Portability/OptimizeFlags.php b/backend/vendor/doctrine/dbal/src/Portability/OptimizeFlags.php new file mode 100644 index 0000000..c985d4b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Portability/OptimizeFlags.php @@ -0,0 +1,42 @@ + + */ + private static array $platforms = [ + DB2Platform::class => 0, + OraclePlatform::class => Connection::PORTABILITY_EMPTY_TO_NULL, + PostgreSQLPlatform::class => 0, + SQLitePlatform::class => 0, + SQLServerPlatform::class => 0, + ]; + + public function __invoke(AbstractPlatform $platform, int $flags): int + { + foreach (self::$platforms as $class => $mask) { + if ($platform instanceof $class) { + $flags &= ~$mask; + + break; + } + } + + return $flags; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Portability/Result.php b/backend/vendor/doctrine/dbal/src/Portability/Result.php new file mode 100644 index 0000000..bb1208f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Portability/Result.php @@ -0,0 +1,75 @@ +converter->convertNumeric( + parent::fetchNumeric(), + ); + } + + public function fetchAssociative(): array|false + { + return $this->converter->convertAssociative( + parent::fetchAssociative(), + ); + } + + public function fetchOne(): mixed + { + return $this->converter->convertOne( + parent::fetchOne(), + ); + } + + /** + * {@inheritDoc} + */ + public function fetchAllNumeric(): array + { + return $this->converter->convertAllNumeric( + parent::fetchAllNumeric(), + ); + } + + /** + * {@inheritDoc} + */ + public function fetchAllAssociative(): array + { + return $this->converter->convertAllAssociative( + parent::fetchAllAssociative(), + ); + } + + /** + * {@inheritDoc} + */ + public function fetchFirstColumn(): array + { + return $this->converter->convertFirstColumn( + parent::fetchFirstColumn(), + ); + } + + public function getColumnName(int $index): string + { + return $this->converter->convertColumnName( + parent::getColumnName($index), + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Portability/Statement.php b/backend/vendor/doctrine/dbal/src/Portability/Statement.php new file mode 100644 index 0000000..de0c76f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Portability/Statement.php @@ -0,0 +1,31 @@ +Statement and applies portability measures. + */ + public function __construct(DriverStatement $stmt, private readonly Converter $converter) + { + parent::__construct($stmt); + } + + public function execute(): ResultInterface + { + return new Result( + parent::execute(), + $this->converter, + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Query.php b/backend/vendor/doctrine/dbal/src/Query.php new file mode 100644 index 0000000..5ea162b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Query.php @@ -0,0 +1,41 @@ + $params + * @phpstan-param array $types + */ + public function __construct( + private readonly string $sql, + private readonly array $params, + private readonly array $types, + ) { + } + + public function getSQL(): string + { + return $this->sql; + } + + /** @return array */ + public function getParams(): array + { + return $this->params; + } + + /** @phpstan-return array */ + public function getTypes(): array + { + return $this->types; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Query/CommonTableExpression.php b/backend/vendor/doctrine/dbal/src/Query/CommonTableExpression.php new file mode 100644 index 0000000..0e37bd4 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Query/CommonTableExpression.php @@ -0,0 +1,27 @@ + + */ + private array $parts; + + /** @internal Use the and() / or() factory methods. */ + public function __construct( + private readonly string $type, + self|string $part, + self|string ...$parts, + ) { + $this->parts = array_merge([$part], array_values($parts)); + } + + public static function and(self|string $part, self|string ...$parts): self + { + return new self(self::TYPE_AND, $part, ...$parts); + } + + public static function or(self|string $part, self|string ...$parts): self + { + return new self(self::TYPE_OR, $part, ...$parts); + } + + /** + * Returns a new CompositeExpression with the given parts added. + */ + public function with(self|string $part, self|string ...$parts): self + { + $that = clone $this; + + $that->parts = array_merge($that->parts, [$part], array_values($parts)); + + return $that; + } + + /** + * Retrieves the amount of expressions on composite expression. + * + * @phpstan-return int<0, max> + */ + public function count(): int + { + return count($this->parts); + } + + /** + * Retrieves the string representation of this composite expression. + */ + public function __toString(): string + { + if ($this->count() === 1) { + return (string) $this->parts[0]; + } + + return '(' . implode(') ' . $this->type . ' (', $this->parts) . ')'; + } + + /** + * Returns the type of this composite expression (AND/OR). + */ + public function getType(): string + { + return $this->type; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Query/Expression/ExpressionBuilder.php b/backend/vendor/doctrine/dbal/src/Query/Expression/ExpressionBuilder.php new file mode 100644 index 0000000..55e1496 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Query/Expression/ExpressionBuilder.php @@ -0,0 +1,247 @@ +'; + final public const LT = '<'; + final public const LTE = '<='; + final public const GT = '>'; + final public const GTE = '>='; + + /** + * Initializes a new ExpressionBuilder. + * + * @param Connection $connection The DBAL Connection. + */ + public function __construct(private readonly Connection $connection) + { + } + + /** + * Creates a conjunction of the given expressions. + */ + public function and( + string|CompositeExpression $expression, + string|CompositeExpression ...$expressions, + ): CompositeExpression { + return CompositeExpression::and($expression, ...$expressions); + } + + /** + * Creates a disjunction of the given expressions. + */ + public function or( + string|CompositeExpression $expression, + string|CompositeExpression ...$expressions, + ): CompositeExpression { + return CompositeExpression::or($expression, ...$expressions); + } + + /** + * Creates a comparison expression. + * + * @param string $x The left expression. + * @param string $operator The comparison operator. + * @param string $y The right expression. + */ + public function comparison(string $x, string $operator, string $y): string + { + return $x . ' ' . $operator . ' ' . $y; + } + + /** + * Creates an equality comparison expression with the given arguments. + * + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a = . Example: + * + * [php] + * // u.id = ? + * $expr->eq('u.id', '?'); + * + * @param string $x The left expression. + * @param string $y The right expression. + */ + public function eq(string $x, string $y): string + { + return $this->comparison($x, self::EQ, $y); + } + + /** + * Creates a non equality comparison expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a <> . Example: + * + * [php] + * // u.id <> 1 + * $q->where($q->expr()->neq('u.id', '1')); + * + * @param string $x The left expression. + * @param string $y The right expression. + */ + public function neq(string $x, string $y): string + { + return $this->comparison($x, self::NEQ, $y); + } + + /** + * Creates a lower-than comparison expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a < . Example: + * + * [php] + * // u.id < ? + * $q->where($q->expr()->lt('u.id', '?')); + * + * @param string $x The left expression. + * @param string $y The right expression. + */ + public function lt(string $x, string $y): string + { + return $this->comparison($x, self::LT, $y); + } + + /** + * Creates a lower-than-equal comparison expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a <= . Example: + * + * [php] + * // u.id <= ? + * $q->where($q->expr()->lte('u.id', '?')); + * + * @param string $x The left expression. + * @param string $y The right expression. + */ + public function lte(string $x, string $y): string + { + return $this->comparison($x, self::LTE, $y); + } + + /** + * Creates a greater-than comparison expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a > . Example: + * + * [php] + * // u.id > ? + * $q->where($q->expr()->gt('u.id', '?')); + * + * @param string $x The left expression. + * @param string $y The right expression. + */ + public function gt(string $x, string $y): string + { + return $this->comparison($x, self::GT, $y); + } + + /** + * Creates a greater-than-equal comparison expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a >= . Example: + * + * [php] + * // u.id >= ? + * $q->where($q->expr()->gte('u.id', '?')); + * + * @param string $x The left expression. + * @param string $y The right expression. + */ + public function gte(string $x, string $y): string + { + return $this->comparison($x, self::GTE, $y); + } + + /** + * Creates an IS NULL expression with the given arguments. + * + * @param string $x The expression to be restricted by IS NULL. + */ + public function isNull(string $x): string + { + return $x . ' IS NULL'; + } + + /** + * Creates an IS NOT NULL expression with the given arguments. + * + * @param string $x The expression to be restricted by IS NOT NULL. + */ + public function isNotNull(string $x): string + { + return $x . ' IS NOT NULL'; + } + + /** + * Creates a LIKE comparison expression. + * + * @param string $expression The expression to be inspected by the LIKE comparison + * @param string $pattern The pattern to compare against + */ + public function like(string $expression, string $pattern, ?string $escapeChar = null): string + { + return $this->comparison($expression, 'LIKE', $pattern) . + ($escapeChar !== null ? sprintf(' ESCAPE %s', $escapeChar) : ''); + } + + /** + * Creates a NOT LIKE comparison expression + * + * @param string $expression The expression to be inspected by the NOT LIKE comparison + * @param string $pattern The pattern to compare against + */ + public function notLike(string $expression, string $pattern, ?string $escapeChar = null): string + { + return $this->comparison($expression, 'NOT LIKE', $pattern) . + ($escapeChar !== null ? sprintf(' ESCAPE %s', $escapeChar) : ''); + } + + /** + * Creates an IN () comparison expression with the given arguments. + * + * @param string $x The SQL expression to be matched against the set. + * @param string|string[] $y The SQL expression or an array of SQL expressions representing the set. + */ + public function in(string $x, string|array $y): string + { + return $this->comparison($x, 'IN', '(' . implode(', ', (array) $y) . ')'); + } + + /** + * Creates a NOT IN () comparison expression with the given arguments. + * + * @param string $x The SQL expression to be matched against the set. + * @param string|string[] $y The SQL expression or an array of SQL expressions representing the set. + */ + public function notIn(string $x, string|array $y): string + { + return $this->comparison($x, 'NOT IN', '(' . implode(', ', (array) $y) . ')'); + } + + /** + * Creates an SQL literal expression from the string. + * + * The usage of this method is discouraged. Use prepared statements + * or {@see AbstractPlatform::quoteStringLiteral()} instead. + * + * @throws Exception + */ + public function literal(string $input): string + { + return $this->connection->quote($input); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Query/ForUpdate.php b/backend/vendor/doctrine/dbal/src/Query/ForUpdate.php new file mode 100644 index 0000000..62c169d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Query/ForUpdate.php @@ -0,0 +1,21 @@ +conflictResolutionMode; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Query/ForUpdate/ConflictResolutionMode.php b/backend/vendor/doctrine/dbal/src/Query/ForUpdate/ConflictResolutionMode.php new file mode 100644 index 0000000..f45f774 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Query/ForUpdate/ConflictResolutionMode.php @@ -0,0 +1,18 @@ +maxResults !== null || $this->firstResult !== 0; + } + + public function getMaxResults(): ?int + { + return $this->maxResults; + } + + public function getFirstResult(): int + { + return $this->firstResult; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Query/QueryBuilder.php b/backend/vendor/doctrine/dbal/src/Query/QueryBuilder.php new file mode 100644 index 0000000..a800c2f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Query/QueryBuilder.php @@ -0,0 +1,1638 @@ +|array + */ + private array $params = []; + + /** + * The parameter type map of this query. + * + * @phpstan-var WrapperParameterTypeArray + */ + private array $types = []; + + /** + * The type of query this is. Can be select, update or delete. + */ + private QueryType $type = QueryType::SELECT; + + /** + * The index of the first result to retrieve. + */ + private int $firstResult = 0; + + /** + * The maximum number of results to retrieve or NULL to retrieve all results. + */ + private ?int $maxResults = null; + + /** + * The counter of bound parameters used with {@see bindValue). + * + * @var int<0, max> + */ + private int $boundCounter = 0; + + /** + * The SELECT parts of the query. + * + * @var string[] + */ + private array $select = []; + + /** + * Whether this is a SELECT DISTINCT query. + */ + private bool $distinct = false; + + /** + * The FROM parts of a SELECT query. + * + * @var From[] + */ + private array $from = []; + + /** + * The table name for an INSERT, UPDATE or DELETE query. + */ + private ?string $table = null; + + /** + * The list of joins, indexed by from alias. + * + * @var array + */ + private array $join = []; + + /** + * The SET parts of an UPDATE query. + * + * @var string[] + */ + private array $set = []; + + /** + * The WHERE part of a SELECT, UPDATE or DELETE query. + */ + private string|CompositeExpression|null $where = null; + + /** + * The GROUP BY part of a SELECT query. + * + * @var string[] + */ + private array $groupBy = []; + + /** + * The HAVING part of a SELECT query. + */ + private string|CompositeExpression|null $having = null; + + /** + * The ORDER BY parts of a SELECT query. + * + * @var string[] + */ + private array $orderBy = []; + + private ?ForUpdate $forUpdate = null; + + /** + * The values of an INSERT query. + * + * @var array + */ + private array $values = []; + + /** + * The QueryBuilder for the union parts. + * + * @var Union[] + */ + private array $unionParts = []; + + /** + * The common table expression parts. + * + * @var CommonTableExpression[] + */ + private array $commonTableExpressions = []; + + /** + * The query cache profile used for caching results. + */ + private ?QueryCacheProfile $resultCacheProfile = null; + + /** + * Initializes a new QueryBuilder. + * + * @param Connection $connection The DBAL Connection. + */ + public function __construct(private readonly Connection $connection) + { + } + + /** + * Gets an ExpressionBuilder used for object-oriented construction of query expressions. + * This producer method is intended for convenient inline usage. Example: + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u') + * ->from('users', 'u') + * ->where($qb->expr()->eq('u.id', 1)); + * + * + * For more complex expression construction, consider storing the expression + * builder object in a local variable. + */ + public function expr(): ExpressionBuilder + { + return $this->connection->createExpressionBuilder(); + } + + /** + * Returns a fresh query builder instance that can be used to build a subquery. + */ + public function sub(): self + { + return $this->connection->createQueryBuilder(); + } + + /** + * Prepares and executes an SQL query and returns the first row of the result + * as an associative array. + * + * @return array|false False is returned if no rows are found. + * + * @throws Exception + */ + public function fetchAssociative(): array|false + { + return $this->executeQuery()->fetchAssociative(); + } + + /** + * Prepares and executes an SQL query and returns the first row of the result + * as a numerically indexed array. + * + * @return array|false False is returned if no rows are found. + * + * @throws Exception + */ + public function fetchNumeric(): array|false + { + return $this->executeQuery()->fetchNumeric(); + } + + /** + * Prepares and executes an SQL query and returns the value of a single column + * of the first row of the result. + * + * @return mixed|false False is returned if no rows are found. + * + * @throws Exception + */ + public function fetchOne(): mixed + { + return $this->executeQuery()->fetchOne(); + } + + /** + * Prepares and executes an SQL query and returns the result as an array of numeric arrays. + * + * @return array> + * + * @throws Exception + */ + public function fetchAllNumeric(): array + { + return $this->executeQuery()->fetchAllNumeric(); + } + + /** + * Prepares and executes an SQL query and returns the result as an array of associative arrays. + * + * @return array> + * + * @throws Exception + */ + public function fetchAllAssociative(): array + { + return $this->executeQuery()->fetchAllAssociative(); + } + + /** + * Prepares and executes an SQL query and returns the result as an associative array with the keys + * mapped to the first column and the values mapped to the second column. + * + * @return array + * + * @throws Exception + */ + public function fetchAllKeyValue(): array + { + return $this->executeQuery()->fetchAllKeyValue(); + } + + /** + * Prepares and executes an SQL query and returns the result as an associative array with the keys mapped + * to the first column and the values being an associative array representing the rest of the columns + * and their values. + * + * @return array> + * + * @throws Exception + */ + public function fetchAllAssociativeIndexed(): array + { + return $this->executeQuery()->fetchAllAssociativeIndexed(); + } + + /** + * Prepares and executes an SQL query and returns the result as an array of the first column values. + * + * @return array + * + * @throws Exception + */ + public function fetchFirstColumn(): array + { + return $this->executeQuery()->fetchFirstColumn(); + } + + /** + * Executes an SQL query (SELECT) and returns a Result. + * + * @throws Exception + */ + public function executeQuery(): Result + { + return $this->connection->executeQuery( + $this->getSQL(), + $this->params, + $this->types, + $this->resultCacheProfile, + ); + } + + /** + * Executes an SQL statement and returns the number of affected rows. + * + * Should be used for INSERT, UPDATE and DELETE + * + * @return int|numeric-string The number of affected rows. + * + * @throws Exception + */ + public function executeStatement(): int|string + { + return $this->connection->executeStatement($this->getSQL(), $this->params, $this->types); + } + + /** + * Gets the complete SQL string formed by the current specifications of this QueryBuilder. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * echo $qb->getSQL(); // SELECT u FROM User u + * + * + * @return string The SQL query string. + * + * @throws Exception + */ + public function getSQL(): string + { + return $this->sql ??= match ($this->type) { + QueryType::INSERT => $this->getSQLForInsert(), + QueryType::DELETE => $this->getSQLForDelete(), + QueryType::UPDATE => $this->getSQLForUpdate(), + QueryType::SELECT => $this->getSQLForSelect(), + QueryType::UNION => $this->getSQLForUnion(), + }; + } + + /** + * Sets a query parameter for the query being constructed. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u') + * ->from('users', 'u') + * ->where('u.id = :user_id') + * ->setParameter('user_id', 1); + * + * + * @param int<0, max>|string $key Parameter position or name + * + * @return $this This QueryBuilder instance. + */ + public function setParameter( + int|string $key, + mixed $value, + string|ParameterType|Type|ArrayParameterType $type = ParameterType::STRING, + ): self { + $this->params[$key] = $value; + $this->types[$key] = $type; + + return $this; + } + + /** + * Sets a collection of query parameters for the query being constructed. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u') + * ->from('users', 'u') + * ->where('u.id = :user_id1 OR u.id = :user_id2') + * ->setParameters(array( + * 'user_id1' => 1, + * 'user_id2' => 2 + * )); + * + * + * @param list|array $params + * @phpstan-param WrapperParameterTypeArray $types + * + * @return $this This QueryBuilder instance. + */ + public function setParameters(array $params, array $types = []): self + { + $this->params = $params; + $this->types = $types; + + return $this; + } + + /** + * Gets all defined query parameters for the query being constructed indexed by parameter index or name. + * + * @return list|array The currently defined query parameters + */ + public function getParameters(): array + { + return $this->params; + } + + /** + * Gets a (previously set) query parameter of the query being constructed. + * + * @param string|int $key The key (index or name) of the bound parameter. + * + * @return mixed The value of the bound parameter. + */ + public function getParameter(string|int $key): mixed + { + return $this->params[$key] ?? null; + } + + /** + * Gets all defined query parameter types for the query being constructed indexed by parameter index or name. + * + * @phpstan-return WrapperParameterTypeArray + */ + public function getParameterTypes(): array + { + return $this->types; + } + + /** + * Gets a (previously set) query parameter type of the query being constructed. + * + * @param int|string $key The key of the bound parameter type + */ + public function getParameterType(int|string $key): string|ParameterType|Type|ArrayParameterType + { + return $this->types[$key] ?? ParameterType::STRING; + } + + /** + * Sets the position of the first result to retrieve (the "offset"). + * + * @param int $firstResult The first result to return. + * + * @return $this This QueryBuilder instance. + */ + public function setFirstResult(int $firstResult): self + { + $this->firstResult = $firstResult; + + $this->sql = null; + + return $this; + } + + /** + * Gets the position of the first result the query object was set to retrieve (the "offset"). + * + * @return int The position of the first result. + */ + public function getFirstResult(): int + { + return $this->firstResult; + } + + /** + * Sets the maximum number of results to retrieve (the "limit"). + * + * @param int|null $maxResults The maximum number of results to retrieve or NULL to retrieve all results. + * + * @return $this This QueryBuilder instance. + */ + public function setMaxResults(?int $maxResults): self + { + $this->maxResults = $maxResults; + + $this->sql = null; + + return $this; + } + + /** + * Gets the maximum number of results the query object was set to retrieve (the "limit"). + * Returns NULL if all results will be returned. + * + * @return int|null The maximum number of results. + */ + public function getMaxResults(): ?int + { + return $this->maxResults; + } + + /** + * Locks the queried rows for a subsequent update. + * + * @return $this + */ + public function forUpdate(ConflictResolutionMode $conflictResolutionMode = ConflictResolutionMode::ORDINARY): self + { + $this->forUpdate = new ForUpdate($conflictResolutionMode); + + $this->sql = null; + + return $this; + } + + /** + * Specifies union parts to be used to build a UNION query. + * Replaces any previously specified parts. + * + * + * $qb = $conn->createQueryBuilder() + * ->union('SELECT 1 AS field1') + * ->addUnion('SELECT 2 AS field1') + * ->addUnion('SELECT 3 AS field1'); + * + * + * @return $this + */ + public function union(string|QueryBuilder $part): self + { + $this->type = QueryType::UNION; + + $this->unionParts = [new Union($part)]; + + $this->sql = null; + + return $this; + } + + /** + * Add parts to be used to build a UNION query. + * + * + * $qb = $conn->createQueryBuilder() + * ->union('SELECT 1 AS field1') + * ->addUnion('SELECT 2 AS field1') + * ->addUnion('SELECT 3 AS field1'); + * + * + * @return $this + * + * @throws QueryException + */ + public function addUnion(string|QueryBuilder $part, UnionType $type = UnionType::DISTINCT): self + { + $this->type = QueryType::UNION; + + if (count($this->unionParts) === 0) { + throw new QueryException('No initial UNION part set, use union() to set one first.'); + } + + $this->unionParts[] = new Union($part, $type); + + $this->sql = null; + + return $this; + } + + /** + * Add a Common Table Expression to be used for a select query. + * + * + * // WITH cte_name AS (SELECT id AS column1 FROM table_a) + * $qb = $conn->createQueryBuilder() + * ->with('cte_name', 'SELECT id AS column1 FROM table_a'); + * + * // WITH cte_name(column1) AS (SELECT id AS column1 FROM table_a) + * $qb = $conn->createQueryBuilder() + * ->with('cte_name', 'SELECT id AS column1 FROM table_a', ['column1']); + * + * + * @param string $name The name of the CTE + * @param string[]|null $columns The optional columns list to select in the CTE. + * If not provided, the columns are inferred from the CTE. + * + * @return $this This QueryBuilder instance. + * + * @throws QueryException Setting an empty array as columns is not allowed. + */ + public function with(string $name, string|QueryBuilder $part, ?array $columns = null): self + { + $this->commonTableExpressions[] = new CommonTableExpression($name, $part, $columns); + + $this->sql = null; + + return $this; + } + + /** + * Specifies an item that is to be returned in the query result. + * Replaces any previously specified selections, if any. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.id', 'p.id') + * ->from('users', 'u') + * ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id'); + * + * + * @param string ...$expressions The selection expressions. + * + * @return $this This QueryBuilder instance. + */ + public function select(string ...$expressions): self + { + $this->type = QueryType::SELECT; + + $this->select = $expressions; + + $this->sql = null; + + return $this; + } + + /** + * Adds or removes DISTINCT to/from the query. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.id') + * ->distinct() + * ->from('users', 'u') + * + * + * @return $this This QueryBuilder instance. + */ + public function distinct(bool $distinct = true): self + { + $this->distinct = $distinct; + $this->sql = null; + + return $this; + } + + /** + * Adds an item that is to be returned in the query result. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.id') + * ->addSelect('p.id') + * ->from('users', 'u') + * ->leftJoin('u', 'phonenumbers', 'u.id = p.user_id'); + * + * + * @param string $expression The selection expression. + * @param string ...$expressions Additional selection expressions. + * + * @return $this This QueryBuilder instance. + */ + public function addSelect(string $expression, string ...$expressions): self + { + $this->type = QueryType::SELECT; + + $this->select = array_merge($this->select, [$expression], $expressions); + + $this->sql = null; + + return $this; + } + + /** + * Turns the query being built into a bulk delete query that ranges over + * a certain table. + * + * + * $qb = $conn->createQueryBuilder() + * ->delete('users u') + * ->where('u.id = :user_id') + * ->setParameter(':user_id', 1); + * + * + * @param string $table The table whose rows are subject to the deletion. + * + * @return $this This QueryBuilder instance. + */ + public function delete(string $table): self + { + $this->type = QueryType::DELETE; + + $this->table = $table; + + $this->sql = null; + + return $this; + } + + /** + * Turns the query being built into a bulk update query that ranges over + * a certain table + * + * + * $qb = $conn->createQueryBuilder() + * ->update('counters c') + * ->set('c.value', 'c.value + 1') + * ->where('c.id = ?'); + * + * + * @param string $table The table whose rows are subject to the update. + * + * @return $this This QueryBuilder instance. + */ + public function update(string $table): self + { + $this->type = QueryType::UPDATE; + + $this->table = $table; + + $this->sql = null; + + return $this; + } + + /** + * Turns the query being built into an insert query that inserts into + * a certain table + * + * + * $qb = $conn->createQueryBuilder() + * ->insert('users') + * ->values( + * array( + * 'name' => '?', + * 'password' => '?' + * ) + * ); + * + * + * @param string $table The table into which the rows should be inserted. + * + * @return $this This QueryBuilder instance. + */ + public function insert(string $table): self + { + $this->type = QueryType::INSERT; + + $this->table = $table; + + $this->sql = null; + + return $this; + } + + /** + * Creates and adds a query root corresponding to the table identified by the + * given alias, forming a cartesian product with any existing query roots. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.id') + * ->from('users', 'u') + * + * + * @param string $table The table. + * @param string|null $alias The alias of the table. + * + * @return $this This QueryBuilder instance. + */ + public function from(string $table, ?string $alias = null): self + { + $this->from[] = new From($table, $alias); + + $this->sql = null; + + return $this; + } + + /** + * Creates and adds a join to the query. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->join('u', 'phonenumbers', 'p', 'p.is_primary = 1'); + * + * + * @param string $fromAlias The alias that points to a from clause. + * @param string $join The table name to join. + * @param string $alias The alias of the join table. + * @param string $condition The condition for the join. + * + * @return $this This QueryBuilder instance. + */ + public function join(string $fromAlias, string $join, string $alias, ?string $condition = null): self + { + return $this->innerJoin($fromAlias, $join, $alias, $condition); + } + + /** + * Creates and adds a join to the query. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->innerJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); + * + * + * @param string $fromAlias The alias that points to a from clause. + * @param string $join The table name to join. + * @param string $alias The alias of the join table. + * @param string $condition The condition for the join. + * + * @return $this This QueryBuilder instance. + */ + public function innerJoin(string $fromAlias, string $join, string $alias, ?string $condition = null): self + { + $this->join[$fromAlias][] = Join::inner($join, $alias, $condition); + + $this->sql = null; + + return $this; + } + + /** + * Creates and adds a left join to the query. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->leftJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); + * + * + * @param string $fromAlias The alias that points to a from clause. + * @param string $join The table name to join. + * @param string $alias The alias of the join table. + * @param string $condition The condition for the join. + * + * @return $this This QueryBuilder instance. + */ + public function leftJoin(string $fromAlias, string $join, string $alias, ?string $condition = null): self + { + $this->join[$fromAlias][] = Join::left($join, $alias, $condition); + + $this->sql = null; + + return $this; + } + + /** + * Creates and adds a right join to the query. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->rightJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); + * + * + * @param string $fromAlias The alias that points to a from clause. + * @param string $join The table name to join. + * @param string $alias The alias of the join table. + * @param string $condition The condition for the join. + * + * @return $this This QueryBuilder instance. + */ + public function rightJoin(string $fromAlias, string $join, string $alias, ?string $condition = null): self + { + $this->join[$fromAlias][] = Join::right($join, $alias, $condition); + + $this->sql = null; + + return $this; + } + + /** + * Sets a new value for a column in a bulk update query. + * + * + * $qb = $conn->createQueryBuilder() + * ->update('counters c') + * ->set('c.value', 'c.value + 1') + * ->where('c.id = ?'); + * + * + * @param string $key The column to set. + * @param string $value The value, expression, placeholder, etc. + * + * @return $this This QueryBuilder instance. + */ + public function set(string $key, string $value): self + { + $this->set[] = $key . ' = ' . $value; + + $this->sql = null; + + return $this; + } + + /** + * Specifies one or more restrictions to the query result. + * Replaces any previously specified restrictions, if any. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('c.value') + * ->from('counters', 'c') + * ->where('c.id = ?'); + * + * // You can optionally programmatically build and/or expressions + * $qb = $conn->createQueryBuilder(); + * + * $or = $qb->expr()->orx(); + * $or->add($qb->expr()->eq('c.id', 1)); + * $or->add($qb->expr()->eq('c.id', 2)); + * + * $qb->update('counters c') + * ->set('c.value', 'c.value + 1') + * ->where($or); + * + * + * @param string|CompositeExpression $predicate The WHERE clause predicate. + * @param string|CompositeExpression ...$predicates Additional WHERE clause predicates. + * + * @return $this This QueryBuilder instance. + */ + public function where(string|CompositeExpression $predicate, string|CompositeExpression ...$predicates): self + { + $this->where = $this->createPredicate($predicate, ...$predicates); + + $this->sql = null; + + return $this; + } + + /** + * Adds one or more restrictions to the query results, forming a logical + * conjunction with any previously specified restrictions. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u') + * ->from('users', 'u') + * ->where('u.username LIKE ?') + * ->andWhere('u.is_active = 1'); + * + * + * @see where() + * + * @param string|CompositeExpression $predicate The predicate to append. + * @param string|CompositeExpression ...$predicates Additional predicates to append. + * + * @return $this This QueryBuilder instance. + */ + public function andWhere(string|CompositeExpression $predicate, string|CompositeExpression ...$predicates): self + { + $this->where = $this->appendToPredicate( + $this->where, + CompositeExpression::TYPE_AND, + $predicate, + ...$predicates, + ); + + $this->sql = null; + + return $this; + } + + /** + * Adds one or more restrictions to the query results, forming a logical + * disjunction with any previously specified restrictions. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->where('u.id = 1') + * ->orWhere('u.id = 2'); + * + * + * @see where() + * + * @param string|CompositeExpression $predicate The predicate to append. + * @param string|CompositeExpression ...$predicates Additional predicates to append. + * + * @return $this This QueryBuilder instance. + */ + public function orWhere(string|CompositeExpression $predicate, string|CompositeExpression ...$predicates): self + { + $this->where = $this->appendToPredicate($this->where, CompositeExpression::TYPE_OR, $predicate, ...$predicates); + + $this->sql = null; + + return $this; + } + + /** + * Specifies one or more grouping expressions over the results of the query. + * Replaces any previously specified groupings, if any. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->groupBy('u.id'); + * + * + * @param string $expression The grouping expression + * @param string ...$expressions Additional grouping expressions + * + * @return $this This QueryBuilder instance. + */ + public function groupBy(string $expression, string ...$expressions): self + { + $this->groupBy = array_merge([$expression], $expressions); + + $this->sql = null; + + return $this; + } + + /** + * Adds one or more grouping expressions to the query. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->groupBy('u.lastLogin') + * ->addGroupBy('u.createdAt'); + * + * + * @param string $expression The grouping expression + * @param string ...$expressions Additional grouping expressions + * + * @return $this This QueryBuilder instance. + */ + public function addGroupBy(string $expression, string ...$expressions): self + { + $this->groupBy = array_merge($this->groupBy, [$expression], $expressions); + + $this->sql = null; + + return $this; + } + + /** + * Sets a value for a column in an insert query. + * + * + * $qb = $conn->createQueryBuilder() + * ->insert('users') + * ->values( + * array( + * 'name' => '?' + * ) + * ) + * ->setValue('password', '?'); + * + * + * @param string $column The column into which the value should be inserted. + * @param string $value The value that should be inserted into the column. + * + * @return $this This QueryBuilder instance. + */ + public function setValue(string $column, string $value): self + { + $this->values[$column] = $value; + + return $this; + } + + /** + * Specifies values for an insert query indexed by column names. + * Replaces any previous values, if any. + * + * + * $qb = $conn->createQueryBuilder() + * ->insert('users') + * ->values( + * array( + * 'name' => '?', + * 'password' => '?' + * ) + * ); + * + * + * @param array $values The values to specify for the insert query indexed by column names. + * + * @return $this This QueryBuilder instance. + */ + public function values(array $values): self + { + $this->values = $values; + + $this->sql = null; + + return $this; + } + + /** + * Specifies a restriction over the groups of the query. + * Replaces any previous having restrictions, if any. + * + * @param string|CompositeExpression $predicate The HAVING clause predicate. + * @param string|CompositeExpression ...$predicates Additional HAVING clause predicates. + * + * @return $this This QueryBuilder instance. + */ + public function having(string|CompositeExpression $predicate, string|CompositeExpression ...$predicates): self + { + $this->having = $this->createPredicate($predicate, ...$predicates); + + $this->sql = null; + + return $this; + } + + /** + * Adds a restriction over the groups of the query, forming a logical + * conjunction with any existing having restrictions. + * + * @param string|CompositeExpression $predicate The predicate to append. + * @param string|CompositeExpression ...$predicates Additional predicates to append. + * + * @return $this This QueryBuilder instance. + */ + public function andHaving(string|CompositeExpression $predicate, string|CompositeExpression ...$predicates): self + { + $this->having = $this->appendToPredicate( + $this->having, + CompositeExpression::TYPE_AND, + $predicate, + ...$predicates, + ); + + $this->sql = null; + + return $this; + } + + /** + * Adds a restriction over the groups of the query, forming a logical + * disjunction with any existing having restrictions. + * + * @param string|CompositeExpression $predicate The predicate to append. + * @param string|CompositeExpression ...$predicates Additional predicates to append. + * + * @return $this This QueryBuilder instance. + */ + public function orHaving(string|CompositeExpression $predicate, string|CompositeExpression ...$predicates): self + { + $this->having = $this->appendToPredicate( + $this->having, + CompositeExpression::TYPE_OR, + $predicate, + ...$predicates, + ); + + $this->sql = null; + + return $this; + } + + /** + * Creates a CompositeExpression from one or more predicates combined by the AND logic. + */ + private function createPredicate( + string|CompositeExpression $predicate, + string|CompositeExpression ...$predicates, + ): string|CompositeExpression { + if (count($predicates) === 0) { + return $predicate; + } + + return new CompositeExpression(CompositeExpression::TYPE_AND, $predicate, ...$predicates); + } + + /** + * Appends the given predicates combined by the given type of logic to the current predicate. + */ + private function appendToPredicate( + string|CompositeExpression|null $currentPredicate, + string $type, + string|CompositeExpression ...$predicates, + ): string|CompositeExpression { + if ($currentPredicate instanceof CompositeExpression && $currentPredicate->getType() === $type) { + return $currentPredicate->with(...$predicates); + } + + if ($currentPredicate !== null) { + array_unshift($predicates, $currentPredicate); + } elseif (count($predicates) === 1) { + return $predicates[0]; + } + + return new CompositeExpression($type, ...$predicates); + } + + /** + * Specifies an ordering for the query results. + * Replaces any previously specified orderings, if any. + * + * @param string $sort The ordering expression. + * @param string $order The ordering direction. + * + * @return $this This QueryBuilder instance. + */ + public function orderBy(string $sort, ?string $order = null): self + { + $orderBy = $sort; + + if ($order !== null) { + $orderBy .= ' ' . $order; + } + + $this->orderBy = [$orderBy]; + + $this->sql = null; + + return $this; + } + + /** + * Adds an ordering to the query results. + * + * @param string $sort The ordering expression. + * @param string $order The ordering direction. + * + * @return $this This QueryBuilder instance. + */ + public function addOrderBy(string $sort, ?string $order = null): self + { + $orderBy = $sort; + + if ($order !== null) { + $orderBy .= ' ' . $order; + } + + $this->orderBy[] = $orderBy; + + $this->sql = null; + + return $this; + } + + /** + * Resets the WHERE conditions for the query. + * + * @return $this This QueryBuilder instance. + */ + public function resetWhere(): self + { + $this->where = null; + $this->sql = null; + + return $this; + } + + /** + * Resets the grouping for the query. + * + * @return $this This QueryBuilder instance. + */ + public function resetGroupBy(): self + { + $this->groupBy = []; + $this->sql = null; + + return $this; + } + + /** + * Resets the HAVING conditions for the query. + * + * @return $this This QueryBuilder instance. + */ + public function resetHaving(): self + { + $this->having = null; + $this->sql = null; + + return $this; + } + + /** + * Resets the ordering for the query. + * + * @return $this This QueryBuilder instance. + */ + public function resetOrderBy(): self + { + $this->orderBy = []; + $this->sql = null; + + return $this; + } + + /** @throws Exception */ + private function getSQLForSelect(): string + { + if (count($this->select) === 0) { + throw new QueryException('No SELECT expressions given. Please use select() or addSelect().'); + } + + $databasePlatform = $this->connection->getDatabasePlatform(); + $selectParts = []; + if (count($this->commonTableExpressions) > 0) { + $selectParts[] = $databasePlatform + ->createWithSQLBuilder() + ->buildSQL(...$this->commonTableExpressions); + } + + $selectParts[] = $databasePlatform + ->createSelectSQLBuilder() + ->buildSQL( + new SelectQuery( + $this->distinct, + $this->select, + $this->getFromClauses(), + $this->where !== null ? (string) $this->where : null, + $this->groupBy, + $this->having !== null ? (string) $this->having : null, + $this->orderBy, + new Limit($this->maxResults, $this->firstResult), + $this->forUpdate, + ), + ); + + return implode(' ', $selectParts); + } + + /** + * @return array + * + * @throws QueryException + */ + private function getFromClauses(): array + { + $fromClauses = []; + $knownAliases = []; + + foreach ($this->from as $from) { + if ($from->alias === null || $from->alias === $from->table) { + $tableSql = $from->table; + $tableReference = $from->table; + } else { + $tableSql = $from->table . ' ' . $from->alias; + $tableReference = $from->alias; + } + + $knownAliases[$tableReference] = true; + + $fromClauses[$tableReference] = $tableSql . $this->getSQLForJoins($tableReference, $knownAliases); + } + + $this->verifyAllAliasesAreKnown($knownAliases); + + return $fromClauses; + } + + /** + * @param array $knownAliases + * + * @throws QueryException + */ + private function verifyAllAliasesAreKnown(array $knownAliases): void + { + foreach ($this->join as $fromAlias => $joins) { + if (! isset($knownAliases[$fromAlias])) { + throw UnknownAlias::new($fromAlias, array_keys($knownAliases)); + } + } + } + + /** + * Converts this instance into an INSERT string in SQL. + */ + private function getSQLForInsert(): string + { + return 'INSERT INTO ' . $this->table . + ' (' . implode(', ', array_keys($this->values)) . ')' . + ' VALUES(' . implode(', ', $this->values) . ')'; + } + + /** + * Converts this instance into an UPDATE string in SQL. + */ + private function getSQLForUpdate(): string + { + $query = 'UPDATE ' . $this->table + . ' SET ' . implode(', ', $this->set); + + if ($this->where !== null) { + $query .= ' WHERE ' . $this->where; + } + + return $query; + } + + /** + * Converts this instance into a DELETE string in SQL. + */ + private function getSQLForDelete(): string + { + $query = 'DELETE FROM ' . $this->table; + + if ($this->where !== null) { + $query .= ' WHERE ' . $this->where; + } + + return $query; + } + + /** + * Converts this instance into a UNION string in SQL. + * + * @throws Exception + */ + private function getSQLForUnion(): string + { + $countUnions = count($this->unionParts); + if ($countUnions < 2) { + throw new QueryException( + 'Insufficient UNION parts give, need at least 2.' + . ' Please use union() and addUnion() to set enough UNION parts.', + ); + } + + $databasePlatform = $this->connection->getDatabasePlatform(); + $unionParts = []; + if (count($this->commonTableExpressions) > 0) { + $unionParts[] = $databasePlatform + ->createWithSQLBuilder() + ->buildSQL(...$this->commonTableExpressions); + } + + $unionParts[] = $databasePlatform + ->createUnionSQLBuilder() + ->buildSQL( + new UnionQuery( + $this->unionParts, + $this->orderBy, + new Limit($this->maxResults, $this->firstResult), + ), + ); + + return implode(' ', $unionParts); + } + + /** + * Gets a string representation of this QueryBuilder which corresponds to + * the final SQL query being constructed. + * + * @return string The string representation of this QueryBuilder. + * + * @throws Exception + */ + public function __toString(): string + { + return $this->getSQL(); + } + + /** + * Creates a new named parameter and bind the value $value to it. + * + * This method provides a shortcut for {@see Statement::bindValue()} + * when using prepared statements. + * + * The parameter $value specifies the value that you want to bind. If + * $placeholder is not provided createNamedParameter() will automatically + * create a placeholder for you. An automatic placeholder will be of the + * name ':dcValue1', ':dcValue2' etc. + * + * Example: + * + * $value = 2; + * $q->eq( 'id', $q->createNamedParameter( $value ) ); + * $stmt = $q->executeQuery(); // executed with 'id = 2' + * + * + * @link http://www.zetacomponents.org + * + * @param string|null $placeHolder The name to bind with. The string must start with a colon ':'. + * + * @return string the placeholder name used. + */ + public function createNamedParameter( + mixed $value, + string|ParameterType|Type|ArrayParameterType $type = ParameterType::STRING, + ?string $placeHolder = null, + ): string { + if ($placeHolder === null) { + $this->boundCounter++; + $placeHolder = ':dcValue' . $this->boundCounter; + } + + $this->setParameter(substr($placeHolder, 1), $value, $type); + + return $placeHolder; + } + + /** + * Creates a new positional parameter and bind the given value to it. + * + * Attention: If you are using positional parameters with the query builder you have + * to be very careful to bind all parameters in the order they appear in the SQL + * statement , otherwise they get bound in the wrong order which can lead to serious + * bugs in your code. + * + * Example: + * + * $qb = $conn->createQueryBuilder(); + * $qb->select('u.*') + * ->from('users', 'u') + * ->where('u.username = ' . $qb->createPositionalParameter('Foo', ParameterType::STRING)) + * ->orWhere('u.username = ' . $qb->createPositionalParameter('Bar', ParameterType::STRING)) + * + */ + public function createPositionalParameter( + mixed $value, + string|ParameterType|Type|ArrayParameterType $type = ParameterType::STRING, + ): string { + $this->setParameter($this->boundCounter, $value, $type); + $this->boundCounter++; + + return '?'; + } + + /** + * @param array $knownAliases + * + * @throws QueryException + */ + private function getSQLForJoins(string $fromAlias, array &$knownAliases): string + { + $sql = ''; + + if (! isset($this->join[$fromAlias])) { + return $sql; + } + + foreach ($this->join[$fromAlias] as $join) { + if (array_key_exists($join->alias, $knownAliases)) { + throw NonUniqueAlias::new($join->alias, array_keys($knownAliases)); + } + + $sql .= ' ' . $join->type . ' JOIN ' . $join->table . ' ' . $join->alias; + + if ($join->condition !== null) { + $sql .= ' ON ' . $join->condition; + } + + $knownAliases[$join->alias] = true; + } + + foreach ($this->join[$fromAlias] as $join) { + $sql .= $this->getSQLForJoins($join->alias, $knownAliases); + } + + return $sql; + } + + /** + * Deep clone of all expression objects in the SQL parts. + */ + public function __clone() + { + foreach ($this->from as $key => $from) { + $this->from[$key] = clone $from; + } + + foreach ($this->join as $fromAlias => $joins) { + foreach ($joins as $key => $join) { + $this->join[$fromAlias][$key] = clone $join; + } + } + + if (is_object($this->where)) { + $this->where = clone $this->where; + } + + if (is_object($this->having)) { + $this->having = clone $this->having; + } + + foreach ($this->params as $name => $param) { + if (! is_object($param)) { + continue; + } + + $this->params[$name] = clone $param; + } + } + + /** + * Enables caching of the results of this query, for given amount of seconds + * and optionally specified which key to use for the cache entry. + * + * @return $this + */ + public function enableResultCache(QueryCacheProfile $cacheProfile): self + { + $this->resultCacheProfile = $cacheProfile; + + return $this; + } + + /** + * Disables caching of the results of this query. + * + * @return $this + */ + public function disableResultCache(): self + { + $this->resultCacheProfile = null; + + return $this; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Query/QueryException.php b/backend/vendor/doctrine/dbal/src/Query/QueryException.php new file mode 100644 index 0000000..34b9527 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Query/QueryException.php @@ -0,0 +1,11 @@ +distinct; + } + + /** @return string[] */ + public function getColumns(): array + { + return $this->columns; + } + + /** @return string[] */ + public function getFrom(): array + { + return $this->from; + } + + public function getWhere(): ?string + { + return $this->where; + } + + /** @return string[] */ + public function getGroupBy(): array + { + return $this->groupBy; + } + + public function getHaving(): ?string + { + return $this->having; + } + + /** @return string[] */ + public function getOrderBy(): array + { + return $this->orderBy; + } + + public function getLimit(): Limit + { + return $this->limit; + } + + public function getForUpdate(): ?ForUpdate + { + return $this->forUpdate; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Query/Union.php b/backend/vendor/doctrine/dbal/src/Query/Union.php new file mode 100644 index 0000000..33a5a6d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Query/Union.php @@ -0,0 +1,15 @@ +unionParts; + } + + /** @return string[] */ + public function getOrderBy(): array + { + return $this->orderBy; + } + + public function getLimit(): Limit + { + return $this->limit; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Query/UnionType.php b/backend/vendor/doctrine/dbal/src/Query/UnionType.php new file mode 100644 index 0000000..e7c0df6 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Query/UnionType.php @@ -0,0 +1,11 @@ +|false + * + * @throws Exception + */ + public function fetchNumeric(): array|false + { + try { + return $this->result->fetchNumeric(); + } catch (DriverException $e) { + throw $this->connection->convertException($e); + } + } + + /** + * Returns the next row of the result as an associative array or FALSE if there are no more rows. + * + * @return array|false + * + * @throws Exception + */ + public function fetchAssociative(): array|false + { + try { + return $this->result->fetchAssociative(); + } catch (DriverException $e) { + throw $this->connection->convertException($e); + } + } + + /** + * Returns the first value of the next row of the result or FALSE if there are no more rows. + * + * @throws Exception + */ + public function fetchOne(): mixed + { + try { + return $this->result->fetchOne(); + } catch (DriverException $e) { + throw $this->connection->convertException($e); + } + } + + /** + * Returns an array containing all of the result rows represented as numeric arrays. + * + * @return list> + * + * @throws Exception + */ + public function fetchAllNumeric(): array + { + try { + return $this->result->fetchAllNumeric(); + } catch (DriverException $e) { + throw $this->connection->convertException($e); + } + } + + /** + * Returns an array containing all of the result rows represented as associative arrays. + * + * @return list> + * + * @throws Exception + */ + public function fetchAllAssociative(): array + { + try { + return $this->result->fetchAllAssociative(); + } catch (DriverException $e) { + throw $this->connection->convertException($e); + } + } + + /** + * Returns an array containing the values of the first column of the result. + * + * @return array + * + * @throws Exception + */ + public function fetchAllKeyValue(): array + { + $this->ensureHasKeyValue(); + + $data = []; + + foreach ($this->fetchAllNumeric() as $row) { + assert(count($row) >= 2); + [$key, $value] = $row; + $data[$key] = $value; + } + + return $data; + } + + /** + * Returns an associative array with the keys mapped to the first column and the values being + * an associative array representing the rest of the columns and their values. + * + * @return array> + * + * @throws Exception + */ + public function fetchAllAssociativeIndexed(): array + { + $data = []; + + foreach ($this->fetchAllAssociative() as $row) { + $data[array_shift($row)] = $row; + } + + return $data; + } + + /** + * @return list + * + * @throws Exception + */ + public function fetchFirstColumn(): array + { + try { + return $this->result->fetchFirstColumn(); + } catch (DriverException $e) { + throw $this->connection->convertException($e); + } + } + + /** + * @return Traversable> + * + * @throws Exception + */ + public function iterateNumeric(): Traversable + { + while (($row = $this->fetchNumeric()) !== false) { + yield $row; + } + } + + /** + * @return Traversable> + * + * @throws Exception + */ + public function iterateAssociative(): Traversable + { + while (($row = $this->fetchAssociative()) !== false) { + yield $row; + } + } + + /** + * @return Traversable + * + * @throws Exception + */ + public function iterateKeyValue(): Traversable + { + $this->ensureHasKeyValue(); + + foreach ($this->iterateNumeric() as $row) { + assert(count($row) >= 2); + [$key, $value] = $row; + + yield $key => $value; + } + } + + /** + * Returns an iterator over the result set with the keys mapped to the first column and the values being + * an associative array representing the rest of the columns and their values. + * + * @return Traversable> + * + * @throws Exception + */ + public function iterateAssociativeIndexed(): Traversable + { + foreach ($this->iterateAssociative() as $row) { + yield array_shift($row) => $row; + } + } + + /** + * @return Traversable + * + * @throws Exception + */ + public function iterateColumn(): Traversable + { + while (($value = $this->fetchOne()) !== false) { + yield $value; + } + } + + /** + * Returns the number of rows affected by the DELETE, INSERT, or UPDATE statement that produced the result. + * + * If the statement executed a SELECT query or a similar platform-specific SQL (e.g. DESCRIBE, SHOW, etc.), + * some database drivers may return the number of rows returned by that query. However, this behaviour + * is not guaranteed for all drivers and should not be relied on in portable applications. + * + * If the number of rows exceeds {@see PHP_INT_MAX}, it might be returned as string if the driver supports it. + * + * @return int|numeric-string + * + * @throws Exception + */ + public function rowCount(): int|string + { + try { + return $this->result->rowCount(); + } catch (DriverException $e) { + throw $this->connection->convertException($e); + } + } + + /** @throws Exception */ + public function columnCount(): int + { + try { + return $this->result->columnCount(); + } catch (DriverException $e) { + throw $this->connection->convertException($e); + } + } + + /** + * Returns the name of the column in the result set for the given 0-based index. + * + * If the index is not a valid column index ({@see columnCount}), an exception will be thrown. + * + * @throws Exception + */ + public function getColumnName(int $index): string + { + if (! method_exists($this->result, 'getColumnName')) { + throw new LogicException(sprintf( + 'The driver result %s does not support accessing the column name.', + get_debug_type($this->result), + )); + } + + try { + return $this->result->getColumnName($index); + } catch (DriverException $e) { + throw $this->connection->convertException($e); + } + } + + public function free(): void + { + $this->result->free(); + } + + /** @throws Exception */ + private function ensureHasKeyValue(): void + { + $columnCount = $this->columnCount(); + + if ($columnCount < 2) { + throw NoKeyValue::fromColumnCount($columnCount); + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/SQL/Builder/CreateSchemaObjectsSQLBuilder.php b/backend/vendor/doctrine/dbal/src/SQL/Builder/CreateSchemaObjectsSQLBuilder.php new file mode 100644 index 0000000..598a6ad --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/SQL/Builder/CreateSchemaObjectsSQLBuilder.php @@ -0,0 +1,73 @@ + */ + public function buildSQL(Schema $schema): array + { + return array_merge( + $this->buildNamespaceStatements($schema->getNamespaces()), + $this->buildSequenceStatements($schema->getSequences()), + $this->buildTableStatements($schema->getTables()), + ); + } + + /** + * @param string[] $namespaces + * + * @return list + */ + private function buildNamespaceStatements(array $namespaces): array + { + $statements = []; + + if ($this->platform->supportsSchemas()) { + foreach ($namespaces as $namespace) { + $statements[] = $this->platform->getCreateSchemaSQL($namespace); + } + } + + return $statements; + } + + /** + * @param Table[] $tables + * + * @return list + */ + private function buildTableStatements(array $tables): array + { + return $this->platform->getCreateTablesSQL($tables); + } + + /** + * @param Sequence[] $sequences + * + * @return list + */ + private function buildSequenceStatements(array $sequences): array + { + $statements = []; + + foreach ($sequences as $sequence) { + $statements[] = $this->platform->getCreateSequenceSQL($sequence); + } + + return $statements; + } +} diff --git a/backend/vendor/doctrine/dbal/src/SQL/Builder/DefaultSelectSQLBuilder.php b/backend/vendor/doctrine/dbal/src/SQL/Builder/DefaultSelectSQLBuilder.php new file mode 100644 index 0000000..a30120e --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/SQL/Builder/DefaultSelectSQLBuilder.php @@ -0,0 +1,94 @@ +isDistinct()) { + $parts[] = 'DISTINCT'; + } + + $parts[] = implode(', ', $query->getColumns()); + + $from = $query->getFrom(); + + if (count($from) > 0) { + $parts[] = 'FROM ' . implode(', ', $from); + } + + $where = $query->getWhere(); + + if ($where !== null) { + $parts[] = 'WHERE ' . $where; + } + + $groupBy = $query->getGroupBy(); + + if (count($groupBy) > 0) { + $parts[] = 'GROUP BY ' . implode(', ', $groupBy); + } + + $having = $query->getHaving(); + + if ($having !== null) { + $parts[] = 'HAVING ' . $having; + } + + $orderBy = $query->getOrderBy(); + + if (count($orderBy) > 0) { + $parts[] = 'ORDER BY ' . implode(', ', $orderBy); + } + + $sql = implode(' ', $parts); + $limit = $query->getLimit(); + + if ($limit->isDefined()) { + $sql = $this->platform->modifyLimitQuery($sql, $limit->getMaxResults(), $limit->getFirstResult()); + } + + $forUpdate = $query->getForUpdate(); + + if ($forUpdate !== null) { + if ($this->forUpdateSQL === null) { + throw NotSupported::new('FOR UPDATE'); + } + + $sql .= ' ' . $this->forUpdateSQL; + + if ($forUpdate->getConflictResolutionMode() === ConflictResolutionMode::SKIP_LOCKED) { + if ($this->skipLockedSQL === null) { + throw NotSupported::new('SKIP LOCKED'); + } + + $sql .= ' ' . $this->skipLockedSQL; + } + } + + return $sql; + } +} diff --git a/backend/vendor/doctrine/dbal/src/SQL/Builder/DefaultUnionSQLBuilder.php b/backend/vendor/doctrine/dbal/src/SQL/Builder/DefaultUnionSQLBuilder.php new file mode 100644 index 0000000..289382d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/SQL/Builder/DefaultUnionSQLBuilder.php @@ -0,0 +1,48 @@ +getUnionParts() as $union) { + if ($union->type !== null) { + $parts[] = $union->type === UnionType::ALL + ? $this->platform->getUnionAllSQL() + : $this->platform->getUnionDistinctSQL(); + } + + $parts[] = $this->platform->getUnionSelectPartSQL((string) $union->query); + } + + $orderBy = $query->getOrderBy(); + if (count($orderBy) > 0) { + $parts[] = 'ORDER BY ' . implode(', ', $orderBy); + } + + $sql = implode(' ', $parts); + $limit = $query->getLimit(); + + if ($limit->isDefined()) { + $sql = $this->platform->modifyLimitQuery($sql, $limit->getMaxResults(), $limit->getFirstResult()); + } + + return $sql; + } +} diff --git a/backend/vendor/doctrine/dbal/src/SQL/Builder/DropSchemaObjectsSQLBuilder.php b/backend/vendor/doctrine/dbal/src/SQL/Builder/DropSchemaObjectsSQLBuilder.php new file mode 100644 index 0000000..c038489 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/SQL/Builder/DropSchemaObjectsSQLBuilder.php @@ -0,0 +1,54 @@ + */ + public function buildSQL(Schema $schema): array + { + return array_merge( + $this->buildSequenceStatements($schema->getSequences()), + $this->buildTableStatements($schema->getTables()), + ); + } + + /** + * @param list
$tables + * + * @return list + */ + private function buildTableStatements(array $tables): array + { + return $this->platform->getDropTablesSQL($tables); + } + + /** + * @param list $sequences + * + * @return list + */ + private function buildSequenceStatements(array $sequences): array + { + $statements = []; + + foreach ($sequences as $sequence) { + $statements[] = $this->platform->getDropSequenceSQL($sequence->getQuotedName($this->platform)); + } + + return $statements; + } +} diff --git a/backend/vendor/doctrine/dbal/src/SQL/Builder/SelectSQLBuilder.php b/backend/vendor/doctrine/dbal/src/SQL/Builder/SelectSQLBuilder.php new file mode 100644 index 0000000..c013f96 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/SQL/Builder/SelectSQLBuilder.php @@ -0,0 +1,14 @@ +name]; + if ($part->columns !== null && count($part->columns) > 0) { + $ctePart[] = ' (' . implode(', ', $part->columns) . ')'; + } + + $ctePart[] = ' AS (' . $part->query . ')'; + $cteParts[] = implode('', $ctePart); + } + + return 'WITH ' . implode(', ', $cteParts); + } +} diff --git a/backend/vendor/doctrine/dbal/src/SQL/Parser.php b/backend/vendor/doctrine/dbal/src/SQL/Parser.php new file mode 100644 index 0000000..c332a1e --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/SQL/Parser.php @@ -0,0 +1,116 @@ +getMySQLStringLiteralPattern("'"), + $this->getMySQLStringLiteralPattern('"'), + ]; + } else { + $patterns = [ + $this->getAnsiSQLStringLiteralPattern("'"), + $this->getAnsiSQLStringLiteralPattern('"'), + ]; + } + + $patterns = array_merge($patterns, [ + self::BACKTICK_IDENTIFIER, + self::BRACKET_IDENTIFIER, + self::MULTICHAR, + self::ONE_LINE_COMMENT, + self::MULTI_LINE_COMMENT, + self::OTHER, + ]); + + $this->sqlPattern = sprintf('(%s)', implode('|', $patterns)); + $this->tokenPattern = '~\\G' + . '(?P' . self::NAMED_PARAMETER . ')' + . '|(?P' . self::POSITIONAL_PARAMETER . ')' + . '|(?P' . $this->sqlPattern . '|' . self::SPECIAL . ')' + . '~s'; + } + + /** + * Parses the given SQL statement + * + * @throws Exception + */ + public function parse(string $sql, Visitor $visitor): void + { + $offset = 0; + $length = strlen($sql); + while ($offset < $length) { + if (preg_match($this->tokenPattern, $sql, $matches, 0, $offset) === 1) { + $match = $matches[0]; + if ($matches['named'] !== '') { + $visitor->acceptNamedParameter($match); + } elseif ($matches['positional'] !== '') { + $visitor->acceptPositionalParameter($match); + } else { + $visitor->acceptOther($match); + } + + $offset += strlen($match); + } elseif (preg_last_error() !== PREG_NO_ERROR) { + // @codeCoverageIgnoreStart + throw RegularExpressionError::new(); + // @codeCoverageIgnoreEnd + } + } + } + + private function getMySQLStringLiteralPattern(string $delimiter): string + { + return $delimiter . '((\\\\.)|(?![' . $delimiter . '\\\\]).)*' . $delimiter; + } + + private function getAnsiSQLStringLiteralPattern(string $delimiter): string + { + return $delimiter . '[^' . $delimiter . ']*' . $delimiter; + } +} diff --git a/backend/vendor/doctrine/dbal/src/SQL/Parser/Exception.php b/backend/vendor/doctrine/dbal/src/SQL/Parser/Exception.php new file mode 100644 index 0000000..0c14b35 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/SQL/Parser/Exception.php @@ -0,0 +1,11 @@ + Table($tableName)); if you want to rename the table, you have to make sure this does not get + * recreated during schema migration. + * + * @internal This class should be extended only by DBAL itself. + * + * @template N of Name + */ +abstract class AbstractAsset +{ + protected string $_name = ''; + + /** + * Indicates whether the object name has been initialized. + */ + protected bool $isNameInitialized = false; + + /** + * Namespace of the asset. If none isset the default namespace is assumed. + * + * @deprecated Use {@see NamedObject::getObjectName()} and {@see OptionallyQualifiedName::getQualifier()} instead. + */ + protected ?string $_namespace = null; + + /** @deprecated */ + protected bool $_quoted = false; + + /** @var list */ + private array $identifiers = []; + + private bool $validateFuture = false; + + public function __construct(?string $name = null) + { + if ($name === null) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6610', + 'Not passing $name to %s is deprecated.', + __METHOD__, + ); + + return; + } + + $this->_setName($name); + } + + /** + * Returns a parser for parsing the object name. + * + * @deprecated Parse the name in the constructor instead. + * + * @return Parser + */ + protected function getNameParser(): Parser + { + throw NotImplemented::fromMethod(static::class, __FUNCTION__); + } + + /** + * Sets the object name. + * + * @deprecated Set the name in the constructor instead. + * + * @param ?N $name + */ + protected function setName(?Name $name): void + { + throw NotImplemented::fromMethod(static::class, __FUNCTION__); + } + + /** + * Sets the name of this asset. + * + * @deprecated Use the constructor instead. + */ + protected function _setName(string $name): void + { + $this->isNameInitialized = false; + + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6610', + '%s is deprecated. Use the constructor instead.', + __METHOD__, + ); + + $input = $name; + + if ($this->isIdentifierQuoted($name)) { + $this->_quoted = true; + $name = $this->trimQuotes($name); + } + + if (str_contains($name, '.')) { + $parts = explode('.', $name); + $this->_namespace = $parts[0]; + $name = $parts[1]; + } + + $this->_name = $name; + + $this->validateFuture = false; + + if ($input !== '') { + try { + $parsedName = $this->getNameParser()->parse($input); + } catch (NotImplemented $e) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6592', + 'Unable to parse object name: %s.', + $e->getMessage(), + ); + + return; + } catch (Throwable $e) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6592', + 'Unable to parse object name: %s.', + $e->getMessage(), + ); + + return; + } + } else { + $parsedName = null; + } + + try { + $this->setName($parsedName); + } catch (Throwable $e) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6646', + 'Using invalid database object names is deprecated: %s.', + $e->getMessage(), + ); + + return; + } + + $this->isNameInitialized = true; + + if ($parsedName === null) { + $this->identifiers = []; + + return; + } + + if ($parsedName instanceof UnqualifiedName) { + $identifiers = [$parsedName->getIdentifier()]; + } elseif ($parsedName instanceof OptionallyQualifiedName) { + $unqualifiedName = $parsedName->getUnqualifiedName(); + $qualifier = $parsedName->getQualifier(); + + $identifiers = $qualifier !== null + ? [$qualifier, $unqualifiedName] + : [$unqualifiedName]; + } elseif ($parsedName instanceof GenericName) { + $identifiers = $parsedName->getIdentifiers(); + } else { + return; + } + + switch (count($identifiers)) { + case 1: + $namespace = null; + $name = $identifiers[0]; + break; + + case 2: + [$namespace, $name] = $identifiers; + break; + + default: + return; + } + + $this->identifiers = $identifiers; + $this->validateFuture = true; + + $futureName = $name->getValue(); + $futureNamespace = $namespace?->getValue(); + + if ($this->_name !== $futureName) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6592', + 'Instead of "%s", this name will be interpreted as "%s" in 5.0', + $this->_name, + $futureName, + ); + } + + if ($this->_namespace === $futureNamespace) { + return; + } + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6592', + 'Instead of %s, the namespace in this name will be interpreted as %s in 5.0.', + $this->_namespace !== null ? sprintf('"%s"', $this->_namespace) : 'null', + $futureNamespace !== null ? sprintf('"%s"', $futureNamespace) : 'null', + ); + } + + /** + * Is this asset in the default namespace? + * + * @deprecated + */ + public function isInDefaultNamespace(string $defaultNamespaceName): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6664', + '%s is deprecated and will be removed in 5.0.', + __METHOD__, + ); + + return $this->_namespace === $defaultNamespaceName || $this->_namespace === null; + } + + /** + * Gets the namespace name of this asset. + * + * If NULL is returned this means the default namespace is used. + * + * @deprecated Use {@see NamedObject::getObjectName()} and {@see OptionallyQualifiedName::getQualifier()} instead. + */ + public function getNamespaceName(): ?string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6664', + '%s is deprecated and will be removed in 5.0. Use NamedObject::getObjectName()' + . ' and OptionallyQualifiedName::getQualifier() instead.', + __METHOD__, + ); + + return $this->_namespace; + } + + /** + * The shortest name is stripped of the default namespace. All other + * namespaced elements are returned as full-qualified names. + * + * @deprecated Use {@see NamedObject::getObjectName()} instead. + */ + public function getShortestName(?string $defaultNamespaceName): string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6657', + '%s is deprecated and will be removed in 5.0.', + __METHOD__, + ); + + $shortestName = $this->getName(); + if ($this->_namespace === $defaultNamespaceName) { + $shortestName = $this->_name; + } + + return strtolower($shortestName); + } + + /** + * Checks if this asset's name is quoted. + * + * @deprecated Depending on the concrete class of the object, use {@see NamedObject::getObjectName()} or + * {@see OptionallyNamedObject::getObjectName()} to get the name. Then, depending on the type of the + * name, use {@see UnqualifiedName::getIdentifier()}, {@see OptionallyQualifiedName::getQualifier()}, + * or {@see OptionallyQualifiedName::getUnqualifiedName()} to get the corresponding identifiers. Then, + * use {@see Identifier::$isQuoted()}. + */ + public function isQuoted(): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7084', + '%s is deprecated and will be removed in 5.0.', + __METHOD__, + ); + + return $this->_quoted; + } + + /** + * Checks if this identifier is quoted. + * + * @deprecated Parse the name and introspect its identifiers individually using {@see Identifier::isQuoted()} + * instead. + */ + protected function isIdentifierQuoted(string $identifier): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6677', + '%s is deprecated and will be removed in 5.0.', + __METHOD__, + ); + + return isset($identifier[0]) && ($identifier[0] === '`' || $identifier[0] === '"' || $identifier[0] === '['); + } + + /** + * Trim quotes from the identifier. + */ + protected function trimQuotes(string $identifier): string + { + return str_replace(['`', '"', '[', ']'], '', $identifier); + } + + /** + * Returns the name of this schema asset. + * + * @deprecated Use {@see NamedObject::getObjectName()} or {@see OptionallyQualifiedName::getObjectName()} instead. + * In SQL context, convert the resulting {@see Name} to SQL using {@see Name::toSQL()}. In other + * contexts, convert the resulting name to string using {@see Name::toString()}. + */ + public function getName(): string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7094', + '%s is deprecated and will be removed in 5.0.', + __METHOD__, + ); + + if ($this->_namespace !== null) { + return $this->_namespace . '.' . $this->_name; + } + + return $this->_name; + } + + /** + * Gets the quoted representation of this asset but only if it was defined with one. Otherwise + * return the plain unquoted value as inserted. + * + * @deprecated Use {@see NamedObject::getObjectName()} or {@see OptionallyQualifiedName::getObjectName()} followed + * by {@see Name::toSQL()} instead. + */ + public function getQuotedName(AbstractPlatform $platform): string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6674', + '%s is deprecated and will be removed in 5.0.', + __METHOD__, + ); + + $keywords = $platform->getReservedKeywordsList(); + $folding = $platform->getUnquotedIdentifierFolding(); + $parts = $normalizedParts = []; + + foreach (explode('.', $this->getName()) as $identifier) { + $isQuoted = $this->_quoted || $keywords->isKeyword($identifier); + + if (! $isQuoted) { + $parts[] = $identifier; + + /** @phpstan-ignore argument.type */ + $normalizedParts[] = $folding->foldUnquotedIdentifier($identifier); + } else { + $parts[] = $platform->quoteSingleIdentifier($identifier); + $normalizedParts[] = $identifier; + } + } + + $name = implode('.', $parts); + + if ($this->validateFuture) { + $futureParts = array_map(static function (Identifier $identifier) use ($folding): string { + $value = $identifier->getValue(); + + if (! $identifier->isQuoted()) { + $value = $folding->foldUnquotedIdentifier($value); + } + + return $value; + }, $this->identifiers); + + if ($normalizedParts !== $futureParts) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6592', + 'Relying on implicitly quoted identifiers preserving their original case is deprecated. ' + . 'The current name %s will become %s in 5.0. ' + . 'Please quote the name if the case needs to be preserved.', + $name, + implode('.', array_map([$platform, 'quoteSingleIdentifier'], $futureParts)), + ); + } + } + + return $name; + } + + /** + * Generates an identifier from a list of column names obeying a certain string length. + * + * This is especially important for Oracle, since it does not allow identifiers larger than 30 chars, + * however building idents automatically for foreign keys, composite keys or such can easily create + * very long names. + * + * @param array $columnNames + * @param positive-int $maxSize + * + * @return non-empty-string + */ + protected function _generateIdentifierName(array $columnNames, string $prefix = '', int $maxSize = 30): string + { + $hash = implode('', array_map(static function ($column): string { + return dechex(crc32($column)); + }, $columnNames)); + + return strtoupper(substr($prefix . '_' . $hash, 0, $maxSize)); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/AbstractNamedObject.php b/backend/vendor/doctrine/dbal/src/Schema/AbstractNamedObject.php new file mode 100644 index 0000000..54fe512 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/AbstractNamedObject.php @@ -0,0 +1,58 @@ + + * @implements NamedObject + */ +abstract class AbstractNamedObject extends AbstractAsset implements NamedObject +{ + /** + * The name of the database object. + * + * Until the validity of the name is enforced, this property isn't guaranteed to be always initialized. The property + * can be accessed only if {@see $isNameInitialized} is set to true. + * + * @var N + */ + protected Name $name; + + public function __construct(string $name) + { + parent::__construct($name); + } + + /** + * Returns the object name. + * + * @return N + * + * @throws InvalidState + */ + public function getObjectName(): Name + { + if (! $this->isNameInitialized) { + throw InvalidState::objectNameNotInitialized(); + } + + return $this->name; + } + + protected function setName(?Name $name): void + { + if ($name === null) { + throw InvalidName::fromEmpty(); + } + + $this->name = $name; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/AbstractOptionallyNamedObject.php b/backend/vendor/doctrine/dbal/src/Schema/AbstractOptionallyNamedObject.php new file mode 100644 index 0000000..c1fe096 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/AbstractOptionallyNamedObject.php @@ -0,0 +1,46 @@ + + * @implements OptionallyNamedObject + */ +abstract class AbstractOptionallyNamedObject extends AbstractAsset implements OptionallyNamedObject +{ + /** + * The name of the database object. + * + * Until the validity of the name is enforced, this property isn't guaranteed to be always initialized. The property + * can be accessed only if {@see $isNameInitialized} is set to true. + * + * @var ?N + */ + protected ?Name $name; + + public function __construct(?string $name) + { + parent::__construct($name ?? ''); + } + + public function getObjectName(): ?Name + { + if (! $this->isNameInitialized) { + throw InvalidState::objectNameNotInitialized(); + } + + return $this->name; + } + + protected function setName(?Name $name): void + { + $this->name = $name; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/AbstractSchemaManager.php b/backend/vendor/doctrine/dbal/src/Schema/AbstractSchemaManager.php new file mode 100644 index 0000000..c65c3e5 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/AbstractSchemaManager.php @@ -0,0 +1,1491 @@ +null value means that there is no + * schema currently selected within the connection. + * + * The property should be accessed only when {@link $currentSchemaDetermined} is set to true. If the + * currently used database platform doesn't support schemas, the property will remain uninitialized. + * + * The property is initialized only once. If the underlying connection switches to a different schema, a new schema + * manager instance will have to be created to reflect this change. + * + * @var ?non-empty-string + */ + private ?string $currentSchemaName; + + /** + * Indicates whether the current schema has been determined. + */ + private bool $currentSchemaDetermined = false; + + /** @param T $platform */ + public function __construct(protected Connection $connection, protected AbstractPlatform $platform) + { + } + + /** + * Lists the available databases for this connection. + * + * @deprecated Use {@see introspectDatabaseNames()} instead. + * + * @return array + * + * @throws Exception + */ + public function listDatabases(): array + { + return array_map(function (array $row): string { + return $this->_getPortableDatabaseDefinition($row); + }, $this->connection->fetchAllAssociative( + $this->platform->getListDatabasesSQL(), + )); + } + + /** + * Returns a list of the names of all schemata in the current database. + * + * @deprecated Use {@see introspectSchemaNames()} instead. + * + * @return list + * + * @throws Exception + */ + public function listSchemaNames(): array + { + throw NotSupported::new(__METHOD__); + } + + /** + * Lists the available sequences for this connection. + * + * @deprecated Use {@see introspectSequences()} instead. + * + * @return list + * + * @throws Exception + */ + public function listSequences(): array + { + return $this->filterAssetNames( + array_map(function (array $row): Sequence { + return $this->_getPortableSequenceDefinition($row); + }, $this->connection->fetchAllAssociative( + $this->platform->getListSequencesSQL( + $this->getDatabase(__METHOD__), + ), + )), + ); + } + + /** + * Lists the columns for a given table. + * + * In contrast to other libraries and to the old version of Doctrine, + * this column definition does try to contain the 'primary' column for + * the reason that it is not portable across different RDBMS. Use + * {@see listTableIndexes($tableName)} to retrieve the primary key + * of a table. Where a RDBMS specifies more details, these are held + * in the platformDetails array. + * + * @deprecated Use {@see introspectTableColumns()}, {@see introspectTableColumnsByUnquotedName()} + * or {@see introspectTableColumnsByQuotedName()} instead. + * + * @return array + * + * @throws Exception + */ + public function listTableColumns(string $table): array + { + $this->validateTableName($table, __METHOD__); + + $database = $this->getDatabase(__METHOD__); + + return $this->_getPortableTableColumnList( + $table, + $database, + $this->fetchTableColumns($database, $this->normalizeName($table)), + ); + } + + /** + * Lists the indexes for a given table returning an array of Index instances. + * + * Keys of the portable indexes list are all lower-cased. + * + * @deprecated Use {@see introspectTableIndexes()}, {@see introspectTableIndexesByUnquotedName()} + * or {@see introspectTableIndexesByQuotedName()} + * + * @return array + * + * @throws Exception + */ + public function listTableIndexes(string $table): array + { + $this->validateTableName($table, __METHOD__); + + $database = $this->getDatabase(__METHOD__); + $table = $this->normalizeName($table); + + return $this->_getPortableTableIndexesList( + $this->fetchIndexColumns($database, $table), + $table, + ); + } + + /** + * Returns true if all the given tables exist. + * + * @param array $names + * + * @throws Exception + */ + public function tablesExist(array $names): bool + { + $names = array_map('strtolower', $names); + + return count($names) === count(array_intersect($names, array_map('strtolower', $this->listTableNames()))); + } + + /** @throws Exception */ + public function tableExists(string $tableName): bool + { + return $this->tablesExist([$tableName]); + } + + /** + * Returns a list of all tables in the current database. + * + * @deprecated Use {@see introspectTableNames()} instead. + * + * @return list + * + * @throws Exception + */ + public function listTableNames(): array + { + return $this->filterAssetNames( + array_map(function (array $row): string { + return $this->_getPortableTableDefinition($row); + }, $this->selectTableNames( + $this->getDatabase(__METHOD__), + )->fetchAllAssociative()), + ); + } + + /** + * Filters asset names if they are configured to return only a subset of all + * the found elements. + * + * @param list $assetNames + * + * @return list + * + * @template N + */ + private function filterAssetNames(array $assetNames): array + { + $filter = $this->connection->getConfiguration()->getSchemaAssetsFilter(); + + return array_values(array_filter($assetNames, $filter)); + } + + /** + * Lists the tables for this connection. + * + * @deprecated Use {@see introspectTables()} instead. + * + * @return list
+ * + * @throws Exception + */ + public function listTables(): array + { + $database = $this->getDatabase(__METHOD__); + + $tableColumnsByTable = $this->fetchTableColumnsByTable($database); + $indexColumnsByTable = $this->fetchIndexColumnsByTable($database); + $foreignKeyColumnsByTable = $this->fetchForeignKeyColumnsByTable($database); + $tableOptionsByTable = $this->fetchTableOptionsByTable($database); + + $filter = $this->connection->getConfiguration()->getSchemaAssetsFilter(); + $tables = []; + + $configuration = $this->createSchemaConfig() + ->toTableConfiguration(); + + foreach ($tableColumnsByTable as $tableName => $tableColumns) { + if (! $filter($tableName)) { + continue; + } + + $tables[] = new Table( + $tableName, + $this->_getPortableTableColumnList($tableName, $database, $tableColumns), + $this->_getPortableTableIndexesList($indexColumnsByTable[$tableName] ?? [], $tableName), + [], + $this->_getPortableTableForeignKeysList($foreignKeyColumnsByTable[$tableName] ?? []), + $tableOptionsByTable[$tableName] ?? [], + $configuration, + ); + } + + return $tables; + } + + /** + * Returns the current schema name used by the schema manager connection. + * + * The null value means that there is no schema currently selected within the connection or the + * corresponding database platform doesn't support schemas. + * + * @return ?non-empty-string + * + * @throws Exception + */ + final protected function getCurrentSchemaName(): ?string + { + if (! $this->platform->supportsSchemas()) { + return null; + } + + if (! $this->currentSchemaDetermined) { + $this->currentSchemaName = $this->determineCurrentSchemaName(); + $this->currentSchemaDetermined = true; + } + + return $this->currentSchemaName; + } + + /** + * Determines the name of the current schema. + * + * If the corresponding database platform supports schemas, the schema manager must implement this method. + * + * @return ?non-empty-string + * + * @throws Exception + */ + protected function determineCurrentSchemaName(): ?string + { + throw NotSupported::new(__METHOD__); + } + + /** + * An extension point for those platforms where case sensitivity of the object name depends on whether it's quoted. + * + * Such platforms should convert a possibly quoted name into a value of the corresponding case. + * + * @deprecated Use {@see Identifier::toNormalizedValue()} instead. + */ + protected function normalizeName(string $name): string + { + $identifier = new Identifier($name); + + return $identifier->getName(); + } + + private function validateTableName(string $input, string $methodName): void + { + $parser = Parsers::getOptionallyQualifiedNameParser(); + + try { + $tableName = $parser->parse($input); + } catch (Throwable $e) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6768', + 'Unable to parse table name passed to %s(): %s.', + $methodName, + $e->getMessage(), + ); + + return; + } + + if ($tableName->getQualifier() === null || $this->platform->supportsSchemas()) { + return; + } + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6768', + 'Relying on %s() not parsing an unquoted table name containing a dot while working with %s is' + . ' deprecated. Pass a quoted name instead.', + $methodName, + $this->platform::class, + ); + } + + /** + * Selects names of tables in the specified database. + * + * @throws Exception + */ + abstract protected function selectTableNames(string $databaseName): Result; + + /** + * Selects definitions of table columns in the specified database. If the table name is specified, narrows down + * the selection to this table. + * + * @throws Exception + */ + abstract protected function selectTableColumns(string $databaseName, ?string $tableName = null): Result; + + /** + * Selects definitions of index columns in the specified database. If the table name is specified, narrows down + * the selection to this table. + * + * @throws Exception + */ + abstract protected function selectIndexColumns(string $databaseName, ?string $tableName = null): Result; + + /** + * Selects definitions of foreign key columns in the specified database. If the table name is specified, + * narrows down the selection to this table. + * + * @throws Exception + */ + abstract protected function selectForeignKeyColumns(string $databaseName, ?string $tableName = null): Result; + + /** + * Fetches definitions of table columns in the specified database. If the table name is specified, narrows down + * the selection to this table. + * + * @return list> + * + * @throws Exception + */ + protected function fetchTableColumns(string $databaseName, ?string $tableName = null): array + { + return $this->selectTableColumns($databaseName, $tableName)->fetchAllAssociative(); + } + + /** + * Fetches definitions of index columns in the specified database. If the table name is specified, narrows down + * the selection to this table. + * + * @return list> + * + * @throws Exception + */ + protected function fetchIndexColumns(string $databaseName, ?string $tableName = null): array + { + return $this->selectIndexColumns($databaseName, $tableName)->fetchAllAssociative(); + } + + /** + * Fetches definitions of foreign key columns in the specified database. If the table name is specified, + * narrows down the selection to this table. + * + * @return list> + * + * @throws Exception + */ + protected function fetchForeignKeyColumns(string $databaseName, ?string $tableName = null): array + { + return $this->selectForeignKeyColumns($databaseName, $tableName)->fetchAllAssociative(); + } + + /** + * Fetches definitions of table columns in the specified database and returns them grouped by table name. + * + * @return array>> + * + * @throws Exception + */ + protected function fetchTableColumnsByTable(string $databaseName): array + { + return $this->groupByTable($this->fetchTableColumns($databaseName)); + } + + /** + * Fetches definitions of index columns in the specified database and returns them grouped by table name. + * + * @return array>> + * + * @throws Exception + */ + protected function fetchIndexColumnsByTable(string $databaseName): array + { + return $this->groupByTable($this->fetchIndexColumns($databaseName)); + } + + /** + * Fetches definitions of foreign key columns in the specified database and returns them grouped by table name. + * + * @return array>> + * + * @throws Exception + */ + protected function fetchForeignKeyColumnsByTable(string $databaseName): array + { + return $this->groupByTable($this->fetchForeignKeyColumns($databaseName)); + } + + /** + * Fetches table options for the tables in the specified database and returns them grouped by table name. + * If the table name is specified, narrows down the selection to this table. + * + * @param ?non-empty-string $tableName + * + * @return array> + * + * @throws Exception + */ + abstract protected function fetchTableOptionsByTable(string $databaseName, ?string $tableName = null): array; + + /** + * Introspects the table with the given name. + * + * @deprecated Use {@see introspectTableByUnquotedName()} or {@see introspectTableByQuotedName()} instead. + * + * @throws Exception + */ + public function introspectTable(string $name): Table + { + $columns = $this->listTableColumns($name); + + if ($columns === []) { + throw TableDoesNotExist::new($name); + } + + return new Table( + $name, + $columns, + $this->listTableIndexes($name), + [], + $this->listTableForeignKeys($name), + $this->getTableOptions($name), + ); + } + + /** + * Lists the views this connection has. + * + * @deprecated Use {@see introspectViews()} instead. + * + * @return list + * + * @throws Exception + */ + public function listViews(): array + { + return array_map(function (array $row): View { + return $this->_getPortableViewDefinition($row); + }, $this->connection->fetchAllAssociative( + $this->platform->getListViewsSQL( + $this->getDatabase(__METHOD__), + ), + )); + } + + /** + * Lists the foreign keys for the given table. + * + * @deprecated Use {@see introspectTableForeignKeyConstraints()}, + * {@see introspectTableForeignKeyConstraintsByUnquotedName()} + * or {@see introspectTableForeignKeyConstraintsByQuotedName()} instead. + * + * @return array + * + * @throws Exception + */ + public function listTableForeignKeys(string $table): array + { + $this->validateTableName($table, __METHOD__); + + $database = $this->getDatabase(__METHOD__); + + return $this->_getPortableTableForeignKeysList( + $this->fetchForeignKeyColumns( + $database, + $this->normalizeName($table), + ), + ); + } + + /** + * @return array + * + * @throws Exception + */ + private function getTableOptions(string $name): array + { + $this->validateTableName($name, __METHOD__); + + $normalizedName = $this->normalizeName($name); + + return $this->fetchTableOptionsByTable( + $this->getDatabase(__METHOD__), + $normalizedName, // @phpstan-ignore argument.type + )[$normalizedName] ?? []; + } + + /** + * Introspects available databases and returns their names. + * + * @return list + * + * @throws Exception + */ + public function introspectDatabaseNames(): array + { + return $this->createSchemaProvider()->getAllDatabaseNames(); + } + + /** + * Introspects schemas in the current database and returns their names. + * + * @return list + * + * @throws Exception + */ + public function introspectSchemaNames(): array + { + return $this->createSchemaProvider()->getAllSchemaNames(); + } + + /** + * Introspects tables in the current database and returns their names. + * + * @return list + * + * @throws Exception + */ + public function introspectTableNames(): array + { + $filter = $this->connection->getConfiguration()->getSchemaAssetsFilter(); + $tableNames = []; + + foreach ($this->createSchemaProvider()->getAllTableNames() as $tableName) { + if (! $this->testTableName($tableName, $filter)) { + continue; + } + + $tableNames[] = $tableName; + } + + return $tableNames; + } + + /** + * Introspects tables in the current database and returns their definitions. + * + * @return list
+ * + * @throws Exception + */ + public function introspectTables(): array + { + $filter = $this->connection->getConfiguration()->getSchemaAssetsFilter(); + $tables = []; + + foreach ($this->createSchemaProvider()->getAllTables() as $table) { + if (! $this->testTableName($table->getObjectName(), $filter)) { + continue; + } + + $tables[] = $table; + } + + return $tables; + } + + /** + * Tests whether the table name matches the filter. + */ + private function testTableName(OptionallyQualifiedName $tableName, callable $filter): bool + { + $formattedName = $tableName->getUnqualifiedName()->getValue(); + $qualifier = $tableName->getQualifier(); + + if ($qualifier !== null) { + $formattedName = $qualifier->getValue() . '.' . $formattedName; + } + + return $filter($formattedName); + } + + /** + * Introspects the table with the given name and returns its definition. If the name is unqualified, and the + * underlying database platform supports schemas, the current schema is used. + * + * This method is currently private due to the conflict with {@see introspectTable()}. Use + * {@see introspectTableByUnquotedName()} or {@see introspectTableByQuotedName()} instead. + * + * @throws Exception + */ + private function introspectTable0(OptionallyQualifiedName $tableName): Table + { + $columns = $this->introspectTableColumns($tableName); + + if ($columns === []) { + throw TableDoesNotExist::new($tableName->toString()); + } + + $options = $this->introspectTableOptions($tableName); + assert($options !== null); + + return Table::editor() + ->setName($tableName) + ->setColumns(...$columns) + ->setPrimaryKeyConstraint($this->introspectTablePrimaryKeyConstraint($tableName)) + ->setIndexes(...$this->introspectTableIndexes($tableName)) + ->setForeignKeyConstraints(...$this->introspectTableForeignKeyConstraints($tableName)) + ->setOptions($options) + ->create(); + } + + /** + * Introspects the table with the given unquoted name and schema name and returns its definition. If the schema name + * is omitted, and the underlying database platform supports schemas, the current schema is used. + * + * @param non-empty-string $tableName + * @param ?non-empty-string $schemaName + * + * @throws Exception + */ + public function introspectTableByUnquotedName(string $tableName, ?string $schemaName = null): Table + { + return $this->introspectTable0( + OptionallyQualifiedName::unquoted($tableName, $schemaName), + ); + } + + /** + * Introspects the table with the given quoted name and schema name and returns its definition. If the schema name + * is omitted, and the underlying database platform supports schemas, the current schema is used. + * + * @param non-empty-string $tableName + * @param ?non-empty-string $schemaName + * + * @throws Exception + */ + public function introspectTableByQuotedName(string $tableName, ?string $schemaName = null): Table + { + return $this->introspectTable0( + OptionallyQualifiedName::quoted($tableName, $schemaName), + ); + } + + /** + * Introspects the columns of a given table and returns their definitions. If the name is unqualified, and the + * underlying database platform supports schemas, the current schema is used. + * + * Returns an empty value if the table does not exist. + * + * @return list + * + * @throws Exception + */ + public function introspectTableColumns(OptionallyQualifiedName $tableName): array + { + return $this->introspectTableObjects( + $tableName, + static function (SchemaProvider $schemaProvider, ?string $schemaName, string $tableName): array { + return $schemaProvider->getColumnsForTable($schemaName, $tableName); + }, + ); + } + + /** + * Introspects the columns of the table with the given unquoted name and schema name and returns their definitions. + * If the schema name is omitted and the underlying database platform supports schemas, the current schema is used. + * + * Returns an empty value if the table does not exist. + * + * @param non-empty-string $tableName + * @param ?non-empty-string $schemaName + * + * @return list + * + * @throws Exception + */ + public function introspectTableColumnsByUnquotedName(string $tableName, ?string $schemaName = null): array + { + return $this->introspectTableColumns( + OptionallyQualifiedName::unquoted($tableName, $schemaName), + ); + } + + /** + * Introspects the columns of the table with the given quoted name and schema name and returns their definitions. If + * the schema name is omitted and the underlying database platform supports schemas, the current schema is used. + * + * Returns an empty value if the table does not exist. + * + * @param non-empty-string $tableName + * @param ?non-empty-string $schemaName + * + * @return list + * + * @throws Exception + */ + public function introspectTableColumnsByQuotedName(string $tableName, ?string $schemaName = null): array + { + return $this->introspectTableColumns( + OptionallyQualifiedName::quoted($tableName, $schemaName), + ); + } + + /** + * Introspects the indexes of a given table and returns their definitions. If the name is unqualified, and the + * underlying database platform supports schemas, the current schema is used. + * + * Returns an empty value if the table does not exist. + * + * @return list + * + * @throws Exception + */ + public function introspectTableIndexes(OptionallyQualifiedName $tableName): array + { + return $this->introspectTableObjects( + $tableName, + static function (SchemaProvider $schemaProvider, ?string $schemaName, string $tableName): array { + return $schemaProvider->getIndexesForTable($schemaName, $tableName); + }, + ); + } + + /** + * Introspects the indexes of the table with the given unquoted name and schema name and returns their definitions. + * If the schema name is omitted and the underlying database platform supports schemas, the current schema is used. + * + * Returns an empty value if the table does not exist. + * + * @param non-empty-string $tableName + * @param ?non-empty-string $schemaName + * + * @return list + * + * @throws Exception + */ + public function introspectTableIndexesByUnquotedName(string $tableName, ?string $schemaName = null): array + { + return $this->introspectTableIndexes( + OptionallyQualifiedName::unquoted($tableName, $schemaName), + ); + } + + /** + * Introspects the indexes of the table with the given quoted name and schema name and returns their definitions. If + * the schema name is omitted and the underlying database platform supports schemas, the current schema is used. + * + * Returns an empty value if the table does not exist. + * + * @param non-empty-string $tableName + * @param ?non-empty-string $schemaName + * + * @return list + * + * @throws Exception + */ + public function introspectTableIndexesByQuotedName(string $tableName, ?string $schemaName = null): array + { + return $this->introspectTableIndexes( + OptionallyQualifiedName::quoted($tableName, $schemaName), + ); + } + + /** + * Introspects the primary key constraint of a given table and returns its definition. If the name is unqualified, + * and the underlying database platform supports schemas, the current schema is used. + * + * Returns null if the table does not exist or does not have a primary key constraint. + * + * @throws Exception + */ + public function introspectTablePrimaryKeyConstraint(OptionallyQualifiedName $tableName): ?PrimaryKeyConstraint + { + return $this->introspectTableObjects( + $tableName, + static function ( + SchemaProvider $schemaProvider, + ?string $schemaName, + string $tableName, + ): ?PrimaryKeyConstraint { + return $schemaProvider->getPrimaryKeyConstraintForTable($schemaName, $tableName); + }, + ); + } + + /** + * Introspects the foreign key constraints of a given table and returns their definitions. If the name is + * unqualified, and the underlying database platform supports schemas, the current schema is used. + * + * Returns an empty value if the table does not exist. + * + * @return list + * + * @throws Exception + */ + public function introspectTableForeignKeyConstraints(OptionallyQualifiedName $tableName): array + { + return $this->introspectTableObjects( + $tableName, + static function (SchemaProvider $schemaProvider, ?string $schemaName, string $tableName): array { + return $schemaProvider->getForeignKeyConstraintsForTable($schemaName, $tableName); + }, + ); + } + + /** + * Introspects the foreign key constraints of the table with the given unquoted name and schema name and returns + * their definitions. If the name is unqualified, and the underlying database platform supports schemas, the current + * schema is used. + * + * Returns an empty value if the table does not exist. + * + * @param non-empty-string $tableName + * @param ?non-empty-string $schemaName + * + * @return list + * + * @throws Exception + */ + public function introspectTableForeignKeyConstraintsByUnquotedName( + string $tableName, + ?string $schemaName = null, + ): array { + return $this->introspectTableForeignKeyConstraints( + OptionallyQualifiedName::unquoted($tableName, $schemaName), + ); + } + + /** + * Introspects the foreign key constraints of the table with the given quoted name and schema name and returns their + * definitions. If the name is unqualified, and the underlying database platform supports schemas, the current + * schema is used. + * + * Returns an empty value if the table does not exist. + * + * @param non-empty-string $tableName + * @param ?non-empty-string $schemaName + * + * @return list + * + * @throws Exception + */ + public function introspectTableForeignKeyConstraintsByQuotedName( + string $tableName, + ?string $schemaName = null, + ): array { + return $this->introspectTableForeignKeyConstraints( + OptionallyQualifiedName::quoted($tableName, $schemaName), + ); + } + + /** + * @param callable(SchemaProvider, ?non-empty-string, non-empty-string): R $function + * + * @return R + * + * @throws Exception + * + * @template R + */ + private function introspectTableObjects(OptionallyQualifiedName $tableName, callable $function) + { + $folding = $this->platform->getUnquotedIdentifierFolding(); + $qualifier = $tableName->getQualifier(); + + if ($qualifier !== null) { + $schemaName = $qualifier->toNormalizedValue($folding); + } else { + $schemaName = $this->getCurrentSchemaName(); + } + + return $function( + $this->createSchemaProvider(), + $schemaName, + $tableName->getUnqualifiedName()->toNormalizedValue($folding), + ); + } + + /** + * @return ?array + * + * @throws Exception + */ + private function introspectTableOptions(OptionallyQualifiedName $tableName): ?array + { + $folding = $this->platform->getUnquotedIdentifierFolding(); + $qualifier = $tableName->getQualifier(); + + if ($qualifier !== null) { + $schemaName = $qualifier->toNormalizedValue($folding); + } else { + $schemaName = $this->getCurrentSchemaName(); + } + + return $this->createSchemaProvider()->getOptionsForTable( + $schemaName, + $tableName->getUnqualifiedName()->toNormalizedValue($folding), + ); + } + + /** + * Introspects the views in the current database and returns their definitions. + * + * @return list + * + * @throws Exception + */ + public function introspectViews(): array + { + return $this->createSchemaProvider()->getAllViews(); + } + + /** + * Introspects the sequences in the current database and returns their definitions. + * + * @return list + * + * @throws Exception + */ + public function introspectSequences(): array + { + return $this->filterAssetNames( + $this->createSchemaProvider()->getAllSequences(), + ); + } + + /** @throws Exception */ + private function createSchemaProvider(): IntrospectingSchemaProvider + { + return new IntrospectingSchemaProvider( + $this->platform->createMetadataProvider($this->connection), + $this->getCurrentSchemaName(), + $this->createSchemaConfig()->toTableConfiguration(), + ); + } + + /* drop*() Methods */ + + /** + * Drops a database. + * + * NOTE: You can not drop the database this SchemaManager is currently connected to. + * + * @throws Exception + */ + public function dropDatabase(string $database): void + { + $this->connection->executeStatement( + $this->platform->getDropDatabaseSQL($database), + ); + } + + /** + * Drops a schema. + * + * @throws Exception + */ + public function dropSchema(string $schemaName): void + { + $this->connection->executeStatement( + $this->platform->getDropSchemaSQL($schemaName), + ); + } + + /** + * Drops the given table. + * + * @throws Exception + */ + public function dropTable(string $name): void + { + $this->connection->executeStatement( + $this->platform->getDropTableSQL($name), + ); + } + + /** + * Drops the index from the given table. + * + * @throws Exception + */ + public function dropIndex(string $index, string $table): void + { + $this->connection->executeStatement( + $this->platform->getDropIndexSQL($index, $table), + ); + } + + /** + * Drops a foreign key from a table. + * + * @throws Exception + */ + public function dropForeignKey(string $name, string $table): void + { + $this->connection->executeStatement( + $this->platform->getDropForeignKeySQL($name, $table), + ); + } + + /** + * Drops a sequence with a given name. + * + * @throws Exception + */ + public function dropSequence(string $name): void + { + $this->connection->executeStatement( + $this->platform->getDropSequenceSQL($name), + ); + } + + /** + * Drops the unique constraint from the given table. + * + * @throws Exception + */ + public function dropUniqueConstraint(string $name, string $tableName): void + { + $this->connection->executeStatement( + $this->platform->getDropUniqueConstraintSQL($name, $tableName), + ); + } + + /** + * Drops a view. + * + * @throws Exception + */ + public function dropView(string $name): void + { + $this->connection->executeStatement( + $this->platform->getDropViewSQL($name), + ); + } + + /* create*() Methods */ + + /** @throws Exception */ + public function createSchemaObjects(Schema $schema): void + { + $this->executeStatements($schema->toSql($this->platform)); + } + + /** + * Creates a new database. + * + * @throws Exception + */ + public function createDatabase(string $database): void + { + $this->connection->executeStatement( + $this->platform->getCreateDatabaseSQL($database), + ); + } + + /** + * Creates a new table. + * + * @throws Exception + */ + public function createTable(Table $table): void + { + $this->executeStatements($this->platform->getCreateTableSQL($table)); + } + + /** + * Creates a new sequence. + * + * @throws Exception + */ + public function createSequence(Sequence $sequence): void + { + $this->connection->executeStatement( + $this->platform->getCreateSequenceSQL($sequence), + ); + } + + /** + * Creates a new index on a table. + * + * @param string $table The name of the table on which the index is to be created. + * + * @throws Exception + */ + public function createIndex(Index $index, string $table): void + { + $this->connection->executeStatement( + $this->platform->getCreateIndexSQL($index, $table), + ); + } + + /** + * Creates a new foreign key. + * + * @param ForeignKeyConstraint $foreignKey The ForeignKey instance. + * @param string $table The name of the table on which the foreign key is to be created. + * + * @throws Exception + */ + public function createForeignKey(ForeignKeyConstraint $foreignKey, string $table): void + { + $this->connection->executeStatement( + $this->platform->getCreateForeignKeySQL($foreignKey, $table), + ); + } + + /** + * Creates a unique constraint on a table. + * + * @throws Exception + */ + public function createUniqueConstraint(UniqueConstraint $uniqueConstraint, string $tableName): void + { + $this->connection->executeStatement( + $this->platform->getCreateUniqueConstraintSQL($uniqueConstraint, $tableName), + ); + } + + /** + * Creates a new view. + * + * @throws Exception + */ + public function createView(View $view): void + { + $this->connection->executeStatement( + $this->platform->getCreateViewSQL( + $view->getQuotedName($this->platform), + $view->getSql(), + ), + ); + } + + /** @throws Exception */ + public function dropSchemaObjects(Schema $schema): void + { + $this->executeStatements($schema->toDropSql($this->platform)); + } + + /** + * Alters an existing schema. + * + * @throws Exception + */ + public function alterSchema(SchemaDiff $schemaDiff): void + { + $this->executeStatements($this->platform->getAlterSchemaSQL($schemaDiff)); + } + + /** + * Migrates an existing schema to a new schema. + * + * @throws Exception + */ + public function migrateSchema(Schema $newSchema): void + { + $schemaDiff = $this->createComparator() + ->compareSchemas($this->introspectSchema(), $newSchema); + + $this->alterSchema($schemaDiff); + } + + /* alterTable() Methods */ + + /** + * Alters an existing tables schema. + * + * @throws Exception + */ + public function alterTable(TableDiff $tableDiff): void + { + $this->executeStatements($this->platform->getAlterTableSQL($tableDiff)); + } + + /** + * Renames a given table to another name. + * + * @throws Exception + */ + public function renameTable(string $name, string $newName): void + { + $this->connection->executeStatement( + $this->platform->getRenameTableSQL($name, $newName), + ); + } + + /** + * Methods for filtering return values of list*() methods to convert + * the native DBMS data definition to a portable Doctrine definition + */ + + /** @param array $database */ + protected function _getPortableDatabaseDefinition(array $database): string + { + throw NotSupported::new(__METHOD__); + } + + /** @param array $sequence */ + protected function _getPortableSequenceDefinition(array $sequence): Sequence + { + throw NotSupported::new(__METHOD__); + } + + /** + * Independent of the database the keys of the column list result are lowercased. + * + * The name of the created column instance however is kept in its case. + * + * @param array> $rows + * + * @return array + * + * @throws TypesException + */ + protected function _getPortableTableColumnList(string $table, string $database, array $rows): array + { + $list = []; + foreach ($rows as $row) { + $column = $this->_getPortableTableColumnDefinition($row); + + $name = strtolower($column->getQuotedName($this->platform)); + $list[$name] = $column; + } + + return $list; + } + + /** + * Gets Table Column Definition. + * + * @param array $tableColumn + * + * @throws TypesException + */ + abstract protected function _getPortableTableColumnDefinition(array $tableColumn): Column; + + /** + * Aggregates and groups the index results according to the required data result. + * + * @param array> $rows + * + * @return array + */ + protected function _getPortableTableIndexesList(array $rows, string $tableName): array + { + $result = []; + foreach ($rows as $row) { + $indexName = $keyName = $row['key_name']; + if ($row['primary']) { + $keyName = 'primary'; + } + + $keyName = strtolower($keyName); + + if (! isset($result[$keyName])) { + $options = [ + 'lengths' => [], + ]; + + if (isset($row['where'])) { + $options['where'] = $row['where']; + } + + $result[$keyName] = [ + 'name' => $indexName, + 'columns' => [], + 'unique' => ! $row['non_unique'], + 'primary' => $row['primary'], + 'flags' => $row['flags'] ?? [], + 'options' => $options, + ]; + } + + $result[$keyName]['columns'][] = $row['column_name']; + $result[$keyName]['options']['lengths'][] = $row['length'] ?? null; + } + + $indexes = []; + foreach ($result as $indexKey => $data) { + $indexes[$indexKey] = new Index( + $data['name'], + $data['columns'], + $data['unique'], + $data['primary'], + $data['flags'], + $data['options'], + ); + } + + return $indexes; + } + + /** + * @deprecated Use the schema name and the unqualified table name separately instead. + * + * @param array $table + * + * @return non-empty-string + */ + abstract protected function _getPortableTableDefinition(array $table): string; + + /** @param array $view */ + abstract protected function _getPortableViewDefinition(array $view): View; + + /** + * @param array> $rows + * + * @return array + */ + protected function _getPortableTableForeignKeysList(array $rows): array + { + $list = []; + + foreach ($rows as $value) { + $list[] = $this->_getPortableTableForeignKeyDefinition($value); + } + + return $list; + } + + /** @param array $tableForeignKey */ + abstract protected function _getPortableTableForeignKeyDefinition(array $tableForeignKey): ForeignKeyConstraint; + + /** + * @param array $sql + * + * @throws Exception + */ + private function executeStatements(array $sql): void + { + foreach ($sql as $query) { + $this->connection->executeStatement($query); + } + } + + /** + * Returns a {@see Schema} instance representing the current database schema. + * + * @throws Exception + */ + public function introspectSchema(): Schema + { + $schemaNames = []; + + if ($this->platform->supportsSchemas()) { + $schemaNames = $this->listSchemaNames(); + } + + $sequences = []; + + if ($this->platform->supportsSequences()) { + $sequences = $this->listSequences(); + } + + $tables = $this->listTables(); + + return new Schema($tables, $sequences, $this->createSchemaConfig(), $schemaNames); + } + + /** + * Creates the configuration for this schema. + * + * @throws Exception + */ + public function createSchemaConfig(): SchemaConfig + { + $schemaConfig = new SchemaConfig(); + $schemaConfig->setMaxIdentifierLength($this->platform->getMaxIdentifierLength()); + $schemaConfig->setName($this->getCurrentSchemaName()); + + $params = $this->connection->getParams(); + if (! isset($params['defaultTableOptions'])) { + $params['defaultTableOptions'] = []; + } + + if (! isset($params['defaultTableOptions']['charset']) && isset($params['charset'])) { + $params['defaultTableOptions']['charset'] = $params['charset']; + } + + $schemaConfig->setDefaultTableOptions($params['defaultTableOptions']); + + return $schemaConfig; + } + + /** + * @return non-empty-string + * + * @throws Exception + */ + private function getDatabase(string $methodName): string + { + $database = $this->connection->getDatabase(); + + if ($database === null) { + throw DatabaseRequired::new($methodName); + } + + return $database; + } + + public function createComparator(/* ComparatorConfig $config = new ComparatorConfig() */): Comparator + { + return new Comparator($this->platform, func_num_args() > 0 ? func_get_arg(0) : new ComparatorConfig()); + } + + /** + * Groups the rows representing database object elements by table they belong to. + * + * @param list> $rows + * + * @return array>> + */ + private function groupByTable(array $rows): array + { + $data = []; + + foreach ($rows as $row) { + $tableName = $this->_getPortableTableDefinition($row); + $data[$tableName][] = $row; + } + + /** @phpstan-ignore return.type */ + return $data; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Collections/Exception.php b/backend/vendor/doctrine/dbal/src/Schema/Collections/Exception.php new file mode 100644 index 0000000..31b5451 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Collections/Exception.php @@ -0,0 +1,12 @@ +objectName; + } + + public static function new(UnqualifiedName $objectName): self + { + return new self(sprintf('Object %s already exists.', $objectName->toString()), $objectName); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Collections/Exception/ObjectDoesNotExist.php b/backend/vendor/doctrine/dbal/src/Schema/Collections/Exception/ObjectDoesNotExist.php new file mode 100644 index 0000000..37f6534 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Collections/Exception/ObjectDoesNotExist.php @@ -0,0 +1,30 @@ +objectName; + } + + public static function new(UnqualifiedName $objectName): self + { + return new self(sprintf('Object %s does not exist.', $objectName->toString()), $objectName); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Collections/ObjectSet.php b/backend/vendor/doctrine/dbal/src/Schema/Collections/ObjectSet.php new file mode 100644 index 0000000..e78afa2 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Collections/ObjectSet.php @@ -0,0 +1,71 @@ + + */ +interface ObjectSet extends IteratorAggregate +{ + /** + * Checks if the set is empty. + */ + public function isEmpty(): bool; + + /** + * Returns the element with the given name. If no such element exists, null is returned. + * + * @phpstan-return E|null + */ + public function get(UnqualifiedName $elementName): ?object; + + /** + * Adds the given element to the set. + * + * @phpstan-param E $element + * + * @throws ObjectAlreadyExists If an element with the same name already exists. + */ + public function add(object $element): void; + + /** + * Removes the element with the given name from the set. + * + * @throws ObjectDoesNotExist If no element with the given name exists. + */ + public function remove(UnqualifiedName $elementName): void; + + /** + * Modifies the element with the given name using the provided callable. + * + * @param callable(E): E $modification + * + * @throws ObjectDoesNotExist If no element with the given name exists. + * @throws ObjectAlreadyExists If an element with the name after modification already exists. + */ + public function modify(UnqualifiedName $elementName, callable $modification): void; + + /** + * Clears the set, removing all elements. + */ + public function clear(): void; + + /** + * Returns the elements of the set represented as a list. + * + * @phpstan-return list + */ + public function toList(): array; +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Collections/OptionallyUnqualifiedNamedObjectSet.php b/backend/vendor/doctrine/dbal/src/Schema/Collections/OptionallyUnqualifiedNamedObjectSet.php new file mode 100644 index 0000000..e93b2c1 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Collections/OptionallyUnqualifiedNamedObjectSet.php @@ -0,0 +1,171 @@ + + * @template-implements ObjectSet + */ +final class OptionallyUnqualifiedNamedObjectSet implements ObjectSet +{ + /** @var list */ + private array $elements = []; + + /** @var array */ + private array $elementPositionsByKey = []; + + /** @phpstan-param E ...$elements */ + public function __construct(OptionallyNamedObject ...$elements) + { + foreach ($elements as $element) { + $this->add($element); + } + } + + public function isEmpty(): bool + { + return count($this->elements) === 0; + } + + public function get(UnqualifiedName $elementName): ?OptionallyNamedObject + { + $key = $this->getKey($elementName); + + if (isset($this->elementPositionsByKey[$key])) { + return $this->elements[$this->elementPositionsByKey[$key]]; + } + + return null; + } + + public function add(object $element): void + { + $elementName = $element->getObjectName(); + + if ($elementName !== null) { + $key = $this->getKey($elementName); + + if (isset($this->elementPositionsByKey[$key])) { + throw ObjectAlreadyExists::new($elementName); + } + + $this->elementPositionsByKey[$key] = count($this->elements); + } + + $this->elements[] = $element; + } + + public function remove(UnqualifiedName $elementName): void + { + $key = $this->getKey($elementName); + + if (! isset($this->elementPositionsByKey[$key])) { + throw ObjectDoesNotExist::new($elementName); + } + + $this->removeByKey($key); + } + + public function modify(UnqualifiedName $elementName, callable $modification): void + { + $key = $this->getKey($elementName); + + if (! isset($this->elementPositionsByKey[$key])) { + throw ObjectDoesNotExist::new($elementName); + } + + $position = $this->elementPositionsByKey[$key]; + + $this->replace($key, $position, $modification($this->elements[$position])); + } + + public function clear(): void + { + $this->elements = $this->elementPositionsByKey = []; + } + + /** {@inheritDoc} */ + public function toList(): array + { + return $this->elements; + } + + /** {@inheritDoc} */ + public function getIterator(): Traversable + { + yield from $this->elements; + } + + /** + * Replaces the element corresponding to the old key with the provided element. + * + * @phpstan-param E $element + * + * @throws ObjectAlreadyExists If an element with the same name as the element name already exists. + */ + private function replace(string $oldKey, int $position, OptionallyNamedObject $element): void + { + $elementName = $element->getObjectName(); + + if ($elementName !== null) { + $newKey = $this->getKey($elementName); + + if ($newKey !== $oldKey) { + if (isset($this->elementPositionsByKey[$newKey])) { + throw ObjectAlreadyExists::new($elementName); + } + + unset($this->elementPositionsByKey[$oldKey]); + + $this->elementPositionsByKey[$newKey] = $position; + } + } else { + unset($this->elementPositionsByKey[$oldKey]); + } + + // @phpstan-ignore assign.propertyType + $this->elements[$position] = $element; + } + + private function removeByKey(string $key): void + { + $position = $this->elementPositionsByKey[$key]; + + array_splice($this->elements, $position, 1); + unset($this->elementPositionsByKey[$key]); + + foreach ($this->elementPositionsByKey as $elementKey => $elementPosition) { + if ($elementPosition <= $position) { + continue; + } + + $this->elementPositionsByKey[$elementKey]--; + } + } + + private function getKey(UnqualifiedName $name): string + { + return strtolower($name->getIdentifier()->getValue()); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Collections/UnqualifiedNamedObjectSet.php b/backend/vendor/doctrine/dbal/src/Schema/Collections/UnqualifiedNamedObjectSet.php new file mode 100644 index 0000000..d37c420 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Collections/UnqualifiedNamedObjectSet.php @@ -0,0 +1,148 @@ + + * @template-implements ObjectSet + */ +final class UnqualifiedNamedObjectSet implements ObjectSet +{ + /** @var array */ + private array $elements = []; + + /** @phpstan-param E ...$elements */ + public function __construct(NamedObject ...$elements) + { + foreach ($elements as $element) { + $this->add($element); + } + } + + public function isEmpty(): bool + { + return count($this->elements) === 0; + } + + public function get(UnqualifiedName $elementName): ?NamedObject + { + $key = $this->getKey($elementName); + + return $this->elements[$key] ?? null; + } + + public function add(object $element): void + { + $elementName = $element->getObjectName(); + $key = $this->getKey($elementName); + + if (isset($this->elements[$key])) { + throw ObjectAlreadyExists::new($elementName); + } + + $this->elements[$key] = $element; + } + + public function remove(UnqualifiedName $elementName): void + { + $key = $this->getKey($elementName); + + if (! isset($this->elements[$key])) { + throw ObjectDoesNotExist::new($elementName); + } + + unset($this->elements[$key]); + } + + public function modify(UnqualifiedName $elementName, callable $modification): void + { + $key = $this->getKey($elementName); + + if (! isset($this->elements[$key])) { + throw ObjectDoesNotExist::new($elementName); + } + + $this->replace($key, $modification($this->elements[$key])); + } + + public function clear(): void + { + $this->elements = []; + } + + /** {@inheritDoc} */ + public function toList(): array + { + return array_values($this->elements); + } + + /** {@inheritDoc} */ + public function getIterator(): Traversable + { + foreach ($this->elements as $element) { + yield $element; + } + } + + /** + * Replaces the element corresponding to the old key with the provided element. The position of the element in the + * set is preserved. + * + * @phpstan-param E $element + * + * @throws ObjectAlreadyExists If an element with the same name as the element name already exists. + */ + private function replace(string $oldKey, NamedObject $element): void + { + $elementName = $element->getObjectName(); + $newKey = $this->getKey($elementName); + + if ($newKey === $oldKey) { + $this->elements[$oldKey] = $element; + + return; + } + + if (isset($this->elements[$newKey])) { + throw ObjectAlreadyExists::new($elementName); + } + + $keys = array_keys($this->elements); + $values = array_values($this->elements); + + $position = array_search($oldKey, $keys, true); + assert($position !== false); + + $keys[$position] = $newKey; + $values[$position] = $element; + + $this->elements = array_combine($keys, $values); + } + + private function getKey(UnqualifiedName $name): string + { + return strtolower($name->getIdentifier()->getValue()); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Column.php b/backend/vendor/doctrine/dbal/src/Schema/Column.php new file mode 100644 index 0000000..69035f7 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Column.php @@ -0,0 +1,432 @@ + + * @phpstan-type ColumnProperties = array{ + * name: string, + * type: Type, + * default: mixed, + * notnull?: bool, + * autoincrement: bool, + * columnDefinition: ?non-empty-string, + * comment: string, + * charset?: ?non-empty-string, + * collation?: ?non-empty-string, + * } + * @phpstan-type PlatformOptions = array{ + * charset?: ?non-empty-string, + * collation?: ?non-empty-string, + * default_constraint_name?: non-empty-string, + * enumType?: class-string, + * jsonb?: bool, + * version?: bool, + * } + */ +class Column extends AbstractNamedObject +{ + protected Type $_type; + + protected ?int $_length = null; + + protected ?int $_precision = null; + + protected int $_scale = 0; + + protected bool $_unsigned = false; + + protected bool $_fixed = false; + + protected bool $_notnull = true; + + protected mixed $_default = null; + + protected bool $_autoincrement = false; + + /** @var list */ + protected array $_values = []; + + /** @var PlatformOptions */ + protected array $_platformOptions = []; + + /** @var ?non-empty-string */ + protected ?string $_columnDefinition = null; + + protected string $_comment = ''; + + /** + * @internal Use {@link Column::editor()} to instantiate an editor and {@link ColumnEditor::create()} to create a + * column. + * + * @param array $options + */ + public function __construct(string $name, Type $type, array $options = []) + { + parent::__construct($name); + + $this->setType($type); + $this->setOptions($options); + } + + protected function getNameParser(): UnqualifiedNameParser + { + return Parsers::getUnqualifiedNameParser(); + } + + /** @param array $options */ + public function setOptions(array $options): self + { + foreach ($options as $name => $value) { + $method = 'set' . $name; + + if (! method_exists($this, $method)) { + throw UnknownColumnOption::new($name); + } + + $this->$method($value); + } + + return $this; + } + + public function setType(Type $type): self + { + $this->_type = $type; + + return $this; + } + + public function setLength(?int $length): self + { + $this->_length = $length; + + return $this; + } + + public function setPrecision(?int $precision): self + { + $this->_precision = $precision; + + return $this; + } + + public function setScale(int $scale): self + { + $this->_scale = $scale; + + return $this; + } + + public function setUnsigned(bool $unsigned): self + { + $this->_unsigned = $unsigned; + + return $this; + } + + public function setFixed(bool $fixed): self + { + $this->_fixed = $fixed; + + return $this; + } + + public function setNotnull(bool $notnull): self + { + $this->_notnull = $notnull; + + return $this; + } + + public function setDefault(mixed $default): self + { + $this->_default = $default; + + return $this; + } + + /** @param PlatformOptions $platformOptions */ + public function setPlatformOptions(array $platformOptions): self + { + if (isset($platformOptions['jsonb']) && $platformOptions['jsonb']) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6939', + 'The "jsonb" column platform option is deprecated. Use the "JSONB" type instead.', + ); + } + + $this->_platformOptions = $platformOptions; + + return $this; + } + + /** @param key-of $name */ + public function setPlatformOption(string $name, mixed $value): self + { + if ($name === 'jsonb' && (bool) $value === true) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6939', + 'The "jsonb" column platform option is deprecated. Use the "JSONB" type instead.', + ); + } + + $this->_platformOptions[$name] = $value; + + return $this; + } + + /** @param ?non-empty-string $value */ + public function setColumnDefinition(?string $value): self + { + $this->_columnDefinition = $value; + + return $this; + } + + public function getType(): Type + { + return $this->_type; + } + + public function getLength(): ?int + { + return $this->_length; + } + + public function getPrecision(): ?int + { + return $this->_precision; + } + + public function getScale(): int + { + return $this->_scale; + } + + public function getUnsigned(): bool + { + return $this->_unsigned; + } + + public function getFixed(): bool + { + return $this->_fixed; + } + + public function getNotnull(): bool + { + return $this->_notnull; + } + + public function getDefault(): mixed + { + return $this->_default; + } + + /** + * Returns the name of the character set to use with the column. + * + * @return ?non-empty-string + */ + public function getCharset(): ?string + { + return $this->_platformOptions['charset'] ?? null; + } + + /** + * Returns the name of the collation to use with the column. + * + * @return ?non-empty-string + */ + public function getCollation(): ?string + { + return $this->_platformOptions['collation'] ?? null; + } + + /** + * Returns the minimum value to enforce on the column. + */ + public function getMinimumValue(): mixed + { + return $this->_platformOptions['min'] ?? null; + } + + /** + * Returns the maximum value to enforce on the column. + */ + public function getMaximumValue(): mixed + { + return $this->_platformOptions['max'] ?? null; + } + + /** + * Returns the enum type used by the column. + * + * @return ?class-string + */ + public function getEnumType(): ?string + { + return $this->_platformOptions['enumType'] ?? null; + } + + /** + * @internal Should be used only from within the {@see AbstractSchemaManager} class hierarchy. + * + * Returns the name of the DEFAULT constraint that implements the default value for the column on SQL Server. + * + * @return ?non-empty-string + */ + public function getDefaultConstraintName(): ?string + { + return $this->_platformOptions[SQLServerPlatform::OPTION_DEFAULT_CONSTRAINT_NAME] ?? null; + } + + /** + * @deprecated Use {@see getCharset()}, {@see getCollation()}, {@see getMinimumValue()}, {@see getMaximumValue()} + * or {@see getEnumType()} instead. + * + * @return PlatformOptions + */ + public function getPlatformOptions(): array + { + return $this->_platformOptions; + } + + /** + * @deprecated Use {@see getCharset()}, {@see getCollation()}, {@see getMinimumValue()}, {@see getMaximumValue()} + * or {@see getEnumType()} instead. + * + * @param key-of $name + */ + public function hasPlatformOption(string $name): bool + { + return isset($this->_platformOptions[$name]); + } + + /** + * @deprecated Use {@see getCharset()}, {@see getCollation()}, {@see getMinimumValue()}, {@see getMaximumValue()} + * or {@see getEnumType()} instead. + * + * @param key-of $name + */ + public function getPlatformOption(string $name): mixed + { + /** @phpstan-ignore offsetAccess.notFound */ + return $this->_platformOptions[$name]; + } + + public function getColumnDefinition(): ?string + { + return $this->_columnDefinition; + } + + public function getAutoincrement(): bool + { + return $this->_autoincrement; + } + + public function setAutoincrement(bool $flag): self + { + $this->_autoincrement = $flag; + + return $this; + } + + public function setComment(string $comment): self + { + $this->_comment = $comment; + + return $this; + } + + public function getComment(): string + { + return $this->_comment; + } + + /** + * @param list $values + * + * @return $this + */ + public function setValues(array $values): static + { + $this->_values = $values; + + return $this; + } + + /** @return list */ + public function getValues(): array + { + return $this->_values; + } + + /** @return ColumnProperties */ + public function toArray(): array + { + return array_merge([ + 'name' => $this->_name, + 'type' => $this->_type, + 'default' => $this->_default, + 'notnull' => $this->_notnull, + 'length' => $this->_length, + 'precision' => $this->_precision, + 'scale' => $this->_scale, + 'fixed' => $this->_fixed, + 'unsigned' => $this->_unsigned, + 'autoincrement' => $this->_autoincrement, + 'columnDefinition' => $this->_columnDefinition, + 'comment' => $this->_comment, + 'values' => $this->_values, + ], $this->_platformOptions); + } + + public static function editor(): ColumnEditor + { + return new ColumnEditor(); + } + + public function edit(): ColumnEditor + { + return self::editor() + ->setName($this->getObjectName()) + ->setType($this->_type) + ->setLength($this->_length) + ->setPrecision($this->_precision) + ->setScale($this->_scale) + ->setUnsigned($this->_unsigned) + ->setFixed($this->_fixed) + ->setNotNull($this->_notnull) + ->setDefaultValue($this->_default) + ->setAutoincrement($this->_autoincrement) + ->setComment($this->_comment) + ->setValues($this->_values) + ->setColumnDefinition($this->_columnDefinition) + ->setCharset($this->getCharset()) + ->setCollation($this->getCollation()) + ->setMinimumValue($this->getMinimumValue()) + ->setMaximumValue($this->getMaximumValue()) + ->setEnumType($this->getEnumType()) + ->setDefaultConstraintName($this->getDefaultConstraintName()); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/ColumnDiff.php b/backend/vendor/doctrine/dbal/src/Schema/ColumnDiff.php new file mode 100644 index 0000000..6c86e92 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/ColumnDiff.php @@ -0,0 +1,141 @@ +hasUnsignedChanged() + + (int) $this->hasAutoIncrementChanged() + + (int) $this->hasDefaultChanged() + + (int) $this->hasFixedChanged() + + (int) $this->hasPrecisionChanged() + + (int) $this->hasScaleChanged() + + (int) $this->hasLengthChanged() + + (int) $this->hasNotNullChanged() + + (int) $this->hasNameChanged() + + (int) $this->hasTypeChanged() + + (int) $this->hasPlatformOptionsChanged() + + (int) $this->hasCommentChanged(); + } + + public function getOldColumn(): Column + { + return $this->oldColumn; + } + + public function getNewColumn(): Column + { + return $this->newColumn; + } + + public function hasNameChanged(): bool + { + $oldColumn = $this->getOldColumn(); + + // Column names are case insensitive + return strcasecmp($oldColumn->getName(), $this->getNewColumn()->getName()) !== 0; + } + + public function hasTypeChanged(): bool + { + return $this->newColumn->getType()::class !== $this->oldColumn->getType()::class; + } + + public function hasLengthChanged(): bool + { + return $this->hasPropertyChanged(static function (Column $column): ?int { + return $column->getLength(); + }); + } + + public function hasPrecisionChanged(): bool + { + return $this->hasPropertyChanged(static function (Column $column): ?int { + return $column->getPrecision(); + }); + } + + public function hasScaleChanged(): bool + { + return $this->hasPropertyChanged(static function (Column $column): int { + return $column->getScale(); + }); + } + + public function hasUnsignedChanged(): bool + { + return $this->hasPropertyChanged(static function (Column $column): bool { + return $column->getUnsigned(); + }); + } + + public function hasFixedChanged(): bool + { + return $this->hasPropertyChanged(static function (Column $column): bool { + return $column->getFixed(); + }); + } + + public function hasNotNullChanged(): bool + { + return $this->hasPropertyChanged(static function (Column $column): bool { + return $column->getNotnull(); + }); + } + + public function hasDefaultChanged(): bool + { + $oldDefault = $this->oldColumn->getDefault(); + $newDefault = $this->newColumn->getDefault(); + + // Null values need to be checked additionally as they tell whether to create or drop a default value. + // null != 0, null != false, null != '' etc. This affects platform's table alteration SQL generation. + if (($newDefault === null) xor ($oldDefault === null)) { + return true; + } + + return $newDefault != $oldDefault; + } + + public function hasAutoIncrementChanged(): bool + { + return $this->hasPropertyChanged(static function (Column $column): bool { + return $column->getAutoincrement(); + }); + } + + public function hasCommentChanged(): bool + { + return $this->hasPropertyChanged(static function (Column $column): string { + return $column->getComment(); + }); + } + + public function hasPlatformOptionsChanged(): bool + { + return $this->hasPropertyChanged(static function (Column $column): array { + return $column->getPlatformOptions(); + }); + } + + private function hasPropertyChanged(callable $property): bool + { + return $property($this->newColumn) !== $property($this->oldColumn); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/ColumnEditor.php b/backend/vendor/doctrine/dbal/src/Schema/ColumnEditor.php new file mode 100644 index 0000000..1b2cff2 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/ColumnEditor.php @@ -0,0 +1,286 @@ + */ + private array $values = []; + + /** @var ?non-empty-string */ + private ?string $charset = null; + + /** @var ?non-empty-string */ + private ?string $collation = null; + + /** @var ?non-empty-string */ + private ?string $defaultConstraintName = null; + + /** @var ?non-empty-string */ + private ?string $columnDefinition = null; + + /** @internal Use {@link Column::editor()} or {@link Column::edit()} to create an instance */ + public function __construct() + { + } + + public function setName(UnqualifiedName $name): self + { + $this->name = $name; + + return $this; + } + + /** @param non-empty-string $name */ + public function setUnquotedName(string $name): self + { + $this->name = UnqualifiedName::unquoted($name); + + return $this; + } + + /** @param non-empty-string $name */ + public function setQuotedName(string $name): self + { + $this->name = UnqualifiedName::quoted($name); + + return $this; + } + + public function setType(Type $type): self + { + $this->type = $type; + + return $this; + } + + /** @throws TypesException */ + public function setTypeName(string $typeName): self + { + $this->type = Type::getType($typeName); + + return $this; + } + + public function setLength(?int $length): self + { + $this->length = $length; + + return $this; + } + + public function setPrecision(?int $precision): self + { + $this->precision = $precision; + + return $this; + } + + public function setScale(int $scale): self + { + $this->scale = $scale; + + return $this; + } + + public function setUnsigned(bool $unsigned): self + { + $this->unsigned = $unsigned; + + return $this; + } + + public function setFixed(bool $fixed): self + { + $this->fixed = $fixed; + + return $this; + } + + public function setNotNull(bool $notNull): self + { + $this->notNull = $notNull; + + return $this; + } + + public function setDefaultValue(mixed $defaultValue): self + { + $this->defaultValue = $defaultValue; + + return $this; + } + + public function setMinimumValue(mixed $minimumValue): self + { + $this->minimumValue = $minimumValue; + + return $this; + } + + public function setMaximumValue(mixed $maximumValue): self + { + $this->maximumValue = $maximumValue; + + return $this; + } + + /** @param ?class-string $enumType */ + public function setEnumType(?string $enumType): self + { + $this->enumType = $enumType; + + return $this; + } + + public function setAutoincrement(bool $flag): self + { + $this->autoincrement = $flag; + + return $this; + } + + public function setComment(string $comment): self + { + $this->comment = $comment; + + return $this; + } + + /** @param list $values */ + public function setValues(array $values): self + { + $this->values = $values; + + return $this; + } + + /** @param ?non-empty-string $charset */ + public function setCharset(?string $charset): self + { + $this->charset = $charset; + + return $this; + } + + /** @param ?non-empty-string $collation */ + public function setCollation(?string $collation): self + { + $this->collation = $collation; + + return $this; + } + + /** + * @internal Should be used only from within the {@see AbstractSchemaManager} class hierarchy. + * + * @param ?non-empty-string $defaultConstraintName + */ + public function setDefaultConstraintName(?string $defaultConstraintName): self + { + $this->defaultConstraintName = $defaultConstraintName; + + return $this; + } + + /** @param ?non-empty-string $columnDefinition */ + public function setColumnDefinition(?string $columnDefinition): self + { + $this->columnDefinition = $columnDefinition; + + return $this; + } + + public function create(): Column + { + if ($this->name === null) { + throw InvalidColumnDefinition::nameNotSpecified(); + } + + if ($this->type === null) { + throw InvalidColumnDefinition::dataTypeNotSpecified($this->name); + } + + $platformOptions = []; + + if ($this->charset !== null) { + $platformOptions['charset'] = $this->charset; + } + + if ($this->collation !== null) { + $platformOptions['collation'] = $this->collation; + } + + if ($this->minimumValue !== null) { + $platformOptions['min'] = $this->minimumValue; + } + + if ($this->maximumValue !== null) { + $platformOptions['max'] = $this->maximumValue; + } + + if ($this->enumType !== null) { + $platformOptions['enumType'] = $this->enumType; + } + + if ($this->defaultConstraintName !== null) { + $platformOptions[SQLServerPlatform::OPTION_DEFAULT_CONSTRAINT_NAME] = $this->defaultConstraintName; + } + + return new Column( + $this->name->toString(), + $this->type, + [ + 'length' => $this->length, + 'precision' => $this->precision, + 'scale' => $this->scale, + 'unsigned' => $this->unsigned, + 'fixed' => $this->fixed, + 'notnull' => $this->notNull, + 'default' => $this->defaultValue, + 'autoincrement' => $this->autoincrement, + 'comment' => $this->comment, + 'values' => $this->values, + 'platformOptions' => $platformOptions, + 'columnDefinition' => $this->columnDefinition, + ], + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Comparator.php b/backend/vendor/doctrine/dbal/src/Schema/Comparator.php new file mode 100644 index 0000000..2f0a949 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Comparator.php @@ -0,0 +1,463 @@ +getNamespaces() as $newNamespace) { + if ($oldSchema->hasNamespace($newNamespace)) { + continue; + } + + $createdSchemas[] = $newNamespace; + } + + foreach ($oldSchema->getNamespaces() as $oldNamespace) { + if ($newSchema->hasNamespace($oldNamespace)) { + continue; + } + + $droppedSchemas[] = $oldNamespace; + } + + foreach ($newSchema->getTables() as $newTable) { + $newTableName = $newTable->getShortestName($newSchema->getName()); + if (! $oldSchema->hasTable($newTableName)) { + $createdTables[] = $newSchema->getTable($newTableName); + } else { + $tableDiff = $this->compareTables( + $oldSchema->getTable($newTableName), + $newSchema->getTable($newTableName), + ); + + if (! $tableDiff->isEmpty()) { + $alteredTables[] = $tableDiff; + } + } + } + + // Check if there are tables removed + foreach ($oldSchema->getTables() as $oldTable) { + $oldTableName = $oldTable->getShortestName($oldSchema->getName()); + + $oldTable = $oldSchema->getTable($oldTableName); + if ($newSchema->hasTable($oldTableName)) { + continue; + } + + $droppedTables[] = $oldTable; + } + + foreach ($newSchema->getSequences() as $newSequence) { + $newSequenceName = $newSequence->getShortestName($newSchema->getName()); + if (! $oldSchema->hasSequence($newSequenceName)) { + if (! $this->isAutoIncrementSequenceInSchema($oldSchema, $newSequence)) { + $createdSequences[] = $newSequence; + } + } else { + if ($this->diffSequence($newSequence, $oldSchema->getSequence($newSequenceName))) { + $alteredSequences[] = $newSchema->getSequence($newSequenceName); + } + } + } + + foreach ($oldSchema->getSequences() as $oldSequence) { + if ($this->isAutoIncrementSequenceInSchema($newSchema, $oldSequence)) { + continue; + } + + $oldSequenceName = $oldSequence->getShortestName($oldSchema->getName()); + + if ($newSchema->hasSequence($oldSequenceName)) { + continue; + } + + $droppedSequences[] = $oldSequence; + } + + return new SchemaDiff( + $createdSchemas, + $droppedSchemas, + $createdTables, + $alteredTables, + $droppedTables, + $createdSequences, + $alteredSequences, + $droppedSequences, + ); + } + + private function isAutoIncrementSequenceInSchema(Schema $schema, Sequence $sequence): bool + { + foreach ($schema->getTables() as $table) { + if ($sequence->isAutoIncrementsFor($table)) { + return true; + } + } + + return false; + } + + public function diffSequence(Sequence $sequence1, Sequence $sequence2): bool + { + if ($sequence1->getAllocationSize() !== $sequence2->getAllocationSize()) { + return true; + } + + return $sequence1->getInitialValue() !== $sequence2->getInitialValue(); + } + + /** + * Compares the tables and returns the difference between them. + */ + public function compareTables(Table $oldTable, Table $newTable): TableDiff + { + $shouldReportModifiedIndexes = $this->config->getReportModifiedIndexes(); + if ($shouldReportModifiedIndexes) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6890', + 'Detection of modified indexes is deprecated. Please disable it by configuring the comparator' + . ' using ComparatorConfig::withReportModifiedIndexes(false).', + ); + } + + $addedColumns = []; + $modifiedColumns = []; + $droppedColumns = []; + $addedIndexes = []; + $modifiedIndexes = []; + $droppedIndexes = []; + $renamedIndexes = []; + $addedForeignKeys = []; + $droppedForeignKeys = []; + + $oldColumns = $oldTable->getColumns(); + $newColumns = $newTable->getColumns(); + + // See if all the columns in the old table exist in the new table + foreach ($newColumns as $newColumn) { + $newColumnName = strtolower($newColumn->getName()); + + if ($oldTable->hasColumn($newColumnName)) { + continue; + } + + $addedColumns[$newColumnName] = $newColumn; + } + + // See if there are any removed columns in the new table + foreach ($oldColumns as $oldColumn) { + $oldColumnName = strtolower($oldColumn->getName()); + + // See if column is removed in the new table. + if (! $newTable->hasColumn($oldColumnName)) { + $droppedColumns[$oldColumnName] = $oldColumn; + + continue; + } + + $newColumn = $newTable->getColumn($oldColumnName); + + if ($this->columnsEqual($oldColumn, $newColumn)) { + continue; + } + + $modifiedColumns[$oldColumnName] = new ColumnDiff($oldColumn, $newColumn); + } + + $renamedColumnNames = $newTable->getRenamedColumns(); + + foreach ($addedColumns as $addedColumnName => $addedColumn) { + if (! isset($renamedColumnNames[$addedColumn->getName()])) { + continue; + } + + $removedColumnName = strtolower($renamedColumnNames[$addedColumn->getName()]); + // Explicitly renamed columns need to be diffed, because their types can also have changed + $modifiedColumns[$removedColumnName] = new ColumnDiff( + $droppedColumns[$removedColumnName], + $addedColumn, + ); + + unset( + $addedColumns[$addedColumnName], + $droppedColumns[$removedColumnName], + ); + } + + if ($this->config->getDetectRenamedColumns()) { + $this->detectRenamedColumns($modifiedColumns, $addedColumns, $droppedColumns); + } + + $oldIndexes = $oldTable->getIndexes(); + $newIndexes = $newTable->getIndexes(); + + // See if all the indexes from the old table exist in the new one + foreach ($newIndexes as $newIndex) { + $newIndexName = $newIndex->getName(); + + if (($newIndex->isPrimary() && $oldTable->getPrimaryKey() !== null) || $oldTable->hasIndex($newIndexName)) { + continue; + } + + $addedIndexes[] = $newIndex; + } + + // See if there are any removed indexes in the new table + foreach ($oldIndexes as $oldIndex) { + $oldIndexName = $oldIndex->getName(); + + // See if the index is removed in the new table. + if ( + ($oldIndex->isPrimary() && $newTable->getPrimaryKey() === null) || + ! $oldIndex->isPrimary() && ! $newTable->hasIndex($oldIndexName) + ) { + $droppedIndexes[] = $oldIndex; + + continue; + } + + // See if index has changed in the new table. + $newIndex = $oldIndex->isPrimary() ? $newTable->getPrimaryKey() : $newTable->getIndex($oldIndexName); + assert($newIndex instanceof Index); + + if (! $this->diffIndex($oldIndex, $newIndex)) { + continue; + } + + if ($shouldReportModifiedIndexes) { + $modifiedIndexes[] = $newIndex; + } else { + $droppedIndexes[] = $oldIndex; + $addedIndexes[] = $newIndex; + } + } + + if ($this->config->getDetectRenamedIndexes()) { + $renamedIndexes = $this->detectRenamedIndexes($addedIndexes, $droppedIndexes); + } + + $oldForeignKeys = $oldTable->getForeignKeys(); + $newForeignKeys = $newTable->getForeignKeys(); + + foreach ($oldForeignKeys as $oldKey => $oldForeignKey) { + foreach ($newForeignKeys as $newKey => $newForeignKey) { + if ($this->diffForeignKey($oldForeignKey, $newForeignKey) === false) { + unset($oldForeignKeys[$oldKey], $newForeignKeys[$newKey]); + } else { + if (strtolower($oldForeignKey->getName()) === strtolower($newForeignKey->getName())) { + $droppedForeignKeys[$oldKey] = $oldForeignKey; + $addedForeignKeys[$newKey] = $newForeignKey; + + unset($oldForeignKeys[$oldKey], $newForeignKeys[$newKey]); + } + } + } + } + + foreach ($oldForeignKeys as $oldForeignKey) { + $droppedForeignKeys[] = $oldForeignKey; + } + + foreach ($newForeignKeys as $newForeignKey) { + $addedForeignKeys[] = $newForeignKey; + } + + return new TableDiff( + $oldTable, + addedColumns: $addedColumns, + changedColumns: $modifiedColumns, + droppedColumns: $droppedColumns, + addedIndexes: $addedIndexes, + modifiedIndexes: $modifiedIndexes, + droppedIndexes: $droppedIndexes, + renamedIndexes: $renamedIndexes, + addedForeignKeys: $addedForeignKeys, + droppedForeignKeys: $droppedForeignKeys, + ); + } + + /** + * Try to find columns that only changed their name, rename operations maybe cheaper than add/drop + * however ambiguities between different possibilities should not lead to renaming at all. + * + * @param array $modifiedColumns + * @param array $addedColumns + * @param array $removedColumns + */ + private function detectRenamedColumns(array &$modifiedColumns, array &$addedColumns, array &$removedColumns): void + { + /** @var array>> $candidatesByName */ + $candidatesByName = []; + + foreach ($addedColumns as $addedColumnName => $addedColumn) { + foreach ($removedColumns as $removedColumn) { + if (! $this->columnsEqual($addedColumn, $removedColumn)) { + continue; + } + + $candidatesByName[$addedColumnName][] = [$removedColumn, $addedColumn]; + } + } + + foreach ($candidatesByName as $addedColumnName => $candidates) { + if (count($candidates) !== 1) { + continue; + } + + [$oldColumn, $newColumn] = $candidates[0]; + $oldColumnName = strtolower($oldColumn->getName()); + + if (isset($modifiedColumns[$oldColumnName])) { + continue; + } + + $modifiedColumns[$oldColumnName] = new ColumnDiff( + $oldColumn, + $newColumn, + ); + + unset( + $addedColumns[$addedColumnName], + $removedColumns[$oldColumnName], + ); + } + } + + /** + * Try to find indexes that only changed their name, rename operations maybe cheaper than add/drop + * however ambiguities between different possibilities should not lead to renaming at all. + * + * @param array $addedIndexes + * @param array $removedIndexes + * + * @return array + */ + private function detectRenamedIndexes(array &$addedIndexes, array &$removedIndexes): array + { + $candidatesByName = []; + + // Gather possible rename candidates by comparing each added and removed index based on semantics. + foreach ($addedIndexes as $addedIndexKey => $addedIndex) { + foreach ($removedIndexes as $removedIndexKey => $removedIndex) { + if ($this->diffIndex($addedIndex, $removedIndex)) { + continue; + } + + $candidatesByName[$addedIndex->getName()][] = [$removedIndexKey, $addedIndexKey]; + } + } + + $renamedIndexes = []; + + foreach ($candidatesByName as $candidates) { + // If the current rename candidate contains exactly one semantically equal index, + // we can safely rename it. + // Otherwise, it is unclear if a rename action is really intended, + // therefore we let those ambiguous indexes be added/dropped. + if (count($candidates) !== 1) { + continue; + } + + [$removedIndexKey, $addedIndexKey] = $candidates[0]; + + $removedIndex = $removedIndexes[$removedIndexKey]; + $removedIndexName = strtolower($removedIndex->getName()); + + if (isset($renamedIndexes[$removedIndexName])) { + continue; + } + + $addedIndex = $addedIndexes[$addedIndexKey]; + + $renamedIndexes[$removedIndexName] = $addedIndex; + unset( + $addedIndexes[$addedIndexKey], + $removedIndexes[$removedIndexKey], + ); + } + + return $renamedIndexes; + } + + protected function diffForeignKey(ForeignKeyConstraint $key1, ForeignKeyConstraint $key2): bool + { + if ( + array_map('strtolower', $key1->getUnquotedLocalColumns()) + !== array_map('strtolower', $key2->getUnquotedLocalColumns()) + ) { + return true; + } + + if ( + array_map('strtolower', $key1->getUnquotedForeignColumns()) + !== array_map('strtolower', $key2->getUnquotedForeignColumns()) + ) { + return true; + } + + if ($key1->getUnqualifiedForeignTableName() !== $key2->getUnqualifiedForeignTableName()) { + return true; + } + + if ($key1->onUpdate() !== $key2->onUpdate()) { + return true; + } + + return $key1->onDelete() !== $key2->onDelete(); + } + + /** + * Compares the definitions of the given columns + */ + protected function columnsEqual(Column $column1, Column $column2): bool + { + return $this->platform->columnsEqual($column1, $column2); + } + + /** + * Finds the difference between the indexes $index1 and $index2. + * + * Compares $index1 with $index2 and returns true if there are any + * differences or false in case there are no differences. + */ + protected function diffIndex(Index $index1, Index $index2): bool + { + return ! ($index1->isFulfilledBy($index2) && $index2->isFulfilledBy($index1)); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/ComparatorConfig.php b/backend/vendor/doctrine/dbal/src/Schema/ComparatorConfig.php new file mode 100644 index 0000000..c303cdc --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/ComparatorConfig.php @@ -0,0 +1,58 @@ +detectRenamedIndexes, + $this->reportModifiedIndexes, + ); + } + + public function getDetectRenamedColumns(): bool + { + return $this->detectRenamedColumns; + } + + public function withDetectRenamedIndexes(bool $detectRenamedIndexes): self + { + return new self( + $this->detectRenamedColumns, + $detectRenamedIndexes, + $this->reportModifiedIndexes, + ); + } + + public function getDetectRenamedIndexes(): bool + { + return $this->detectRenamedIndexes; + } + + public function withReportModifiedIndexes(bool $reportModifiedIndexes): self + { + return new self( + $this->detectRenamedColumns, + $this->detectRenamedIndexes, + $reportModifiedIndexes, + ); + } + + /** @internal This method is intended solely to provide an upgrade path to DBAL 5.0. */ + public function getReportModifiedIndexes(): bool + { + return $this->reportModifiedIndexes; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/DB2SchemaManager.php b/backend/vendor/doctrine/dbal/src/Schema/DB2SchemaManager.php new file mode 100644 index 0000000..5f7b293 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/DB2SchemaManager.php @@ -0,0 +1,374 @@ + + */ +class DB2SchemaManager extends AbstractSchemaManager +{ + /** + * {@inheritDoc} + */ + protected function _getPortableTableColumnDefinition(array $tableColumn): Column + { + $tableColumn = array_change_key_case($tableColumn, CASE_LOWER); + + $length = $precision = $default = null; + $scale = 0; + $fixed = false; + + if ($tableColumn['default'] !== null && $tableColumn['default'] !== 'NULL') { + $default = $tableColumn['default']; + + if (preg_match('/^\'(.*)\'$/s', $default, $matches) === 1) { + $default = str_replace("''", "'", $matches[1]); + } + } + + $type = $this->platform->getDoctrineTypeMapping($tableColumn['typename']); + + switch (strtolower($tableColumn['typename'])) { + case 'varchar': + if ($tableColumn['codepage'] === 0) { + $type = Types::BINARY; + } + + $length = $tableColumn['length']; + break; + + case 'character': + if ($tableColumn['codepage'] === 0) { + $type = Types::BINARY; + } + + $length = $tableColumn['length']; + $fixed = true; + break; + + case 'clob': + $length = $tableColumn['length']; + break; + + case 'decimal': + case 'double': + case 'real': + $scale = $tableColumn['scale']; + $precision = $tableColumn['length']; + break; + } + + $options = [ + 'length' => $length, + 'fixed' => $fixed, + 'default' => $default, + 'autoincrement' => (bool) $tableColumn['autoincrement'], + 'notnull' => $tableColumn['nulls'] === 'N', + ]; + + if ($tableColumn['comment'] !== null) { + $options['comment'] = $tableColumn['comment']; + } + + if ($scale !== null && $precision !== null) { + $options['scale'] = $scale; + $options['precision'] = $precision; + } + + return new Column($tableColumn['colname'], Type::getType($type), $options); + } + + /** + * @deprecated Use the schema name and the unqualified table name separately instead. + * + * {@inheritDoc} + */ + protected function _getPortableTableDefinition(array $table): string + { + $table = array_change_key_case($table, CASE_LOWER); + + return $table['name']; + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableIndexesList(array $rows, string $tableName): array + { + foreach ($rows as &$row) { + $row = array_change_key_case($row, CASE_LOWER); + $row['primary'] = (bool) $row['primary']; + } + + return parent::_getPortableTableIndexesList($rows, $tableName); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableForeignKeyDefinition(array $tableForeignKey): ForeignKeyConstraint + { + return new ForeignKeyConstraint( + $tableForeignKey['local_columns'], + $tableForeignKey['foreign_table'], + $tableForeignKey['foreign_columns'], + $tableForeignKey['name'], + $tableForeignKey['options'], + ); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableForeignKeysList(array $rows): array + { + $foreignKeys = []; + + foreach ($rows as $tableForeignKey) { + $tableForeignKey = array_change_key_case($tableForeignKey, CASE_LOWER); + + if (! isset($foreignKeys[$tableForeignKey['index_name']])) { + $foreignKeys[$tableForeignKey['index_name']] = [ + 'local_columns' => [$tableForeignKey['local_column']], + 'foreign_table' => $tableForeignKey['foreign_table'], + 'foreign_columns' => [$tableForeignKey['foreign_column']], + 'name' => $tableForeignKey['index_name'], + 'options' => [ + 'onUpdate' => $tableForeignKey['on_update'], + 'onDelete' => $tableForeignKey['on_delete'], + ], + ]; + } else { + $foreignKeys[$tableForeignKey['index_name']]['local_columns'][] = $tableForeignKey['local_column']; + $foreignKeys[$tableForeignKey['index_name']]['foreign_columns'][] = $tableForeignKey['foreign_column']; + } + } + + return parent::_getPortableTableForeignKeysList($foreignKeys); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableViewDefinition(array $view): View + { + $view = array_change_key_case($view, CASE_LOWER); + + $sql = ''; + $pos = strpos($view['text'], ' AS '); + + if ($pos !== false) { + $sql = substr($view['text'], $pos + 4); + } + + return new View($view['name'], $sql); + } + + /** @deprecated Use {@see Identifier::toNormalizedValue()} instead. */ + protected function normalizeName(string $name): string + { + $identifier = new Identifier($name); + + return $identifier->isQuoted() ? $identifier->getName() : strtoupper($name); + } + + protected function selectTableNames(string $databaseName): Result + { + $sql = <<<'SQL' +SELECT TABNAME AS NAME +FROM SYSCAT.TABLES +WHERE TYPE = 'T' + AND TABSCHEMA = ? +SQL; + + return $this->connection->executeQuery($sql, [$databaseName]); + } + + protected function selectTableColumns(string $databaseName, ?string $tableName = null): Result + { + $conditions = ['C.TABSCHEMA = ?']; + $params = [$databaseName]; + + if ($tableName !== null) { + $conditions[] = 'C.TABNAME = ?'; + $params[] = $tableName; + } + + $sql = sprintf( + <<<'SQL' +SELECT + C.TABNAME AS NAME, + C.COLNAME, + C.TYPENAME, + C.CODEPAGE, + C.NULLS, + C.LENGTH, + C.SCALE, + C.REMARKS AS COMMENT, + CASE + WHEN C.GENERATED = 'D' THEN 1 + ELSE 0 + END AS AUTOINCREMENT, + C.DEFAULT +FROM SYSCAT.COLUMNS C + JOIN SYSCAT.TABLES AS T + ON T.TABSCHEMA = C.TABSCHEMA + AND T.TABNAME = C.TABNAME + WHERE %s + AND T.TYPE = 'T' +ORDER BY C.TABNAME, C.COLNO +SQL, + implode(' AND ', $conditions), + ); + + return $this->connection->executeQuery($sql, $params); + } + + protected function selectIndexColumns(string $databaseName, ?string $tableName = null): Result + { + $conditions = ['IDX.TABSCHEMA = ?']; + $params = [$databaseName]; + + if ($tableName !== null) { + $conditions[] = 'IDX.TABNAME = ?'; + $params[] = $tableName; + } + + $sql = sprintf( + <<<'SQL' + SELECT + IDX.TABNAME AS NAME, + IDX.INDNAME AS KEY_NAME, + IDXCOL.COLNAME AS COLUMN_NAME, + CASE + WHEN IDX.UNIQUERULE = 'P' THEN 1 + ELSE 0 + END AS PRIMARY, + CASE + WHEN IDX.UNIQUERULE = 'D' THEN 1 + ELSE 0 + END AS NON_UNIQUE + FROM SYSCAT.INDEXES AS IDX + JOIN SYSCAT.TABLES AS T + ON IDX.TABSCHEMA = T.TABSCHEMA AND IDX.TABNAME = T.TABNAME + JOIN SYSCAT.INDEXCOLUSE AS IDXCOL + ON IDX.INDSCHEMA = IDXCOL.INDSCHEMA AND IDX.INDNAME = IDXCOL.INDNAME + WHERE %s + AND T.TYPE = 'T' + ORDER BY IDX.TABNAME, + IDX.INDNAME, + IDXCOL.COLSEQ +SQL, + implode(' AND ', $conditions), + ); + + return $this->connection->executeQuery($sql, $params); + } + + protected function selectForeignKeyColumns(string $databaseName, ?string $tableName = null): Result + { + $conditions = ['R.TABSCHEMA = ?']; + $params = [$databaseName]; + + if ($tableName !== null) { + $conditions[] = 'R.TABNAME = ?'; + $params[] = $tableName; + } + + $sql = sprintf( + <<<'SQL' + SELECT + R.TABNAME AS NAME, + FKCOL.COLNAME AS LOCAL_COLUMN, + R.REFTABNAME AS FOREIGN_TABLE, + PKCOL.COLNAME AS FOREIGN_COLUMN, + R.CONSTNAME AS INDEX_NAME, + CASE + WHEN R.UPDATERULE = 'R' THEN 'RESTRICT' + END AS ON_UPDATE, + CASE + WHEN R.DELETERULE = 'C' THEN 'CASCADE' + WHEN R.DELETERULE = 'N' THEN 'SET NULL' + WHEN R.DELETERULE = 'R' THEN 'RESTRICT' + END AS ON_DELETE + FROM SYSCAT.REFERENCES AS R + JOIN SYSCAT.TABLES AS T + ON T.TABSCHEMA = R.TABSCHEMA + AND T.TABNAME = R.TABNAME + JOIN SYSCAT.KEYCOLUSE AS FKCOL + ON FKCOL.CONSTNAME = R.CONSTNAME + AND FKCOL.TABSCHEMA = R.TABSCHEMA + AND FKCOL.TABNAME = R.TABNAME + JOIN SYSCAT.KEYCOLUSE AS PKCOL + ON PKCOL.CONSTNAME = R.REFKEYNAME + AND PKCOL.TABSCHEMA = R.REFTABSCHEMA + AND PKCOL.TABNAME = R.REFTABNAME + AND PKCOL.COLSEQ = FKCOL.COLSEQ + WHERE %s + AND T.TYPE = 'T' + ORDER BY R.TABNAME, + R.CONSTNAME, + FKCOL.COLSEQ +SQL, + implode(' AND ', $conditions), + ); + + return $this->connection->executeQuery($sql, $params); + } + + /** + * {@inheritDoc} + */ + protected function fetchTableOptionsByTable(string $databaseName, ?string $tableName = null): array + { + $conditions = ['TABSCHEMA = ?']; + $params = [$databaseName]; + + if ($tableName !== null) { + $conditions[] = 'TABNAME = ?'; + $params[] = $tableName; + } + + $sql = sprintf( + <<<'SQL' + SELECT TABNAME, + REMARKS + FROM SYSCAT.TABLES + WHERE %s + AND TYPE = 'T' + ORDER BY TABNAME +SQL, + implode(' AND ', $conditions), + ); + + $tableOptions = []; + foreach ($this->connection->iterateKeyValue($sql, $params) as $table => $remarks) { + $tableOptions[$table] = ['comment' => $remarks]; + } + + return $tableOptions; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/DefaultExpression.php b/backend/vendor/doctrine/dbal/src/Schema/DefaultExpression.php new file mode 100644 index 0000000..af1f701 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/DefaultExpression.php @@ -0,0 +1,18 @@ +getCurrentDateSQL(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/DefaultExpression/CurrentTime.php b/backend/vendor/doctrine/dbal/src/Schema/DefaultExpression/CurrentTime.php new file mode 100644 index 0000000..3d55a8f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/DefaultExpression/CurrentTime.php @@ -0,0 +1,19 @@ +getCurrentTimeSQL(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/DefaultExpression/CurrentTimestamp.php b/backend/vendor/doctrine/dbal/src/Schema/DefaultExpression/CurrentTimestamp.php new file mode 100644 index 0000000..4d80949 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/DefaultExpression/CurrentTimestamp.php @@ -0,0 +1,19 @@ +getCurrentTimestampSQL(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/DefaultSchemaManagerFactory.php b/backend/vendor/doctrine/dbal/src/Schema/DefaultSchemaManagerFactory.php new file mode 100644 index 0000000..efba87f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/DefaultSchemaManagerFactory.php @@ -0,0 +1,20 @@ +getDatabasePlatform()->createSchemaManager($connection); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Exception/ColumnAlreadyExists.php b/backend/vendor/doctrine/dbal/src/Schema/Exception/ColumnAlreadyExists.php new file mode 100644 index 0000000..c9bc82b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Exception/ColumnAlreadyExists.php @@ -0,0 +1,18 @@ +toString(), + $name2->toString(), + )); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Exception/IndexAlreadyExists.php b/backend/vendor/doctrine/dbal/src/Schema/Exception/IndexAlreadyExists.php new file mode 100644 index 0000000..6baec54 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Exception/IndexAlreadyExists.php @@ -0,0 +1,20 @@ +toString())); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidForeignKeyConstraintDefinition.php b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidForeignKeyConstraintDefinition.php new file mode 100644 index 0000000..427cbdf --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidForeignKeyConstraintDefinition.php @@ -0,0 +1,43 @@ +' : $constraintName->toString(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidIdentifier.php b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidIdentifier.php new file mode 100644 index 0000000..dc10cbc --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidIdentifier.php @@ -0,0 +1,16 @@ +toString())); + } + + public static function fromNonPositiveColumnLength(UnqualifiedName $columnName, int $length): self + { + return new self(sprintf( + 'Indexed column length must be a positive integer, %d given for column %s.', + $length, + $columnName->toString(), + )); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidName.php b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidName.php new file mode 100644 index 0000000..5053766 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidName.php @@ -0,0 +1,16 @@ +toString())); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidTableModification.php b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidTableModification.php new file mode 100644 index 0000000..0465ac4 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidTableModification.php @@ -0,0 +1,184 @@ +getObjectName()->toString(), + self::formatTableName($tableName), + ), previous: $previous); + } + + public static function columnDoesNotExist( + ?OptionallyQualifiedName $tableName, + ObjectDoesNotExist $previous, + ): self { + return new self(sprintf( + 'Column %s does not exist on table %s.', + $previous->getObjectName()->toString(), + self::formatTableName($tableName), + ), previous: $previous); + } + + public static function indexAlreadyExists( + ?OptionallyQualifiedName $tableName, + ObjectAlreadyExists $previous, + ): self { + return new self(sprintf( + 'Index %s already exists on table %s.', + $previous->getObjectName()->toString(), + self::formatTableName($tableName), + ), previous: $previous); + } + + public static function indexDoesNotExist( + ?OptionallyQualifiedName $tableName, + ObjectDoesNotExist $previous, + ): self { + return new self(sprintf( + 'Index %s does not exist on table %s.', + $previous->getObjectName()->toString(), + self::formatTableName($tableName), + ), previous: $previous); + } + + public static function primaryKeyConstraintAlreadyExists(?OptionallyQualifiedName $tableName): self + { + return new self(sprintf( + 'Primary key constraint already exists on table %s.', + self::formatTableName($tableName), + )); + } + + public static function primaryKeyConstraintDoesNotExist(?OptionallyQualifiedName $tableName): self + { + return new self(sprintf( + 'Primary key constraint does not exist on table %s.', + self::formatTableName($tableName), + )); + } + + public static function uniqueConstraintAlreadyExists( + ?OptionallyQualifiedName $tableName, + ObjectAlreadyExists $previous, + ): self { + return new self(sprintf( + 'Unique constraint %s already exists on table %s.', + $previous->getObjectName()->toString(), + self::formatTableName($tableName), + ), previous: $previous); + } + + public static function uniqueConstraintDoesNotExist( + ?OptionallyQualifiedName $tableName, + ObjectDoesNotExist $previous, + ): self { + return new self(sprintf( + 'Unique constraint %s does not exist on table %s.', + $previous->getObjectName()->toString(), + self::formatTableName($tableName), + ), previous: $previous); + } + + public static function foreignKeyConstraintAlreadyExists( + ?OptionallyQualifiedName $tableName, + ObjectAlreadyExists $previous, + ): self { + return new self(sprintf( + 'Foreign key constraint %s already exists on table %s.', + $previous->getObjectName()->toString(), + self::formatTableName($tableName), + ), previous: $previous); + } + + public static function foreignKeyConstraintDoesNotExist( + ?OptionallyQualifiedName $tableName, + ObjectDoesNotExist $previous, + ): self { + return new self(sprintf( + 'Foreign key constraint %s does not exist on table %s.', + $previous->getObjectName()->toString(), + self::formatTableName($tableName), + ), previous: $previous); + } + + public static function indexedColumnDoesNotExist( + ?OptionallyQualifiedName $tableName, + UnqualifiedName $indexName, + UnqualifiedName $columnName, + ): self { + return new self(sprintf( + 'Column %s referenced by index %s does not exist on table %s.', + $columnName->toString(), + $indexName->toString(), + self::formatTableName($tableName), + )); + } + + public static function primaryKeyConstraintColumnDoesNotExist( + ?OptionallyQualifiedName $tableName, + ?UnqualifiedName $constraintName, + UnqualifiedName $columnName, + ): self { + return new self(sprintf( + 'Column %s referenced by primary key constraint %s does not exist on table %s.', + $columnName->toString(), + self::formatConstraintName($constraintName), + self::formatTableName($tableName), + )); + } + + public static function uniqueConstraintColumnDoesNotExist( + ?OptionallyQualifiedName $tableName, + ?UnqualifiedName $constraintName, + UnqualifiedName $columnName, + ): self { + return new self(sprintf( + 'Column %s referenced by unique constraint %s does not exist on table %s.', + $columnName->toString(), + self::formatConstraintName($constraintName), + self::formatTableName($tableName), + )); + } + + public static function foreignKeyConstraintReferencingColumnDoesNotExist( + ?OptionallyQualifiedName $tableName, + ?UnqualifiedName $constraintName, + UnqualifiedName $columnName, + ): self { + return new self(sprintf( + 'Referencing column %s of foreign key constraint %s does not exist on table %s.', + $columnName->toString(), + self::formatConstraintName($constraintName), + self::formatTableName($tableName), + )); + } + + private static function formatTableName(?OptionallyQualifiedName $tableName): string + { + return $tableName === null ? '' : $tableName->toString(); + } + + private static function formatConstraintName(?UnqualifiedName $constraintName): string + { + return $constraintName === null ? '' : $constraintName->toString(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidTableName.php b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidTableName.php new file mode 100644 index 0000000..0433b0c --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidTableName.php @@ -0,0 +1,18 @@ +' : $constraintName->toString(), + )); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidViewDefinition.php b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidViewDefinition.php new file mode 100644 index 0000000..43c70a0 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Exception/InvalidViewDefinition.php @@ -0,0 +1,24 @@ +toString())); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Exception/NamespaceAlreadyExists.php b/backend/vendor/doctrine/dbal/src/Schema/Exception/NamespaceAlreadyExists.php new file mode 100644 index 0000000..2bad735 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Exception/NamespaceAlreadyExists.php @@ -0,0 +1,18 @@ +'; + } + + return new self(sprintf( + 'Unable to introspect foreign key constraint %s on table "%s" because the referenced column names' + . ' are omitted, and the referenced table "%s" does not exist or does not have a primary key.', + $constraintReference, + $referencingTableName, + $referencedTableName, + )); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint.php b/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint.php new file mode 100644 index 0000000..dd042ba --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint.php @@ -0,0 +1,799 @@ + + * @final This class will be made final in DBAL 5.0. + */ +class ForeignKeyConstraint extends AbstractOptionallyNamedObject +{ + /** + * Asset identifier instances of the referencing table column names the foreign key constraint is associated with. + * + * @deprecated + * + * @var non-empty-array + */ + protected array $_localColumnNames; + + /** + * Table or asset identifier instance of the referenced table name the foreign key constraint is associated with. + * + * @deprecated + */ + protected Identifier $_foreignTableName; + + /** + * Asset identifier instances of the referenced table column names the foreign key constraint is associated with. + * + * @deprecated + * + * @var non-empty-array + */ + protected array $_foreignColumnNames; + + /** + * Options associated with the foreign key constraint. + * + * @deprecated + * + * @var array + */ + protected array $options; + + /** + * Referencing table column names the foreign key constraint is associated with. + * + * An empty list indicates that an attempt to parse column names failed. + * + * @var list + */ + private readonly array $referencingColumnNames; + + /** + * Referenced table name the foreign key constraint is associated with. + * + * A null value indicates that an attempt to parse the table name failed. + */ + private readonly ?OptionallyQualifiedName $referencedTableName; + + /** + * Referenced table column names the foreign key constraint is associated with. + * + * An empty list indicates that an attempt to parse column names failed. + * + * @var list + */ + private readonly array $referencedColumnNames; + + /** + * The match type of the foreign key constraint. + * + * A null value indicates that an attempt to parse the match type failed. + */ + private readonly ?MatchType $matchType; + + /** + * The referential action for UPDATE operations. + * + * A null value indicates that an attempt to parse the referential action failed. + */ + private readonly ?ReferentialAction $onUpdateAction; + + /** + * The referential action for DELETE operations. + * + * A null value indicates that an attempt to parse the referential action failed. + */ + private readonly ?ReferentialAction $onDeleteAction; + + /** + * Indicates whether the constraint is or can be deferred. + * + * A null value indicates that the combination of the options that defined deferrability was invalid. + */ + private readonly ?Deferrability $deferrability; + + /** + * @internal Use {@link ForeignKeyConstraint::editor()} to instantiate an editor and + * {@link ForeignKeyConstraintEditor::create()} to create a foreign key constraint. + * + * @param non-empty-list $localColumnNames Names of the referencing table columns. + * @param string $foreignTableName Referenced table. + * @param non-empty-list $foreignColumnNames Names of the referenced table columns. + * @param string $name Name of the foreign key constraint. + * @param array $options Options associated with the foreign key constraint. + */ + public function __construct( + array $localColumnNames, + string $foreignTableName, + array $foreignColumnNames, + string $name = '', + array $options = [], + ) { + $this->options = $options; + + if (count($localColumnNames) < 1) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + 'Instantiation of a foreign key constraint without local column names is deprecated.', + ); + } + + if (count($foreignColumnNames) < 1) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + 'Instantiation of a foreign key constraint without foreign column names is deprecated.', + ); + } + + if (count($foreignColumnNames) !== count($localColumnNames)) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + 'Instantiation of a foreign key constraint with a different number of local and foreign' + . ' column names is deprecated.', + ); + } + + parent::__construct($name); + + $this->_localColumnNames = $this->createIdentifierMap($localColumnNames); + $this->_foreignTableName = new Identifier($foreignTableName); + + $this->_foreignColumnNames = $this->createIdentifierMap($foreignColumnNames); + + $this->referencingColumnNames = $this->parseColumnNames($localColumnNames); + $this->referencedTableName = $this->parseReferencedTableName($foreignTableName); + $this->referencedColumnNames = $this->parseColumnNames($foreignColumnNames); + + $this->matchType = $this->parseMatchType($options); + $this->onUpdateAction = $this->parseReferentialAction($options, 'onUpdate'); + $this->onDeleteAction = $this->parseReferentialAction($options, 'onDelete'); + + $this->deferrability = $this->parseDeferrability($options); + } + + protected function getNameParser(): UnqualifiedNameParser + { + return Parsers::getUnqualifiedNameParser(); + } + + /** + * Returns the names of the referencing table columns the foreign key constraint is associated with. + * + * @return non-empty-list + */ + public function getReferencingColumnNames(): array + { + if (count($this->referencingColumnNames) < 1) { + throw InvalidState::foreignKeyConstraintHasInvalidReferencingColumnNames($this->getName()); + } + + return $this->referencingColumnNames; + } + + /** + * Returns the names of the referenced table columns the foreign key constraint is associated with. + */ + public function getReferencedTableName(): OptionallyQualifiedName + { + if ($this->referencedTableName === null) { + throw InvalidState::foreignKeyConstraintHasInvalidReferencedTableName($this->getName()); + } + + return $this->referencedTableName; + } + + /** + * Returns the names of the referenced table columns the foreign key constraint is associated with. + * + * @return non-empty-list + */ + public function getReferencedColumnNames(): array + { + if (count($this->referencedColumnNames) < 1) { + throw InvalidState::foreignKeyConstraintHasInvalidReferencedColumnNames($this->getName()); + } + + return $this->referencedColumnNames; + } + + /** + * Returns the match type of the foreign key constraint. + */ + public function getMatchType(): MatchType + { + if ($this->matchType === null) { + throw InvalidState::foreignKeyConstraintHasInvalidMatchType($this->getName()); + } + + return $this->matchType; + } + + /** + * Returns the referential action for UPDATE operations. + */ + public function getOnUpdateAction(): ReferentialAction + { + if ($this->onUpdateAction === null) { + throw InvalidState::foreignKeyConstraintHasInvalidOnUpdateAction($this->getName()); + } + + return $this->onUpdateAction; + } + + /** + * Returns the referential action for DELETE operations. + */ + public function getOnDeleteAction(): ReferentialAction + { + if ($this->onDeleteAction === null) { + throw InvalidState::foreignKeyConstraintHasInvalidOnDeleteAction($this->getName()); + } + + return $this->onDeleteAction; + } + + /** + * Returns whether the constraint is or can be deferred. + */ + public function getDeferrability(): Deferrability + { + if ($this->deferrability === null) { + throw InvalidState::foreignKeyConstraintHasInvalidDeferrability($this->getName()); + } + + return $this->deferrability; + } + + /** + * @param non-empty-array $names + * + * @return non-empty-array + */ + private function createIdentifierMap(array $names): array + { + $identifiers = []; + + foreach ($names as $name) { + $identifiers[$name] = new Identifier($name); + } + + return $identifiers; + } + + /** + * Returns the names of the referencing table columns + * the foreign key constraint is associated with. + * + * @deprecated Use {@see getReferencingColumnNames()} instead. + * + * @return non-empty-list + */ + public function getLocalColumns(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getReferencingColumnNames() instead.', + __METHOD__, + ); + + return array_keys($this->_localColumnNames); + } + + /** + * @deprecated Use {@see getReferencingColumnNames()} and {@see UnqualifiedName::toSQL()} instead. + * + * Returns the quoted representation of the referencing table column names + * the foreign key constraint is associated with. + * + * But only if they were defined with one or the referencing table column name + * is a keyword reserved by the platform. + * Otherwise the plain unquoted value as inserted is returned. + * + * @param AbstractPlatform $platform The platform to use for quotation. + * + * @return non-empty-array + */ + public function getQuotedLocalColumns(AbstractPlatform $platform): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getReferencingColumnNames() and UnqualifiedName::toSQL() instead.', + __METHOD__, + ); + + $columns = []; + + foreach ($this->_localColumnNames as $column) { + $columns[] = $column->getQuotedName($platform); + } + + return $columns; + } + + /** + * @deprecated Use {@see getReferencingColumnNames()} instead. + * + * Returns unquoted representation of local table column names for comparison with other FK + * + * @return non-empty-array + */ + public function getUnquotedLocalColumns(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getReferencingColumnNames() instead.', + __METHOD__, + ); + + return array_map($this->trimQuotes(...), $this->getLocalColumns()); + } + + /** + * @deprecated Use {@see getReferencedColumnNames()} instead. + * + * Returns unquoted representation of foreign table column names for comparison with other FK + * + * @return non-empty-array + */ + public function getUnquotedForeignColumns(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getReferencedColumnNames() instead.', + __METHOD__, + ); + + return array_map($this->trimQuotes(...), $this->getForeignColumns()); + } + + /** + * @deprecated Use {@see getReferencedTableName()} instead. + * + * Returns the name of the referenced table + * the foreign key constraint is associated with. + */ + public function getForeignTableName(): string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getReferencedTableName() instead.', + __METHOD__, + ); + + return $this->_foreignTableName->getName(); + } + + /** + * @deprecated Use {@see getReferencedTableName()} instead. + * + * Returns the non-schema qualified foreign table name. + */ + public function getUnqualifiedForeignTableName(): string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getReferencedTableName() instead.', + __METHOD__, + ); + + $name = $this->_foreignTableName->getName(); + $position = strrpos($name, '.'); + + if ($position !== false) { + $name = substr($name, $position + 1); + } + + if ($this->isIdentifierQuoted($name)) { + $name = $this->trimQuotes($name); + } + + return strtolower($name); + } + + /** + * @deprecated Use {@see getReferencedTableName()} and {@see OptionallyQualifiedName::toSQL()} instead. + * + * Returns the quoted representation of the referenced table name + * the foreign key constraint is associated with. + * + * But only if it was defined with one or the referenced table name + * is a keyword reserved by the platform. + * Otherwise the plain unquoted value as inserted is returned. + * + * @param AbstractPlatform $platform The platform to use for quotation. + */ + public function getQuotedForeignTableName(AbstractPlatform $platform): string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getReferencedTableName() and OptionallyQualifiedName::toSQL() instead.', + __METHOD__, + ); + + return $this->_foreignTableName->getQuotedName($platform); + } + + /** + * @deprecated Use {@see getReferencedColumnNames()} instead. + * + * Returns the names of the referenced table columns + * the foreign key constraint is associated with. + * + * @return non-empty-array + */ + public function getForeignColumns(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getReferencedColumnNames() instead.', + __METHOD__, + ); + + return array_keys($this->_foreignColumnNames); + } + + /** + * @deprecated Use {@see getReferencedColumnNames()} and {@see UnqualifiedName::toSQL()} instead. + * + * Returns the quoted representation of the referenced table column names + * the foreign key constraint is associated with. + * + * But only if they were defined with one or the referenced table column name + * is a keyword reserved by the platform. + * Otherwise the plain unquoted value as inserted is returned. + * + * @param AbstractPlatform $platform The platform to use for quotation. + * + * @return non-empty-array + */ + public function getQuotedForeignColumns(AbstractPlatform $platform): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getReferencedColumnNames() and UnqualifiedName::toSQL() instead.', + __METHOD__, + ); + + $columns = []; + + foreach ($this->_foreignColumnNames as $column) { + $columns[] = $column->getQuotedName($platform); + } + + return $columns; + } + + /** + * @deprecated Use {@see getMatchType()}, {@see getOnDeleteAction()}, {@see getOnUpdateAction()} or + * {@see getDeferrability()} instead. + * + * Returns whether or not a given option + * is associated with the foreign key constraint. + */ + public function hasOption(string $name): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getMatchType(), getOnDeleteAction(), getOnUpdateAction() or' + . ' getDeferrability() instead.', + __METHOD__, + ); + + return isset($this->options[$name]); + } + + /** + * @deprecated Use {@see getMatchType()}, {@see getOnDeleteAction()}, {@see getOnUpdateAction()} or + * {@see getDeferrability()} instead. + * + * Returns an option associated with the foreign key constraint. + */ + public function getOption(string $name): mixed + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getMatchType(), getOnDeleteAction(), getOnUpdateAction() or' + . ' getDeferrability() instead.', + __METHOD__, + ); + + return $this->options[$name]; + } + + /** + * @deprecated Use {@see getMatchType()}, {@see getOnDeleteAction()}, {@see getOnUpdateAction()} or + * {@see getDeferrability()} instead. + * + * Returns the options associated with the foreign key constraint. + * + * @return array + */ + public function getOptions(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getMatchType(), getOnDeleteAction(), getOnUpdateAction() or' + . ' getDeferrability() instead.', + __METHOD__, + ); + + return $this->options; + } + + /** + * @deprecated Use {@see getOnUpdateAction()} instead. + * + * Returns the referential action for UPDATE operations + * on the referenced table the foreign key constraint is associated with. + */ + public function onUpdate(): ?string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getOnUpdateAction() instead.', + __METHOD__, + ); + + return $this->onEvent('onUpdate'); + } + + /** + * @deprecated Use {@see getOnDeleteAction()} instead. + * + * Returns the referential action for DELETE operations + * on the referenced table the foreign key constraint is associated with. + */ + public function onDelete(): ?string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated. Use getOnDeleteAction() instead.', + __METHOD__, + ); + + return $this->onEvent('onDelete'); + } + + private function parseReferencedTableName(string $referencedTableName): ?OptionallyQualifiedName + { + $parser = Parsers::getOptionallyQualifiedNameParser(); + + try { + return $parser->parse($referencedTableName); + } catch (Throwable $e) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + 'Unable to parse referenced table name: %s.', + $e->getMessage(), + ); + + return null; + } + } + + /** + * @param list $columnNames + * + * @return list + */ + private function parseColumnNames(array $columnNames): array + { + $parser = Parsers::getUnqualifiedNameParser(); + + try { + return array_map( + static fn (string $columnName) => $parser->parse($columnName), + $columnNames, + ); + } catch (Throwable $e) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + 'Unable to parse column name: %s.', + $e->getMessage(), + ); + + return []; + } + } + + /** @param array $options */ + private function parseMatchType(array $options): ?MatchType + { + if (isset($options['match'])) { + try { + /** + * This looks like a PHPStan bug. + * + * @phpstan-ignore missingType.checkedException + */ + return MatchType::from(strtoupper($options['match'])); + } catch (ValueError $e) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + 'Unable to parse match type: %s.', + $e->getMessage(), + ); + + return null; + } + } + + return MatchType::SIMPLE; + } + + /** @param array $options */ + private function parseReferentialAction(array $options, string $option): ?ReferentialAction + { + if (isset($options[$option])) { + try { + /** + * This looks like a PHPStan bug. + * + * @phpstan-ignore missingType.checkedException + */ + return ReferentialAction::from(strtoupper($options[$option])); + } catch (ValueError $e) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + 'Unable to parse referential action: %s.', + $e->getMessage(), + ); + + return null; + } + } + + return ReferentialAction::NO_ACTION; + } + + /** @param array $options */ + private function parseDeferrability(array $options): ?Deferrability + { + // a constraint is INITIALLY IMMEDIATE unless explicitly declared as INITIALLY DEFERRED + $isDeferred = isset($options['deferred']) && $options['deferred'] !== false; + + // a constraint is NOT DEFERRABLE unless explicitly declared as DEFERRABLE or is explicitly or implicitly + // INITIALLY DEFERRED + $isDeferrable = isset($options['deferrable']) + ? $options['deferrable'] !== false + : $isDeferred; + + if ($isDeferred) { + if (! $isDeferrable) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + 'Declaring a constraint as NOT DEFERRABLE INITIALLY DEFERRED is deprecated', + ); + + return null; + } + + return Deferrability::DEFERRED; + } + + return $isDeferrable ? Deferrability::DEFERRABLE : Deferrability::NOT_DEFERRABLE; + } + + /** + * Returns the referential action for a given database operation + * on the referenced table the foreign key constraint is associated with. + * + * @param string $event Name of the database operation/event to return the referential action for. + */ + private function onEvent(string $event): ?string + { + if (isset($this->options[$event])) { + $onEvent = strtoupper($this->options[$event]); + + if ($onEvent !== 'NO ACTION' && $onEvent !== 'RESTRICT') { + return $onEvent; + } + } + + return null; + } + + /** + * @deprecated + * + * Checks whether this foreign key constraint intersects the given index columns. + * + * Returns `true` if at least one of this foreign key's local columns + * matches one of the given index's columns, `false` otherwise. + * + * @param Index $index The index to be checked against. + */ + public function intersectsIndexColumns(Index $index): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6728', + '%s is deprecated.', + __METHOD__, + ); + + foreach ($index->getColumns() as $indexColumn) { + foreach ($this->_localColumnNames as $localColumn) { + if (strtolower($indexColumn) === strtolower($localColumn->getName())) { + return true; + } + } + } + + return false; + } + + /** + * Instantiates a new foreign key constraint editor. + */ + public static function editor(): ForeignKeyConstraintEditor + { + return new ForeignKeyConstraintEditor(); + } + + /** + * Instantiates a new foreign key constraint editor and initializes it with the constraint's properties. + */ + public function edit(): ForeignKeyConstraintEditor + { + return self::editor() + ->setName($this->getObjectName()) + ->setReferencedTableName($this->getReferencedTableName()) + ->setReferencingColumnNames(...$this->getReferencingColumnNames()) + ->setReferencedColumnNames(...$this->getReferencedColumnNames()) + ->setMatchType($this->getMatchType()) + ->setOnDeleteAction($this->getOnDeleteAction()) + ->setOnUpdateAction($this->getOnUpdateAction()) + ->setDeferrability($this->getDeferrability()); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint/Deferrability.php b/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint/Deferrability.php new file mode 100644 index 0000000..4bd09b9 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint/Deferrability.php @@ -0,0 +1,23 @@ +value; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint/MatchType.php b/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint/MatchType.php new file mode 100644 index 0000000..be67fda --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint/MatchType.php @@ -0,0 +1,33 @@ +" + * @link https://dev.mysql.com/doc/refman/8.4/en/constraint-foreign-key.html + * @link https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-PARMS-REFERENCES + * @link https://www.sqlite.org/foreignkeys.html + */ +enum MatchType: string +{ + case FULL = 'FULL'; + case PARTIAL = 'PARTIAL'; + + /** + * The SIMPLE match type is not part of the SQL-92 standard but is supported by and is the default + * for MySQL, PostgreSQL and SQLite. + */ + case SIMPLE = 'SIMPLE'; + + /** + * Returns the SQL representation of the match type. + */ + public function toSQL(): string + { + return $this->value; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint/ReferentialAction.php b/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint/ReferentialAction.php new file mode 100644 index 0000000..b565807 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint/ReferentialAction.php @@ -0,0 +1,38 @@ +" + * @link https://dev.mysql.com/doc/refman/8.4/en/constraint-foreign-key.html + * @link https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-PARMS-REFERENCES + * @link https://learn.microsoft.com/en-us/sql/relational-databases/tables/primary-and-foreign-key-constraints#cascading-referential-integrity + * @link https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/constraint.html + * @link https://www.ibm.com/docs/en/db2/11.5?topic=constraints-foreign-key-referential + * @link https://www.sqlite.org/foreignkeys.html + */ +enum ReferentialAction: string +{ + case CASCADE = 'CASCADE'; + case NO_ACTION = 'NO ACTION'; + case SET_DEFAULT = 'SET DEFAULT'; + case SET_NULL = 'SET NULL'; + + /** + * The RESTRICT referential action is not part of the SQL-92 standard but is supported by MySQL, + * PostgreSQL, IBM DB2 and SQLite. + */ + case RESTRICT = 'RESTRICT'; + + /** + * Returns the SQL representation of the referential action. + */ + public function toSQL(): string + { + return $this->value; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraintEditor.php b/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraintEditor.php new file mode 100644 index 0000000..d8378be --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/ForeignKeyConstraintEditor.php @@ -0,0 +1,275 @@ + */ + private array $referencingColumnNames = []; + + private ?OptionallyQualifiedName $referencedTableName = null; + + /** @var list */ + private array $referencedColumnNames = []; + + private MatchType $matchType = MatchType::SIMPLE; + + private ReferentialAction $onUpdateAction = ReferentialAction::NO_ACTION; + + private ReferentialAction $onDeleteAction = ReferentialAction::NO_ACTION; + + private Deferrability $deferrability = Deferrability::NOT_DEFERRABLE; + + /** + * @internal Use {@link ForeignKeyConstraint::editor()} or {@link ForeignKeyConstraint::edit()} to create + * an instance. + */ + public function __construct() + { + } + + public function setName(?UnqualifiedName $name): self + { + $this->name = $name; + + return $this; + } + + /** @param non-empty-string $name */ + public function setUnquotedName(string $name): self + { + $this->name = UnqualifiedName::unquoted($name); + + return $this; + } + + /** @param non-empty-string $name */ + public function setQuotedName(string $name): self + { + $this->name = UnqualifiedName::quoted($name); + + return $this; + } + + public function setReferencingColumnNames( + UnqualifiedName $firstColumnName, + UnqualifiedName ...$otherColumnNames, + ): self { + $this->referencingColumnNames = [$firstColumnName, ...array_values($otherColumnNames)]; + + return $this; + } + + /** + * @param non-empty-string $firstColumnName + * @param non-empty-string ...$otherColumnNames + */ + public function setUnquotedReferencingColumnNames( + string $firstColumnName, + string ...$otherColumnNames, + ): self { + $this->referencingColumnNames = array_map( + static fn (string $name): UnqualifiedName => UnqualifiedName::unquoted($name), + [$firstColumnName, ...array_values($otherColumnNames)], + ); + + return $this; + } + + /** + * @param non-empty-string $firstColumnName + * @param non-empty-string ...$otherColumnNames + */ + public function setQuotedReferencingColumnNames( + string $firstColumnName, + string ...$otherColumnNames, + ): self { + $this->referencingColumnNames = array_map( + static fn (string $name): UnqualifiedName => UnqualifiedName::quoted($name), + [$firstColumnName, ...array_values($otherColumnNames)], + ); + + return $this; + } + + public function addReferencingColumnName(UnqualifiedName $columName): self + { + $this->referencingColumnNames[] = $columName; + + return $this; + } + + public function setReferencedTableName(OptionallyQualifiedName $referencedTableName): self + { + $this->referencedTableName = $referencedTableName; + + return $this; + } + + /** + * @param non-empty-string $unqualifiedReferencedTableName + * @param ?non-empty-string $referencedTableNameQualifier + */ + public function setUnquotedReferencedTableName( + string $unqualifiedReferencedTableName, + ?string $referencedTableNameQualifier = null, + ): self { + $this->referencedTableName = + OptionallyQualifiedName::unquoted($unqualifiedReferencedTableName, $referencedTableNameQualifier); + + return $this; + } + + /** + * @param non-empty-string $unqualifiedReferencedTableName + * @param ?non-empty-string $referencedTableNameQualifier + */ + public function setQuotedReferencedTableName( + string $unqualifiedReferencedTableName, + ?string $referencedTableNameQualifier = null, + ): self { + $this->referencedTableName = + OptionallyQualifiedName::quoted($unqualifiedReferencedTableName, $referencedTableNameQualifier); + + return $this; + } + + public function setReferencedColumnNames( + UnqualifiedName $firstColumnName, + UnqualifiedName ...$otherColumnNames, + ): self { + $this->referencedColumnNames = [$firstColumnName, ...array_values($otherColumnNames)]; + + return $this; + } + + /** + * @param non-empty-string $firstColumnName + * @param non-empty-string ...$otherColumnNames + */ + public function setUnquotedReferencedColumnNames( + string $firstColumnName, + string ...$otherColumnNames, + ): self { + $this->referencedColumnNames = array_map( + static fn (string $name): UnqualifiedName => UnqualifiedName::unquoted($name), + [$firstColumnName, ...array_values($otherColumnNames)], + ); + + return $this; + } + + /** + * @param non-empty-string $firstColumnName + * @param non-empty-string ...$otherColumnNames + */ + public function setQuotedReferencedColumnNames( + string $firstColumnName, + string ...$otherColumnNames, + ): self { + $this->referencedColumnNames = array_map( + static fn (string $name): UnqualifiedName => UnqualifiedName::quoted($name), + [$firstColumnName, ...array_values($otherColumnNames)], + ); + + return $this; + } + + public function addReferencedColumnName(UnqualifiedName $columName): self + { + $this->referencedColumnNames[] = $columName; + + return $this; + } + + public function setMatchType(MatchType $matchType): self + { + $this->matchType = $matchType; + + return $this; + } + + public function setOnUpdateAction(ReferentialAction $action): self + { + $this->onUpdateAction = $action; + + return $this; + } + + public function setOnDeleteAction(ReferentialAction $action): self + { + $this->onDeleteAction = $action; + + return $this; + } + + public function setDeferrability(Deferrability $deferrability): self + { + $this->deferrability = $deferrability; + + return $this; + } + + public function create(): ForeignKeyConstraint + { + if (count($this->referencingColumnNames) < 1) { + throw InvalidForeignKeyConstraintDefinition::referencingColumnNamesNotSet($this->name); + } + + if ($this->referencedTableName === null) { + throw InvalidForeignKeyConstraintDefinition::referencedTableNameNotSet($this->name); + } + + if (count($this->referencedColumnNames) < 1) { + throw InvalidForeignKeyConstraintDefinition::referencedColumnNamesNotSet($this->name); + } + + $options = []; + + if ($this->matchType !== MatchType::SIMPLE) { + $options['match'] = $this->matchType->value; + } + + if ($this->onUpdateAction !== ReferentialAction::NO_ACTION) { + $options['onUpdate'] = $this->onUpdateAction->value; + } + + if ($this->onDeleteAction !== ReferentialAction::NO_ACTION) { + $options['onDelete'] = $this->onDeleteAction->value; + } + + return new ForeignKeyConstraint( + array_map( + static fn (UnqualifiedName $columnName) => $columnName->toString(), + $this->referencingColumnNames, + ), + $this->referencedTableName->toString(), + array_map( + static fn (UnqualifiedName $columnName) => $columnName->toString(), + $this->referencedColumnNames, + ), + $this->name?->toString() ?? '', + array_merge($options, match ($this->deferrability) { + Deferrability::NOT_DEFERRABLE => [], + Deferrability::DEFERRABLE => ['deferrable' => true], + Deferrability::DEFERRED => ['deferrable' => true, 'deferred' => true], + }), + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Identifier.php b/backend/vendor/doctrine/dbal/src/Schema/Identifier.php new file mode 100644 index 0000000..5382026 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Identifier.php @@ -0,0 +1,42 @@ + + */ +class Identifier extends AbstractNamedObject +{ + /** + * @param string $identifier Identifier name to wrap. + * @param bool $quote Whether to force quoting the given identifier. + */ + public function __construct(string $identifier, bool $quote = false) + { + parent::__construct($identifier); + + if (! $quote || $this->_quoted) { + return; + } + + $this->_setName('"' . $this->getName() . '"'); + } + + protected function getNameParser(): GenericNameParser + { + return Parsers::getGenericNameParser(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Index.php b/backend/vendor/doctrine/dbal/src/Schema/Index.php new file mode 100644 index 0000000..777348f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Index.php @@ -0,0 +1,761 @@ + + */ +class Index extends AbstractNamedObject +{ + /** + * Asset identifier instances of the column names the index is associated with. + * + * @deprecated Use {@see getIndexedColumns()} instead. + * + * @var array + */ + protected array $_columns = []; + + /** @deprecated Use {@see getType()} and compare with {@see IndexType::UNIQUE} instead. */ + protected bool $_isUnique = false; + + /** @deprecated Use {@see PrimaryKeyConstraint} instead. */ + protected bool $_isPrimary = false; + + /** + * Platform specific flags for indexes. + * + * @deprecated + * + * @var array + */ + protected array $_flags = []; + + /** + * Column the index is associated with. + * + * An empty list indicates that an attempt to parse indexed columns failed. + * + * @var list + */ + private readonly array $columns; + + /** + * Index type. + * + * A null value indicates that an attempt to parse the index type failed. + */ + private ?IndexType $type = null; + + private ?string $predicate = null; + + private bool $failedToParsePredicate = false; + + /** + * @internal Use {@link Index::editor()} to instantiate an editor and {@link IndexEditor::create()} to create an + * index. + * + * @param non-empty-list $columns + * @param array $flags + * @param array $options + */ + public function __construct( + ?string $name, + array $columns, + bool $isUnique = false, + bool $isPrimary = false, + array $flags = [], + private readonly array $options = [], + ) { + parent::__construct($name ?? ''); + + if (count($columns) < 1) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6787', + 'Instantiation of an index without column names is deprecated.', + ); + } + + if ($isPrimary) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6867', + 'Declaring an index as primary is deprecated. Use PrimaryKeyConstraint instead.', + ); + } + + $this->_isUnique = $isUnique || $isPrimary; + $this->_isPrimary = $isPrimary; + + foreach ($columns as $column) { + $this->_addColumn($column); + } + + if (isset($options['where'])) { + $predicate = $options['where']; + + if (strlen($predicate) === 0) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + 'Passing an empty string as index predicate is deprecated.', + ); + + $this->failedToParsePredicate = true; + } else { + $this->predicate = $predicate; + } + } + + foreach ($flags as $flag) { + $this->addFlag($flag); + } + + if (count($flags) === 0) { + $this->type = $this->inferType(); + } + + $this->columns = $this->parseColumns($isPrimary, $columns, $options['lengths'] ?? []); + } + + protected function getNameParser(): UnqualifiedNameParser + { + return Parsers::getUnqualifiedNameParser(); + } + + public function getType(): IndexType + { + if ($this->type === null) { + throw InvalidState::indexHasInvalidType($this->getName()); + } + + return $this->type; + } + + /** + * Returns the indexed columns. + * + * @return non-empty-list + */ + public function getIndexedColumns(): array + { + if (count($this->columns) < 1) { + throw InvalidState::indexHasInvalidColumns($this->getName()); + } + + return $this->columns; + } + + /** + * Returns whether the index is clustered. + */ + public function isClustered(): bool + { + return $this->hasFlag('clustered'); + } + + /** + * Returns the index predicate. + * + * @return ?non-empty-string + */ + public function getPredicate(): ?string + { + if ($this->failedToParsePredicate) { + throw InvalidState::indexHasInvalidPredicate($this->getName()); + } + + return $this->hasOption('where') + ? $this->getOption('where') + : null; + } + + protected function _addColumn(string $column): void + { + $this->_columns[$column] = new Identifier($column); + } + + /** + * Returns the names of the referencing table columns the constraint is associated with. + * + * @deprecated Use {@see getIndexedColumns()} instead. + * + * @return non-empty-list + */ + public function getColumns(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::getIndexedColumns() instead.', + __METHOD__, + ); + + /** @phpstan-ignore return.type */ + return array_keys($this->_columns); + } + + /** + * Returns the quoted representation of the column names the constraint is associated with. + * + * But only if they were defined with one or a column name + * is a keyword reserved by the platform. + * Otherwise, the plain unquoted value as inserted is returned. + * + * @deprecated Use {@see getIndexedColumns()} instead. + * + * @param AbstractPlatform $platform The platform to use for quotation. + * + * @return list + */ + public function getQuotedColumns(AbstractPlatform $platform): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::getIndexedColumns() instead.', + __METHOD__, + ); + + $subParts = $platform->supportsColumnLengthIndexes() && $this->hasOption('lengths') + ? $this->getOption('lengths') : []; + + $columns = []; + + foreach ($this->_columns as $column) { + $length = array_shift($subParts); + + $quotedColumn = $column->getQuotedName($platform); + + if ($length !== null) { + $quotedColumn .= '(' . $length . ')'; + } + + $columns[] = $quotedColumn; + } + + return $columns; + } + + /** + * @deprecated Use {@see getIndexedColumns()} instead. + * + * @return non-empty-list + */ + public function getUnquotedColumns(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::getIndexedColumns() instead.', + __METHOD__, + ); + + return array_map($this->trimQuotes(...), $this->getColumns()); + } + + /** + * Is the index neither unique nor primary key? + * + * @deprecated Use {@see getType()} and compare with {@see IndexType::REGULAR} instead. + */ + public function isSimpleIndex(): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::getType() and compare with IndexType::REGULAR instead.', + __METHOD__, + ); + + return ! $this->_isPrimary && ! $this->_isUnique; + } + + /** @deprecated Use {@see getType()} and compare with {@see IndexType::UNIQUE} instead. */ + public function isUnique(): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::getType() and compare with IndexType::UNIQUE instead.', + __METHOD__, + ); + + return $this->_isUnique; + } + + /** @deprecated Use {@see PrimaryKeyConstraint} instead. */ + public function isPrimary(): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6867', + 'Checking whether an index is primary is deprecated. Use PrimaryKeyConstraint instead.', + ); + + return $this->_isPrimary; + } + + /** @deprecated Use {@see getIndexedColumns()} instead. */ + public function hasColumnAtPosition(string $name, int $pos = 0): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::getIndexedColumns() instead.', + __METHOD__, + ); + + $name = $this->trimQuotes(strtolower($name)); + $indexColumns = array_map('strtolower', $this->getUnquotedColumns()); + + return array_search($name, $indexColumns, true) === $pos; + } + + /** + * Checks if this index exactly spans the given column names in the correct order. + * + * @internal + * + * @param array $columnNames + */ + public function spansColumns(array $columnNames): bool + { + $columns = $this->getColumns(); + $numberOfColumns = count($columns); + $sameColumns = true; + + for ($i = 0; $i < $numberOfColumns; $i++) { + if ( + isset($columnNames[$i]) + && $this->trimQuotes(strtolower($columns[$i])) === $this->trimQuotes(strtolower($columnNames[$i])) + ) { + continue; + } + + $sameColumns = false; + } + + return $sameColumns; + } + + /** + * Checks if the other index already fulfills all the indexing and constraint needs of the current one. + */ + public function isFulfilledBy(Index $other): bool + { + // allow the other index to be equally large only. It being larger is an option + // but it creates a problem with scenarios of the kind PRIMARY KEY(foo,bar) UNIQUE(foo) + if (count($other->getColumns()) !== count($this->getColumns())) { + return false; + } + + // Check if columns are the same, and even in the same order + $sameColumns = $this->spansColumns($other->getColumns()); + + if ($sameColumns) { + if (! $this->samePartialIndex($other)) { + return false; + } + + if (! $this->hasSameColumnLengths($other)) { + return false; + } + + if (! $this->isUnique() && ! $this->isPrimary()) { + // this is a special case: If the current key is neither primary or unique, any unique or + // primary key will always have the same effect for the index and there cannot be any constraint + // overlaps. This means a primary or unique index can always fulfill the requirements of just an + // index that has no constraints. + return true; + } + + if ($other->isPrimary() !== $this->isPrimary()) { + return false; + } + + return $other->isUnique() === $this->isUnique(); + } + + return false; + } + + /** + * Detects if the other index is a non-unique, non primary index that can be overwritten by this one. + * + * @deprecated + */ + public function overrules(Index $other): bool + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated.', + __METHOD__, + ); + + if ($other->isPrimary()) { + return false; + } + + if ($this->isSimpleIndex() && $other->isUnique()) { + return false; + } + + return $this->spansColumns($other->getColumns()) + && ($this->isPrimary() || $this->isUnique()) + && $this->samePartialIndex($other); + } + + /** + * Returns platform specific flags for indexes. + * + * @deprecated Use {@see getType()} and {@see isClustered()} instead. + * + * @return array + */ + public function getFlags(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::getType() and Index::isClustered() instead.', + __METHOD__, + ); + + return array_keys($this->_flags); + } + + /** + * Adds Flag for an index that translates to platform specific handling. + * + * @deprecated Use {@see edit()}, {@see IndexEditor::setType()} and {@see IndexEditor::setIsClustered()} instead. + * + * @example $index->addFlag('CLUSTERED') + */ + public function addFlag(string $flag): self + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::edit(), IndexEditor::setType() and IndexEditor::setIsClustered()' + . ' instead.', + __METHOD__, + ); + + $this->_flags[strtolower($flag)] = true; + + $this->validateFlags(); + + $this->type = $this->inferType(); + + return $this; + } + + /** + * Does this index have a specific flag? + * + * @deprecated Use {@see getType()} and {@see isClustered()} instead. + */ + public function hasFlag(string $flag): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::getType() and Index::isClustered() instead.', + __METHOD__, + ); + + return isset($this->_flags[strtolower($flag)]); + } + + /** + * @deprecated Use {@see edit()}, {@see IndexEditor::setType()} and {@see IndexEditor::setIsClustered()} + * instead. + */ + public function removeFlag(string $flag): void + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::edit(), IndexEditor::setType() and IndexEditor::setIsClustered()' + . ' instead.', + __METHOD__, + ); + + unset($this->_flags[strtolower($flag)]); + + $this->type = $this->inferType(); + } + + /** @deprecated Use {@see getIndexedColumns()} and {@see getPredicate()} instead. */ + public function hasOption(string $name): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::getIndexedColumns() and Index::getPredicate() instead.', + __METHOD__, + ); + + return isset($this->options[strtolower($name)]); + } + + /** @deprecated Use {@see getIndexedColumns()} and {@see getPredicate()} instead. */ + public function getOption(string $name): mixed + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::getIndexedColumns() and Index::getPredicate() instead.', + __METHOD__, + ); + + return $this->options[strtolower($name)]; + } + + /** + * @deprecated Use {@see getIndexedColumns()} and {@see getPredicate()} instead. + * + * @return array + */ + public function getOptions(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + '%s is deprecated. Use Index::getIndexedColumns() and Index::getPredicate() instead.', + __METHOD__, + ); + + return $this->options; + } + + private function validateFlags(): void + { + $unsupportedFlags = $this->_flags; + unset( + $unsupportedFlags['fulltext'], + $unsupportedFlags['spatial'], + $unsupportedFlags['clustered'], + $unsupportedFlags['nonclustered'], + ); + + if (count($unsupportedFlags) > 0) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + 'Configuring an index with non-standard flags is deprecated: %s', + implode(', ', array_keys($unsupportedFlags)), + ); + } + + if ( + $this->hasFlag('clustered') && ( + $this->hasFlag('nonclustered') + || $this->hasFlag('fulltext') + || $this->hasFlag('spatial') + ) + ) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + 'A fulltext, spatial or non-clustered index cannot be clustered.', + ); + } + + if ( + $this->predicate === null + || (! $this->hasFlag('fulltext') + && ! $this->hasFlag('spatial') + && ! $this->hasFlag('clustered')) + ) { + return; + } + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + 'A fulltext, spatial or clustered index cannot be partial.', + ); + } + + private function inferType(): ?IndexType + { + $type = IndexType::REGULAR; + $matches = []; + + if ($this->_isUnique) { + $type = IndexType::UNIQUE; + $matches[] = 'unique'; + } + + if ($this->hasFlag('fulltext')) { + $type = IndexType::FULLTEXT; + $matches[] = 'fulltext'; + } + + if ($this->hasFlag('spatial')) { + $type = IndexType::SPATIAL; + $matches[] = 'spatial'; + } + + if (count($matches) > 1) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6886', + 'Configuring an index with mutually exclusive properties is deprecated: %s', + implode(', ', $matches), + ); + + return null; + } + + return $type; + } + + /** + * @param non-empty-array $columnNames + * @param array $lengths + * + * @return list + */ + private function parseColumns(bool $isPrimary, array $columnNames, array $lengths): array + { + $columns = []; + + $parser = Parsers::getUnqualifiedNameParser(); + + foreach ($columnNames as $columnName) { + try { + $parsedName = $parser->parse($columnName); + } catch (Throwable $e) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6787', + 'Unable to parse column name: %s.', + $e->getMessage(), + ); + + return []; + } + + $length = array_shift($lengths); + + if ($length !== null) { + if ($isPrimary) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6787', + 'Declaring column length for primary key indexes is deprecated.', + ); + + return []; + } + + if (! is_int($length)) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6787', + 'Indexed column length should be an integer, %s given.', + is_object($length) ? $length::class : gettype($length), + ); + + $length = (int) $length; + } + + if ($length < 1) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6787', + 'Indexed column length should be a positive integer, %d given.', + $length, + ); + + return []; + } + } + + $columns[] = new IndexedColumn($parsedName, $length); + } + + return $columns; + } + + /** + * Return whether the two indexes have the same partial index + */ + private function samePartialIndex(Index $other): bool + { + if ( + $this->hasOption('where') + && $other->hasOption('where') + && $this->getOption('where') === $other->getOption('where') + ) { + return true; + } + + return ! $this->hasOption('where') && ! $other->hasOption('where'); + } + + /** + * Returns whether the index has the same column lengths as the other + */ + private function hasSameColumnLengths(self $other): bool + { + $filter = static function (?int $length): bool { + return $length !== null; + }; + + return array_filter($this->options['lengths'] ?? [], $filter) + === array_filter($other->options['lengths'] ?? [], $filter); + } + + /** + * Instantiates a new index editor. + */ + public static function editor(): IndexEditor + { + return new IndexEditor(); + } + + /** + * Instantiates a new index editor and initializes it with the properties of the current index. + */ + public function edit(): IndexEditor + { + return self::editor() + ->setName($this->getObjectName()) + ->setType($this->getType()) + ->setColumns(...$this->getIndexedColumns()) + ->setIsClustered($this->isClustered()) + ->setPredicate($this->getPredicate()); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Index/IndexType.php b/backend/vendor/doctrine/dbal/src/Schema/Index/IndexType.php new file mode 100644 index 0000000..6466688 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Index/IndexType.php @@ -0,0 +1,13 @@ +columnName; + } + + /** @return ?positive-int */ + public function getLength(): ?int + { + return $this->length; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/IndexEditor.php b/backend/vendor/doctrine/dbal/src/Schema/IndexEditor.php new file mode 100644 index 0000000..8f6ca52 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/IndexEditor.php @@ -0,0 +1,185 @@ + */ + private array $columns = []; + + private bool $isClustered = false; + + /** @var ?non-empty-string */ + private ?string $predicate = null; + + /** @internal Use {@link Index::editor()} or {@link Index::edit()} to create an instance */ + public function __construct() + { + } + + public function setName(?UnqualifiedName $name): self + { + $this->name = $name; + + return $this; + } + + /** @param non-empty-string $name */ + public function setUnquotedName(string $name): self + { + $this->name = UnqualifiedName::unquoted($name); + + return $this; + } + + /** @param non-empty-string $name */ + public function setQuotedName(string $name): self + { + $this->name = UnqualifiedName::quoted($name); + + return $this; + } + + public function setType(IndexType $type): self + { + $this->type = $type; + + return $this; + } + + public function setColumns(IndexedColumn $firstColumn, IndexedColumn ...$otherColumns): self + { + $this->columns = [$firstColumn, ...array_values($otherColumns)]; + + return $this; + } + + public function addColumn(IndexedColumn $column): self + { + $this->columns[] = $column; + + return $this; + } + + public function setColumnNames(UnqualifiedName $firstColumnName, UnqualifiedName ...$otherColumnNames): self + { + $this->columns = array_map( + static fn (UnqualifiedName $name) => new IndexedColumn($name, null), + [$firstColumnName, ...array_values($otherColumnNames)], + ); + + return $this; + } + + /** + * @param non-empty-string $firstColumnName + * @param non-empty-string ...$otherColumnNames + */ + public function setUnquotedColumnNames( + string $firstColumnName, + string ...$otherColumnNames, + ): self { + $this->columns = array_map( + static fn (string $name): IndexedColumn => new IndexedColumn(UnqualifiedName::unquoted($name), null), + [$firstColumnName, ...array_values($otherColumnNames)], + ); + + return $this; + } + + /** + * @param non-empty-string $firstColumnName + * @param non-empty-string ...$otherColumnNames + */ + public function setQuotedColumnNames( + string $firstColumnName, + string ...$otherColumnNames, + ): self { + $this->columns = array_map( + static fn (string $name): IndexedColumn => new IndexedColumn(UnqualifiedName::quoted($name), null), + [$firstColumnName, ...array_values($otherColumnNames)], + ); + + return $this; + } + + public function setIsClustered(bool $isClustered): self + { + $this->isClustered = $isClustered; + + return $this; + } + + /** @param ?non-empty-string $predicate */ + public function setPredicate(?string $predicate): self + { + $this->predicate = $predicate; + + return $this; + } + + public function create(): Index + { + if ($this->name === null) { + throw InvalidIndexDefinition::nameNotSet(); + } + + if (count($this->columns) < 1) { + throw InvalidIndexDefinition::columnsNotSet($this->name); + } + + $columnNames = $lengths = $options = $flags = []; + foreach ($this->columns as $i => $column) { + $columnNames[] = $column->getColumnName()->toString(); + + $length = $column->getLength(); + if ($length === null) { + continue; + } + + $lengths[$i] = $column->getLength(); + } + + if (count($lengths) !== 0) { + $options['lengths'] = $lengths; + } + + if ($this->type === IndexType::FULLTEXT) { + $flags[] = 'fulltext'; + } elseif ($this->type === IndexType::SPATIAL) { + $flags[] = 'spatial'; + } + + if ($this->isClustered) { + $flags[] = 'clustered'; + } + + if ($this->predicate !== null) { + $options['where'] = $this->predicate; + } + + return new Index( + $this->name->toString(), + $columnNames, + $this->type === IndexType::UNIQUE, + false, + $flags, + $options, + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Introspection/IntrospectingSchemaProvider.php b/backend/vendor/doctrine/dbal/src/Schema/Introspection/IntrospectingSchemaProvider.php new file mode 100644 index 0000000..a46fe79 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Introspection/IntrospectingSchemaProvider.php @@ -0,0 +1,413 @@ +NULL schema key in results grouped by schema name. + * + * The value should be a valid array key but, ideally, not a valid schema name, so an empty string looks like a + * perfect fit. + */ + private const NULL_SCHEMA_KEY = ''; + + /** @param ?non-empty-string $currentSchemaName */ + public function __construct( + private MetadataProvider $metadataProvider, + private ?string $currentSchemaName, + private TableConfiguration $tableConfiguration, + ) { + } + + /** {@inheritDoc} */ + public function getAllDatabaseNames(): array + { + $databaseNames = []; + + foreach ($this->metadataProvider->getAllDatabaseNames() as $row) { + $databaseNames[] = UnqualifiedName::quoted($row->getDatabaseName()); + } + + return $databaseNames; + } + + /** {@inheritDoc} */ + public function getAllSchemaNames(): array + { + $schemaNames = []; + + foreach ($this->metadataProvider->getAllSchemaNames() as $row) { + $schemaNames[] = UnqualifiedName::quoted($row->getSchemaName()); + } + + return $schemaNames; + } + + /** {@inheritDoc} */ + public function getAllTables(): array + { + $tableColumnsByTable = $this->getColumnsForAllTables(); + $indexesByTable = $this->getIndexesForAllTables(); + $primaryKeyConstraintsByTable = $this->getPrimaryKeyConstraintsForAllTables(); + $foreignKeyConstraintsByTable = $this->getForeignKeyConstraintsForAllTables(); + $tableOptionsByTable = $this->getOptionsForAllTables(); + + $tables = []; + + foreach ($tableColumnsByTable as $schemaNameKey => $schemaTables) { + if ($schemaNameKey !== self::NULL_SCHEMA_KEY && $schemaNameKey !== $this->currentSchemaName) { + $schemaName = $schemaNameKey; + } else { + $schemaName = null; + } + + foreach ($schemaTables as $unqualifiedName => $tableColumns) { + $editor = Table::editor() + ->setName( + OptionallyQualifiedName::quoted($unqualifiedName, $schemaName), + ) + ->setColumns(...$tableColumns) + ->setIndexes( + ...$indexesByTable[$schemaNameKey][$unqualifiedName] ?? [], + ); + + if (isset($primaryKeyConstraintsByTable[$schemaNameKey][$unqualifiedName])) { + $editor->setPrimaryKeyConstraint( + $primaryKeyConstraintsByTable[$schemaNameKey][$unqualifiedName], + ); + } + + if (isset($foreignKeyConstraintsByTable[$schemaNameKey][$unqualifiedName])) { + $editor->setForeignKeyConstraints( + ...$foreignKeyConstraintsByTable[$schemaNameKey][$unqualifiedName], + ); + } + + if (isset($tableOptionsByTable[$schemaNameKey][$unqualifiedName])) { + $editor->setOptions($tableOptionsByTable[$schemaNameKey][$unqualifiedName]); + } + + $tables[] = $editor + ->setConfiguration($this->tableConfiguration) + ->create(); + } + } + + return $tables; + } + + /** {@inheritDoc} */ + public function getAllTableNames(): array + { + $tableNames = []; + + foreach ($this->metadataProvider->getAllTableNames() as $row) { + $schemaName = $row->getSchemaName(); + $tableName = $row->getTableName(); + + if ($schemaName === $this->currentSchemaName) { + $schemaName = null; + } + + $tableNames[] = OptionallyQualifiedName::quoted($tableName, $schemaName); + } + + return $tableNames; + } + + /** {@inheritDoc} */ + public function getColumnsForTable(?string $schemaName, string $tableName): array + { + $columns = []; + + foreach ($this->metadataProvider->getTableColumnsForTable($schemaName, $tableName) as $row) { + $columns[] = $row->getColumn(); + } + + return $columns; + } + + /** + * Returns columns of all tables, grouped by schema and table. + * + * If the underlying database does not support schemas, the schema key will be {@link NULL_SCHEMA_KEY}. + * + * @return array>> + * + * @throws Exception + */ + private function getColumnsForAllTables(): array + { + $columns = []; + + foreach ($this->metadataProvider->getTableColumnsForAllTables() as $row) { + $schemaName = $row->getSchemaName() ?? self::NULL_SCHEMA_KEY; + $tableName = $row->getTableName(); + + $columns[$schemaName][$tableName][] = $row->getColumn(); + } + + return $columns; + } + + /** {@inheritDoc} */ + public function getIndexesForTable(?string $schemaName, string $tableName): array + { + $editors = []; + $processor = new IndexColumnMetadataProcessor(); + + foreach ($this->metadataProvider->getIndexColumnsForTable($schemaName, $tableName) as $row) { + $indexName = $row->getIndexName(); + + if (! isset($editors[$indexName])) { + $editors[$indexName] = $processor->initializeEditor($row); + } + + $processor->applyRow($editors[$indexName], $row); + } + + return array_map( + static fn (IndexEditor $e): Index => $e->create(), + array_values($editors), + ); + } + + /** + * Returns indexes for all tables, grouped by schema and table. + * + * If the underlying database does not support schemas, the schema key will be {@link NULL_SCHEMA_KEY}. + * + * @return array>> + * + * @throws Exception + */ + private function getIndexesForAllTables(): array + { + $editors = []; + $processor = new IndexColumnMetadataProcessor(); + + foreach ($this->metadataProvider->getIndexColumnsForAllTables() as $row) { + $schemaName = $row->getSchemaName() ?? self::NULL_SCHEMA_KEY; + $tableName = $row->getTableName(); + $indexName = $row->getIndexName(); + + if (! isset($editors[$schemaName][$tableName][$indexName])) { + $editors[$schemaName][$tableName][$indexName] = $processor->initializeEditor($row); + } + + $processor->applyRow($editors[$schemaName][$tableName][$indexName], $row); + } + + return array_map( + static fn (array $editors): array => array_map( + static fn (array $editors): array => array_map( + static fn (IndexEditor $editor): Index => $editor->create(), + array_values($editors), + ), + $editors, + ), + $editors, + ); + } + + public function getPrimaryKeyConstraintForTable(?string $schemaName, string $tableName): ?PrimaryKeyConstraint + { + $editor = null; + $processor = new PrimaryKeyConstraintColumnMetadataProcessor(); + + foreach ($this->metadataProvider->getPrimaryKeyConstraintColumnsForTable($schemaName, $tableName) as $row) { + $editor ??= $processor->initializeEditor($row); + + $processor->applyRow($editor, $row); + } + + return $editor?->create(); + } + + /** + * Returns the primary key constraints for all tables, grouped by schema and table. + * + * If the underlying database does not support schemas, the schema key will be {@link NULL_SCHEMA_KEY}. + * + * @return array> + * + * @throws Exception + */ + private function getPrimaryKeyConstraintsForAllTables(): array + { + $editors = []; + $processor = new PrimaryKeyConstraintColumnMetadataProcessor(); + + foreach ($this->metadataProvider->getPrimaryKeyConstraintColumnsForAllTables() as $row) { + $schemaName = $row->getSchemaName() ?? self::NULL_SCHEMA_KEY; + $tableName = $row->getTableName(); + + if (! isset($editors[$schemaName][$tableName])) { + $editors[$schemaName][$tableName] = $processor->initializeEditor($row); + } + + $processor->applyRow($editors[$schemaName][$tableName], $row); + } + + return array_map( + static fn (array $editors): array => array_map( + static fn (PrimaryKeyConstraintEditor $editor): PrimaryKeyConstraint => $editor->create(), + $editors, + ), + $editors, + ); + } + + /** {@inheritDoc} */ + public function getForeignKeyConstraintsForTable(?string $schemaName, string $tableName): array + { + $editors = []; + $processor = new ForeignKeyConstraintColumnMetadataProcessor($this->currentSchemaName); + + foreach ($this->metadataProvider->getForeignKeyConstraintColumnsForTable($schemaName, $tableName) as $row) { + $id = $row->getId(); + + if (! isset($editors[$id])) { + $editors[$id] = $processor->initializeEditor($row); + } + + $processor->applyRow($editors[$id], $row); + } + + return array_map( + static fn (ForeignKeyConstraintEditor $e): ForeignKeyConstraint => $e->create(), + array_values($editors), + ); + } + + /** + * Returns the foreign key constraints, grouped by schema and table. + * + * If the underlying database does not support schemas, the schema key will be {@link NULL_SCHEMA_KEY}. + * + * @return array>> + * + * @throws Exception + */ + private function getForeignKeyConstraintsForAllTables(): array + { + $editors = []; + $processor = new ForeignKeyConstraintColumnMetadataProcessor($this->currentSchemaName); + + foreach ($this->metadataProvider->getForeignKeyConstraintColumnsForAllTables() as $row) { + $schemaName = $row->getSchemaName() ?? self::NULL_SCHEMA_KEY; + $tableName = $row->getTableName(); + $id = $row->getId(); + + if (! isset($editors[$schemaName][$tableName][$id])) { + $editors[$schemaName][$tableName][$id] = $processor->initializeEditor($row); + } + + $processor->applyRow($editors[$schemaName][$tableName][$id], $row); + } + + return array_map( + static fn (array $editors): array => array_map( + static fn (array $editors): array => array_map( + static fn (ForeignKeyConstraintEditor $editor): ForeignKeyConstraint => $editor->create(), + array_values($editors), + ), + $editors, + ), + $editors, + ); + } + + /** {@inheritDoc} */ + public function getOptionsForTable(?string $schemaName, string $tableName): ?array + { + foreach ($this->metadataProvider->getTableOptionsForTable($schemaName, $tableName) as $row) { + return $row->getOptions(); + } + + return null; + } + + /** + * Returns options for all tables, grouped by schema and table. + * + * If the underlying database does not support schemas, the schema key will be {@link NULL_SCHEMA_KEY}. + * + * @return array>> + * + * @throws Exception + */ + private function getOptionsForAllTables(): array + { + $options = []; + + foreach ($this->metadataProvider->getTableOptionsForAllTables() as $row) { + $schemaName = $row->getSchemaName() ?? self::NULL_SCHEMA_KEY; + $tableName = $row->getTableName(); + + $options[$schemaName][$tableName] = $row->getOptions(); + } + + return $options; + } + + /** {@inheritDoc} */ + public function getAllViews(): array + { + $processor = new ViewMetadataProcessor(); + $views = []; + + foreach ($this->metadataProvider->getAllViews() as $row) { + $views[] = $processor->createObject($row); + } + + return $views; + } + + /** {@inheritDoc} */ + public function getAllSequences(): array + { + $processor = new SequenceMetadataProcessor(); + $sequences = []; + + foreach ($this->metadataProvider->getAllSequences() as $row) { + $sequences[] = $processor->createObject($row); + } + + return $sequences; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/ForeignKeyConstraintColumnMetadataProcessor.php b/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/ForeignKeyConstraintColumnMetadataProcessor.php new file mode 100644 index 0000000..020bd39 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/ForeignKeyConstraintColumnMetadataProcessor.php @@ -0,0 +1,71 @@ +getName(); + if ($constraintName !== null) { + $editor->setName( + UnqualifiedName::quoted($constraintName), + ); + } + + $referencedSchemaName = $row->getReferencedSchemaName(); + if ($referencedSchemaName === $this->currentSchemaName) { + $referencedSchemaName = null; + } + + $editor + ->setReferencedTableName( + OptionallyQualifiedName::quoted( + $row->getReferencedTableName(), + $referencedSchemaName, + ), + ) + ->setMatchType($row->getMatchType()) + ->setOnUpdateAction($row->getOnUpdateAction()) + ->setOnDeleteAction($row->getOnDeleteAction()); + + if ($row->isDeferred()) { + $editor->setDeferrability(Deferrability::DEFERRED); + } elseif ($row->isDeferrable()) { + $editor->setDeferrability(Deferrability::DEFERRABLE); + } + + return $editor; + } + + public function applyRow(ForeignKeyConstraintEditor $editor, ForeignKeyConstraintColumnMetadataRow $row): void + { + $editor + ->addReferencingColumnName( + UnqualifiedName::quoted($row->getReferencingColumnName()), + ) + ->addReferencedColumnName( + UnqualifiedName::quoted($row->getReferencedColumnName()), + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/IndexColumnMetadataProcessor.php b/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/IndexColumnMetadataProcessor.php new file mode 100644 index 0000000..215b539 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/IndexColumnMetadataProcessor.php @@ -0,0 +1,40 @@ +setName( + UnqualifiedName::quoted($row->getIndexName()), + ) + ->setType($row->getType()) + ->setIsClustered($row->isClustered()) + ->setPredicate($row->getPredicate()); + } + + public function applyRow(IndexEditor $editor, IndexColumnMetadataRow $row): void + { + $editor->addColumn( + new IndexedColumn( + UnqualifiedName::quoted($row->getColumnName()), + $row->getColumnLength(), + ), + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/PrimaryKeyConstraintColumnMetadataProcessor.php b/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/PrimaryKeyConstraintColumnMetadataProcessor.php new file mode 100644 index 0000000..027bf5a --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/PrimaryKeyConstraintColumnMetadataProcessor.php @@ -0,0 +1,33 @@ +setIsClustered($row->isClustered()); + } + + public function applyRow(PrimaryKeyConstraintEditor $editor, PrimaryKeyConstraintColumnRow $row): void + { + $editor->addColumnName( + UnqualifiedName::quoted($row->getColumnName()), + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/SequenceMetadataProcessor.php b/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/SequenceMetadataProcessor.php new file mode 100644 index 0000000..b499112 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/SequenceMetadataProcessor.php @@ -0,0 +1,26 @@ +setQuotedName($row->getSequenceName(), $row->getSchemaName()) + ->setAllocationSize($row->getAllocationSize()) + ->setInitialValue($row->getInitialValue()) + ->setCacheSize($row->getCacheSize()) + ->create(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/ViewMetadataProcessor.php b/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/ViewMetadataProcessor.php new file mode 100644 index 0000000..68788e2 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Introspection/MetadataProcessor/ViewMetadataProcessor.php @@ -0,0 +1,24 @@ +setQuotedName($row->getViewName(), $row->getSchemaName()) + ->setSQL($row->getDefinition()) + ->create(); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Metadata/DatabaseMetadataRow.php b/backend/vendor/doctrine/dbal/src/Schema/Metadata/DatabaseMetadataRow.php new file mode 100644 index 0000000..bbe3e91 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Metadata/DatabaseMetadataRow.php @@ -0,0 +1,22 @@ +databaseName; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Metadata/ForeignKeyConstraintColumnMetadataRow.php b/backend/vendor/doctrine/dbal/src/Schema/Metadata/ForeignKeyConstraintColumnMetadataRow.php new file mode 100644 index 0000000..f56e522 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Metadata/ForeignKeyConstraintColumnMetadataRow.php @@ -0,0 +1,131 @@ +id = $id; + } elseif ($name !== null) { + $this->id = $name; + } else { + throw new InvalidArgumentException( + 'Either the id or name must be set to a non-null value.', + ); + } + } + + /** @return ?non-empty-string */ + public function getSchemaName(): ?string + { + return $this->referencingSchemaName; + } + + /** @return non-empty-string */ + public function getTableName(): string + { + return $this->referencingTableName; + } + + /** @return int|non-empty-string */ + public function getId(): int|string + { + return $this->id; + } + + /** @return ?non-empty-string */ + public function getName(): ?string + { + return $this->name; + } + + /** @return ?non-empty-string */ + public function getReferencedSchemaName(): ?string + { + return $this->referencedSchemaName; + } + + /** @return non-empty-string */ + public function getReferencedTableName(): string + { + return $this->referencedTableName; + } + + public function getMatchType(): MatchType + { + return $this->matchType; + } + + public function getOnUpdateAction(): ReferentialAction + { + return $this->onUpdateAction; + } + + public function getOnDeleteAction(): ReferentialAction + { + return $this->onDeleteAction; + } + + public function isDeferrable(): bool + { + return $this->isDeferrable; + } + + public function isDeferred(): bool + { + return $this->isDeferred; + } + + /** @return non-empty-string */ + public function getReferencingColumnName(): string + { + return $this->referencingColumnName; + } + + /** @return non-empty-string */ + public function getReferencedColumnName(): string + { + return $this->referencedColumnName; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Metadata/IndexColumnMetadataRow.php b/backend/vendor/doctrine/dbal/src/Schema/Metadata/IndexColumnMetadataRow.php new file mode 100644 index 0000000..669f9d4 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Metadata/IndexColumnMetadataRow.php @@ -0,0 +1,79 @@ +schemaName; + } + + /** @return non-empty-string */ + public function getTableName(): string + { + return $this->tableName; + } + + /** @return non-empty-string */ + public function getIndexName(): string + { + return $this->indexName; + } + + public function getType(): IndexType + { + return $this->type; + } + + public function isClustered(): bool + { + return $this->isClustered; + } + + /** @return ?non-empty-string */ + public function getPredicate(): ?string + { + return $this->predicate; + } + + /** @return non-empty-string */ + public function getColumnName(): string + { + return $this->columnName; + } + + /** @return ?positive-int */ + public function getColumnLength(): ?int + { + return $this->columnLength; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Metadata/MetadataProvider.php b/backend/vendor/doctrine/dbal/src/Schema/Metadata/MetadataProvider.php new file mode 100644 index 0000000..ccd2d07 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Metadata/MetadataProvider.php @@ -0,0 +1,241 @@ + + * + * @throws Exception + */ + public function getAllDatabaseNames(): iterable; + + /** + * Returns names of all schemas available within the current database. + * + * The resulting list is ordered by schema name. + * + * @return iterable + * + * @throws Exception + */ + public function getAllSchemaNames(): iterable; + + /** + * Returns names of all tables within the current database. + * + * The results are ordered by schema name (if the underlying database platform supports schemas) and table name. + * + * @return iterable + * + * @throws Exception + */ + public function getAllTableNames(): iterable; + + /** + * Returns the columns of all tables within the current database. + * + * The results are ordered by schema name (if the underlying database platform supports schemas), table name, and + * column position within the table. + * + * @return iterable + * + * @throws Exception + */ + public function getTableColumnsForAllTables(): iterable; + + /** + * Returns the columns of the given table. + * + * If the underlying database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * The results are ordered by column position within the table. If the table doesn't exist, or is not accessible to + * the connection, an empty value is returned. + * + * @param ?non-empty-string $schemaName + * @param non-empty-string $tableName + * + * @return iterable + * + * @throws Exception + */ + public function getTableColumnsForTable(?string $schemaName, string $tableName): iterable; + + /** + * Returns the index columns of all tables within the current database. + * + * The results are ordered by schema name (if the underlying database platform supports schemas), table name, index + * name, and column position within the index. + * + * @return iterable + * + * @throws Exception + */ + public function getIndexColumnsForAllTables(): iterable; + + /** + * Returns the index columns of the given table. + * + * If the underlying database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * The results are ordered by index name and column position within the index. If the table doesn't exist, or is not + * accessible to the connection, an empty value is returned. + * + * @param ?non-empty-string $schemaName + * @param non-empty-string $tableName + * + * @return iterable + * + * @throws Exception + */ + public function getIndexColumnsForTable(?string $schemaName, string $tableName): iterable; + + /** + * Returns the primary key constraint columns of all tables within the current database. + * + * The results are ordered by schema name (if the underlying database platform supports schemas), table name, and + * column position within the primary key constraint. If a table does not have a primary key constraint, it will not + * be represented in the results. + * + * @return iterable + * + * @throws Exception + */ + public function getPrimaryKeyConstraintColumnsForAllTables(): iterable; + + /** + * Returns the primary key constraint columns of the given table. + * + * If the underlying database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * The results are ordered by column position within the primary key constraint. If the table doesn't exist, + * is not accessible to the connection or doesn't have a primary key constraint, an empty value is returned. + * + * @param ?non-empty-string $schemaName + * @param non-empty-string $tableName + * + * @return iterable + * + * @throws Exception + */ + public function getPrimaryKeyConstraintColumnsForTable(?string $schemaName, string $tableName): iterable; + + /** + * Returns the foreign key constraint columns of all tables within the current database. + * + * The results are ordered by schema name (if the underlying database platform supports schemas), table name, + * foreign key constraint name, and column position within the foreign key constraint. If the underlying database + * platform supports unnamed foreign key constraints, instead of ordering by name, it may provide another stable + * order of the results. + * + * @return iterable + * + * @throws Exception + */ + public function getForeignKeyConstraintColumnsForAllTables(): iterable; + + /** + * Returns the foreign key constraint columns of the given table. + * + * If the underlying database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * The results are ordered by foreign key constraint name and column position within the foreign key constraint. If + * the underlying database platform supports unnamed foreign key constraints, instead of ordering by name, it may + * provide another stable order of the results. If the table doesn't exist, or is not accessible to the connection, + * an empty value is returned. + * + * @param ?non-empty-string $schemaName + * @param non-empty-string $tableName + * + * @return iterable + * + * @throws Exception + */ + public function getForeignKeyConstraintColumnsForTable( + ?string $schemaName, + string $tableName, + ): iterable; + + /** + * Returns the options of all tables within the current database. + * + * The results are ordered by schema name (if the underlying database platform supports schemas) and table name. The + * order of the options within each array is not significant. + * + * Implementations must return an element for each table, even if their options are not explicitly represented in + * the underlying database. + * + * @return iterable + * + * @throws Exception + */ + public function getTableOptionsForAllTables(): iterable; + + /** + * Returns the options of the given table. + * + * If the underlying database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * If the table doesn't exist or is not accessible to the connection, an empty value is returned. Implementations + * must return a non-empty array as long as the table exists, even if its options are not explicitly represented + * in the underlying database. + * + * @param ?non-empty-string $schemaName + * @param non-empty-string $tableName + * + * @return iterable + * + * @throws Exception + */ + public function getTableOptionsForTable(?string $schemaName, string $tableName): iterable; + + /** + * Returns the definitions of all views within the current database. + * + * If the underlying database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * The results are ordered by schema name (if the underlying database platform supports schemas) and view name. + * + * @return iterable + * + * @throws Exception + */ + public function getAllViews(): iterable; + + /** + * Returns the definitions of all sequences within the current database. + * + * If the underlying database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * The results are ordered by schema name (if the underlying database platform supports schemas) and sequence name. + * + * @return iterable + * + * @throws Exception + */ + public function getAllSequences(): iterable; +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Metadata/PrimaryKeyConstraintColumnRow.php b/backend/vendor/doctrine/dbal/src/Schema/Metadata/PrimaryKeyConstraintColumnRow.php new file mode 100644 index 0000000..1ce0b74 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Metadata/PrimaryKeyConstraintColumnRow.php @@ -0,0 +1,55 @@ +schemaName; + } + + /** @return non-empty-string */ + public function getTableName(): string + { + return $this->tableName; + } + + /** @return ?non-empty-string */ + public function getConstraintName(): ?string + { + return $this->constraintName; + } + + public function isClustered(): bool + { + return $this->isClustered; + } + + /** @return non-empty-string */ + public function getColumnName(): string + { + return $this->columnName; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Metadata/SchemaMetadataRow.php b/backend/vendor/doctrine/dbal/src/Schema/Metadata/SchemaMetadataRow.php new file mode 100644 index 0000000..31a5e82 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Metadata/SchemaMetadataRow.php @@ -0,0 +1,22 @@ +schemaName; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Metadata/SequenceMetadataRow.php b/backend/vendor/doctrine/dbal/src/Schema/Metadata/SequenceMetadataRow.php new file mode 100644 index 0000000..b6182f4 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Metadata/SequenceMetadataRow.php @@ -0,0 +1,53 @@ +schemaName; + } + + /** @return non-empty-string */ + public function getSequenceName(): string + { + return $this->sequenceName; + } + + public function getAllocationSize(): int + { + return $this->allocationSize; + } + + public function getInitialValue(): int + { + return $this->initialValue; + } + + /** @return ?non-negative-int */ + public function getCacheSize(): ?int + { + return $this->cacheSize; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Metadata/TableColumnMetadataRow.php b/backend/vendor/doctrine/dbal/src/Schema/Metadata/TableColumnMetadataRow.php new file mode 100644 index 0000000..b4cdf3b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Metadata/TableColumnMetadataRow.php @@ -0,0 +1,46 @@ +schemaName; + } + + /** @return non-empty-string */ + public function getTableName(): string + { + return $this->tableName; + } + + public function getColumn(): Column + { + return $this->column; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Metadata/TableMetadataRow.php b/backend/vendor/doctrine/dbal/src/Schema/Metadata/TableMetadataRow.php new file mode 100644 index 0000000..63745c1 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Metadata/TableMetadataRow.php @@ -0,0 +1,41 @@ + $options + */ + public function __construct( + private ?string $schemaName, + private string $tableName, + private array $options, + ) { + } + + /** @return ?non-empty-string */ + public function getSchemaName(): ?string + { + return $this->schemaName; + } + + /** @return non-empty-string */ + public function getTableName(): string + { + return $this->tableName; + } + + /** @return array */ + public function getOptions(): array + { + return $this->options; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Metadata/ViewMetadataRow.php b/backend/vendor/doctrine/dbal/src/Schema/Metadata/ViewMetadataRow.php new file mode 100644 index 0000000..e8a29f2 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Metadata/ViewMetadataRow.php @@ -0,0 +1,39 @@ +schemaName; + } + + /** @return non-empty-string */ + public function getViewName(): string + { + return $this->viewName; + } + + public function getDefinition(): string + { + return $this->definition; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/MySQLSchemaManager.php b/backend/vendor/doctrine/dbal/src/Schema/MySQLSchemaManager.php new file mode 100644 index 0000000..78359c8 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/MySQLSchemaManager.php @@ -0,0 +1,555 @@ + + */ +class MySQLSchemaManager extends AbstractSchemaManager +{ + /** @see https://mariadb.com/kb/en/library/string-literals/#escape-sequences */ + private const MARIADB_ESCAPE_SEQUENCES = [ + '\\0' => "\0", + "\\'" => "'", + '\\"' => '"', + '\\b' => "\b", + '\\n' => "\n", + '\\r' => "\r", + '\\t' => "\t", + '\\Z' => "\x1a", + '\\\\' => '\\', + '\\%' => '%', + '\\_' => '_', + + // Internally, MariaDB escapes single quotes using the standard syntax + "''" => "'", + ]; + + private ?DefaultTableOptions $defaultTableOptions = null; + + /** + * @deprecated Use the schema name and the unqualified table name separately instead. + * + * {@inheritDoc} + */ + protected function _getPortableTableDefinition(array $table): string + { + return $table['TABLE_NAME']; + } + + /** + * {@inheritDoc} + */ + protected function _getPortableViewDefinition(array $view): View + { + return new View($view['TABLE_NAME'], $view['VIEW_DEFINITION']); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableIndexesList(array $rows, string $tableName): array + { + foreach ($rows as $i => $row) { + $row = array_change_key_case($row, CASE_LOWER); + + $row['primary'] = $row['key_name'] === 'PRIMARY'; + + if (str_contains($row['index_type'], 'FULLTEXT')) { + $row['flags'] = ['FULLTEXT']; + } elseif (str_contains($row['index_type'], 'SPATIAL')) { + $row['flags'] = ['SPATIAL']; + } + + // Ignore prohibited prefix `length` for spatial index + if (! str_contains($row['index_type'], 'SPATIAL')) { + $row['length'] = isset($row['sub_part']) ? (int) $row['sub_part'] : null; + } + + $rows[$i] = $row; + } + + return parent::_getPortableTableIndexesList($rows, $tableName); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableDatabaseDefinition(array $database): string + { + return $database['Database']; + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableColumnDefinition(array $tableColumn): Column + { + $tableColumn = array_change_key_case($tableColumn, CASE_LOWER); + + $dbType = $tableColumn['type']; + $length = null; + $scale = 0; + $precision = null; + $fixed = false; + $values = []; + + $type = $this->platform->getDoctrineTypeMapping($dbType); + + switch ($dbType) { + case 'char': + case 'varchar': + $length = (int) $tableColumn['character_maximum_length']; + break; + + case 'binary': + case 'varbinary': + $length = (int) $tableColumn['character_octet_length']; + break; + + case 'tinytext': + $length = AbstractMySQLPlatform::LENGTH_LIMIT_TINYTEXT; + break; + + case 'text': + $length = AbstractMySQLPlatform::LENGTH_LIMIT_TEXT; + break; + + case 'mediumtext': + $length = AbstractMySQLPlatform::LENGTH_LIMIT_MEDIUMTEXT; + break; + + case 'tinyblob': + $length = AbstractMySQLPlatform::LENGTH_LIMIT_TINYBLOB; + break; + + case 'blob': + $length = AbstractMySQLPlatform::LENGTH_LIMIT_BLOB; + break; + + case 'mediumblob': + $length = AbstractMySQLPlatform::LENGTH_LIMIT_MEDIUMBLOB; + break; + + case 'float': + case 'double': + case 'real': + case 'numeric': + case 'decimal': + $precision = (int) $tableColumn['numeric_precision']; + + if (isset($tableColumn['numeric_scale'])) { + $scale = (int) $tableColumn['numeric_scale']; + } + + break; + } + + switch ($dbType) { + case 'char': + case 'binary': + $fixed = true; + break; + + case 'enum': + $values = $this->parseEnumExpression($tableColumn['column_type']); + break; + } + + if ($tableColumn['default'] === null) { + $columnDefault = null; + } elseif ($this->platform instanceof MariaDBPlatform) { + $columnDefault = $this->parseMariaDBColumnDefault($tableColumn['default']); + } else { + $columnDefault = $this->parseMySQLColumnDefault($dbType, $tableColumn['default']); + } + + $options = [ + 'length' => $length, + 'unsigned' => str_contains($tableColumn['column_type'], 'unsigned'), + 'fixed' => $fixed, + 'default' => $columnDefault, + 'notnull' => $tableColumn['null'] !== 'YES', + 'scale' => $scale, + 'precision' => $precision, + 'autoincrement' => str_contains($tableColumn['extra'], 'auto_increment'), + 'values' => $values, + ]; + + if ($tableColumn['comment'] !== null) { + $options['comment'] = $tableColumn['comment']; + } + + $column = new Column($tableColumn['field'], Type::getType($type), $options); + $column->setPlatformOption('charset', $tableColumn['characterset']); + $column->setPlatformOption('collation', $tableColumn['collation']); + + return $column; + } + + /** @return list */ + private function parseEnumExpression(string $expression): array + { + $result = preg_match_all("/'([^']*(?:''[^']*)*)'/", $expression, $matches); + assert($result !== false); + + return array_map( + static fn (string $match): string => strtr($match, ["''" => "'"]), + $matches[1], + ); + } + + /** @link https://dev.mysql.com/doc/refman/8.4/en/timestamp-initialization.html */ + private function parseMySQLColumnDefault(string $type, string $default): string|DefaultExpression + { + // There is no way to tell whether the "CURRENT_TIMESTAMP" value represents a string or an expression in MySQL + // schema introspection results. We rely on the fact that the "CURRENT_TIMESTAMP" expression is only supported + // for the "DATETIME" and "TIMESTAMP" data types and represent this value as an expression only in these cases. + if (($type === 'datetime' || $type === 'timestamp') && $default === 'CURRENT_TIMESTAMP') { + return new CurrentTimestamp(); + } + + return $default; + } + + /** + * Return Doctrine/Mysql-compatible column default values for MariaDB 10.2.7+ servers. + * + * - Since MariaDb 10.2.7 column defaults stored in information_schema are now quoted + * to distinguish them from expressions (see MDEV-10134). + * - CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE are stored in information_schema + * as current_timestamp(), currdate(), currtime() + * - Quoted 'NULL' is not enforced by Maria, it is technically possible to have + * null in some circumstances (see https://jira.mariadb.org/browse/MDEV-14053) + * - \' is always stored as '' in information_schema (normalized) + * + * @link https://mariadb.com/kb/en/library/information-schema-columns-table/ + * @link https://jira.mariadb.org/browse/MDEV-13132 + * + * @param string $columnDefault default value as stored in information_schema for MariaDB >= 10.2.7 + */ + private function parseMariaDBColumnDefault(string $columnDefault): string|DefaultExpression|null + { + if ($columnDefault === 'NULL') { + return null; + } + + if (preg_match('/^\'(.*)\'$/', $columnDefault, $matches) === 1) { + return strtr($matches[1], self::MARIADB_ESCAPE_SEQUENCES); + } + + return match ($columnDefault) { + 'current_timestamp()' => new CurrentTimestamp(), + 'curdate()' => new CurrentDate(), + 'curtime()' => new CurrentTime(), + default => $columnDefault, + }; + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableForeignKeysList(array $rows): array + { + $list = []; + foreach ($rows as $row) { + $row = array_change_key_case($row, CASE_LOWER); + if (! isset($list[$row['constraint_name']])) { + if (! isset($row['delete_rule']) || $row['delete_rule'] === 'RESTRICT') { + $row['delete_rule'] = null; + } + + if (! isset($row['update_rule']) || $row['update_rule'] === 'RESTRICT') { + $row['update_rule'] = null; + } + + $list[$row['constraint_name']] = [ + 'name' => $this->getQuotedIdentifierName($row['constraint_name']), + 'local' => [], + 'foreign' => [], + 'foreignTable' => $row['referenced_table_name'], + 'onDelete' => $row['delete_rule'], + 'onUpdate' => $row['update_rule'], + ]; + } + + $list[$row['constraint_name']]['local'][] = $row['column_name']; + $list[$row['constraint_name']]['foreign'][] = $row['referenced_column_name']; + } + + return parent::_getPortableTableForeignKeysList($list); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableForeignKeyDefinition(array $tableForeignKey): ForeignKeyConstraint + { + return new ForeignKeyConstraint( + $tableForeignKey['local'], + $tableForeignKey['foreignTable'], + $tableForeignKey['foreign'], + $tableForeignKey['name'], + [ + 'onDelete' => $tableForeignKey['onDelete'], + 'onUpdate' => $tableForeignKey['onUpdate'], + ], + ); + } + + /** @throws Exception */ + public function createComparator(/* ComparatorConfig $config = new ComparatorConfig() */): Comparator + { + return new MySQL\Comparator( + $this->platform, + new CachingCharsetMetadataProvider( + new ConnectionCharsetMetadataProvider($this->connection), + ), + new CachingCollationMetadataProvider( + new ConnectionCollationMetadataProvider($this->connection), + ), + $this->getDefaultTableOptions(), + func_num_args() > 0 ? func_get_arg(0) : new ComparatorConfig(), + ); + } + + protected function selectTableNames(string $databaseName): Result + { + $sql = <<<'SQL' +SELECT TABLE_NAME +FROM information_schema.TABLES +WHERE TABLE_SCHEMA = ? + AND TABLE_TYPE = 'BASE TABLE' +ORDER BY TABLE_NAME +SQL; + + return $this->connection->executeQuery($sql, [$databaseName]); + } + + protected function selectTableColumns(string $databaseName, ?string $tableName = null): Result + { + // The schema name is passed multiple times as a literal in the WHERE clause instead of using a JOIN condition + // in order to avoid performance issues on MySQL older than 8.0 and the corresponding MariaDB versions + // caused by https://bugs.mysql.com/bug.php?id=81347 + $conditions = ['c.TABLE_SCHEMA = ?', 't.TABLE_SCHEMA = ?']; + $params = [$databaseName, $databaseName]; + + if ($tableName !== null) { + $conditions[] = 't.TABLE_NAME = ?'; + $params[] = $tableName; + } + + $sql = sprintf( + <<<'SQL' +SELECT + c.TABLE_NAME, + c.COLUMN_NAME AS field, + %s AS type, + c.COLUMN_TYPE, + c.CHARACTER_MAXIMUM_LENGTH, + c.CHARACTER_OCTET_LENGTH, + c.NUMERIC_PRECISION, + c.NUMERIC_SCALE, + c.IS_NULLABLE AS `null`, + c.COLUMN_KEY AS `key`, + c.COLUMN_DEFAULT AS `default`, + c.EXTRA, + c.COLUMN_COMMENT AS comment, + c.CHARACTER_SET_NAME AS characterset, + c.COLLATION_NAME AS collation +FROM information_schema.COLUMNS c + INNER JOIN information_schema.TABLES t + ON t.TABLE_NAME = c.TABLE_NAME + WHERE %s + AND t.TABLE_TYPE = 'BASE TABLE' +ORDER BY c.TABLE_NAME, + c.ORDINAL_POSITION +SQL, + $this->platform->getColumnTypeSQLSnippet('c', $databaseName), + implode(' AND ', $conditions), + ); + + return $this->connection->executeQuery($sql, $params); + } + + protected function selectIndexColumns(string $databaseName, ?string $tableName = null): Result + { + $conditions = ['TABLE_SCHEMA = ?']; + $params = [$databaseName]; + + if ($tableName !== null) { + $conditions[] = 'TABLE_NAME = ?'; + $params[] = $tableName; + } + + $sql = sprintf( + <<<'SQL' +SELECT + TABLE_NAME, + NON_UNIQUE AS Non_Unique, + INDEX_NAME AS Key_name, + COLUMN_NAME AS Column_Name, + SUB_PART AS Sub_Part, + INDEX_TYPE AS Index_Type +FROM information_schema.STATISTICS +WHERE %s +ORDER BY TABLE_NAME, + SEQ_IN_INDEX +SQL, + implode(' AND ', $conditions), + ); + + return $this->connection->executeQuery($sql, $params); + } + + protected function selectForeignKeyColumns(string $databaseName, ?string $tableName = null): Result + { + // The schema name is passed multiple times in the WHERE clause instead of using a JOIN condition + // in order to avoid performance issues on MySQL older than 8.0 and the corresponding MariaDB versions + // caused by https://bugs.mysql.com/bug.php?id=81347 + $conditions = ['k.TABLE_SCHEMA = ?', 'c.CONSTRAINT_SCHEMA = ?']; + $params = [$databaseName, $databaseName]; + + if ($tableName !== null) { + $conditions[] = 'k.TABLE_NAME = ?'; + $params[] = $tableName; + } + + $sql = sprintf( + <<<'SQL' +SELECT + k.TABLE_NAME, + k.CONSTRAINT_NAME, + k.COLUMN_NAME, + k.REFERENCED_TABLE_NAME, + k.REFERENCED_COLUMN_NAME, + k.ORDINAL_POSITION, + c.UPDATE_RULE, + c.DELETE_RULE +FROM information_schema.key_column_usage k +INNER JOIN information_schema.referential_constraints c +ON c.CONSTRAINT_NAME = k.CONSTRAINT_NAME +AND c.TABLE_NAME = k.TABLE_NAME +WHERE %s +AND k.REFERENCED_COLUMN_NAME IS NOT NULL +ORDER BY k.TABLE_NAME, + k.CONSTRAINT_NAME, + k.ORDINAL_POSITION +SQL, + implode(' AND ', $conditions), + ); + + return $this->connection->executeQuery($sql, $params); + } + + /** + * {@inheritDoc} + */ + protected function fetchTableOptionsByTable(string $databaseName, ?string $tableName = null): array + { + $sql = $this->platform->fetchTableOptionsByTable($tableName !== null); + + $params = [$databaseName]; + if ($tableName !== null) { + $params[] = $tableName; + } + + /** @var array> $metadata */ + $metadata = $this->connection->executeQuery($sql, $params) + ->fetchAllAssociativeIndexed(); + + $tableOptions = []; + foreach ($metadata as $table => $data) { + $data = array_change_key_case($data, CASE_LOWER); + + $tableOptions[$table] = [ + 'engine' => $data['engine'], + 'collation' => $data['table_collation'], + 'charset' => $data['character_set_name'], + 'autoincrement' => $data['auto_increment'], + 'comment' => $data['table_comment'], + 'create_options' => $this->parseCreateOptions($data['create_options']), + ]; + } + + return $tableOptions; + } + + /** @return array|array */ + private function parseCreateOptions(?string $string): array + { + $options = []; + + if ($string === null || $string === '') { + return $options; + } + + foreach (explode(' ', $string) as $pair) { + $parts = explode('=', $pair, 2); + + $options[$parts[0]] = $parts[1] ?? true; + } + + return $options; + } + + /** @throws Exception */ + private function getDefaultTableOptions(): DefaultTableOptions + { + if ($this->defaultTableOptions === null) { + $row = $this->connection->fetchNumeric( + 'SELECT @@character_set_database, @@collation_database', + ); + + assert($row !== false); + + $this->defaultTableOptions = new DefaultTableOptions(...$row); + } + + return $this->defaultTableOptions; + } + + /** Returns the quoted representation of the given identifier name. */ + private function getQuotedIdentifierName(?string $identifier): ?string + { + if ($identifier === null) { + return null; + } + + return $this->platform->quoteSingleIdentifier($identifier); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Name.php b/backend/vendor/doctrine/dbal/src/Schema/Name.php new file mode 100644 index 0000000..d516977 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Name.php @@ -0,0 +1,25 @@ + $identifiers */ + private array $identifiers; + + public function __construct(Identifier $firstIdentifier, Identifier ...$otherIdentifiers) + { + $this->identifiers = array_merge([$firstIdentifier], array_values($otherIdentifiers)); + } + + /** @return non-empty-list */ + public function getIdentifiers(): array + { + return $this->identifiers; + } + + public function toSQL(AbstractPlatform $platform): string + { + return $this->joinIdentifiers(static fn (Identifier $identifier): string => $identifier->toSQL($platform)); + } + + public function toString(): string + { + return $this->joinIdentifiers(static fn (Identifier $identifier): string => $identifier->toString()); + } + + /** @param callable(Identifier): string $mapper */ + private function joinIdentifiers(callable $mapper): string + { + return implode('.', array_map($mapper, $this->identifiers)); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Name/Identifier.php b/backend/vendor/doctrine/dbal/src/Schema/Name/Identifier.php new file mode 100644 index 0000000..8ce3319 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Name/Identifier.php @@ -0,0 +1,103 @@ +value) === 0) { + throw InvalidIdentifier::fromEmpty(); + } + } + + /** @return non-empty-string */ + public function getValue(): string + { + return $this->value; + } + + public function isQuoted(): bool + { + return $this->isQuoted; + } + + /** + * Returns whether this identifier is equal to the other. + */ + public function equals(self $other, UnquotedIdentifierFolding $folding): bool + { + if ($this === $other) { + return true; + } + + return $this->toNormalizedValue($folding) === $other->toNormalizedValue($folding); + } + + public function toSQL(AbstractPlatform $platform): string + { + return $platform->quoteSingleIdentifier( + $this->toNormalizedValue($platform->getUnquotedIdentifierFolding()), + ); + } + + /** + * Returns the literal value of the identifier normalized according to the rules of the given database platform. + * + * Consumers should use the normalized value for schema comparison and referencing the objects to be introspected. + * + * @return non-empty-string + */ + public function toNormalizedValue(UnquotedIdentifierFolding $folding): string + { + if (! $this->isQuoted) { + return $folding->foldUnquotedIdentifier($this->value); + } + + return $this->value; + } + + public function toString(): string + { + if (! $this->isQuoted) { + return $this->value; + } + + return sprintf('"%s"', str_replace('"', '""', $this->value)); + } + + /** + * Creates a quoted identifier. + * + * @param non-empty-string $value + */ + public static function quoted(string $value): self + { + return new self($value, true); + } + + /** + * Creates an unquoted identifier. + * + * @param non-empty-string $value + */ + public static function unquoted(string $value): self + { + return new self($value, false); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Name/OptionallyQualifiedName.php b/backend/vendor/doctrine/dbal/src/Schema/Name/OptionallyQualifiedName.php new file mode 100644 index 0000000..e82a247 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Name/OptionallyQualifiedName.php @@ -0,0 +1,103 @@ +unqualifiedName; + } + + public function getQualifier(): ?Identifier + { + return $this->qualifier; + } + + public function toSQL(AbstractPlatform $platform): string + { + $unqualifiedName = $this->unqualifiedName->toSQL($platform); + + if ($this->qualifier === null) { + return $unqualifiedName; + } + + return $this->qualifier->toSQL($platform) . '.' . $unqualifiedName; + } + + public function toString(): string + { + $unqualifiedName = $this->unqualifiedName->toString(); + + if ($this->qualifier === null) { + return $unqualifiedName; + } + + return $this->qualifier->toString() . '.' . $unqualifiedName; + } + + /** + * Returns whether this optionally qualified name is equal to the other. + * + * To be comparable, both names must either have a qualifier or have no qualifier. + */ + public function equals(self $other, UnquotedIdentifierFolding $folding): bool + { + if ($this === $other) { + return true; + } + + if (($this->qualifier === null) !== ($other->qualifier === null)) { + throw IncomparableNames::fromOptionallyQualifiedNames($this, $other); + } + + if (! $this->unqualifiedName->equals($other->getUnqualifiedName(), $folding)) { + return false; + } + + return $this->qualifier === null + || $other->qualifier === null + || $this->qualifier->equals($other->qualifier, $folding); + } + + /** + * Creates an optionally qualified name with all identifiers quoted. + * + * @param non-empty-string $unqualifiedName + * @param ?non-empty-string $qualifier + */ + public static function quoted(string $unqualifiedName, ?string $qualifier = null): self + { + return new self( + Identifier::quoted($unqualifiedName), + $qualifier !== null ? Identifier::quoted($qualifier) : null, + ); + } + + /** + * Creates an optionally qualified name with all identifiers unquoted. + * + * @param non-empty-string $unqualifiedName + * @param ?non-empty-string $qualifier + */ + public static function unquoted(string $unqualifiedName, ?string $qualifier = null): self + { + return new self( + Identifier::unquoted($unqualifiedName), + $qualifier !== null ? Identifier::unquoted($qualifier) : null, + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Name/Parser.php b/backend/vendor/doctrine/dbal/src/Schema/Name/Parser.php new file mode 100644 index 0000000..90254ba --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Name/Parser.php @@ -0,0 +1,25 @@ + + */ +final class GenericNameParser implements Parser +{ + private const IDENTIFIER_PATTERN = <<<'PATTERN' + /\G + (?: + "(?[^"]*(?:""[^"]*)*)" # ANSI SQL double-quoted + | `(?[^`]*(?:``[^`]*)*)` # MySQL-style backtick-quoted + | \[(?[^]]*(?:]][^]]*)*)] # SQL Server-style square-bracket-quoted + | (?[^\s."`\[\]]+) # Unquoted + ) + /x + PATTERN; + + public function parse(string $input): GenericName + { + $offset = 0; + $identifiers = []; + $length = strlen($input); + + while (true) { + if ($offset >= $length) { + throw ExpectedNextIdentifier::new(); + } + + if (preg_match(self::IDENTIFIER_PATTERN, $input, $matches, 0, $offset) === 0) { + throw UnableToParseIdentifier::new($offset); + } + + if (isset($matches['ansi']) && strlen($matches['ansi']) > 0) { + $identifier = Identifier::quoted(str_replace('""', '"', $matches['ansi'])); + } elseif (isset($matches['mysql']) && strlen($matches['mysql']) > 0) { + $identifier = Identifier::quoted(str_replace('``', '`', $matches['mysql'])); + } elseif (isset($matches['sqlserver']) && strlen($matches['sqlserver']) > 0) { + $identifier = Identifier::quoted(str_replace(']]', ']', $matches['sqlserver'])); + } else { + assert(isset($matches['unquoted']) && strlen($matches['unquoted']) > 0); + $identifier = Identifier::unquoted($matches['unquoted']); + } + + $identifiers[] = $identifier; + + $offset += strlen($matches[0]); + + if ($offset >= $length) { + break; + } + + $character = $input[$offset]; + + if ($character !== '.') { + throw ExpectedDot::new($offset, $character); + } + + $offset++; + } + + assert(count($identifiers) > 0); + + return new GenericName(...$identifiers); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Name/Parser/OptionallyQualifiedNameParser.php b/backend/vendor/doctrine/dbal/src/Schema/Name/Parser/OptionallyQualifiedNameParser.php new file mode 100644 index 0000000..92b868a --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Name/Parser/OptionallyQualifiedNameParser.php @@ -0,0 +1,35 @@ + + */ +final readonly class OptionallyQualifiedNameParser implements Parser +{ + public function __construct(private GenericNameParser $genericNameParser) + { + } + + public function parse(string $input): OptionallyQualifiedName + { + $identifiers = $this->genericNameParser->parse($input) + ->getIdentifiers(); + + return match (count($identifiers)) { + 1 => new OptionallyQualifiedName($identifiers[0], null), + 2 => new OptionallyQualifiedName($identifiers[1], $identifiers[0]), + default => throw InvalidName::forOptionallyQualifiedName(count($identifiers)), + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Name/Parser/UnqualifiedNameParser.php b/backend/vendor/doctrine/dbal/src/Schema/Name/Parser/UnqualifiedNameParser.php new file mode 100644 index 0000000..f91dc1d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Name/Parser/UnqualifiedNameParser.php @@ -0,0 +1,35 @@ + + */ +final readonly class UnqualifiedNameParser implements Parser +{ + public function __construct(private GenericNameParser $genericNameParser) + { + } + + public function parse(string $input): UnqualifiedName + { + $identifiers = $this->genericNameParser->parse($input) + ->getIdentifiers(); + + if (count($identifiers) > 1) { + throw InvalidName::forUnqualifiedName(count($identifiers)); + } + + return new UnqualifiedName($identifiers[0]); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Name/Parsers.php b/backend/vendor/doctrine/dbal/src/Schema/Name/Parsers.php new file mode 100644 index 0000000..58611d1 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Name/Parsers.php @@ -0,0 +1,43 @@ +identifier; + } + + public function toSQL(AbstractPlatform $platform): string + { + return $this->identifier->toSQL($platform); + } + + public function toString(): string + { + return $this->identifier->toString(); + } + + /** + * Returns whether this unqualified name is equal to the other. + */ + public function equals(self $other, UnquotedIdentifierFolding $folding): bool + { + if ($this === $other) { + return true; + } + + return $this->identifier->equals($other->getIdentifier(), $folding); + } + + /** + * Creates a quoted unqualified name. + * + * @param non-empty-string $value + */ + public static function quoted(string $value): self + { + return new self(Identifier::quoted($value)); + } + + /** + * Creates an unquoted unqualified name. + * + * @param non-empty-string $value + */ + public static function unquoted(string $value): self + { + return new self(Identifier::unquoted($value)); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Name/UnquotedIdentifierFolding.php b/backend/vendor/doctrine/dbal/src/Schema/Name/UnquotedIdentifierFolding.php new file mode 100644 index 0000000..4b1ed83 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Name/UnquotedIdentifierFolding.php @@ -0,0 +1,45 @@ + strtoupper($value), + self::LOWER => strtolower($value), + self::NONE => $value, + }; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/NamedObject.php b/backend/vendor/doctrine/dbal/src/Schema/NamedObject.php new file mode 100644 index 0000000..c17310f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/NamedObject.php @@ -0,0 +1,22 @@ +null, if the name is not set. + * + * @return ?N + */ + public function getObjectName(): ?Name; +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/OracleSchemaManager.php b/backend/vendor/doctrine/dbal/src/Schema/OracleSchemaManager.php new file mode 100644 index 0000000..47d8740 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/OracleSchemaManager.php @@ -0,0 +1,489 @@ + + */ +class OracleSchemaManager extends AbstractSchemaManager +{ + /** + * {@inheritDoc} + */ + protected function _getPortableViewDefinition(array $view): View + { + $view = array_change_key_case($view, CASE_LOWER); + + return new View($this->getQuotedIdentifierName($view['view_name']), $view['text']); + } + + /** + * @deprecated Use the schema name and the unqualified table name separately instead. + * + * {@inheritDoc} + */ + protected function _getPortableTableDefinition(array $table): string + { + $table = array_change_key_case($table, CASE_LOWER); + + /** @phpstan-ignore return.type */ + return $this->getQuotedIdentifierName($table['table_name']); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableIndexesList(array $rows, string $tableName): array + { + $indexBuffer = []; + foreach ($rows as $row) { + $row = array_change_key_case($row, CASE_LOWER); + + $buffer = []; + + if ($row['is_primary'] === 'P') { + $buffer['key_name'] = 'primary'; + $buffer['primary'] = true; + $buffer['non_unique'] = false; + } else { + $buffer['key_name'] = strtolower($row['name']); + $buffer['primary'] = false; + $buffer['non_unique'] = ! $row['is_unique']; + } + + $buffer['column_name'] = $this->getQuotedIdentifierName($row['column_name']); + $indexBuffer[] = $buffer; + } + + return parent::_getPortableTableIndexesList($indexBuffer, $tableName); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableColumnDefinition(array $tableColumn): Column + { + $tableColumn = array_change_key_case($tableColumn, CASE_LOWER); + + $dbType = strtolower($tableColumn['data_type']); + if (str_starts_with($dbType, 'timestamp(')) { + if (str_contains($dbType, 'with time zone')) { + $dbType = 'timestamptz'; + } else { + $dbType = 'timestamp'; + } + } + + $length = $precision = null; + $scale = 0; + $fixed = false; + + assert(array_key_exists('data_default', $tableColumn)); + + // Default values returned from database sometimes have trailing spaces. + if (is_string($tableColumn['data_default'])) { + $tableColumn['data_default'] = trim($tableColumn['data_default']); + } + + if ($tableColumn['data_default'] === '' || $tableColumn['data_default'] === 'NULL') { + $tableColumn['data_default'] = null; + } + + if ($tableColumn['data_default'] !== null) { + // Default values returned from database are represented as literal expressions + if (preg_match('/^\'(.*)\'$/s', $tableColumn['data_default'], $matches) === 1) { + $tableColumn['data_default'] = str_replace("''", "'", $matches[1]); + } + } + + if ($tableColumn['data_precision'] !== null) { + $precision = (int) $tableColumn['data_precision']; + } + + if ($tableColumn['data_scale'] !== null) { + $scale = (int) $tableColumn['data_scale']; + } + + $type = $this->platform->getDoctrineTypeMapping($dbType); + + switch ($dbType) { + case 'number': + if ($precision === 20 && $scale === 0) { + $type = 'bigint'; + } elseif ($precision === 5 && $scale === 0) { + $type = 'smallint'; + } elseif ($precision === 1 && $scale === 0) { + $type = 'boolean'; + } elseif ($scale > 0) { + $type = 'decimal'; + } + + break; + + case 'float': + if ($precision === 63) { + $type = 'smallfloat'; + } + + break; + + case 'varchar': + case 'varchar2': + case 'nvarchar2': + $length = (int) $tableColumn['char_length']; + break; + + case 'raw': + $length = (int) $tableColumn['data_length']; + $fixed = true; + break; + + case 'char': + case 'nchar': + $length = (int) $tableColumn['char_length']; + $fixed = true; + break; + } + + $options = [ + 'notnull' => $tableColumn['nullable'] === 'N', + 'fixed' => $fixed, + 'default' => $tableColumn['data_default'], + 'length' => $length, + 'precision' => $precision, + 'scale' => $scale, + ]; + + if ($tableColumn['comments'] !== null) { + $options['comment'] = $tableColumn['comments']; + } + + return new Column($this->getQuotedIdentifierName($tableColumn['column_name']), Type::getType($type), $options); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableForeignKeysList(array $rows): array + { + $list = []; + foreach ($rows as $row) { + $row = array_change_key_case($row, CASE_LOWER); + if (! isset($list[$row['constraint_name']])) { + if ($row['delete_rule'] === 'NO ACTION') { + $row['delete_rule'] = null; + } + + $list[$row['constraint_name']] = [ + 'name' => $this->getQuotedIdentifierName($row['constraint_name']), + 'local' => [], + 'foreign' => [], + 'foreignTable' => $row['references_table'], + 'onDelete' => $row['delete_rule'], + 'deferrable' => $row['deferrable'] === 'DEFERRABLE', + 'deferred' => $row['deferred'] === 'DEFERRED', + ]; + } + + $localColumn = $this->getQuotedIdentifierName($row['local_column']); + $foreignColumn = $this->getQuotedIdentifierName($row['foreign_column']); + + $list[$row['constraint_name']]['local'][] = $localColumn; + $list[$row['constraint_name']]['foreign'][] = $foreignColumn; + } + + return parent::_getPortableTableForeignKeysList($list); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableForeignKeyDefinition(array $tableForeignKey): ForeignKeyConstraint + { + return new ForeignKeyConstraint( + $tableForeignKey['local'], + $this->getQuotedIdentifierName($tableForeignKey['foreignTable']), + $tableForeignKey['foreign'], + $this->getQuotedIdentifierName($tableForeignKey['name']), + [ + 'onDelete' => $tableForeignKey['onDelete'], + 'deferrable' => $tableForeignKey['deferrable'], + 'deferred' => $tableForeignKey['deferred'], + ], + ); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableSequenceDefinition(array $sequence): Sequence + { + $sequence = array_change_key_case($sequence, CASE_LOWER); + + return new Sequence( + $this->getQuotedIdentifierName($sequence['sequence_name']), + (int) $sequence['increment_by'], + (int) $sequence['min_value'], + ); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableDatabaseDefinition(array $database): string + { + $database = array_change_key_case($database, CASE_LOWER); + + return $database['username']; + } + + public function createDatabase(string $database): void + { + $statement = $this->platform->getCreateDatabaseSQL($database); + + $params = $this->connection->getParams(); + + if (isset($params['password'])) { + $statement .= ' IDENTIFIED BY ' . $this->connection->quoteSingleIdentifier($params['password']); + } + + $this->connection->executeStatement($statement); + + $statement = 'GRANT DBA TO ' . $database; + $this->connection->executeStatement($statement); + } + + /** + * @internal The method should be only used by the {@see OracleSchemaManager} class. + * + * @throws Exception + */ + protected function dropAutoincrement(string $table): bool + { + $sql = $this->platform->getDropAutoincrementSql($table); + foreach ($sql as $query) { + $this->connection->executeStatement($query); + } + + return true; + } + + public function dropTable(string $name): void + { + try { + $this->dropAutoincrement($name); + } catch (DatabaseObjectNotFoundException) { + } + + parent::dropTable($name); + } + + /** + * Returns the quoted representation of the given identifier name. + * + * Quotes non-uppercase identifiers explicitly to preserve case + * and thus make references to the particular identifier work. + */ + private function getQuotedIdentifierName(string $identifier): string + { + if (preg_match('/[a-z]/', $identifier) === 1) { + return $this->platform->quoteSingleIdentifier($identifier); + } + + return $identifier; + } + + protected function selectTableNames(string $databaseName): Result + { + $sql = <<<'SQL' +SELECT TABLE_NAME +FROM ALL_TABLES +WHERE OWNER = :OWNER +ORDER BY TABLE_NAME +SQL; + + return $this->connection->executeQuery($sql, ['OWNER' => $databaseName]); + } + + protected function selectTableColumns(string $databaseName, ?string $tableName = null): Result + { + $conditions = ['C.OWNER = :OWNER']; + $params = ['OWNER' => $databaseName]; + + if ($tableName !== null) { + $conditions[] = 'C.TABLE_NAME = :TABLE_NAME'; + $params['TABLE_NAME'] = $tableName; + } + + $sql = sprintf( + <<<'SQL' + SELECT + C.TABLE_NAME, + C.COLUMN_NAME, + C.DATA_TYPE, + C.DATA_DEFAULT, + C.DATA_PRECISION, + C.DATA_SCALE, + C.CHAR_LENGTH, + C.DATA_LENGTH, + C.NULLABLE, + D.COMMENTS + FROM ALL_TAB_COLUMNS C + INNER JOIN ALL_TABLES T + ON T.OWNER = C.OWNER + AND T.TABLE_NAME = C.TABLE_NAME + LEFT JOIN ALL_COL_COMMENTS D + ON D.OWNER = C.OWNER + AND D.TABLE_NAME = C.TABLE_NAME + AND D.COLUMN_NAME = C.COLUMN_NAME + WHERE %s + ORDER BY C.TABLE_NAME, C.COLUMN_ID +SQL, + implode(' AND ', $conditions), + ); + + return $this->connection->executeQuery($sql, $params); + } + + protected function selectIndexColumns(string $databaseName, ?string $tableName = null): Result + { + $conditions = ['IND_COL.INDEX_OWNER = :OWNER']; + $params = ['OWNER' => $databaseName]; + + if ($tableName !== null) { + $conditions[] = 'IND_COL.TABLE_NAME = :TABLE_NAME'; + $params['TABLE_NAME'] = $tableName; + } + + $sql = sprintf( + <<<'SQL' + SELECT + IND_COL.TABLE_NAME, + IND_COL.INDEX_NAME AS NAME, + IND.INDEX_TYPE AS TYPE, + DECODE(IND.UNIQUENESS, 'NONUNIQUE', 0, 'UNIQUE', 1) AS IS_UNIQUE, + IND_COL.COLUMN_NAME, + IND_COL.COLUMN_POSITION AS COLUMN_POS, + CON.CONSTRAINT_TYPE AS IS_PRIMARY + FROM ALL_IND_COLUMNS IND_COL + LEFT JOIN ALL_INDEXES IND + ON IND.OWNER = IND_COL.INDEX_OWNER + AND IND.INDEX_NAME = IND_COL.INDEX_NAME + LEFT JOIN ALL_CONSTRAINTS CON + ON CON.OWNER = IND_COL.INDEX_OWNER + AND CON.INDEX_NAME = IND_COL.INDEX_NAME + WHERE %s + ORDER BY IND_COL.TABLE_NAME, + IND_COL.INDEX_NAME, + IND_COL.COLUMN_POSITION +SQL, + implode(' AND ', $conditions), + ); + + return $this->connection->executeQuery($sql, $params); + } + + protected function selectForeignKeyColumns(string $databaseName, ?string $tableName = null): Result + { + $conditions = ["ALC.CONSTRAINT_TYPE = 'R'", 'COLS.OWNER = :OWNER']; + $params = ['OWNER' => $databaseName]; + + if ($tableName !== null) { + $conditions[] = 'COLS.TABLE_NAME = :TABLE_NAME'; + $params['TABLE_NAME'] = $tableName; + } + + $sql = sprintf( + <<<'SQL' + SELECT + COLS.TABLE_NAME, + ALC.CONSTRAINT_NAME, + ALC.DELETE_RULE, + ALC.DEFERRABLE, + ALC.DEFERRED, + COLS.COLUMN_NAME LOCAL_COLUMN, + COLS.POSITION, + R_COLS.TABLE_NAME REFERENCES_TABLE, + R_COLS.COLUMN_NAME FOREIGN_COLUMN + FROM ALL_CONS_COLUMNS COLS + LEFT JOIN ALL_CONSTRAINTS ALC ON ALC.OWNER = COLS.OWNER AND ALC.CONSTRAINT_NAME = COLS.CONSTRAINT_NAME + LEFT JOIN ALL_CONS_COLUMNS R_COLS ON R_COLS.OWNER = ALC.R_OWNER AND + R_COLS.CONSTRAINT_NAME = ALC.R_CONSTRAINT_NAME AND + R_COLS.POSITION = COLS.POSITION + WHERE %s + ORDER BY COLS.TABLE_NAME, + COLS.CONSTRAINT_NAME, + COLS.POSITION +SQL, + implode(' AND ', $conditions), + ); + + return $this->connection->executeQuery($sql, $params); + } + + /** + * {@inheritDoc} + */ + protected function fetchTableOptionsByTable(string $databaseName, ?string $tableName = null): array + { + $conditions = ['OWNER = :OWNER']; + $params = ['OWNER' => $databaseName]; + + if ($tableName !== null) { + $conditions[] = 'TABLE_NAME = :TABLE_NAME'; + $params['TABLE_NAME'] = $tableName; + } + + $sql = sprintf( + <<<'SQL' + SELECT TABLE_NAME, + COMMENTS + FROM ALL_TAB_COMMENTS + WHERE %s + ORDER BY TABLE_NAME +SQL, + implode(' AND ', $conditions), + ); + + $tableOptions = []; + foreach ($this->connection->iterateKeyValue($sql, $params) as $table => $comments) { + $tableOptions[$table] = ['comment' => $comments]; + } + + return $tableOptions; + } + + /** @deprecated Use {@see Identifier::toNormalizedValue()} instead. */ + protected function normalizeName(string $name): string + { + $identifier = new Identifier($name); + + return $identifier->isQuoted() ? $identifier->getName() : strtoupper($name); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/PostgreSQLSchemaManager.php b/backend/vendor/doctrine/dbal/src/Schema/PostgreSQLSchemaManager.php new file mode 100644 index 0000000..1007296 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/PostgreSQLSchemaManager.php @@ -0,0 +1,542 @@ + + */ +class PostgreSQLSchemaManager extends AbstractSchemaManager +{ + /** + * {@inheritDoc} + */ + public function listSchemaNames(): array + { + return $this->connection->fetchFirstColumn( + <<<'SQL' +SELECT schema_name +FROM information_schema.schemata +WHERE schema_name NOT LIKE 'pg\_%' +AND schema_name != 'information_schema' +SQL, + ); + } + + /** + * Returns the name of the current schema. + * + * @deprecated Use {@link getCurrentSchemaName()} instead + * + * @throws Exception + */ + protected function getCurrentSchema(): ?string + { + return $this->getCurrentSchemaName(); + } + + /** + * Determines the name of the current schema. + * + * @deprecated Use {@link determineCurrentSchemaName()} instead + * + * @return non-empty-string + * + * @throws Exception + */ + protected function determineCurrentSchema(): string + { + $currentSchema = $this->connection->fetchOne('SELECT current_schema()'); + assert(is_string($currentSchema)); + assert(strlen($currentSchema) > 0); + + return $currentSchema; + } + + protected function determineCurrentSchemaName(): ?string + { + return $this->determineCurrentSchema(); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableForeignKeyDefinition(array $tableForeignKey): ForeignKeyConstraint + { + $onUpdate = null; + $onDelete = null; + + if ( + preg_match( + '(ON UPDATE ([a-zA-Z0-9]+( (NULL|ACTION|DEFAULT))?))', + $tableForeignKey['condef'], + $match, + ) === 1 + ) { + $onUpdate = $match[1]; + } + + if ( + preg_match( + '(ON DELETE ([a-zA-Z0-9]+( (NULL|ACTION|DEFAULT))?))', + $tableForeignKey['condef'], + $match, + ) === 1 + ) { + $onDelete = $match[1]; + } + + $result = preg_match('/FOREIGN KEY \((.+)\) REFERENCES (.+)\((.+)\)/', $tableForeignKey['condef'], $values); + assert($result === 1); + + // PostgreSQL returns identifiers that are keywords with quotes, we need them later, don't get + // the idea to trim them here. + $localColumns = array_map('trim', explode(',', $values[1])); + $foreignColumns = array_map('trim', explode(',', $values[3])); + $foreignTable = $values[2]; + + return new ForeignKeyConstraint( + $localColumns, + $foreignTable, + $foreignColumns, + $tableForeignKey['conname'], + [ + 'onUpdate' => $onUpdate, + 'onDelete' => $onDelete, + 'deferrable' => (bool) $tableForeignKey['condeferrable'], + 'deferred' => (bool) $tableForeignKey['condeferred'], + ], + ); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableViewDefinition(array $view): View + { + return new View($view['schemaname'] . '.' . $view['viewname'], $view['definition']); + } + + /** + * @deprecated Use the schema name and the unqualified table name separately instead. + * + * {@inheritDoc} + */ + protected function _getPortableTableDefinition(array $table): string + { + // @phpstan-ignore missingType.checkedException + $currentSchema = $this->getCurrentSchema(); + + if ($table['schema_name'] === $currentSchema) { + return $table['table_name']; + } + + return $table['schema_name'] . '.' . $table['table_name']; + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableIndexesList(array $rows, string $tableName): array + { + return parent::_getPortableTableIndexesList(array_map( + /** @param array $row */ + static function (array $row): array { + return [ + 'key_name' => $row['relname'], + 'non_unique' => ! $row['indisunique'], + 'primary' => (bool) $row['indisprimary'], + 'where' => $row['where'], + 'column_name' => $row['attname'], + ]; + }, + $rows, + ), $tableName); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableDatabaseDefinition(array $database): string + { + return $database['datname']; + } + + /** + * {@inheritDoc} + */ + protected function _getPortableSequenceDefinition(array $sequence): Sequence + { + if ($sequence['schemaname'] !== 'public') { + $sequenceName = $sequence['schemaname'] . '.' . $sequence['relname']; + } else { + $sequenceName = $sequence['relname']; + } + + return new Sequence($sequenceName, (int) $sequence['increment_by'], (int) $sequence['min_value']); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableColumnDefinition(array $tableColumn): Column + { + $tableColumn = array_change_key_case($tableColumn, CASE_LOWER); + + $length = null; + $precision = null; + $scale = 0; + $fixed = false; + $jsonb = false; + + $dbType = $tableColumn['type']; + + if ( + $tableColumn['domain_type'] !== null + && ! $this->platform->hasDoctrineTypeMappingFor($dbType) + ) { + $dbType = $tableColumn['domain_type']; + $completeType = $tableColumn['domain_complete_type']; + } else { + $completeType = $tableColumn['complete_type']; + } + + $type = $this->platform->getDoctrineTypeMapping($dbType); + + switch ($dbType) { + case 'bpchar': + case 'varchar': + $parameters = $this->parseColumnTypeParameters($completeType); + if (count($parameters) > 0) { + $length = $parameters[0]; + } + + break; + + case 'double': + case 'decimal': + case 'money': + case 'numeric': + $parameters = $this->parseColumnTypeParameters($completeType); + if (count($parameters) > 0) { + $precision = $parameters[0]; + } + + if (count($parameters) > 1) { + $scale = $parameters[1]; + } + + break; + } + + if ($dbType === 'bpchar') { + $fixed = true; + } elseif ($dbType === 'jsonb') { + $jsonb = true; + } + + $options = [ + 'length' => $length, + 'notnull' => (bool) $tableColumn['isnotnull'], + 'default' => $this->parseDefaultExpression($tableColumn['default']), + 'precision' => $precision, + 'scale' => $scale, + 'fixed' => $fixed, + 'autoincrement' => $tableColumn['attidentity'] === 'd', + ]; + + if ($tableColumn['comment'] !== null) { + $options['comment'] = $tableColumn['comment']; + } + + $column = new Column($tableColumn['field'], Type::getType($type), $options); + + if (! empty($tableColumn['collation'])) { + $column->setPlatformOption('collation', $tableColumn['collation']); + } + + if ($column->getType() instanceof JsonType) { + $column->setPlatformOption('jsonb', $jsonb); + } + + return $column; + } + + /** + * Parses the parameters between parenthesis in the data type. + * + * @return list + */ + private function parseColumnTypeParameters(string $type): array + { + if (preg_match('/\((\d+)(?:,(\d+))?\)/', $type, $matches) !== 1) { + return []; + } + + $parameters = [(int) $matches[1]]; + + if (isset($matches[2])) { + $parameters[] = (int) $matches[2]; + } + + return $parameters; + } + + /** + * Parses a default value expression as given by PostgreSQL + */ + private function parseDefaultExpression(?string $expression): mixed + { + if ($expression === null || str_starts_with($expression, 'NULL::')) { + return null; + } + + if ($expression === 'true') { + return true; + } + + if ($expression === 'false') { + return false; + } + + if (preg_match("/^'(.*)'::/s", $expression, $matches) === 1) { + return str_replace("''", "'", $matches[1]); + } + + return $expression; + } + + protected function selectTableNames(string $databaseName): Result + { + $sql = <<<'SQL' +SELECT quote_ident(table_name) AS table_name, + table_schema AS schema_name +FROM information_schema.tables +WHERE table_catalog = ? + AND table_schema NOT LIKE 'pg\_%' + AND table_schema != 'information_schema' + AND table_name != 'geometry_columns' + AND table_name != 'spatial_ref_sys' + AND table_type = 'BASE TABLE' +ORDER BY + quote_ident(table_name) +SQL; + + return $this->connection->executeQuery($sql, [$databaseName]); + } + + protected function selectTableColumns(string $databaseName, ?string $tableName = null): Result + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT quote_ident(n.nspname) AS schema_name, + quote_ident(c.relname) AS table_name, + quote_ident(a.attname) AS field, + t.typname AS type, + format_type(a.atttypid, a.atttypmod) AS complete_type, + bt.typname AS domain_type, + format_type(bt.oid, t.typtypmod) AS domain_complete_type, + a.attnotnull AS isnotnull, + a.attidentity, + (%s) AS "default", + dsc.description AS comment, + CASE + WHEN coll.collprovider = 'c' + THEN coll.collcollate + WHEN coll.collprovider = 'd' + THEN NULL + ELSE coll.collname + END AS collation + FROM pg_attribute a + JOIN pg_class c + ON c.oid = a.attrelid + JOIN pg_namespace n + ON n.oid = c.relnamespace + JOIN pg_type t + ON t.oid = a.atttypid + LEFT JOIN pg_type bt + ON t.typtype = 'd' + AND bt.oid = t.typbasetype + LEFT JOIN pg_collation coll + ON coll.oid = a.attcollation + LEFT JOIN pg_depend dep + ON dep.objid = c.oid + AND dep.deptype = 'e' + AND dep.classid = (SELECT oid FROM pg_class WHERE relname = 'pg_class') + LEFT JOIN pg_description dsc + ON dsc.objoid = c.oid AND dsc.objsubid = a.attnum + LEFT JOIN pg_inherits i + ON i.inhrelid = c.oid + LEFT JOIN pg_class p + ON i.inhparent = p.oid + AND p.relkind = 'p' + WHERE %s + -- 'r' for regular tables - 'p' for partitioned tables + AND c.relkind IN ('r', 'p') + AND a.attnum > 0 + AND dep.refobjid IS NULL + -- exclude partitions (tables that inherit from partitioned tables) + AND p.oid IS NULL + ORDER BY n.nspname, + c.relname, + a.attnum + SQL, + $this->platform->getDefaultColumnValueSQLSnippet(), + implode(' AND ', $this->buildQueryConditions($tableName, $params)), + ); + + return $this->connection->executeQuery($sql, $params); + } + + protected function selectIndexColumns(string $databaseName, ?string $tableName = null): Result + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT + quote_ident(n.nspname) AS schema_name, + quote_ident(c.relname) AS table_name, + quote_ident(ic.relname) AS relname, + i.indisunique, + i.indisprimary, + i.indkey, + i.indrelid, + pg_get_expr(indpred, indrelid) AS "where", + quote_ident(attname) AS attname + FROM pg_index i + JOIN pg_class AS c ON c.oid = i.indrelid + JOIN pg_namespace n ON n.oid = c.relnamespace + JOIN pg_class AS ic ON ic.oid = i.indexrelid + JOIN LATERAL UNNEST(i.indkey) WITH ORDINALITY AS keys(attnum, ord) + ON TRUE + JOIN pg_attribute a + ON a.attrelid = c.oid + AND a.attnum = keys.attnum + WHERE %s + ORDER BY 1, 2, keys.ord; + SQL, + implode(' AND ', $this->buildQueryConditions($tableName, $params)), + ); + + return $this->connection->executeQuery($sql, $params); + } + + protected function selectForeignKeyColumns(string $databaseName, ?string $tableName = null): Result + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT + quote_ident(tn.nspname) AS schema_name, + quote_ident(tc.relname) AS table_name, + quote_ident(r.conname) as conname, + pg_get_constraintdef(r.oid, true) as condef, + r.condeferrable, + r.condeferred + FROM pg_constraint r + JOIN pg_class AS tc ON tc.oid = r.conrelid + JOIN pg_namespace tn ON tn.oid = tc.relnamespace + WHERE r.conrelid IN + ( + SELECT c.oid + FROM pg_class c + JOIN pg_namespace n + ON n.oid = c.relnamespace + WHERE %s) + AND r.contype = 'f' + ORDER BY 1, 2 + SQL, + implode(' AND ', $this->buildQueryConditions($tableName, $params)), + ); + + return $this->connection->executeQuery($sql, $params); + } + + /** + * {@inheritDoc} + */ + protected function fetchTableOptionsByTable(string $databaseName, ?string $tableName = null): array + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT quote_ident(n.nspname) AS schema_name, + quote_ident(c.relname) AS table_name, + CASE c.relpersistence WHEN 'u' THEN true ELSE false END as unlogged, + obj_description(c.oid, 'pg_class') AS comment + FROM pg_class c + INNER JOIN pg_namespace n + ON n.oid = c.relnamespace + WHERE + c.relkind = 'r' + AND %s + SQL, + implode(' AND ', $this->buildQueryConditions($tableName, $params)), + ); + + $tableOptions = []; + foreach ($this->connection->iterateAssociative($sql, $params) as $row) { + $tableOptions[$this->_getPortableTableDefinition($row)] = $row; + } + + return $tableOptions; + } + + /** + * @param list $params + * + * @return non-empty-list + */ + private function buildQueryConditions(?string $tableName, array &$params): array + { + $conditions = []; + + if ($tableName !== null) { + if (str_contains($tableName, '.')) { + [$schemaName, $tableName] = explode('.', $tableName); + + $conditions[] = 'n.nspname = ?'; + $params[] = $schemaName; + } else { + $conditions[] = 'n.nspname = ANY(current_schemas(false))'; + } + + $conditions[] = 'c.relname = ?'; + $params[] = $tableName; + } + + $conditions[] = "n.nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast')"; + + return $conditions; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/PrimaryKeyConstraint.php b/backend/vendor/doctrine/dbal/src/Schema/PrimaryKeyConstraint.php new file mode 100644 index 0000000..700a5bc --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/PrimaryKeyConstraint.php @@ -0,0 +1,76 @@ + */ +final readonly class PrimaryKeyConstraint implements OptionallyNamedObject +{ + /** + * @internal Use {@link PrimaryKeyConstraint::editor()} to instantiate an editor and + * {@link PrimaryKeyConstraintEditor::create()} to create a primary key constraint. + * + * @param ?UnqualifiedName $name Name of the primary key constraint. If omitted in the schema + * defined by the application, it is considered that the name is + * not essential and may be generated by the underlying database + * platform. + * @param non-empty-list $columnNames + */ + public function __construct( + private ?UnqualifiedName $name, + private array $columnNames, + private bool $isClustered, + ) { + if (count($this->columnNames) < 1) { + throw InvalidPrimaryKeyConstraintDefinition::columnNamesNotSet(); + } + } + + public function getObjectName(): ?UnqualifiedName + { + return $this->name; + } + + /** + * Returns the names of the columns. + * + * @return non-empty-list + */ + public function getColumnNames(): array + { + return $this->columnNames; + } + + /** + * Returns whether the primary key constraint is clustered. + */ + public function isClustered(): bool + { + return $this->isClustered; + } + + /** + * Instantiates a new primary key constraint editor. + */ + public static function editor(): PrimaryKeyConstraintEditor + { + return new PrimaryKeyConstraintEditor(); + } + + /** + * Instantiates a new foreign key constraint editor and initializes it with the constraint's properties. + */ + public function edit(): PrimaryKeyConstraintEditor + { + return self::editor() + ->setName($this->name) + ->setColumnNames(...$this->columnNames) + ->setIsClustered($this->isClustered); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/PrimaryKeyConstraintEditor.php b/backend/vendor/doctrine/dbal/src/Schema/PrimaryKeyConstraintEditor.php new file mode 100644 index 0000000..9efc286 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/PrimaryKeyConstraintEditor.php @@ -0,0 +1,115 @@ + */ + private array $columnNames = []; + + private bool $isClustered = true; + + /** + * @internal Use {@link PrimaryKeyConstraint::editor()} or {@link PrimaryKeyConstraint::edit()} to create + * an instance. + */ + public function __construct() + { + } + + public function setName(?UnqualifiedName $name): self + { + $this->name = $name; + + return $this; + } + + /** @param non-empty-string $name */ + public function setUnquotedName(string $name): self + { + $this->name = UnqualifiedName::unquoted($name); + + return $this; + } + + /** @param non-empty-string $name */ + public function setQuotedName(string $name): self + { + $this->name = UnqualifiedName::quoted($name); + + return $this; + } + + public function setColumnNames(UnqualifiedName $firstColumnName, UnqualifiedName ...$otherColumnNames): self + { + $this->columnNames = [$firstColumnName, ...array_values($otherColumnNames)]; + + return $this; + } + + /** + * @param non-empty-string $firstColumnName + * @param non-empty-string ...$otherColumnNames + */ + public function setUnquotedColumnNames( + string $firstColumnName, + string ...$otherColumnNames, + ): self { + $this->columnNames = array_map( + static fn (string $name): UnqualifiedName => UnqualifiedName::unquoted($name), + [$firstColumnName, ...array_values($otherColumnNames)], + ); + + return $this; + } + + /** + * @param non-empty-string $firstColumnName + * @param non-empty-string ...$otherColumnNames + */ + public function setQuotedColumnNames( + string $firstColumnName, + string ...$otherColumnNames, + ): self { + $this->columnNames = array_map( + static fn (string $name): UnqualifiedName => UnqualifiedName::quoted($name), + [$firstColumnName, ...array_values($otherColumnNames)], + ); + + return $this; + } + + public function addColumnName(UnqualifiedName $columName): self + { + $this->columnNames[] = $columName; + + return $this; + } + + public function setIsClustered(bool $isClustered): self + { + $this->isClustered = $isClustered; + + return $this; + } + + public function create(): PrimaryKeyConstraint + { + if (count($this->columnNames) < 1) { + throw InvalidPrimaryKeyConstraintDefinition::columnNamesNotSet(); + } + + return new PrimaryKeyConstraint($this->name, $this->columnNames, $this->isClustered); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/SQLServerSchemaManager.php b/backend/vendor/doctrine/dbal/src/Schema/SQLServerSchemaManager.php new file mode 100644 index 0000000..86c1c65 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/SQLServerSchemaManager.php @@ -0,0 +1,516 @@ + + */ +class SQLServerSchemaManager extends AbstractSchemaManager +{ + private ?string $databaseCollation = null; + + /** + * {@inheritDoc} + */ + public function listSchemaNames(): array + { + return $this->connection->fetchFirstColumn( + <<<'SQL' +SELECT name +FROM sys.schemas +WHERE name NOT IN('guest', 'INFORMATION_SCHEMA', 'sys') +SQL, + ); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableSequenceDefinition(array $sequence): Sequence + { + return new Sequence($sequence['name'], (int) $sequence['increment'], (int) $sequence['start_value']); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableColumnDefinition(array $tableColumn): Column + { + $dbType = $tableColumn['type']; + + $length = (int) $tableColumn['length']; + + $precision = null; + + $scale = 0; + $fixed = false; + + if ($tableColumn['scale'] !== null) { + $scale = (int) $tableColumn['scale']; + } + + if ($tableColumn['precision'] !== null) { + $precision = (int) $tableColumn['precision']; + } + + switch ($dbType) { + case 'nchar': + case 'ntext': + // Unicode data requires 2 bytes per character + $length /= 2; + break; + + case 'nvarchar': + if ($length === -1) { + break; + } + + // Unicode data requires 2 bytes per character + $length /= 2; + break; + + case 'varchar': + // TEXT type is returned as VARCHAR(MAX) with a length of -1 + if ($length === -1) { + $dbType = 'text'; + } + + break; + + case 'varbinary': + if ($length === -1) { + $dbType = 'blob'; + } + + break; + } + + if ($dbType === 'char' || $dbType === 'nchar' || $dbType === 'binary') { + $fixed = true; + } + + $type = $this->platform->getDoctrineTypeMapping($dbType); + + $options = [ + 'fixed' => $fixed, + 'notnull' => (bool) $tableColumn['notnull'], + 'scale' => $scale, + 'precision' => $precision, + 'autoincrement' => (bool) $tableColumn['autoincrement'], + ]; + + if ($tableColumn['comment'] !== null) { + $options['comment'] = $tableColumn['comment']; + } + + if ($length !== 0 && ($type === 'text' || $type === 'string' || $type === 'binary')) { + $options['length'] = $length; + } + + $column = new Column($tableColumn['name'], Type::getType($type), $options); + + if ($tableColumn['default'] !== null) { + $default = $this->parseDefaultExpression($tableColumn['default']); + + $column->setDefault($default); + $column->setPlatformOption( + SQLServerPlatform::OPTION_DEFAULT_CONSTRAINT_NAME, + $tableColumn['df_name'], + ); + } + + $column->setPlatformOption('collation', $tableColumn['collation']); + + return $column; + } + + private function parseDefaultExpression(string $value): string|DefaultExpression|null + { + while (preg_match('/^\((.*)\)$/s', $value, $matches) === 1) { + $value = $matches[1]; + } + + if ($value === 'NULL') { + return null; + } + + if (preg_match('/^\'(.*)\'$/s', $value, $matches) === 1) { + $value = str_replace("''", "'", $matches[1]); + } + + if ($value === 'getdate()') { + return new CurrentTimestamp(); + } + + return $value; + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableForeignKeysList(array $rows): array + { + $foreignKeys = []; + + foreach ($rows as $row) { + $name = $row['ForeignKey']; + + if (! isset($foreignKeys[$name])) { + $referencedTableName = $row['ReferenceTableName']; + + // @phpstan-ignore missingType.checkedException + if ($row['ReferenceSchemaName'] !== $this->getCurrentSchemaName()) { + $referencedTableName = $row['ReferenceSchemaName'] . '.' . $referencedTableName; + } + + $foreignKeys[$name] = [ + 'local_columns' => [$row['ColumnName']], + 'foreign_table' => $referencedTableName, + 'foreign_columns' => [$row['ReferenceColumnName']], + 'name' => $name, + 'options' => [ + 'onUpdate' => str_replace('_', ' ', $row['update_referential_action_desc']), + 'onDelete' => str_replace('_', ' ', $row['delete_referential_action_desc']), + ], + ]; + } else { + $foreignKeys[$name]['local_columns'][] = $row['ColumnName']; + $foreignKeys[$name]['foreign_columns'][] = $row['ReferenceColumnName']; + } + } + + return parent::_getPortableTableForeignKeysList($foreignKeys); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableIndexesList(array $rows, string $tableName): array + { + foreach ($rows as &$row) { + $row['non_unique'] = (bool) $row['non_unique']; + $row['primary'] = (bool) $row['primary']; + $row['flags'] = $row['flags'] ? [$row['flags']] : null; + } + + return parent::_getPortableTableIndexesList($rows, $tableName); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableForeignKeyDefinition(array $tableForeignKey): ForeignKeyConstraint + { + return new ForeignKeyConstraint( + $tableForeignKey['local_columns'], + $tableForeignKey['foreign_table'], + $tableForeignKey['foreign_columns'], + $tableForeignKey['name'], + $tableForeignKey['options'], + ); + } + + /** + * @deprecated Use the schema name and the unqualified table name separately instead. + * + * {@inheritDoc} + */ + protected function _getPortableTableDefinition(array $table): string + { + // @phpstan-ignore missingType.checkedException + if ($table['schema_name'] !== $this->getCurrentSchemaName()) { + return $table['schema_name'] . '.' . $table['table_name']; + } + + return $table['table_name']; + } + + /** + * {@inheritDoc} + */ + protected function _getPortableDatabaseDefinition(array $database): string + { + return $database['name']; + } + + /** + * {@inheritDoc} + */ + protected function _getPortableViewDefinition(array $view): View + { + return new View($view['name'], $view['definition']); + } + + /** @throws Exception */ + public function createComparator(/* ComparatorConfig $config = new ComparatorConfig() */): Comparator + { + return new SQLServer\Comparator( + $this->platform, + $this->getDatabaseCollation(), + func_num_args() > 0 ? func_get_arg(0) : new ComparatorConfig(), + ); + } + + /** @throws Exception */ + private function getDatabaseCollation(): string + { + if ($this->databaseCollation === null) { + $databaseCollation = $this->connection->fetchOne( + 'SELECT collation_name FROM sys.databases WHERE name = ' + . $this->platform->getCurrentDatabaseExpression(), + ); + + // a database is always selected, even if omitted in the connection parameters + assert(is_string($databaseCollation)); + + $this->databaseCollation = $databaseCollation; + } + + return $this->databaseCollation; + } + + protected function determineCurrentSchemaName(): ?string + { + $schemaName = $this->connection->fetchOne('SELECT SCHEMA_NAME()'); + assert($schemaName !== false); + + return $schemaName; + } + + protected function selectTableNames(string $databaseName): Result + { + // The "sysdiagrams" table must be ignored as it's internal SQL Server table for Database Diagrams + $sql = <<<'SQL' +SELECT SCHEMA_NAME(schema_id) AS schema_name, + name AS table_name +FROM sys.tables +WHERE name != 'sysdiagrams' +ORDER BY name +SQL; + + return $this->connection->executeQuery($sql); + } + + protected function selectTableColumns(string $databaseName, ?string $tableName = null): Result + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT + scm.name AS schema_name, + tbl.name AS table_name, + col.name, + type.name AS type, + col.max_length AS length, + ~col.is_nullable AS notnull, + def.definition AS [default], + def.name AS df_name, + col.scale, + col.precision, + col.is_identity AS autoincrement, + col.collation_name AS collation, + -- CAST avoids driver error for sql_variant type + CAST(prop.value AS NVARCHAR(MAX)) AS comment + FROM sys.columns AS col + JOIN sys.types AS type + ON col.user_type_id = type.user_type_id + JOIN sys.tables AS tbl + ON col.object_id = tbl.object_id + JOIN sys.schemas AS scm + ON tbl.schema_id = scm.schema_id + LEFT JOIN sys.default_constraints def + ON col.default_object_id = def.object_id + AND col.object_id = def.parent_object_id + LEFT JOIN sys.extended_properties AS prop + ON tbl.object_id = prop.major_id + AND col.column_id = prop.minor_id + AND prop.name = 'MS_Description' + WHERE %s + ORDER BY scm.name, + tbl.name, + col.column_id +SQL, + $this->getWhereClause($tableName, 'scm.name', 'tbl.name', $params), + ); + + return $this->connection->executeQuery($sql, $params); + } + + protected function selectIndexColumns(string $databaseName, ?string $tableName = null): Result + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT + scm.name AS schema_name, + tbl.name AS table_name, + idx.name AS key_name, + col.name AS column_name, + ~idx.is_unique AS non_unique, + idx.is_primary_key AS [primary], + CASE idx.type + WHEN '1' THEN 'clustered' + WHEN '2' THEN 'nonclustered' + ELSE NULL + END AS flags + FROM sys.tables AS tbl + JOIN sys.schemas AS scm + ON tbl.schema_id = scm.schema_id + JOIN sys.indexes AS idx + ON tbl.object_id = idx.object_id + JOIN sys.index_columns AS idxcol + ON idx.object_id = idxcol.object_id + AND idx.index_id = idxcol.index_id + JOIN sys.columns AS col + ON idxcol.object_id = col.object_id + AND idxcol.column_id = col.column_id + WHERE %s + ORDER BY scm.name, + tbl.name, + idx.index_id, + idxcol.key_ordinal +SQL, + $this->getWhereClause($tableName, 'scm.name', 'tbl.name', $params), + ); + + return $this->connection->executeQuery($sql, $params); + } + + protected function selectForeignKeyColumns(string $databaseName, ?string $tableName = null): Result + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT + SCHEMA_NAME(f.schema_id) AS schema_name, + OBJECT_NAME(f.parent_object_id) AS table_name, + f.name AS ForeignKey, + COL_NAME(fc.parent_object_id, fc.parent_column_id) AS ColumnName, + SCHEMA_NAME(t.schema_id) ReferenceSchemaName, + OBJECT_NAME(f.referenced_object_id) AS ReferenceTableName, + COL_NAME(fc.referenced_object_id, fc.referenced_column_id) AS ReferenceColumnName, + f.delete_referential_action_desc, + f.update_referential_action_desc + FROM sys.foreign_keys AS f + INNER JOIN sys.foreign_key_columns AS fc + ON f.object_id = fc.constraint_object_id + INNER JOIN sys.tables AS t + ON t.object_id = fc.referenced_object_id + WHERE %s + ORDER BY 1, + 2, + 3, + fc.constraint_column_id +SQL, + $this->getWhereClause( + $tableName, + 'SCHEMA_NAME(f.schema_id)', + 'OBJECT_NAME(f.parent_object_id)', + $params, + ), + ); + + return $this->connection->executeQuery($sql, $params); + } + + /** + * {@inheritDoc} + */ + protected function fetchTableOptionsByTable(string $databaseName, ?string $tableName = null): array + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT + scm.name AS schema_name, + tbl.name AS table_name, + p.value + FROM + sys.tables AS tbl + JOIN sys.schemas AS scm + ON tbl.schema_id = scm.schema_id + INNER JOIN sys.extended_properties AS p ON p.major_id=tbl.object_id AND p.minor_id=0 AND p.class=1 + WHERE + p.name = N'MS_Description' + AND %s +SQL, + $this->getWhereClause($tableName, 'scm.name', 'tbl.name', $params), + ); + + $tableOptions = []; + foreach ($this->connection->iterateAssociative($sql, $params) as $data) { + $data = array_change_key_case($data, CASE_LOWER); + + $tableOptions[$this->_getPortableTableDefinition($data)] = [ + 'comment' => $data['value'], + ]; + } + + return $tableOptions; + } + + /** + * Returns the where clause to filter schema and table name in a query. + * + * @param ?string $tableName The full qualified name of the table. + * @param string $schemaColumn The name of the column to compare the schema to in the where clause. + * @param string $tableColumn The name of the column to compare the table to in the where clause. + * @param list $params + */ + private function getWhereClause( + ?string $tableName, + string $schemaColumn, + string $tableColumn, + array &$params, + ): string { + $conditions = []; + + if ($tableName !== null) { + if (str_contains($tableName, '.')) { + [$schemaName, $tableName] = explode('.', $tableName); + + $conditions = [sprintf('%s = ?', $schemaColumn)]; + $params[] = $schemaName; + } else { + $conditions = [sprintf('%s = SCHEMA_NAME()', $schemaColumn)]; + } + + $conditions[] = sprintf('%s = ?', $tableColumn); + $params[] = $tableName; + } + + // The "sysdiagrams" table must be ignored as it's internal SQL Server table for Database Diagrams + $conditions[] = sprintf("%s != 'sysdiagrams'", $tableColumn); + + return implode(' AND ', $conditions); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/SQLiteSchemaManager.php b/backend/vendor/doctrine/dbal/src/Schema/SQLiteSchemaManager.php new file mode 100644 index 0000000..8a8cba8 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/SQLiteSchemaManager.php @@ -0,0 +1,622 @@ + + */ +class SQLiteSchemaManager extends AbstractSchemaManager +{ + public function createForeignKey(ForeignKeyConstraint $foreignKey, string $table): void + { + $table = $this->introspectTable($table); + + $this->alterTable(new TableDiff($table, addedForeignKeys: [$foreignKey])); + } + + public function dropForeignKey(string $name, string $table): void + { + $table = $this->introspectTable($table); + + $foreignKey = $table->getForeignKey($name); + + $this->alterTable(new TableDiff($table, droppedForeignKeys: [$foreignKey])); + } + + /** + * @deprecated Use the schema name and the unqualified table name separately instead. + * + * {@inheritDoc} + */ + protected function _getPortableTableDefinition(array $table): string + { + return $table['table_name']; + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableColumnDefinition(array $tableColumn): Column + { + $matchResult = preg_match('/^([A-Z\s]+?)(?:\s*\((\d+)(?:,\s*(\d+))?\))?$/i', $tableColumn['type'], $matches); + assert($matchResult === 1); + + $dbType = strtolower($matches[1]); + + $length = $precision = null; + $fixed = $unsigned = false; + $scale = 0; + + if (isset($matches[2])) { + if (isset($matches[3])) { + $precision = (int) $matches[2]; + $scale = (int) $matches[3]; + } else { + $length = (int) $matches[2]; + } + } + + if (str_contains($dbType, ' unsigned')) { + $dbType = str_replace(' unsigned', '', $dbType); + $unsigned = true; + } + + $type = $this->platform->getDoctrineTypeMapping($dbType); + $default = $tableColumn['dflt_value']; + if ($default === 'NULL') { + $default = null; + } + + if ($default !== null) { + // SQLite returns the default value as a literal expression, so we need to parse it + if (preg_match('/^\'(.*)\'$/s', $default, $matches) === 1) { + $default = str_replace("''", "'", $matches[1]); + } + } + + $notnull = (bool) $tableColumn['notnull']; + + if ($dbType === 'char') { + $fixed = true; + } + + $options = [ + 'autoincrement' => $tableColumn['autoincrement'], + 'comment' => $tableColumn['comment'], + 'length' => $length, + 'unsigned' => $unsigned, + 'fixed' => $fixed, + 'notnull' => $notnull, + 'default' => $default, + 'precision' => $precision, + 'scale' => $scale, + ]; + + $column = new Column($tableColumn['name'], Type::getType($type), $options); + + if ($type === Types::STRING || $type === Types::TEXT) { + $column->setPlatformOption('collation', $tableColumn['collation'] ?? 'BINARY'); + } + + return $column; + } + + /** + * {@inheritDoc} + */ + protected function _getPortableViewDefinition(array $view): View + { + return new View($view['name'], $view['sql']); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableForeignKeysList(array $rows): array + { + $list = []; + foreach ($rows as $row) { + $row = array_change_key_case($row, CASE_LOWER); + $id = $row['id']; + if (! isset($list[$id])) { + if (! isset($row['on_delete']) || $row['on_delete'] === 'RESTRICT') { + $row['on_delete'] = null; + } + + if (! isset($row['on_update']) || $row['on_update'] === 'RESTRICT') { + $row['on_update'] = null; + } + + $list[$id] = [ + 'name' => $row['constraint_name'], + 'local' => [], + 'foreign' => [], + 'foreignTable' => $row['table'], + 'onDelete' => $row['on_delete'], + 'onUpdate' => $row['on_update'], + 'deferrable' => $row['deferrable'], + 'deferred' => $row['deferred'], + ]; + } + + $list[$id]['local'][] = $row['from']; + + if ($row['to'] === null) { + continue; + } + + $list[$id]['foreign'][] = $row['to']; + } + + foreach ($list as $id => $value) { + if (count($value['foreign']) !== 0) { + continue; + } + + // Inferring a shorthand form for the foreign key constraint, where the "to" field is empty. + // @see https://www.sqlite.org/foreignkeys.html#fk_indexes. + // @phpstan-ignore missingType.checkedException + $foreignTablePrimaryKeyColumnRows = $this->fetchPrimaryKeyColumns($value['foreignTable']); + + if (count($foreignTablePrimaryKeyColumnRows) < 1) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6701', + 'Introspection of SQLite foreign key constraints with omitted referenced column names' + . ' in an incomplete schema is deprecated.', + ); + + continue; + } + + $list[$id]['foreign'] = array_column($foreignTablePrimaryKeyColumnRows, 'name'); + } + + return parent::_getPortableTableForeignKeysList($list); + } + + /** + * {@inheritDoc} + */ + protected function _getPortableTableForeignKeyDefinition(array $tableForeignKey): ForeignKeyConstraint + { + return new ForeignKeyConstraint( + $tableForeignKey['local'], + $tableForeignKey['foreignTable'], + $tableForeignKey['foreign'], + $tableForeignKey['name'], + [ + 'onDelete' => $tableForeignKey['onDelete'], + 'onUpdate' => $tableForeignKey['onUpdate'], + 'deferrable' => $tableForeignKey['deferrable'], + 'deferred' => $tableForeignKey['deferred'], + ], + ); + } + + private function parseColumnCollationFromSQL(string $column, string $sql): ?string + { + $pattern = '{' . $this->buildIdentifierPattern($column) + . '[^,(]+(?:\([^()]+\)[^,]*)?(?:(?:DEFAULT|CHECK)\s*(?:\(.*?\))?[^,]*)*COLLATE\s+["\']?([^\s,"\')]+)}is'; + + if (preg_match($pattern, $sql, $match) !== 1) { + return null; + } + + return $match[1]; + } + + private function parseTableCommentFromSQL(string $table, string $sql): ?string + { + $pattern = '/\s* # Allow whitespace characters at start of line +CREATE\sTABLE' . $this->buildIdentifierPattern($table) . ' +( # Start capture + (?:\s*--[^\n]*\n?)+ # Capture anything that starts with whitespaces followed by -- until the end of the line(s) +)/ix'; + + if (preg_match($pattern, $sql, $match) !== 1) { + return null; + } + + $comment = preg_replace('{^\s*--}m', '', rtrim($match[1], "\n")); + + return $comment === '' ? null : $comment; + } + + private function parseColumnCommentFromSQL(string $column, string $sql): string + { + $pattern = '{[\s(,]' . $this->buildIdentifierPattern($column) + . '(?:\([^)]*?\)|[^,(])*?,?((?:(?!\n))(?:\s*--[^\n]*\n?)+)}i'; + + if (preg_match($pattern, $sql, $match) !== 1) { + return ''; + } + + $comment = preg_replace('{^\s*--}m', '', rtrim($match[1], "\n")); + assert(is_string($comment)); + + return $comment; + } + + /** + * Returns a regular expression pattern that matches the given unquoted or quoted identifier. + */ + private function buildIdentifierPattern(string $identifier): string + { + return '(?:' . implode('|', array_map( + static function (string $sql): string { + return '\W' . preg_quote($sql, '/') . '\W'; + }, + [ + $identifier, + $this->platform->quoteSingleIdentifier($identifier), + ], + )) . ')'; + } + + /** @throws Exception */ + private function getCreateTableSQL(string $table): string + { + $sql = $this->connection->fetchOne( + <<<'SQL' +SELECT sql + FROM ( + SELECT * + FROM sqlite_master + UNION ALL + SELECT * + FROM sqlite_temp_master + ) +WHERE type = 'table' +AND name = ? +SQL + , + [$table], + ); + + if ($sql !== false) { + return $sql; + } + + return ''; + } + + /** + * @return list> + * + * @throws Exception + */ + private function getForeignKeyDetails(string $table): array + { + $createSql = $this->getCreateTableSQL($table); + + if ( + preg_match_all( + '# + (?:CONSTRAINT\s+(\S+)\s+)? + (?:FOREIGN\s+KEY[^)]+\)\s*)? + REFERENCES\s+\S+\s*(?:\([^)]+\))? + (?: + [^,]*? + (NOT\s+DEFERRABLE|DEFERRABLE) + (?:\s+INITIALLY\s+(DEFERRED|IMMEDIATE))? + )?#isx', + $createSql, + $match, + ) === 0 + ) { + return []; + } + + $names = $match[1]; + $deferrable = $match[2]; + $deferred = $match[3]; + $details = []; + + for ($i = 0, $count = count($match[0]); $i < $count; $i++) { + $details[] = [ + 'constraint_name' => $names[$i] ?? '', + 'deferrable' => isset($deferrable[$i]) && strcasecmp($deferrable[$i], 'deferrable') === 0, + 'deferred' => isset($deferred[$i]) && strcasecmp($deferred[$i], 'deferred') === 0, + ]; + } + + return $details; + } + + public function createComparator(/* ComparatorConfig $config = new ComparatorConfig() */): Comparator + { + return new SQLite\Comparator($this->platform, func_num_args() > 0 ? func_get_arg(0) : new ComparatorConfig()); + } + + protected function selectTableNames(string $databaseName): Result + { + $sql = <<<'SQL' +SELECT name AS table_name +FROM sqlite_master +WHERE type = 'table' + AND name NOT IN ('geometry_columns', 'spatial_ref_sys', 'sqlite_sequence') +UNION ALL +SELECT name +FROM sqlite_temp_master +WHERE type = 'table' +ORDER BY name +SQL; + + return $this->connection->executeQuery($sql); + } + + protected function selectTableColumns(string $databaseName, ?string $tableName = null): Result + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT t.name AS table_name, + c.* + FROM sqlite_master t + JOIN pragma_table_info(t.name) c + WHERE %s + ORDER BY t.name, + c.cid +SQL, + $this->getWhereClause($tableName, $params), + ); + + return $this->connection->executeQuery($sql, $params); + } + + /** + * {@inheritDoc} + * + * @link https://www.sqlite.org/pragma.html#pragma_index_info + * @link https://www.sqlite.org/pragma.html#pragma_table_info + * @link https://www.sqlite.org/fileformat2.html#internal_schema_objects + */ + protected function selectIndexColumns(string $databaseName, ?string $tableName = null): Result + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT t.name AS table_name, + i.name, + i."unique", + c.name AS column_name + FROM sqlite_master t + JOIN pragma_index_list(t.name) i + JOIN pragma_index_info(i.name) c + WHERE %s + AND i.name NOT LIKE 'sqlite_%%' + ORDER BY t.name, i.seq, c.seqno +SQL, + $this->getWhereClause($tableName, $params), + ); + + return $this->connection->executeQuery($sql, $params); + } + + protected function selectForeignKeyColumns(string $databaseName, ?string $tableName = null): Result + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT t.name AS table_name, + p.* + FROM sqlite_master t + JOIN pragma_foreign_key_list(t.name) p + ON p.seq != '-1' + WHERE %s + ORDER BY t.name, + p.id DESC, + p.seq +SQL, + $this->getWhereClause($tableName, $params), + ); + + return $this->connection->executeQuery($sql, $params); + } + + /** + * {@inheritDoc} + */ + protected function fetchTableColumns(string $databaseName, ?string $tableName = null): array + { + $rows = parent::fetchTableColumns($databaseName, $tableName); + + $sqlByTable = $pkColumnNamesByTable = $result = []; + + foreach ($rows as $row) { + $tableName = $row['table_name']; + + $sqlByTable[$tableName] ??= $this->getCreateTableSQL($tableName); + + if ($row['pk'] === 0 || $row['pk'] === '0' || $row['type'] !== 'INTEGER') { + continue; + } + + $pkColumnNamesByTable[$tableName][] = $row['name']; + } + + foreach ($rows as $row) { + $tableName = $row['table_name']; + $columnName = $row['name']; + $tableSQL = $sqlByTable[$row['table_name']]; + + $result[] = array_merge($row, [ + 'autoincrement' => isset($pkColumnNamesByTable[$tableName]) + && $pkColumnNamesByTable[$tableName] === [$columnName], + 'collation' => $this->parseColumnCollationFromSQL($columnName, $tableSQL), + 'comment' => $this->parseColumnCommentFromSQL($columnName, $tableSQL), + ]); + } + + return $result; + } + + /** + * {@inheritDoc} + */ + protected function fetchIndexColumns(string $databaseName, ?string $tableName = null): array + { + $result = []; + + $pkColumnNameRows = $this->fetchPrimaryKeyColumns($tableName); + + foreach ($pkColumnNameRows as $pkColumnNameRow) { + $result[] = [ + 'table_name' => $pkColumnNameRow['table_name'], + 'key_name' => 'primary', + 'primary' => true, + 'non_unique' => false, + 'column_name' => $pkColumnNameRow['name'], + ]; + } + + $indexColumnRows = parent::fetchIndexColumns($databaseName, $tableName); + + foreach ($indexColumnRows as $indexColumnRow) { + $result[] = [ + 'table_name' => $indexColumnRow['table_name'], + 'key_name' => $indexColumnRow['name'], + 'primary' => false, + 'non_unique' => ! $indexColumnRow['unique'], + 'column_name' => $indexColumnRow['column_name'], + ]; + } + + return $result; + } + + /** + * Fetches names of primary key columns. If the table name is specified, narrows down the selection to this table. + * + * @link https://www.sqlite.org/pragma.html#pragma_table_info + * + * @return list> + * + * @throws Exception + */ + private function fetchPrimaryKeyColumns(?string $tableName = null): array + { + $params = []; + + $sql = sprintf( + <<<'SQL' + SELECT t.name AS table_name, + p.name + FROM sqlite_master t + JOIN pragma_table_info(t.name) p + WHERE %s + AND p.pk > 0 + ORDER BY t.name, + p.pk + SQL, + $this->getWhereClause($tableName, $params), + ); + + return $this->connection->fetchAllAssociative($sql, $params); + } + + /** + * {@inheritDoc} + */ + protected function fetchForeignKeyColumns(string $databaseName, ?string $tableName = null): array + { + $columnsByTable = []; + foreach (parent::fetchForeignKeyColumns($databaseName, $tableName) as $column) { + $columnsByTable[$column['table_name']][] = $column; + } + + $columns = []; + foreach ($columnsByTable as $table => $tableColumns) { + $foreignKeyDetails = $this->getForeignKeyDetails($table); + $foreignKeyCount = count($foreignKeyDetails); + + foreach ($tableColumns as $column) { + // SQLite identifies foreign keys in reverse order of appearance in SQL + $columns[] = array_merge($column, $foreignKeyDetails[$foreignKeyCount - $column['id'] - 1]); + } + } + + return $columns; + } + + /** + * {@inheritDoc} + */ + protected function fetchTableOptionsByTable(string $databaseName, ?string $tableName = null): array + { + if ($tableName === null) { + $tables = $this->listTableNames(); + } else { + $tables = [$tableName]; + } + + $tableOptions = []; + foreach ($tables as $table) { + $comment = $this->parseTableCommentFromSQL($table, $this->getCreateTableSQL($table)); + + if ($comment === null) { + continue; + } + + $tableOptions[$table]['comment'] = $comment; + } + + /** @phpstan-ignore return.type */ + return $tableOptions; + } + + /** @param list $params */ + private function getWhereClause(?string $tableName, array &$params): string + { + $conditions = [ + "t.type = 'table'", + "t.name NOT IN ('geometry_columns', 'spatial_ref_sys', 'sqlite_sequence')", + ]; + + if ($tableName !== null) { + $conditions[] = 't.name = ?'; + $params[] = $tableName; + } + + return implode(' AND ', $conditions); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Schema.php b/backend/vendor/doctrine/dbal/src/Schema/Schema.php new file mode 100644 index 0000000..f92ee0f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Schema.php @@ -0,0 +1,501 @@ + + */ +class Schema extends AbstractAsset +{ + /** + * The namespaces in this schema. + * + * @var array + */ + private array $namespaces = []; + + /** @var array */ + protected array $_tables = []; + + /** @var array */ + protected array $_sequences = []; + + protected SchemaConfig $_schemaConfig; + + /** + * Indicates whether the schema uses unqualified names for its objects. Once this flag is set to true, it won't be + * unset even after the objects with unqualified names have been dropped from the schema. + */ + private bool $usesUnqualifiedNames = false; + + /** + * @param array
$tables + * @param array $sequences + * @param array $namespaces + */ + public function __construct( + array $tables = [], + array $sequences = [], + ?SchemaConfig $schemaConfig = null, + array $namespaces = [], + ) { + if (count($namespaces) > 0) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7186', + 'Passing the $namespaces argument to the Schema constructor is deprecated.', + ); + } + + $schemaConfig ??= new SchemaConfig(); + + $this->_schemaConfig = $schemaConfig; + + $name = $schemaConfig->getName(); + + parent::__construct($name ?? ''); + + foreach ($namespaces as $namespace) { + $this->createNamespace($namespace); + } + + foreach ($tables as $table) { + $table->setSchemaConfig($this->_schemaConfig); + $this->_addTable($table); + } + + foreach ($sequences as $sequence) { + $this->_addSequence($sequence); + } + } + + /** @deprecated */ + public function getName(): string + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6734', + 'Using Schema as AbstractAsset, including %s, is deprecated.', + __METHOD__, + ); + + return parent::getName(); + } + + protected function getNameParser(): UnqualifiedNameParser + { + return Parsers::getUnqualifiedNameParser(); + } + + /** + * The object representation of the name isn't used because {@see Schema} is not an {@see AbstractAsset}. + * + * This method implements the abstract method in the parent class and will be removed once {@see Schema} stops + * extending {@see AbstractAsset}. + */ + protected function setName(?Name $name): void + { + } + + protected function _addTable(Table $table): void + { + $resolvedName = $this->resolveName($table); + + $key = $this->getKeyFromResolvedName($resolvedName); + + if (isset($this->_tables[$key])) { + throw TableAlreadyExists::new($resolvedName->getName()); + } + + $namespaceName = $resolvedName->getNamespaceName(); + + if ($namespaceName !== null) { + if ( + ! $table->isInDefaultNamespace($this->getName()) + && ! $this->hasNamespace($namespaceName) + ) { + $this->createNamespace($namespaceName); + } + } else { + $this->usesUnqualifiedNames = true; + } + + $this->_tables[$key] = $table; + } + + protected function _addSequence(Sequence $sequence): void + { + $resolvedName = $this->resolveName($sequence); + + $key = $this->getKeyFromResolvedName($resolvedName); + + if (isset($this->_sequences[$key])) { + throw SequenceAlreadyExists::new($resolvedName->getName()); + } + + $namespaceName = $resolvedName->getNamespaceName(); + + if ($namespaceName !== null) { + if ( + ! $sequence->isInDefaultNamespace($this->getName()) + && ! $this->hasNamespace($namespaceName) + ) { + $this->createNamespace($namespaceName); + } + } else { + $this->usesUnqualifiedNames = true; + } + + $this->_sequences[$key] = $sequence; + } + + /** + * Returns the namespaces of this schema. + * + * @return list A list of namespace names. + */ + public function getNamespaces(): array + { + return array_values($this->namespaces); + } + + /** + * Gets all tables of this schema. + * + * @return list
+ */ + public function getTables(): array + { + return array_values($this->_tables); + } + + public function getTable(string $name): Table + { + $key = $this->getKeyFromName($name); + if (! isset($this->_tables[$key])) { + throw TableDoesNotExist::new($name); + } + + return $this->_tables[$key]; + } + + /** + * Returns the key that will be used to store the given object in a collection of such objects based on its name. + * + * If the schema uses unqualified names, the object name must be unqualified. If the schema uses qualified names, + * the object name must be qualified. + * + * The resulting key is the lower-cased full object name. Lower-casing is + * actually wrong, but we have to do it to keep our sanity. If you are + * using database objects that only differentiate in the casing (FOO vs + * Foo) then you will NOT be able to use Doctrine Schema abstraction. + * + * @param AbstractAsset $asset + * + * @template N of Name + */ + private function getKeyFromResolvedName(AbstractAsset $asset): string + { + $key = $asset->getName(); + + if ($asset->getNamespaceName() !== null) { + if ($this->usesUnqualifiedNames) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6677#user-content-qualified-names', + 'Using qualified names to create or reference objects in a schema that uses unqualified ' + . 'names is deprecated.', + ); + } + + $key = $this->getName() . '.' . $key; + } elseif (count($this->namespaces) > 0) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6677#user-content-unqualified-names', + 'Using unqualified names to create or reference objects in a schema that uses qualified ' + . 'names and lacks a default namespace configuration is deprecated.', + ); + } + + return strtolower($key); + } + + /** + * Returns the key that will be used to store the given object with the given name in a collection of such objects. + * + * If the schema configuration has the default namespace, an unqualified name will be resolved to qualified against + * that namespace. + */ + private function getKeyFromName(string $name): string + { + return $this->getKeyFromResolvedName($this->resolveName(new Identifier($name))); + } + + /** + * Resolves the qualified or unqualified name against the current schema name and returns a qualified name. + * + * @param AbstractAsset $asset A database object with optionally qualified name. + * + * @template N of Name + */ + private function resolveName(AbstractAsset $asset): AbstractAsset + { + if ($asset->getNamespaceName() === null) { + $defaultNamespaceName = $this->getName(); + + if ($defaultNamespaceName !== '') { + return new Identifier($defaultNamespaceName . '.' . $asset->getName()); + } + } + + return $asset; + } + + /** + * Returns the unquoted representation of a given asset name. + */ + private function getUnquotedAssetName(string $assetName): string + { + if ($this->isIdentifierQuoted($assetName)) { + return $this->trimQuotes($assetName); + } + + return $assetName; + } + + /** + * Does this schema have a namespace with the given name? + */ + public function hasNamespace(string $name): bool + { + $name = strtolower($this->getUnquotedAssetName($name)); + + return isset($this->namespaces[$name]); + } + + /** + * Does this schema have a table with the given name? + */ + public function hasTable(string $name): bool + { + $key = $this->getKeyFromName($name); + + return isset($this->_tables[$key]); + } + + public function hasSequence(string $name): bool + { + $key = $this->getKeyFromName($name); + + return isset($this->_sequences[$key]); + } + + public function getSequence(string $name): Sequence + { + $key = $this->getKeyFromName($name); + if (! isset($this->_sequences[$key])) { + throw SequenceDoesNotExist::new($name); + } + + return $this->_sequences[$key]; + } + + /** @return list */ + public function getSequences(): array + { + return array_values($this->_sequences); + } + + /** + * Creates a new namespace. + * + * @deprecated The schema automatically derives namespaces from the names of its tables and sequences. + * Creating empty namespaces is deprecated. + * + * @return $this + */ + public function createNamespace(string $name): self + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7186', + '%s is deprecated. The schema automatically derives namespaces from the names of its tables and' + . ' sequences. Creating empty namespaces is deprecated.', + __METHOD__, + ); + + $unquotedName = strtolower($this->getUnquotedAssetName($name)); + + if (isset($this->namespaces[$unquotedName])) { + throw NamespaceAlreadyExists::new($unquotedName); + } + + $this->namespaces[$unquotedName] = $name; + + return $this; + } + + /** + * Creates a new table. + */ + public function createTable(string $name): Table + { + $table = new Table($name, [], [], [], [], [], $this->_schemaConfig->toTableConfiguration()); + $this->_addTable($table); + + foreach ($this->_schemaConfig->getDefaultTableOptions() as $option => $value) { + $table->addOption($option, $value); + } + + return $table; + } + + /** + * Renames a table. + * + * @return $this + */ + public function renameTable(string $oldName, string $newName): self + { + $table = $this->getTable($oldName); + + $identifier = new Identifier($newName); + + $table->_name = $identifier->_name; + $table->_namespace = $identifier->_namespace; + $table->_quoted = $identifier->_quoted; + + $this->dropTable($oldName); + $this->_addTable($table); + + return $this; + } + + /** + * Drops a table from the schema. + * + * @return $this + */ + public function dropTable(string $name): self + { + $key = $this->getKeyFromName($name); + if (! isset($this->_tables[$key])) { + throw TableDoesNotExist::new($name); + } + + unset($this->_tables[$key]); + + return $this; + } + + /** + * Creates a new sequence. + */ + public function createSequence(string $name, int $allocationSize = 1, int $initialValue = 1): Sequence + { + $seq = new Sequence($name, $allocationSize, $initialValue); + $this->_addSequence($seq); + + return $seq; + } + + /** @return $this */ + public function dropSequence(string $name): self + { + $key = $this->getKeyFromName($name); + unset($this->_sequences[$key]); + + return $this; + } + + /** + * Returns an array of necessary SQL queries to create the schema on the given platform. + * + * @return list + * + * @throws Exception + */ + public function toSql(AbstractPlatform $platform): array + { + $builder = new CreateSchemaObjectsSQLBuilder($platform); + + return $builder->buildSQL($this); + } + + /** + * Return an array of necessary SQL queries to drop the schema on the given platform. + * + * @return list + */ + public function toDropSql(AbstractPlatform $platform): array + { + $builder = new DropSchemaObjectsSQLBuilder($platform); + + return $builder->buildSQL($this); + } + + /** + * Cloning a Schema triggers a deep clone of all related assets. + */ + public function __clone() + { + foreach ($this->_tables as $k => $table) { + $this->_tables[$k] = clone $table; + } + + foreach ($this->_sequences as $k => $sequence) { + $this->_sequences[$k] = clone $sequence; + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/SchemaConfig.php b/backend/vendor/doctrine/dbal/src/Schema/SchemaConfig.php new file mode 100644 index 0000000..557ed1e --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/SchemaConfig.php @@ -0,0 +1,74 @@ + */ + protected array $defaultTableOptions = []; + + /** @param positive-int $length */ + public function setMaxIdentifierLength(int $length): void + { + $this->maxIdentifierLength = $length; + } + + /** @return positive-int */ + public function getMaxIdentifierLength(): int + { + return $this->maxIdentifierLength; + } + + /** + * Gets the default namespace of schema objects. + * + * @return ?non-empty-string + */ + public function getName(): ?string + { + return $this->name; + } + + /** + * Sets the default namespace name of schema objects. + * + * @param ?non-empty-string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } + + /** + * Gets the default options that are passed to Table instances created with + * Schema#createTable(). + * + * @return array + */ + public function getDefaultTableOptions(): array + { + return $this->defaultTableOptions; + } + + /** @param array $defaultTableOptions */ + public function setDefaultTableOptions(array $defaultTableOptions): void + { + $this->defaultTableOptions = $defaultTableOptions; + } + + public function toTableConfiguration(): TableConfiguration + { + return new TableConfiguration($this->maxIdentifierLength); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/SchemaDiff.php b/backend/vendor/doctrine/dbal/src/Schema/SchemaDiff.php new file mode 100644 index 0000000..185c1b5 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/SchemaDiff.php @@ -0,0 +1,111 @@ + */ + private readonly array $alteredTables; + + /** + * Constructs an SchemaDiff object. + * + * @internal The diff can be only instantiated by a {@see Comparator}. + * + * @param array $createdSchemas + * @param array $droppedSchemas + * @param array
$createdTables + * @param array $alteredTables + * @param array
$droppedTables + * @param array $createdSequences + * @param array $alteredSequences + * @param array $droppedSequences + */ + public function __construct( + private readonly array $createdSchemas, + private readonly array $droppedSchemas, + private readonly array $createdTables, + array $alteredTables, + private readonly array $droppedTables, + private readonly array $createdSequences, + private readonly array $alteredSequences, + private readonly array $droppedSequences, + ) { + $this->alteredTables = array_filter($alteredTables, static function (TableDiff $diff): bool { + return ! $diff->isEmpty(); + }); + } + + /** @return array */ + public function getCreatedSchemas(): array + { + return $this->createdSchemas; + } + + /** @return array */ + public function getDroppedSchemas(): array + { + return $this->droppedSchemas; + } + + /** @return array
*/ + public function getCreatedTables(): array + { + return $this->createdTables; + } + + /** @return array */ + public function getAlteredTables(): array + { + return $this->alteredTables; + } + + /** @return array
*/ + public function getDroppedTables(): array + { + return $this->droppedTables; + } + + /** @return array */ + public function getCreatedSequences(): array + { + return $this->createdSequences; + } + + /** @return array */ + public function getAlteredSequences(): array + { + return $this->alteredSequences; + } + + /** @return array */ + public function getDroppedSequences(): array + { + return $this->droppedSequences; + } + + /** + * Returns whether the diff is empty (contains no changes). + */ + public function isEmpty(): bool + { + return count($this->createdSchemas) === 0 + && count($this->droppedSchemas) === 0 + && count($this->createdTables) === 0 + && count($this->alteredTables) === 0 + && count($this->droppedTables) === 0 + && count($this->createdSequences) === 0 + && count($this->alteredSequences) === 0 + && count($this->droppedSequences) === 0; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/SchemaException.php b/backend/vendor/doctrine/dbal/src/Schema/SchemaException.php new file mode 100644 index 0000000..4277139 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/SchemaException.php @@ -0,0 +1,11 @@ + + * + * @throws Exception + */ + public function getAllDatabaseNames(): array; + + /** + * Returns names of all available schemas. + * + * @return list + * + * @throws Exception + */ + public function getAllSchemaNames(): array; + + /** + * Returns names of all tables. + * + * @return list + * + * @throws Exception + */ + public function getAllTableNames(): array; + + /** + * Returns all tables. + * + * @return list
+ * + * @throws Exception + */ + public function getAllTables(): array; + + /** + * Returns columns for the given table. + * + * If the current database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * Returns an empty value if the table doesn't exist or is not accessible to the connection. + * + * @param ?non-empty-string $schemaName + * @param non-empty-string $tableName + * + * @return list + * + * @throws Exception + */ + public function getColumnsForTable(?string $schemaName, string $tableName): array; + + /** + * Returns indexes for the given table. + * + * If the current database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * Returns an empty value if the table doesn't exist or is not accessible to the connection. + * + * @param ?non-empty-string $schemaName + * @param non-empty-string $tableName + * + * @return list + * + * @throws Exception + */ + public function getIndexesForTable(?string $schemaName, string $tableName): array; + + /** + * Returns the primary key constraint for the given table. + * + * If the current database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * Returns null if the table doesn't exist, doesn't have a primary key constraint or is not accessible + * to the connection. + * + * @param ?non-empty-string $schemaName + * @param non-empty-string $tableName + * + * @throws Exception + */ + public function getPrimaryKeyConstraintForTable(?string $schemaName, string $tableName): ?PrimaryKeyConstraint; + + /** + * Returns the foreign key constraints in the given table. + * + * If the current database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * Returns an empty value if the table doesn't exist or is not accessible to the connection. + * + * @param ?non-empty-string $schemaName + * @param non-empty-string $tableName + * + * @return list + * + * @throws Exception + */ + public function getForeignKeyConstraintsForTable(?string $schemaName, string $tableName): array; + + /** + * Returns options of the given table. + * + * If the current database platform supports schemas, the schema name must be specified. Otherwise, null must be + * passed as the schema name. + * + * Returns null if the table doesn't exist or is not accessible to the connection. + * + * @param ?non-empty-string $schemaName + * @param non-empty-string $tableName + * + * @return array|null + * + * @throws Exception + */ + public function getOptionsForTable(?string $schemaName, string $tableName): ?array; + + /** + * @return list + * + * @throws Exception + */ + public function getAllViews(): array; + + /** + * @return list + * + * @throws Exception + */ + public function getAllSequences(): array; +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Sequence.php b/backend/vendor/doctrine/dbal/src/Schema/Sequence.php new file mode 100644 index 0000000..71c63a6 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Sequence.php @@ -0,0 +1,201 @@ + + */ +class Sequence extends AbstractNamedObject +{ + protected int $allocationSize = 1; + + protected int $initialValue = 1; + + /** + * @internal Use {@link Sequence::editor()} to instantiate an editor and {@link SequenceEditor::create()} to create + * a sequence. + * + * @param ?non-negative-int $cache + */ + public function __construct( + string $name, + int $allocationSize = 1, + int $initialValue = 1, + protected ?int $cache = null, + ) { + parent::__construct($name); + + if ($cache < 0) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7108', + 'Passing a negative value as sequence cache size is deprecated.', + ); + } + + $this->setAllocationSize($allocationSize); + $this->setInitialValue($initialValue); + } + + protected function getNameParser(): OptionallyQualifiedNameParser + { + return Parsers::getOptionallyQualifiedNameParser(); + } + + public function getAllocationSize(): int + { + return $this->allocationSize; + } + + public function getInitialValue(): int + { + return $this->initialValue; + } + + /** + * @deprecated Use {@see getCacheSize()} instead. + * + * @return ?non-negative-int + */ + public function getCache(): ?int + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7108', + '%s is deprecated, use `getCacheSize()` instead.', + __METHOD__, + ); + + return $this->cache; + } + + /** @return ?non-negative-int */ + public function getCacheSize(): ?int + { + return $this->getCache(); + } + + /** @deprecated Use {@see edit()} and {@see SequenceEditor::setAllocationSize()} instead. */ + public function setAllocationSize(int $allocationSize): self + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7115', + '%s is deprecated. Use Sequence::edit() and SequenceEditor::setAllocationSize() instead.', + __METHOD__, + ); + + $this->allocationSize = $allocationSize; + + return $this; + } + + /** @deprecated Use {@see edit()} and {@see SequenceEditor::setInitialValue()} instead. */ + public function setInitialValue(int $initialValue): self + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7115', + '%s is deprecated. Use Sequence::edit() and SequenceEditor::setInitialValue() instead.', + __METHOD__, + ); + + $this->initialValue = $initialValue; + + return $this; + } + + /** + * @deprecated Use {@see edit()} and {@see SequenceEditor::setCacheSize()} instead. + * + * @param non-negative-int $cache + */ + public function setCache(int $cache): self + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7115', + '%s is deprecated. Use Sequence::edit() and SequenceEditor::setCacheSize() instead.', + __METHOD__, + ); + + $this->cache = $cache; + + return $this; + } + + /** + * Checks if this sequence is an autoincrement sequence for a given table. + * + * This is used inside the comparator to not report sequences as missing, + * when the "from" schema implicitly creates the sequences. + * + * @deprecated + */ + public function isAutoIncrementsFor(Table $table): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6654', + '%s is deprecated and will be removed in 5.0.', + __METHOD__, + ); + + $primaryKey = $table->getPrimaryKey(); + + if ($primaryKey === null) { + return false; + } + + $pkColumns = $primaryKey->getColumns(); + + if (count($pkColumns) !== 1) { + return false; + } + + $column = $table->getColumn($pkColumns[0]); + + if (! $column->getAutoincrement()) { + return false; + } + + $sequenceName = $this->getShortestName($table->getNamespaceName()); + $tableName = $table->getShortestName($table->getNamespaceName()); + $tableSequenceName = sprintf('%s_%s_seq', $tableName, $column->getShortestName($table->getNamespaceName())); + + return $tableSequenceName === $sequenceName; + } + + /** + * Instantiates a new sequence editor. + */ + public static function editor(): SequenceEditor + { + return new SequenceEditor(); + } + + /** + * Instantiates a new sequence editor and initializes it with the sequence's properties. + */ + public function edit(): SequenceEditor + { + return self::editor() + ->setName($this->getObjectName()) + ->setAllocationSize($this->getAllocationSize()) + ->setInitialValue($this->getInitialValue()) + ->setCacheSize($this->getCacheSize()); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/SequenceEditor.php b/backend/vendor/doctrine/dbal/src/Schema/SequenceEditor.php new file mode 100644 index 0000000..119ff50 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/SequenceEditor.php @@ -0,0 +1,94 @@ +name = $name; + + return $this; + } + + /** + * @param non-empty-string $unqualifiedName + * @param ?non-empty-string $qualifier + */ + public function setUnquotedName(string $unqualifiedName, ?string $qualifier = null): self + { + $this->name = OptionallyQualifiedName::unquoted($unqualifiedName, $qualifier); + + return $this; + } + + /** + * @param non-empty-string $unqualifiedName + * @param ?non-empty-string $qualifier + */ + public function setQuotedName(string $unqualifiedName, ?string $qualifier = null): self + { + $this->name = OptionallyQualifiedName::quoted($unqualifiedName, $qualifier); + + return $this; + } + + public function setAllocationSize(int $allocationSize): self + { + $this->allocationSize = $allocationSize; + + return $this; + } + + public function setInitialValue(int $initialValue): self + { + $this->initialValue = $initialValue; + + return $this; + } + + /** @param ?non-negative-int $cacheSize */ + public function setCacheSize(?int $cacheSize): self + { + if ($cacheSize < 0) { + throw InvalidSequenceDefinition::fromNegativeCacheSize($cacheSize); + } + + $this->cacheSize = $cacheSize; + + return $this; + } + + public function create(): Sequence + { + if ($this->name === null) { + throw InvalidSequenceDefinition::nameNotSet(); + } + + return new Sequence( + $this->name->toString(), + $this->allocationSize, + $this->initialValue, + $this->cacheSize, + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/Table.php b/backend/vendor/doctrine/dbal/src/Schema/Table.php new file mode 100644 index 0000000..e41fcc6 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/Table.php @@ -0,0 +1,1211 @@ + + */ +class Table extends AbstractNamedObject +{ + /** @var Column[] */ + protected array $_columns = []; + + /** @var array keys are new names, values are old names */ + protected array $renamedColumns = []; + + /** @var Index[] */ + protected array $_indexes = []; + + /** + * The keys of this array are the names of the indexes that were implicitly created as backing for foreign key + * constraints. The values are not used but must be non-null for {@link isset()} to work correctly. + * + * @var array + */ + private array $implicitIndexNames = []; + + /** @deprecated Use {@see $primaryKeyConstraint} instead. */ + protected ?string $_primaryKeyName = null; + + /** @var UniqueConstraint[] */ + protected array $uniqueConstraints = []; + + /** @var ForeignKeyConstraint[] */ + protected array $_fkConstraints = []; + + /** @var mixed[] */ + protected array $_options = [ + 'create_options' => [], + ]; + + /** @deprecated Pass a {@link TableConfiguration} instance to the constructor instead. */ + protected ?SchemaConfig $_schemaConfig = null; + + /** @var positive-int */ + private int $maxIdentifierLength; + + private ?PrimaryKeyConstraint $primaryKeyConstraint = null; + + private bool $failedToParsePrimaryKeyConstraint = false; + + /** + * @param array $columns + * @param array $indexes + * @param array $uniqueConstraints + * @param array $fkConstraints + * @param array $options + */ + public function __construct( + string $name, + array $columns = [], + array $indexes = [], + array $uniqueConstraints = [], + array $fkConstraints = [], + array $options = [], + ?TableConfiguration $configuration = null, + ?PrimaryKeyConstraint $primaryKeyConstraint = null, + ) { + if ($name === '') { + throw InvalidTableName::new($name); + } + + parent::__construct($name); + + $configuration ??= (new SchemaConfig())->toTableConfiguration(); + + $this->maxIdentifierLength = $configuration->getMaxIdentifierLength(); + + foreach ($columns as $column) { + $this->_addColumn($column); + } + + foreach ($indexes as $idx) { + $this->_addIndex($idx); + } + + if ($primaryKeyConstraint !== null) { + $this->addPrimaryKeyConstraint($primaryKeyConstraint); + } + + foreach ($uniqueConstraints as $uniqueConstraint) { + $this->_addUniqueConstraint($uniqueConstraint); + } + + foreach ($fkConstraints as $fkConstraint) { + $this->_addForeignKeyConstraint($fkConstraint); + } + + $this->_options = array_merge($this->_options, $options); + } + + protected function getNameParser(): OptionallyQualifiedNameParser + { + return Parsers::getOptionallyQualifiedNameParser(); + } + + /** @deprecated Pass a {@link TableConfiguration} instance to the constructor instead. */ + public function setSchemaConfig(SchemaConfig $schemaConfig): void + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6635', + '%s is deprecated. Pass TableConfiguration to the constructor instead.', + __METHOD__, + ); + + $this->_schemaConfig = $schemaConfig; + + $this->maxIdentifierLength = $schemaConfig->getMaxIdentifierLength(); + } + + /** + * Sets the Primary Key. + * + * @deprecated Use {@see addPrimaryKeyConstraint()} instead. + * + * @param non-empty-list $columnNames + */ + public function setPrimaryKey(array $columnNames, ?string $indexName = null): self + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6867', + '%s() is deprecated. Use Table::addPrimaryKeyConstraint() instead.', + __METHOD__, + ); + + if ($indexName === null) { + $indexName = 'primary'; + } + + $this->_addIndex($this->_createIndex($columnNames, $indexName, true, true)); + + foreach ($columnNames as $columnName) { + $column = $this->getColumn($columnName); + + if (! $column->getNotnull()) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6787', + 'Using nullable columns (%s.%s) in a primary key index is deprecated.', + $this->getName(), + $columnName, + ); + } + + $column->setNotnull(true); + } + + return $this; + } + + public function addPrimaryKeyConstraint(PrimaryKeyConstraint $primaryKeyConstraint): self + { + $this->setPrimaryKey( + array_map( + static fn (UnqualifiedName $columnName): string => $columnName->toString(), + $primaryKeyConstraint->getColumnNames(), + ), + $primaryKeyConstraint->getObjectName()?->toString(), + ); + + // there is no way to set a primary index with flags. we have to set it and then add the flag + if (! $primaryKeyConstraint->isClustered()) { + $index = $this->getPrimaryKey(); + assert($index !== null); + $index->addFlag('nonclustered'); + } + + $this->primaryKeyConstraint = $primaryKeyConstraint; + + return $this; + } + + /** + * @param non-empty-list $columnNames + * @param array $flags + * @param array $options + */ + public function addUniqueConstraint( + array $columnNames, + ?string $indexName = null, + array $flags = [], + array $options = [], + ): self { + $indexName ??= $this->_generateIdentifierName( + array_merge([$this->getName()], $columnNames), + 'uniq', + $this->_getMaxIdentifierLength(), + ); + + return $this->_addUniqueConstraint($this->_createUniqueConstraint($columnNames, $indexName, $flags, $options)); + } + + /** + * @param non-empty-list $columnNames + * @param array $flags + * @param array $options + */ + public function addIndex( + array $columnNames, + ?string $indexName = null, + array $flags = [], + array $options = [], + ): self { + $indexName ??= $this->_generateIdentifierName( + array_merge([$this->getName()], $columnNames), + 'idx', + $this->_getMaxIdentifierLength(), + ); + + return $this->_addIndex($this->_createIndex($columnNames, $indexName, false, false, $flags, $options)); + } + + /** + * Drops the primary key from this table. + */ + public function dropPrimaryKey(): void + { + $this->primaryKeyConstraint = null; + $this->failedToParsePrimaryKeyConstraint = false; + + if ($this->_primaryKeyName === null) { + return; + } + + $this->dropIndex($this->_primaryKeyName); + $this->_primaryKeyName = null; + } + + /** + * Drops an index from this table. + */ + public function dropIndex(string $name): void + { + $name = $this->normalizeIdentifier($name); + + if (! $this->hasIndex($name)) { + throw IndexDoesNotExist::new($name, $this->_name); + } + + unset($this->_indexes[$name]); + } + + /** + * @param non-empty-list $columnNames + * @param array $options + */ + public function addUniqueIndex(array $columnNames, ?string $indexName = null, array $options = []): self + { + $indexName ??= $this->_generateIdentifierName( + array_merge([$this->getName()], $columnNames), + 'uniq', + $this->_getMaxIdentifierLength(), + ); + + return $this->_addIndex($this->_createIndex($columnNames, $indexName, true, false, [], $options)); + } + + /** + * Renames an index. + * + * @param string $oldName The name of the index to rename from. + * @param string|null $newName The name of the index to rename to. If null is given, the index name + * will be auto-generated. + */ + public function renameIndex(string $oldName, ?string $newName = null): self + { + if (! $this->hasIndex($oldName)) { + throw IndexDoesNotExist::new($oldName, $this->_name); + } + + $normalizedOldName = $this->normalizeIdentifier($oldName); + + if ($newName !== null) { + $normalizedNewName = $this->normalizeIdentifier($newName); + + if ($normalizedOldName === $normalizedNewName) { + return $this; + } + + if ($this->hasIndex($newName)) { + throw IndexAlreadyExists::new($newName, $this->_name); + } + } + + $oldIndex = $this->_indexes[$normalizedOldName]; + + if ($oldIndex->isPrimary()) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6867', + 'Renaming primary key constraint via %s() is deprecated. Use Table::dropPrimaryKey() and ' + . ' Table::addPrimaryKeyConstraint() instead.', + __METHOD__, + ); + + $this->dropPrimaryKey(); + + return $this->setPrimaryKey($oldIndex->getColumns(), $newName ?? null); + } + + unset($this->_indexes[$normalizedOldName]); + + if ($oldIndex->isUnique()) { + return $this->addUniqueIndex($oldIndex->getColumns(), $newName, $oldIndex->getOptions()); + } + + return $this->addIndex($oldIndex->getColumns(), $newName, $oldIndex->getFlags(), $oldIndex->getOptions()); + } + + /** + * Checks if an index begins in the order of the given columns. + * + * @deprecated + * + * @param array $columnNames + */ + public function columnsAreIndexed(array $columnNames): bool + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6710', + '%s is deprecated.', + __METHOD__, + ); + + foreach ($this->getIndexes() as $index) { + if ($index->spansColumns($columnNames)) { + return true; + } + } + + return false; + } + + /** + * @param array $options + * + * @throws TypesException + */ + public function addColumn(string $name, string $typeName, array $options = []): Column + { + $column = new Column($name, Type::getType($typeName), $options); + + $this->_addColumn($column); + + return $column; + } + + /** @return array */ + final public function getRenamedColumns(): array + { + return $this->renamedColumns; + } + + /** + * @param non-empty-string $oldName + * @param non-empty-string $newName + * + * @throws LogicException + */ + final public function renameColumn(string $oldName, string $newName): Column + { + $oldName = $this->normalizeIdentifier($oldName); + $newName = $this->normalizeIdentifier($newName); + + if ($oldName === $newName) { + throw new LogicException(sprintf( + 'Attempt to rename column "%s.%s" to the same name.', + $this->name->toString(), + $oldName, + )); + } + + $column = $this->getColumn($oldName); + + $column->_name = $newName; + unset($this->_columns[$oldName]); + $this->_addColumn($column); + + $this->renameColumnInIndexes($oldName, $newName); + $this->renameColumnInForeignKeyConstraints($oldName, $newName); + $this->renameColumnInUniqueConstraints($oldName, $newName); + + // If a column is renamed multiple times, we only want to know the original and last new name + if (isset($this->renamedColumns[$oldName])) { + $toRemove = $oldName; + $oldName = $this->renamedColumns[$oldName]; + unset($this->renamedColumns[$toRemove]); + } + + if ($newName !== $oldName) { + $this->renamedColumns[$newName] = $oldName; + } + + return $column; + } + + /** @param array $options */ + public function modifyColumn(string $name, array $options): self + { + $column = $this->getColumn($name); + $column->setOptions($options); + + return $this; + } + + /** + * Drops a Column from the Table. + */ + public function dropColumn(string $name): self + { + $name = $this->normalizeIdentifier($name); + + $foreignKeyConstraintNames = $this->getForeignKeyConstraintNamesByLocalColumnName($name); + $uniqueConstraintNames = $this->getUniqueConstraintNamesByColumnName($name); + + if (count($foreignKeyConstraintNames) > 0 || count($uniqueConstraintNames) > 0) { + $constraints = []; + + if (count($foreignKeyConstraintNames) > 0) { + $constraints[] = 'foreign key constraints: ' . implode(', ', $foreignKeyConstraintNames); + } + + if (count($uniqueConstraintNames) > 0) { + $constraints[] = 'unique constraints: ' . implode(', ', $uniqueConstraintNames); + } + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6559', + 'Dropping columns referenced by constraints is deprecated.' + . ' Column %s is used by the following constraints: %s ', + $name, + implode('; ', $constraints), + ); + } + + unset($this->_columns[$name]); + + return $this; + } + + /** + * Adds a foreign key constraint. + * + * Name is inferred from the local columns. + * + * @param non-empty-list $localColumnNames + * @param non-empty-list $foreignColumnNames + * @param array $options + */ + public function addForeignKeyConstraint( + string $foreignTableName, + array $localColumnNames, + array $foreignColumnNames, + array $options = [], + ?string $name = null, + ): self { + $name ??= $this->_generateIdentifierName( + array_merge([$this->getName()], $localColumnNames), + 'fk', + $this->_getMaxIdentifierLength(), + ); + + foreach ($localColumnNames as $columnName) { + if (! $this->hasColumn($columnName)) { + throw ColumnDoesNotExist::new($columnName, $this->_name); + } + } + + $constraint = new ForeignKeyConstraint( + $localColumnNames, + $foreignTableName, + $foreignColumnNames, + $name, + $options, + ); + + return $this->_addForeignKeyConstraint($constraint); + } + + public function addOption(string $name, mixed $value): self + { + $this->_options[$name] = $value; + + return $this; + } + + /** + * Returns whether this table has a foreign key constraint with the given name. + */ + public function hasForeignKey(string $name): bool + { + $name = $this->normalizeIdentifier($name); + + return isset($this->_fkConstraints[$name]); + } + + /** + * Returns the foreign key constraint with the given name. + */ + public function getForeignKey(string $name): ForeignKeyConstraint + { + $name = $this->normalizeIdentifier($name); + + if (! $this->hasForeignKey($name)) { + throw ForeignKeyDoesNotExist::new($name, $this->_name); + } + + return $this->_fkConstraints[$name]; + } + + /** + * Removes the foreign key constraint with the given name. + * + * @deprecated Use {@link dropForeignKey()} instead. + */ + public function removeForeignKey(string $name): void + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6560', + 'Table::removeForeignKey() is deprecated. Use Table::dropForeignKey() instead.', + ); + + $this->dropForeignKey($name); + } + + /** + * Drops the foreign key constraint with the given name. + */ + public function dropForeignKey(string $name): void + { + $name = $this->normalizeIdentifier($name); + + if (! $this->hasForeignKey($name)) { + throw ForeignKeyDoesNotExist::new($name, $this->_name); + } + + unset($this->_fkConstraints[$name]); + } + + /** + * Returns whether this table has a unique constraint with the given name. + */ + public function hasUniqueConstraint(string $name): bool + { + $name = $this->normalizeIdentifier($name); + + return isset($this->uniqueConstraints[$name]); + } + + /** + * Returns the unique constraint with the given name. + */ + public function getUniqueConstraint(string $name): UniqueConstraint + { + $name = $this->normalizeIdentifier($name); + + if (! $this->hasUniqueConstraint($name)) { + throw UniqueConstraintDoesNotExist::new($name, $this->_name); + } + + return $this->uniqueConstraints[$name]; + } + + /** + * Removes the unique constraint with the given name. + * + * @deprecated Use {@link dropUniqueConstraint()} instead. + */ + public function removeUniqueConstraint(string $name): void + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6560', + 'Table::removeUniqueConstraint() is deprecated. Use Table::dropUniqueConstraint() instead.', + ); + + $this->dropUniqueConstraint($name); + } + + /** + * Drops the unique constraint with the given name. + */ + public function dropUniqueConstraint(string $name): void + { + $name = $this->normalizeIdentifier($name); + + if (! $this->hasUniqueConstraint($name)) { + throw UniqueConstraintDoesNotExist::new($name, $this->_name); + } + + unset($this->uniqueConstraints[$name]); + } + + /** + * Returns the list of table columns. + * + * @return non-empty-list + */ + public function getColumns(): array + { + /** @phpstan-ignore return.type */ + return array_values($this->_columns); + } + + /** + * Returns whether this table has a Column with the given name. + */ + public function hasColumn(string $name): bool + { + $name = $this->normalizeIdentifier($name); + + return isset($this->_columns[$name]); + } + + /** + * Returns the Column with the given name. + */ + public function getColumn(string $name): Column + { + $name = $this->normalizeIdentifier($name); + + if (! $this->hasColumn($name)) { + throw ColumnDoesNotExist::new($name, $this->_name); + } + + return $this->_columns[$name]; + } + + /** + * Returns the primary key. + * + * @deprecated Use {@see getPrimaryKeyConstraint()} instead. + */ + public function getPrimaryKey(): ?Index + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6867', + '%s() is deprecated. Use Table::getPrimaryKeyConstraint() instead.', + __METHOD__, + ); + + if ($this->_primaryKeyName !== null) { + return $this->getIndex($this->_primaryKeyName); + } + + return null; + } + + public function getPrimaryKeyConstraint(): ?PrimaryKeyConstraint + { + if ($this->failedToParsePrimaryKeyConstraint) { + throw InvalidState::tableHasInvalidPrimaryKeyConstraint($this->getName()); + } + + return $this->primaryKeyConstraint; + } + + /** + * Returns whether this table has an Index with the given name. + */ + public function hasIndex(string $name): bool + { + $name = $this->normalizeIdentifier($name); + + return isset($this->_indexes[$name]); + } + + /** + * Returns the Index with the given name. + */ + public function getIndex(string $name): Index + { + $name = $this->normalizeIdentifier($name); + + if (! $this->hasIndex($name)) { + throw IndexDoesNotExist::new($name, $this->_name); + } + + return $this->_indexes[$name]; + } + + /** @return array */ + public function getIndexes(): array + { + return $this->_indexes; + } + + /** + * Returns the unique constraints. + * + * @return array + */ + public function getUniqueConstraints(): array + { + return $this->uniqueConstraints; + } + + /** + * Returns the foreign key constraints. + * + * @return array + */ + public function getForeignKeys(): array + { + return $this->_fkConstraints; + } + + public function hasOption(string $name): bool + { + return isset($this->_options[$name]); + } + + public function getOption(string $name): mixed + { + return $this->_options[$name] ?? null; + } + + /** @return array */ + public function getOptions(): array + { + return $this->_options; + } + + /** + * Clone of a Table triggers a deep clone of all affected assets. + */ + public function __clone() + { + foreach ($this->_columns as $k => $column) { + $this->_columns[$k] = clone $column; + } + + foreach ($this->_indexes as $k => $index) { + $this->_indexes[$k] = clone $index; + } + + foreach ($this->_fkConstraints as $k => $fk) { + $this->_fkConstraints[$k] = clone $fk; + } + } + + /** + * @deprecated + * + * @return positive-int + */ + protected function _getMaxIdentifierLength(): int + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6635', + '%s is deprecated.', + __METHOD__, + ); + + return $this->maxIdentifierLength; + } + + protected function _addColumn(Column $column): void + { + $columnName = $column->getName(); + $columnName = $this->normalizeIdentifier($columnName); + + if (isset($this->_columns[$columnName])) { + throw ColumnAlreadyExists::new($this->getName(), $columnName); + } + + $this->_columns[$columnName] = $column; + } + + /** + * Adds an index to the table. + */ + protected function _addIndex(Index $index): self + { + $indexName = $this->normalizeIdentifier($index->getName()); + + $replacedImplicitIndexNames = []; + + foreach ($this->implicitIndexNames as $implicitIndexName => $_) { + if (! isset($this->_indexes[$implicitIndexName])) { + continue; + } + + if (! $this->_indexes[$implicitIndexName]->isFulfilledBy($index)) { + continue; + } + + $replacedImplicitIndexNames[$implicitIndexName] = true; + } + + if ($this->_primaryKeyName !== null && $index->isPrimary()) { + throw PrimaryKeyAlreadyExists::new($this->_name); + } + + if (isset($this->_indexes[$indexName]) && ! isset($replacedImplicitIndexNames[$indexName])) { + throw IndexAlreadyExists::new($indexName, $this->_name); + } + + foreach ($replacedImplicitIndexNames as $name => $_) { + unset($this->_indexes[$name], $this->implicitIndexNames[$name]); + } + + if ($index->isPrimary()) { + $this->_primaryKeyName = $indexName; + + try { + $this->primaryKeyConstraint = $this->parsePrimaryKeyConstraint($index); + $this->failedToParsePrimaryKeyConstraint = false; + } catch (InvalidState) { + $this->primaryKeyConstraint = null; + $this->failedToParsePrimaryKeyConstraint = true; + } + } + + $this->_indexes[$indexName] = $index; + + return $this; + } + + private function parsePrimaryKeyConstraint(Index $index): ?PrimaryKeyConstraint + { + $indexedColumns = $index->getIndexedColumns(); + + $columnNames = []; + foreach ($indexedColumns as $indexedColumn) { + if ($indexedColumn->getLength() !== null) { + return null; + } + + $columnNames[] = $indexedColumn->getColumnName(); + } + + // Do not derive the constraint name from the index name in the upgrade path. The primary index name defaults to + // "PRIMARY", while the default constraint name is null (unspecified, to be generated by the database platform). + return new PrimaryKeyConstraint( + null, + $columnNames, + ! $index->hasFlag('nonclustered'), + ); + } + + protected function _addUniqueConstraint(UniqueConstraint $constraint): self + { + $name = $constraint->getName() !== '' + ? $constraint->getName() + : $this->_generateIdentifierName( + array_merge((array) $this->getName(), $constraint->getColumns()), + 'fk', + $this->_getMaxIdentifierLength(), + ); + + $name = $this->normalizeIdentifier($name); + + $this->uniqueConstraints[$name] = $constraint; + + // If there is already an index that fulfills this requirements drop the request. In the case of __construct + // calling this method during hydration from schema-details all the explicitly added indexes lead to duplicates. + // This creates computation overhead in this case, however no duplicate indexes are ever added (column based). + $indexName = $this->_generateIdentifierName( + array_merge([$this->getName()], $constraint->getColumns()), + 'idx', + $this->_getMaxIdentifierLength(), + ); + + $indexCandidate = $this->_createIndex($constraint->getColumns(), $indexName, true, false); + + foreach ($this->_indexes as $existingIndex) { + if ($indexCandidate->isFulfilledBy($existingIndex)) { + return $this; + } + } + + $this->implicitIndexNames[$this->normalizeIdentifier($indexName)] = true; + + return $this; + } + + protected function _addForeignKeyConstraint(ForeignKeyConstraint $constraint): self + { + $name = $constraint->getName() !== '' + ? $constraint->getName() + : $this->_generateIdentifierName( + array_merge((array) $this->getName(), $constraint->getLocalColumns()), + 'fk', + $this->_getMaxIdentifierLength(), + ); + + $name = $this->normalizeIdentifier($name); + if (isset($this->_fkConstraints[$name])) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7125', + 'Overwriting an existing foreign key constraint ("%s") is deprecated.', + $name, + ); + } + + $this->_fkConstraints[$name] = $constraint; + + // add an explicit index on the foreign key columns. + // If there is already an index that fulfills this requirements drop the request. In the case of __construct + // calling this method during hydration from schema-details all the explicitly added indexes lead to duplicates. + // This creates computation overhead in this case, however no duplicate indexes are ever added (column based). + $indexName = $this->_generateIdentifierName( + array_merge([$this->getName()], $constraint->getLocalColumns()), + 'idx', + $this->_getMaxIdentifierLength(), + ); + + $indexCandidate = $this->_createIndex($constraint->getLocalColumns(), $indexName, false, false); + + foreach ($this->_indexes as $existingIndex) { + if ($indexCandidate->isFulfilledBy($existingIndex)) { + return $this; + } + } + + $this->_addIndex($indexCandidate); + $this->implicitIndexNames[$this->normalizeIdentifier($indexName)] = true; + + return $this; + } + + /** + * Normalizes a given identifier. + * + * Trims quotes and lowercases the given identifier. + * + * @return non-empty-string + */ + private function normalizeIdentifier(string $identifier): string + { + /** @phpstan-ignore return.type */ + return $this->trimQuotes(strtolower($identifier)); + } + + public function setComment(string $comment): self + { + // For keeping backward compatibility with MySQL in previous releases, table comments are stored as options. + $this->addOption('comment', $comment); + + return $this; + } + + public function getComment(): ?string + { + return $this->_options['comment'] ?? null; + } + + /** + * Instantiates a new table editor. + */ + public static function editor(): TableEditor + { + return new TableEditor(); + } + + /** + * Instantiates a new table editor and initializes it with the table's properties. + */ + public function edit(): TableEditor + { + $editor = self::editor() + ->setName($this->getObjectName()) + ->setColumns(...array_values($this->_columns)) + ->setIndexes(...array_values(array_diff_key($this->_indexes, $this->implicitIndexNames))) + ->setPrimaryKeyConstraint($this->primaryKeyConstraint) + ->setUniqueConstraints(...array_values($this->uniqueConstraints)) + ->setForeignKeyConstraints(...array_values($this->_fkConstraints)); + + $options = $this->_options; + + if (isset($options['comment'])) { + $editor->setComment($options['comment']); + unset($options['comment']); + } + + return $editor + ->setOptions($options) + ->setConfiguration( + new TableConfiguration($this->maxIdentifierLength), + ); + } + + /** + * @param non-empty-list $columns + * @param array $flags + * @param array $options + */ + private function _createUniqueConstraint( + array $columns, + string $indexName, + array $flags = [], + array $options = [], + ): UniqueConstraint { + if (preg_match('(([^a-zA-Z0-9_]+))', $this->normalizeIdentifier($indexName)) === 1) { + throw IndexNameInvalid::new($indexName); + } + + foreach ($columns as $columnName) { + if (! $this->hasColumn($columnName)) { + throw ColumnDoesNotExist::new($columnName, $this->_name); + } + } + + return new UniqueConstraint($indexName, $columns, $flags, $options); + } + + /** + * @param non-empty-list $columns + * @param array $flags + * @param array $options + */ + private function _createIndex( + array $columns, + string $indexName, + bool $isUnique, + bool $isPrimary, + array $flags = [], + array $options = [], + ): Index { + if (preg_match('(([^a-zA-Z0-9_]+))', $this->normalizeIdentifier($indexName)) === 1) { + throw IndexNameInvalid::new($indexName); + } + + foreach ($columns as $columnName) { + if (! $this->hasColumn($columnName)) { + throw ColumnDoesNotExist::new($columnName, $this->_name); + } + } + + return new Index($indexName, $columns, $isUnique, $isPrimary, $flags, $options); + } + + /** @param non-empty-string $newName */ + private function renameColumnInIndexes(string $oldName, string $newName): void + { + foreach ($this->_indexes as $key => $index) { + $modified = false; + $columns = []; + foreach ($index->getColumns() as $columnName) { + if ($columnName === $oldName) { + $columns[] = $newName; + $modified = true; + } else { + $columns[] = $columnName; + } + } + + if (! $modified) { + continue; + } + + $this->_indexes[$key] = new Index( + $index->getName(), + $columns, + $index->isUnique(), + $index->isPrimary(), + $index->getFlags(), + $index->getOptions(), + ); + } + } + + /** + * @param non-empty-string $oldName + * @param non-empty-string $newName + */ + private function renameColumnInForeignKeyConstraints(string $oldName, string $newName): void + { + foreach ($this->_fkConstraints as $key => $constraint) { + $modified = false; + $localColumns = []; + foreach ($constraint->getLocalColumns() as $columnName) { + if ($columnName === $oldName) { + $localColumns[] = $newName; + $modified = true; + } else { + $localColumns[] = $columnName; + } + } + + if (! $modified) { + continue; + } + + $this->_fkConstraints[$key] = new ForeignKeyConstraint( + $localColumns, // @phpstan-ignore argument.type + $constraint->getForeignTableName(), + $constraint->getForeignColumns(), // @phpstan-ignore argument.type + $constraint->getName(), + $constraint->getOptions(), + ); + } + } + + /** + * @param non-empty-string $oldName + * @param non-empty-string $newName + */ + private function renameColumnInUniqueConstraints(string $oldName, string $newName): void + { + foreach ($this->uniqueConstraints as $key => $constraint) { + $modified = false; + $columns = []; + foreach ($constraint->getColumns() as $columnName) { + if ($columnName === $oldName) { + $columns[] = $newName; + $modified = true; + } else { + $columns[] = $columnName; + } + } + + if (! $modified) { + continue; + } + + $this->uniqueConstraints[$key] = new UniqueConstraint( + $constraint->getName(), + $columns, // @phpstan-ignore argument.type + $constraint->getFlags(), + $constraint->getOptions(), + ); + } + } + + /** @return list */ + private function getForeignKeyConstraintNamesByLocalColumnName(string $columnName): array + { + $names = []; + + foreach ($this->_fkConstraints as $name => $constraint) { + if (! in_array($columnName, $constraint->getLocalColumns(), true)) { + continue; + } + + $names[] = $name; + } + + return $names; + } + + /** @return list */ + private function getUniqueConstraintNamesByColumnName(string $columnName): array + { + $names = []; + + foreach ($this->uniqueConstraints as $name => $constraint) { + if (! in_array($columnName, $constraint->getColumns(), true)) { + continue; + } + + $names[] = $name; + } + + return $names; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/TableConfiguration.php b/backend/vendor/doctrine/dbal/src/Schema/TableConfiguration.php new file mode 100644 index 0000000..3348ffe --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/TableConfiguration.php @@ -0,0 +1,30 @@ +maxIdentifierLength; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/TableDiff.php b/backend/vendor/doctrine/dbal/src/Schema/TableDiff.php new file mode 100644 index 0000000..966e39a --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/TableDiff.php @@ -0,0 +1,283 @@ + $droppedForeignKeys + * @param array $addedColumns + * @param array $changedColumns + * @param array $droppedColumns + * @param array $addedIndexes + * @param array $modifiedIndexes + * @param array $droppedIndexes + * @param array $renamedIndexes + * @param array $addedForeignKeys + * @param array $modifiedForeignKeys + */ + public function __construct( + private readonly Table $oldTable, + private readonly array $addedColumns = [], + private readonly array $changedColumns = [], + private readonly array $droppedColumns = [], + private array $addedIndexes = [], + private readonly array $modifiedIndexes = [], + private array $droppedIndexes = [], + private readonly array $renamedIndexes = [], + private readonly array $addedForeignKeys = [], + private readonly array $modifiedForeignKeys = [], + private readonly array $droppedForeignKeys = [], + ) { + if (count($this->modifiedIndexes) !== 0) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6831', + 'Passing a non-empty $modifiedIndexes value to %s() is deprecated. Instead, pass dropped' + . ' indexes via $droppedIndexes and added indexes via $addedIndexes.', + __METHOD__, + ); + } + + foreach ($droppedForeignKeys as $droppedForeignKey) { + if ($droppedForeignKey->getName() === '') { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/7143', + 'Dropping a foreign key constraints without specifying its name is deprecated.', + ); + break; + } + } + + if (count($modifiedForeignKeys) === 0) { + return; + } + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6827', + 'Passing a non-empty $modifiedForeignKeys value to %s() is deprecated. Instead, pass dropped' + . ' constraints via $droppedForeignKeys and added constraints via $addedForeignKeys.', + __METHOD__, + ); + } + + public function getOldTable(): Table + { + return $this->oldTable; + } + + /** @return array */ + public function getAddedColumns(): array + { + return $this->addedColumns; + } + + /** @return array */ + public function getChangedColumns(): array + { + return $this->changedColumns; + } + + /** + * @deprecated Use {@see getChangedColumns()} instead. + * + * @return list + */ + public function getModifiedColumns(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6280', + '%s is deprecated, use `getChangedColumns()` instead.', + __METHOD__, + ); + + return array_values(array_filter( + $this->getChangedColumns(), + static fn (ColumnDiff $diff): bool => $diff->countChangedProperties() > ($diff->hasNameChanged() ? 1 : 0), + )); + } + + /** + * @deprecated Use {@see getChangedColumns()} instead. + * + * @return array + */ + public function getRenamedColumns(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6280', + '%s is deprecated, you should use `getChangedColumns()` instead.', + __METHOD__, + ); + $renamed = []; + foreach ($this->getChangedColumns() as $diff) { + if (! $diff->hasNameChanged()) { + continue; + } + + $oldColumnName = $diff->getOldColumn()->getName(); + $renamed[$oldColumnName] = $diff->getNewColumn(); + } + + return $renamed; + } + + /** @return array */ + public function getDroppedColumns(): array + { + return $this->droppedColumns; + } + + /** @return array */ + public function getAddedIndexes(): array + { + return $this->addedIndexes; + } + + /** + * @internal This method exists only for compatibility with the current implementation of schema managers + * that modify the diff while processing it. + */ + public function unsetAddedIndex(Index $index): void + { + $this->addedIndexes = array_filter( + $this->addedIndexes, + static function (Index $addedIndex) use ($index): bool { + return $addedIndex !== $index; + }, + ); + } + + /** + * @deprecated Use {@see getAddedIndexes()} and {@see getDroppedIndexes()} instead. + * + * @return array + */ + public function getModifiedIndexes(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6831', + '%s() is deprecated, use getAddedIndexes() and getDroppedIndexes() instead.', + __METHOD__, + ); + + return $this->modifiedIndexes; + } + + /** @return array */ + public function getDroppedIndexes(): array + { + return $this->droppedIndexes; + } + + /** + * @internal This method exists only for compatibility with the current implementation of schema managers + * that modify the diff while processing it. + */ + public function unsetDroppedIndex(Index $index): void + { + $this->droppedIndexes = array_filter( + $this->droppedIndexes, + static function (Index $droppedIndex) use ($index): bool { + return $droppedIndex !== $index; + }, + ); + } + + /** @return array */ + public function getRenamedIndexes(): array + { + return $this->renamedIndexes; + } + + /** @return array */ + public function getAddedForeignKeys(): array + { + return $this->addedForeignKeys; + } + + /** + * @deprecated Use {@see getAddedForeignKeys()} and {@see getDroppedForeignKeys()} instead. + * + * @return array + */ + public function getModifiedForeignKeys(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6827', + '%s() is deprecated, use getDroppedForeignKeys() and getAddedForeignKeys() instead.', + __METHOD__, + ); + + return $this->modifiedForeignKeys; + } + + /** + * @deprecated Use {@see getDroppedForeignKeyConstraintNames()}. + * + * @return array + */ + public function getDroppedForeignKeys(): array + { + return $this->droppedForeignKeys; + } + + /** @return array */ + public function getDroppedForeignKeyConstraintNames(): array + { + $names = []; + foreach ($this->droppedForeignKeys as $constraint) { + $name = $constraint->getObjectName(); + + if ($name === null) { + throw InvalidState::tableDiffContainsUnnamedDroppedForeignKeyConstraints(); + } + + $names[] = $name; + } + + return $names; + } + + /** + * Returns whether the diff is empty (contains no changes). + */ + public function isEmpty(): bool + { + return count($this->addedColumns) === 0 + && count($this->changedColumns) === 0 + && count($this->droppedColumns) === 0 + && count($this->addedIndexes) === 0 + && count($this->modifiedIndexes) === 0 + && count($this->droppedIndexes) === 0 + && count($this->renamedIndexes) === 0 + && count($this->addedForeignKeys) === 0 + && count($this->modifiedForeignKeys) === 0 + && count($this->droppedForeignKeys) === 0; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/TableEditor.php b/backend/vendor/doctrine/dbal/src/Schema/TableEditor.php new file mode 100644 index 0000000..feeb49b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/TableEditor.php @@ -0,0 +1,561 @@ + */ + private readonly UnqualifiedNamedObjectSet $columns; + + /** @var UnqualifiedNamedObjectSet */ + private UnqualifiedNamedObjectSet $indexes; + + private ?PrimaryKeyConstraint $primaryKeyConstraint = null; + + /** @var OptionallyUnqualifiedNamedObjectSet */ + private readonly OptionallyUnqualifiedNamedObjectSet $uniqueConstraints; + + /** @var OptionallyUnqualifiedNamedObjectSet */ + private readonly OptionallyUnqualifiedNamedObjectSet $foreignKeyConstraints; + + /** @var array */ + private array $options = []; + + private string $comment = ''; + + private ?TableConfiguration $configuration = null; + + /** @internal Use {@link Table::editor()} or {@link Table::edit()} to create an instance */ + public function __construct() + { + /** @var UnqualifiedNamedObjectSet $columns */ + $columns = new UnqualifiedNamedObjectSet(); + $this->columns = $columns; + + /** @var UnqualifiedNamedObjectSet $indexes */ + $indexes = new UnqualifiedNamedObjectSet(); + $this->indexes = $indexes; + + /** @var OptionallyUnqualifiedNamedObjectSet $uniqueConstraints */ + $uniqueConstraints = new OptionallyUnqualifiedNamedObjectSet(); + $this->uniqueConstraints = $uniqueConstraints; + + /** @var OptionallyUnqualifiedNamedObjectSet $foreignKeyConstraints */ + $foreignKeyConstraints = new OptionallyUnqualifiedNamedObjectSet(); + $this->foreignKeyConstraints = $foreignKeyConstraints; + } + + public function setName(OptionallyQualifiedName $name): self + { + $this->name = $name; + + return $this; + } + + /** + * @param non-empty-string $unqualifiedName + * @param ?non-empty-string $qualifier + */ + public function setUnquotedName(string $unqualifiedName, ?string $qualifier = null): self + { + $this->name = OptionallyQualifiedName::unquoted($unqualifiedName, $qualifier); + + return $this; + } + + /** + * @param non-empty-string $unqualifiedName + * @param ?non-empty-string $qualifier + */ + public function setQuotedName(string $unqualifiedName, ?string $qualifier = null): self + { + $this->name = OptionallyQualifiedName::quoted($unqualifiedName, $qualifier); + + return $this; + } + + public function setColumns(Column $firstColumn, Column ...$otherColumns): self + { + $this->columns->clear(); + + foreach ([$firstColumn, ...$otherColumns] as $column) { + $this->addColumn($column); + } + + return $this; + } + + public function addColumn(Column $column): self + { + try { + $this->columns->add($column); + } catch (ObjectAlreadyExists $e) { + throw InvalidTableModification::columnAlreadyExists($this->name, $e); + } + + return $this; + } + + /** @param callable(ColumnEditor): void $modification */ + public function modifyColumn(UnqualifiedName $columnName, callable $modification): self + { + try { + $this->columns->modify($columnName, static function (Column $column) use ($modification): Column { + $editor = $column->edit(); + + $modification($editor); + + return $editor->create(); + }); + } catch (ObjectDoesNotExist $e) { + throw InvalidTableModification::columnDoesNotExist($this->name, $e); + } catch (ObjectAlreadyExists $e) { + throw InvalidTableModification::columnAlreadyExists($this->name, $e); + } + + return $this; + } + + /** + * @param non-empty-string $columnName + * @param callable(ColumnEditor): void $modification + */ + public function modifyColumnByUnquotedName(string $columnName, callable $modification): self + { + return $this->modifyColumn(UnqualifiedName::unquoted($columnName), $modification); + } + + public function renameColumn(UnqualifiedName $oldColumnName, UnqualifiedName $newColumnName): self + { + $this->modifyColumn($oldColumnName, static function (ColumnEditor $editor) use ($newColumnName): void { + $editor->setName($newColumnName); + }); + + $this->renameColumnInIndexes($oldColumnName, $newColumnName); + $this->renameColumnInPrimaryKeyConstraint($oldColumnName, $newColumnName); + $this->renameColumnInForeignKeyConstraints($oldColumnName, $newColumnName); + $this->renameColumnInUniqueConstraints($oldColumnName, $newColumnName); + + return $this; + } + + private function renameColumnInIndexes(UnqualifiedName $oldColumnName, UnqualifiedName $newColumnName): void + { + foreach ($this->indexes as $index) { + $modified = false; + $columns = []; + + foreach ($index->getIndexedColumns() as $column) { + $columnName = $column->getColumnName(); + if ($this->namesEqual($columnName, $oldColumnName)) { + $columns[] = new Index\IndexedColumn($newColumnName, $column->getLength()); + $modified = true; + } else { + $columns[] = $column; + } + } + + if (! $modified) { + continue; + } + + $this->indexes->modify($index->getObjectName(), static function (Index $index) use ($columns): Index { + return $index->edit() + ->setColumns(...$columns) + ->create(); + }); + } + } + + private function renameColumnInPrimaryKeyConstraint( + UnqualifiedName $oldColumnName, + UnqualifiedName $newColumnName, + ): void { + if ($this->primaryKeyConstraint === null) { + return; + } + + $modified = false; + $columnNames = []; + + foreach ($this->primaryKeyConstraint->getColumnNames() as $columnName) { + if ($this->namesEqual($columnName, $oldColumnName)) { + $columnNames[] = $newColumnName; + $modified = true; + } else { + $columnNames[] = $columnName; + } + } + + if (! $modified) { + return; + } + + $this->primaryKeyConstraint = $this->primaryKeyConstraint->edit() + ->setColumnNames(...$columnNames) + ->create(); + } + + private function renameColumnInUniqueConstraints( + UnqualifiedName $oldColumnName, + UnqualifiedName $newColumnName, + ): void { + $this->renameColumnInConstraints( + $this->uniqueConstraints, + $oldColumnName, + $newColumnName, + static fn (UniqueConstraint $constraint): array => $constraint->getColumnNames(), + static function (UniqueConstraint $constraint, array $columnNames): UniqueConstraint { + return $constraint->edit() + ->setColumnNames(...$columnNames) + ->create(); + }, + ); + } + + private function renameColumnInForeignKeyConstraints( + UnqualifiedName $oldColumnName, + UnqualifiedName $newColumnName, + ): void { + $this->renameColumnInConstraints( + $this->foreignKeyConstraints, + $oldColumnName, + $newColumnName, + static fn (ForeignKeyConstraint $constraint): array => $constraint->getReferencingColumnNames(), + static function (ForeignKeyConstraint $constraint, array $columnNames): ForeignKeyConstraint { + return $constraint->edit() + ->setReferencingColumnNames(...$columnNames) + ->create(); + }, + ); + } + + /** + * Generic method to rename a column in constraints + * + * @param OptionallyUnqualifiedNamedObjectSet $collection + * @param callable(T): list $getColumnNames + * @param callable(T, list): T $modify + * + * @template T of OptionallyNamedObject + */ + private function renameColumnInConstraints( + OptionallyUnqualifiedNamedObjectSet $collection, + UnqualifiedName $oldColumnName, + UnqualifiedName $newColumnName, + callable $getColumnNames, + callable $modify, + ): void { + $constraints = []; + $anyModified = false; + + foreach ($collection as $constraint) { + $newColumnNames = []; + $modified = false; + + foreach ($getColumnNames($constraint) as $columnName) { + if ($this->namesEqual($columnName, $oldColumnName)) { + $newColumnNames[] = $newColumnName; + $modified = true; + } else { + $newColumnNames[] = $columnName; + } + } + + if ($modified) { + $constraint = $modify($constraint, $newColumnNames); + $anyModified = true; + } + + $constraints[] = $constraint; + } + + if (! $anyModified) { + return; + } + + $collection->clear(); + + foreach ($constraints as $constraint) { + $collection->add($constraint); + } + } + + /** + * @param non-empty-string $oldColumnName + * @param non-empty-string $newColumnName + */ + public function renameColumnByUnquotedName(string $oldColumnName, string $newColumnName): self + { + return $this->renameColumn( + UnqualifiedName::unquoted($oldColumnName), + UnqualifiedName::unquoted($newColumnName), + ); + } + + public function dropColumn(UnqualifiedName $columnName): self + { + try { + $this->columns->remove($columnName); + } catch (ObjectDoesNotExist $e) { + throw InvalidTableModification::columnDoesNotExist($this->name, $e); + } + + return $this; + } + + /** @param non-empty-string $columnName */ + public function dropColumnByUnquotedName(string $columnName): self + { + return $this->dropColumn(UnqualifiedName::unquoted($columnName)); + } + + public function setIndexes(Index ...$indexes): self + { + $this->indexes->clear(); + + foreach ($indexes as $index) { + $this->addIndex($index); + } + + return $this; + } + + public function addIndex(Index $index): self + { + try { + $this->indexes->add($index); + } catch (ObjectAlreadyExists $e) { + throw InvalidTableModification::indexAlreadyExists($this->name, $e); + } + + return $this; + } + + public function renameIndex(UnqualifiedName $oldIndexName, UnqualifiedName $newIndexName): self + { + try { + $this->indexes->modify($oldIndexName, static function (Index $index) use ($newIndexName): Index { + return $index->edit() + ->setName($newIndexName) + ->create(); + }); + } catch (ObjectDoesNotExist $e) { + throw InvalidTableModification::indexDoesNotExist($this->name, $e); + } catch (ObjectAlreadyExists $e) { + throw InvalidTableModification::indexAlreadyExists($this->name, $e); + } + + return $this; + } + + /** + * @param non-empty-string $oldIndexName + * @param non-empty-string $newIndexName + */ + public function renameIndexByUnquotedName(string $oldIndexName, string $newIndexName): self + { + return $this->renameIndex( + UnqualifiedName::unquoted($oldIndexName), + UnqualifiedName::unquoted($newIndexName), + ); + } + + public function dropIndex(UnqualifiedName $indexName): self + { + try { + $this->indexes->remove($indexName); + } catch (ObjectDoesNotExist $e) { + throw InvalidTableModification::indexDoesNotExist($this->name, $e); + } + + return $this; + } + + /** @param non-empty-string $indexName */ + public function dropIndexByUnquotedName(string $indexName): self + { + return $this->dropIndex(UnqualifiedName::unquoted($indexName)); + } + + public function setPrimaryKeyConstraint(?PrimaryKeyConstraint $primaryKeyConstraint): self + { + $this->primaryKeyConstraint = $primaryKeyConstraint; + + foreach ($this->indexes->toList() as $index) { + if (! $index->isPrimary()) { + continue; + } + + $this->indexes->remove($index->getObjectName()); + } + + return $this; + } + + public function addPrimaryKeyConstraint(PrimaryKeyConstraint $primaryKeyConstraint): self + { + if ($this->primaryKeyConstraint !== null) { + throw InvalidTableModification::primaryKeyConstraintAlreadyExists($this->name); + } + + return $this->setPrimaryKeyConstraint($primaryKeyConstraint); + } + + public function dropPrimaryKeyConstraint(): self + { + if ($this->primaryKeyConstraint === null) { + throw InvalidTableModification::primaryKeyConstraintDoesNotExist($this->name); + } + + return $this->setPrimaryKeyConstraint(null); + } + + public function setUniqueConstraints(UniqueConstraint ...$uniqueConstraints): self + { + $this->uniqueConstraints->clear(); + + foreach ($uniqueConstraints as $uniqueConstraint) { + $this->addUniqueConstraint($uniqueConstraint); + } + + return $this; + } + + public function addUniqueConstraint(UniqueConstraint $uniqueConstraint): self + { + try { + $this->uniqueConstraints->add($uniqueConstraint); + } catch (ObjectAlreadyExists $e) { + throw InvalidTableModification::uniqueConstraintAlreadyExists($this->name, $e); + } + + return $this; + } + + public function dropUniqueConstraint(UnqualifiedName $constraintName): self + { + try { + $this->uniqueConstraints->remove($constraintName); + } catch (ObjectDoesNotExist $e) { + throw InvalidTableModification::uniqueConstraintDoesNotExist($this->name, $e); + } + + return $this; + } + + /** @param non-empty-string $constraintName */ + public function dropUniqueConstraintByUnquotedName(string $constraintName): self + { + return $this->dropUniqueConstraint(UnqualifiedName::unquoted($constraintName)); + } + + public function setForeignKeyConstraints(ForeignKeyConstraint ...$foreignKeyConstraints): self + { + $this->foreignKeyConstraints->clear(); + + foreach ($foreignKeyConstraints as $foreignKeyConstraint) { + $this->addForeignKeyConstraint($foreignKeyConstraint); + } + + return $this; + } + + public function addForeignKeyConstraint(ForeignKeyConstraint $foreignKeyConstraint): self + { + try { + $this->foreignKeyConstraints->add($foreignKeyConstraint); + } catch (ObjectAlreadyExists $e) { + throw InvalidTableModification::foreignKeyConstraintAlreadyExists($this->name, $e); + } + + return $this; + } + + public function dropForeignKeyConstraint(UnqualifiedName $constraintName): self + { + try { + $this->foreignKeyConstraints->remove($constraintName); + } catch (ObjectDoesNotExist $e) { + throw InvalidTableModification::foreignKeyConstraintDoesNotExist($this->name, $e); + } + + return $this; + } + + /** @param non-empty-string $constraintName */ + public function dropForeignKeyConstraintByUnquotedName(string $constraintName): self + { + return $this->dropForeignKeyConstraint(UnqualifiedName::unquoted($constraintName)); + } + + private function namesEqual(UnqualifiedName $name1, UnqualifiedName $name2): bool + { + return strcasecmp($name1->getIdentifier()->getValue(), $name2->getIdentifier()->getValue()) === 0; + } + + public function setComment(string $comment): self + { + $this->comment = $comment; + + return $this; + } + + /** @param array $options */ + public function setOptions(array $options): self + { + $this->options = $options; + + return $this; + } + + public function setConfiguration(TableConfiguration $configuration): self + { + $this->configuration = $configuration; + + return $this; + } + + public function create(): Table + { + if ($this->name === null) { + throw InvalidTableDefinition::nameNotSet(); + } + + if ($this->columns->isEmpty()) { + throw InvalidTableDefinition::columnsNotSet($this->name); + } + + $options = $this->options; + + if ($this->comment !== '') { + $options['comment'] = $this->comment; + } + + return new Table( + $this->name->toString(), + $this->columns->toList(), + $this->indexes->toList(), + $this->uniqueConstraints->toList(), + $this->foreignKeyConstraints->toList(), + $options, + $this->configuration, + $this->primaryKeyConstraint, + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/UniqueConstraint.php b/backend/vendor/doctrine/dbal/src/Schema/UniqueConstraint.php new file mode 100644 index 0000000..6116e0b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/UniqueConstraint.php @@ -0,0 +1,359 @@ + + * @final This class will be made final in DBAL 5.0. + */ +class UniqueConstraint extends AbstractOptionallyNamedObject +{ + /** + * Asset identifier instances of the column names the unique constraint is associated with. + * + * @deprecated + * + * @var array + */ + protected array $columns = []; + + /** + * Platform specific flags + * + * @deprecated + * + * @var array + */ + protected array $flags = []; + + /** + * Names of the columns covered by the unique constraint. + * + * @var list + */ + private array $columnNames = []; + + private bool $failedToParseColumnNames = false; + + /** + * @internal Use {@link UniqueConstraint::editor()} to instantiate an editor and + * {@link UniqueConstraintEditor::create()} to create a unique constraint. + * + * @param non-empty-list $columns + * @param array $flags + * @param array $options + */ + public function __construct( + string $name, + array $columns, + array $flags = [], + private readonly array $options = [], + ) { + if (count($columns) < 1) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + 'Instantiation of a unique constraint without columns is deprecated.', + ); + } + + if (count($options) > 0) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + 'Using %s options is deprecated.', + self::class, + ); + } + + parent::__construct($name); + + foreach ($columns as $column) { + $this->addColumn($column); + } + + foreach ($flags as $flag) { + $this->addFlag($flag); + } + } + + protected function getNameParser(): UnqualifiedNameParser + { + return Parsers::getUnqualifiedNameParser(); + } + + /** + * Returns the names of the columns the constraint is associated with. + * + * @return non-empty-list + */ + public function getColumnNames(): array + { + if ($this->failedToParseColumnNames) { + throw InvalidState::uniqueConstraintHasInvalidColumnNames($this->getName()); + } + + if (count($this->columnNames) < 1) { + throw InvalidState::uniqueConstraintHasEmptyColumnNames($this->getName()); + } + + return $this->columnNames; + } + + /** + * @deprecated Use {@see getColumnNames()} instead. + * + * @return non-empty-list + */ + public function getColumns(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + '%s is deprecated. Use getColumnNames() instead.', + __METHOD__, + ); + + /** @phpstan-ignore return.type */ + return array_keys($this->columns); + } + + /** + * @deprecated Use {@see getColumnNames()} and {@see UnqualifiedName::toSQL()} instead. + * + * But only if they were defined with one or a column name + * is a keyword reserved by the platform. + * Otherwise, the plain unquoted value as inserted is returned. + * + * @param AbstractPlatform $platform The platform to use for quotation. + * + * @return list + * + * Returns the quoted representation of the column names the constraint is associated with. + */ + public function getQuotedColumns(AbstractPlatform $platform): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + '%s is deprecated. Use getColumnNames() and UnqualifiedName::toSQL() instead.', + __METHOD__, + ); + + $columns = []; + + foreach ($this->columns as $column) { + $columns[] = $column->getQuotedName($platform); + } + + return $columns; + } + + /** + * @deprecated Use {@see getColumnNames()} instead. + * + * @return non-empty-list + */ + public function getUnquotedColumns(): array + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + '%s is deprecated. Use getColumnNames() instead.', + __METHOD__, + ); + + return array_map($this->trimQuotes(...), $this->getColumns()); + } + + /** + * @deprecated Use {@see isClustered()} instead. + * + * Returns platform specific flags for unique constraint. + * + * @return array + */ + public function getFlags(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + '%s is deprecated. Use isClustered() instead.', + __METHOD__, + ); + + return array_keys($this->flags); + } + + /** + * Adds flag for a unique constraint that translates to platform specific handling. + * + * @deprecated Use {@see UniqueConstraintEditor::setIsClustered()} instead. + * + * @return $this + * + * @example $uniqueConstraint->addFlag('CLUSTERED') + */ + public function addFlag(string $flag): self + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + '%s is deprecated.', + __METHOD__, + ); + + $this->flags[strtolower($flag)] = true; + + return $this; + } + + /** + * Does this unique constraint have a specific flag? + * + * @deprecated Use {@see isClustered()} instead. + */ + public function hasFlag(string $flag): bool + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + '%s is deprecated. Use isClustered() instead.', + __METHOD__, + ); + + return isset($this->flags[strtolower($flag)]); + } + + /** + * Returns whether the unique constraint is clustered. + */ + public function isClustered(): bool + { + return $this->hasFlag('clustered'); + } + + /** + * Removes a flag. + * + * @deprecated Use {@see UniqueConstraintEditor::setIsClustered()} instead. + */ + public function removeFlag(string $flag): void + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + '%s is deprecated.', + __METHOD__, + ); + + unset($this->flags[strtolower($flag)]); + } + + /** @deprecated */ + public function hasOption(string $name): bool + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + '%s is deprecated.', + __METHOD__, + ); + + return isset($this->options[strtolower($name)]); + } + + /** @deprecated */ + public function getOption(string $name): mixed + { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + '%s is deprecated.', + __METHOD__, + ); + + return $this->options[strtolower($name)]; + } + + /** + * @deprecated + * + * @return array + */ + public function getOptions(): array + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + '%s is deprecated.', + __METHOD__, + ); + + return $this->options; + } + + /** @deprecated */ + protected function addColumn(string $column): void + { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + '%s is deprecated.', + __METHOD__, + ); + + $this->columns[$column] = new Identifier($column); + + $parser = Parsers::getUnqualifiedNameParser(); + + try { + $this->columnNames[] = $parser->parse($column); + } catch (Throwable $e) { + $this->failedToParseColumnNames = true; + + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/6685', + 'Unable to parse column name: %s.', + $e->getMessage(), + ); + } + } + + /** + * Instantiates a new unique constraint editor. + */ + public static function editor(): UniqueConstraintEditor + { + return new UniqueConstraintEditor(); + } + + /** + * Instantiates a new unique constraint editor and initializes it with the constraint's properties. + */ + public function edit(): UniqueConstraintEditor + { + return self::editor() + ->setName($this->getObjectName()) + ->setColumnNames(...$this->getColumnNames()) + ->setIsClustered($this->isClustered()); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/UniqueConstraintEditor.php b/backend/vendor/doctrine/dbal/src/Schema/UniqueConstraintEditor.php new file mode 100644 index 0000000..d65ab2a --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/UniqueConstraintEditor.php @@ -0,0 +1,110 @@ + */ + private array $columnNames = []; + + private bool $isClustered = false; + + /** @internal Use {@link UniqueConstraint::editor()} or {@link UniqueConstraint::edit()} to create an instance */ + public function __construct() + { + } + + public function setName(?UnqualifiedName $name): self + { + $this->name = $name; + + return $this; + } + + /** @param non-empty-string $name */ + public function setUnquotedName(string $name): self + { + $this->name = UnqualifiedName::unquoted($name); + + return $this; + } + + /** @param non-empty-string $name */ + public function setQuotedName(string $name): self + { + $this->name = UnqualifiedName::quoted($name); + + return $this; + } + + public function setColumnNames(UnqualifiedName $firstColumnName, UnqualifiedName ...$otherColumnNames): self + { + $this->columnNames = array_merge([$firstColumnName], array_values($otherColumnNames)); + + return $this; + } + + /** + * @param non-empty-string $firstColumnName + * @param non-empty-string ...$otherColumnNames + */ + public function setUnquotedColumnNames( + string $firstColumnName, + string ...$otherColumnNames, + ): self { + $this->columnNames = array_map( + static fn (string $name): UnqualifiedName => UnqualifiedName::unquoted($name), + array_merge([$firstColumnName], array_values($otherColumnNames)), + ); + + return $this; + } + + /** + * @param non-empty-string $firstColumnName + * @param non-empty-string ...$otherColumnNames + */ + public function setQuotedColumnNames( + string $firstColumnName, + string ...$otherColumnNames, + ): self { + $this->columnNames = array_map( + static fn (string $name): UnqualifiedName => UnqualifiedName::quoted($name), + array_merge([$firstColumnName], array_values($otherColumnNames)), + ); + + return $this; + } + + public function setIsClustered(bool $isClustered): self + { + $this->isClustered = $isClustered; + + return $this; + } + + public function create(): UniqueConstraint + { + if (count($this->columnNames) < 1) { + throw InvalidUniqueConstraintDefinition::columnNamesAreNotSet($this->name); + } + + return new UniqueConstraint( + $this->name?->toString() ?? '', + array_map(static fn (UnqualifiedName $columnName) => $columnName->toString(), $this->columnNames), + $this->isClustered ? ['clustered'] : [], + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/View.php b/backend/vendor/doctrine/dbal/src/Schema/View.php new file mode 100644 index 0000000..f5f6501 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/View.php @@ -0,0 +1,52 @@ + + */ +class View extends AbstractNamedObject +{ + /** @internal Use {@link View::editor()} to instantiate an editor and {@link ViewEditor::create()} to create a view. */ + public function __construct(string $name, private readonly string $sql) + { + parent::__construct($name); + } + + protected function getNameParser(): OptionallyQualifiedNameParser + { + return Parsers::getOptionallyQualifiedNameParser(); + } + + public function getSql(): string + { + return $this->sql; + } + + /** + * Instantiates a new view editor. + */ + public static function editor(): ViewEditor + { + return new ViewEditor(); + } + + /** + * Instantiates a new view editor and initializes it with the view's properties. + */ + public function edit(): ViewEditor + { + return self::editor() + ->setName($this->getObjectName()) + ->setSQL($this->sql); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Schema/ViewEditor.php b/backend/vendor/doctrine/dbal/src/Schema/ViewEditor.php new file mode 100644 index 0000000..3952a4f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Schema/ViewEditor.php @@ -0,0 +1,72 @@ +name = $name; + + return $this; + } + + /** + * @param non-empty-string $unqualifiedName + * @param ?non-empty-string $qualifier + */ + public function setUnquotedName(string $unqualifiedName, ?string $qualifier = null): self + { + $this->name = OptionallyQualifiedName::unquoted($unqualifiedName, $qualifier); + + return $this; + } + + /** + * @param non-empty-string $unqualifiedName + * @param ?non-empty-string $qualifier + */ + public function setQuotedName(string $unqualifiedName, ?string $qualifier = null): self + { + $this->name = OptionallyQualifiedName::quoted($unqualifiedName, $qualifier); + + return $this; + } + + public function setSQL(string $sql): self + { + $this->sql = $sql; + + return $this; + } + + public function create(): View + { + if ($this->name === null) { + throw InvalidViewDefinition::nameNotSet(); + } + + if ($this->sql === null) { + throw InvalidViewDefinition::sqlNotSet($this->name); + } + + return new View( + $this->name->toString(), + $this->sql, + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/ServerVersionProvider.php b/backend/vendor/doctrine/dbal/src/ServerVersionProvider.php new file mode 100644 index 0000000..91dd9ab --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/ServerVersionProvider.php @@ -0,0 +1,13 @@ +Statement for the given SQL and Connection. + * + * @internal The statement can be only instantiated by {@see Connection}. + * + * @param Connection $conn The connection for handling statement errors. + * @param Driver\Statement $stmt The underlying driver-level statement. + * @param string $sql The SQL of the statement. + * + * @throws Exception + */ + public function __construct( + protected Connection $conn, + protected Driver\Statement $stmt, + protected string $sql, + ) { + $this->platform = $conn->getDatabasePlatform(); + } + + /** + * Binds a parameter value to the statement. + * + * The value can optionally be bound with a DBAL mapping type. + * If bound with a DBAL mapping type, the binding type is derived from the mapping + * type and the value undergoes the conversion routines of the mapping type before + * being bound. + * + * @param string|int $param Parameter identifier. For a prepared statement using named placeholders, + * this will be a parameter name of the form :name. For a prepared statement + * using question mark placeholders, this will be the 1-indexed position + * of the parameter. + * @param mixed $value The value to bind to the parameter. + * @param ParameterType|string|Type $type Either a {@see \Doctrine\DBAL\ParameterType} or a DBAL mapping type name + * or instance. + * + * @throws Exception + */ + public function bindValue( + string|int $param, + mixed $value, + string|ParameterType|Type $type = ParameterType::STRING, + ): void { + $this->params[$param] = $value; + $this->types[$param] = $type; + + if (is_string($type)) { + $type = Type::getType($type); + } + + if ($type instanceof Type) { + $value = $type->convertToDatabaseValue($value, $this->platform); + $bindingType = $type->getBindingType(); + } else { + $bindingType = $type; + } + + try { + $this->stmt->bindValue($param, $value, $bindingType); + } catch (Driver\Exception $e) { + throw $this->conn->convertException($e); + } + } + + /** @throws Exception */ + private function execute(): Result + { + try { + return new Result( + $this->stmt->execute(), + $this->conn, + ); + } catch (Driver\Exception $ex) { + throw $this->conn->convertExceptionDuringQuery($ex, $this->sql, $this->params, $this->types); + } + } + + /** + * Executes the statement with the currently bound parameters and return result. + * + * @throws Exception + */ + public function executeQuery(): Result + { + return $this->execute(); + } + + /** + * Executes the statement with the currently bound parameters and return affected rows. + * + * If the number of rows exceeds {@see PHP_INT_MAX}, it might be returned as string if the driver supports it. + * + * @return int|numeric-string + * + * @throws Exception + */ + public function executeStatement(): int|string + { + return $this->execute()->rowCount(); + } + + /** + * Gets the wrapped driver statement. + */ + public function getWrappedStatement(): Driver\Statement + { + return $this->stmt; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Tools/Console/Command/RunSqlCommand.php b/backend/vendor/doctrine/dbal/src/Tools/Console/Command/RunSqlCommand.php new file mode 100644 index 0000000..8ec6f23 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Tools/Console/Command/RunSqlCommand.php @@ -0,0 +1,119 @@ +setName('dbal:run-sql') + ->setDescription('Executes arbitrary SQL directly from the command line.') + ->setDefinition([ + new InputOption('connection', null, InputOption::VALUE_REQUIRED, 'The named database connection'), + new InputArgument('sql', InputArgument::REQUIRED, 'The SQL statement to execute.'), + new InputOption('depth', null, InputOption::VALUE_REQUIRED, 'Dumping depth of result set (deprecated).'), + new InputOption('force-fetch', null, InputOption::VALUE_NONE, 'Forces fetching the result.'), + ]) + ->setHelp(<<<'EOT' +The %command.name% command executes the given SQL query and +outputs the results: + +php %command.full_name% "SELECT * FROM users" +EOT); + } + + /** + * {@inheritDoc} + * + * @throws Exception + */ + protected function execute(InputInterface $input, OutputInterface $output): int + { + $conn = $this->getConnection($input); + $io = new SymfonyStyle($input, $output); + + $sql = $input->getArgument('sql'); + + if ($sql === null) { + throw new RuntimeException('Argument "sql" is required in order to execute this command correctly.'); + } + + assert(is_string($sql)); + + if ($input->getOption('depth') !== null) { + $io->warning('Parameter "depth" is deprecated and has no effect anymore.'); + } + + $forceFetch = $input->getOption('force-fetch'); + assert(is_bool($forceFetch)); + + if (stripos($sql, 'select') === 0 || $forceFetch) { + $this->runQuery($io, $conn, $sql); + } else { + $this->runStatement($io, $conn, $sql); + } + + return 0; + } + + private function getConnection(InputInterface $input): Connection + { + $connectionName = $input->getOption('connection'); + assert(is_string($connectionName) || $connectionName === null); + + if ($connectionName !== null) { + return $this->connectionProvider->getConnection($connectionName); + } + + return $this->connectionProvider->getDefaultConnection(); + } + + /** @throws Exception */ + private function runQuery(SymfonyStyle $io, Connection $conn, string $sql): void + { + $resultSet = $conn->fetchAllAssociative($sql); + if ($resultSet === []) { + $io->success('The query yielded an empty result set.'); + + return; + } + + $io->table(array_keys($resultSet[0]), $resultSet); + } + + /** @throws Exception */ + private function runStatement(SymfonyStyle $io, Connection $conn, string $sql): void + { + $io->success(sprintf('%d rows affected.', $conn->executeStatement($sql))); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Tools/Console/ConnectionNotFound.php b/backend/vendor/doctrine/dbal/src/Tools/Console/ConnectionNotFound.php new file mode 100644 index 0000000..049d658 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Tools/Console/ConnectionNotFound.php @@ -0,0 +1,11 @@ +connection; + } + + public function getConnection(string $name): Connection + { + if ($name !== $this->defaultConnectionName) { + throw new ConnectionNotFound(sprintf('Connection with name "%s" does not exist.', $name)); + } + + return $this->connection; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Tools/DsnParser.php b/backend/vendor/doctrine/dbal/src/Tools/DsnParser.php new file mode 100644 index 0000000..9a8fb0f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Tools/DsnParser.php @@ -0,0 +1,223 @@ +> $schemeMapping An array used to map DSN schemes to DBAL drivers */ + public function __construct( + private readonly array $schemeMapping = [], + ) { + } + + /** + * @phpstan-return Params + * + * @throws MalformedDsnException + */ + public function parse( + #[SensitiveParameter] + string $dsn, + ): array { + // (pdo-)?sqlite3?:///... => (pdo-)?sqlite3?://localhost/... or else the URL will be invalid + $url = preg_replace('#^((?:pdo-)?sqlite3?):///#', '$1://localhost/', $dsn); + assert($url !== null); + + $url = parse_url($url); + + if ($url === false) { + throw MalformedDsnException::new(); + } + + foreach ($url as $param => $value) { + if (! is_string($value)) { + continue; + } + + $url[$param] = rawurldecode($value); + } + + $params = []; + + if (isset($url['scheme'])) { + $params['driver'] = $this->parseDatabaseUrlScheme($url['scheme']); + } + + if (isset($url['host'])) { + $params['host'] = $url['host']; + } + + if (isset($url['port'])) { + $params['port'] = $url['port']; + } + + if (isset($url['user'])) { + $params['user'] = $url['user']; + } + + if (isset($url['pass'])) { + $params['password'] = $url['pass']; + } + + if (isset($params['driver']) && is_a($params['driver'], Driver::class, true)) { + $params['driverClass'] = $params['driver']; + unset($params['driver']); + } + + $params = $this->parseDatabaseUrlPath($url, $params); + $params = $this->parseDatabaseUrlQuery($url, $params); + + return $params; + } + + /** + * Parses the given connection URL and resolves the given connection parameters. + * + * Assumes that the connection URL scheme is already parsed and resolved into the given connection parameters + * via {@see parseDatabaseUrlScheme}. + * + * @see parseDatabaseUrlScheme + * + * @param mixed[] $url The URL parts to evaluate. + * @param mixed[] $params The connection parameters to resolve. + * + * @return mixed[] The resolved connection parameters. + */ + private function parseDatabaseUrlPath(array $url, array $params): array + { + if (! isset($url['path'])) { + return $params; + } + + if (isset($params['host'])) { + // Only normalize the path if a host is also available. Otherwise we might trim leading slashes + // from a pure dbname. + $url['path'] = $this->normalizeDatabaseUrlPath($url['path']); + } + + // If we do not have a known DBAL driver, we do not know any connection URL path semantics to evaluate + // and therefore treat the path as a regular DBAL connection URL path. + if (! isset($params['driver'])) { + return $this->parseRegularDatabaseUrlPath($url, $params); + } + + if (strpos($params['driver'], 'sqlite') !== false) { + return $this->parseSqliteDatabaseUrlPath($url, $params); + } + + return $this->parseRegularDatabaseUrlPath($url, $params); + } + + /** + * Normalizes the given connection URL path. + * + * @return string The normalized connection URL path + */ + private function normalizeDatabaseUrlPath(string $urlPath): string + { + assert($urlPath[0] === '/'); + + // Trim leading slash from URL path. + return substr($urlPath, 1); + } + + /** + * Parses the query part of the given connection URL and resolves the given connection parameters. + * + * @param mixed[] $url The connection URL parts to evaluate. + * @param mixed[] $params The connection parameters to resolve. + * + * @return mixed[] The resolved connection parameters. + */ + private function parseDatabaseUrlQuery(array $url, array $params): array + { + if (! isset($url['query'])) { + return $params; + } + + $query = []; + + parse_str($url['query'], $query); // simply ingest query as extra params, e.g. charset or sslmode + + return array_merge($params, $query); // parse_str wipes existing array elements + } + + /** + * Parses the given regular connection URL and resolves the given connection parameters. + * + * Assumes that the "path" URL part is already normalized via {@see normalizeDatabaseUrlPath}. + * + * @see normalizeDatabaseUrlPath + * + * @param mixed[] $url The regular connection URL parts to evaluate. + * @param mixed[] $params The connection parameters to resolve. + * + * @return mixed[] The resolved connection parameters. + */ + private function parseRegularDatabaseUrlPath(array $url, array $params): array + { + $params['dbname'] = $url['path']; + + return $params; + } + + /** + * Parses the given SQLite connection URL and resolves the given connection parameters. + * + * Assumes that the "path" URL part is already normalized via {@see normalizeDatabaseUrlPath}. + * + * @see normalizeDatabaseUrlPath + * + * @param mixed[] $url The SQLite connection URL parts to evaluate. + * @param mixed[] $params The connection parameters to resolve. + * + * @return mixed[] The resolved connection parameters. + */ + private function parseSqliteDatabaseUrlPath(array $url, array $params): array + { + if ($url['path'] === ':memory:') { + $params['memory'] = true; + + return $params; + } + + $params['path'] = $url['path']; // pdo_sqlite driver uses 'path' instead of 'dbname' key + + return $params; + } + + /** + * Parses the scheme part from given connection URL and resolves the given connection parameters. + * + * @return string The resolved driver. + */ + private function parseDatabaseUrlScheme(string $scheme): string + { + // URL schemes must not contain underscores, but dashes are ok + $driver = str_replace('-', '_', $scheme); + + // If the driver is an alias (e.g. "postgres"), map it to the actual name ("pdo-pgsql"). + // Otherwise, let checkParams decide later if the driver exists. + return $this->schemeMapping[$driver] ?? $driver; + } +} diff --git a/backend/vendor/doctrine/dbal/src/TransactionIsolationLevel.php b/backend/vendor/doctrine/dbal/src/TransactionIsolationLevel.php new file mode 100644 index 0000000..2b094db --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/TransactionIsolationLevel.php @@ -0,0 +1,13 @@ +getAsciiStringTypeDeclarationSQL($column); + } + + public function getBindingType(): ParameterType + { + return ParameterType::ASCII; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/BigIntType.php b/backend/vendor/doctrine/dbal/src/Types/BigIntType.php new file mode 100644 index 0000000..aa1a5af --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/BigIntType.php @@ -0,0 +1,60 @@ +getBigIntTypeDeclarationSQL($column); + } + + public function getBindingType(): ParameterType + { + return ParameterType::STRING; + } + + /** + * @param T $value + * + * @return (T is null ? null : int|string) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): int|string|null + { + if ($value === null || is_int($value)) { + return $value; + } + + assert( + is_string($value) && is_numeric($value), + 'DBAL assumes values outside of the integer range to be returned as string by the database driver.', + ); + + $intValue = 0 + $value; + if (is_int($intValue)) { + return $intValue; + } + + return $value; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/BinaryType.php b/backend/vendor/doctrine/dbal/src/Types/BinaryType.php new file mode 100644 index 0000000..d400dd5 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/BinaryType.php @@ -0,0 +1,49 @@ +getBinaryTypeDeclarationSQL($column); + } + + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?string + { + if ($value === null) { + return null; + } + + if (is_resource($value)) { + $value = stream_get_contents($value); + } + + if (! is_string($value)) { + throw ValueNotConvertible::new($value, Types::BINARY); + } + + return $value; + } + + public function getBindingType(): ParameterType + { + return ParameterType::BINARY; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/BlobType.php b/backend/vendor/doctrine/dbal/src/Types/BlobType.php new file mode 100644 index 0000000..c5415bc --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/BlobType.php @@ -0,0 +1,56 @@ +getBlobTypeDeclarationSQL($column); + } + + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): mixed + { + if ($value === null) { + return null; + } + + if (is_string($value)) { + $fp = fopen('php://temp', 'rb+'); + assert(is_resource($fp)); + fwrite($fp, $value); + fseek($fp, 0); + $value = $fp; + } + + if (! is_resource($value)) { + throw ValueNotConvertible::new($value, Types::BLOB); + } + + return $value; + } + + public function getBindingType(): ParameterType + { + return ParameterType::LARGE_OBJECT; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/BooleanType.php b/backend/vendor/doctrine/dbal/src/Types/BooleanType.php new file mode 100644 index 0000000..e837e58 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/BooleanType.php @@ -0,0 +1,44 @@ +getBooleanTypeDeclarationSQL($column); + } + + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): mixed + { + return $platform->convertBooleansToDatabaseValue($value); + } + + /** + * @param T $value + * + * @return (T is null ? null : bool) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?bool + { + return $platform->convertFromBoolean($value); + } + + public function getBindingType(): ParameterType + { + return ParameterType::BOOLEAN; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/ConversionException.php b/backend/vendor/doctrine/dbal/src/Types/ConversionException.php new file mode 100644 index 0000000..7cc375d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/ConversionException.php @@ -0,0 +1,14 @@ +getDateTypeDeclarationSQL($column); + } + + /** + * @param T $value + * + * @return (T is null ? null : string) + * + * @template T + */ + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string + { + if ($value === null) { + return $value; + } + + if ($value instanceof DateTimeImmutable) { + return $value->format($platform->getDateFormatString()); + } + + throw InvalidType::new( + $value, + static::class, + ['null', DateTimeImmutable::class], + ); + } + + /** + * @param T $value + * + * @return (T is null ? null : DateTimeImmutable) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTimeImmutable + { + if ($value === null || $value instanceof DateTimeImmutable) { + return $value; + } + + $dateTime = DateTimeImmutable::createFromFormat('!' . $platform->getDateFormatString(), $value); + + if ($dateTime === false) { + throw InvalidFormat::new( + $value, + static::class, + $platform->getDateFormatString(), + ); + } + + return $dateTime; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/DateIntervalType.php b/backend/vendor/doctrine/dbal/src/Types/DateIntervalType.php new file mode 100644 index 0000000..29842ae --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/DateIntervalType.php @@ -0,0 +1,84 @@ +getStringTypeDeclarationSQL($column); + } + + /** + * @param T $value + * + * @return (T is null ? null : string) + * + * @template T + */ + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string + { + if ($value === null) { + return null; + } + + if ($value instanceof DateInterval) { + return $value->format(self::FORMAT); + } + + throw InvalidType::new($value, static::class, ['null', DateInterval::class]); + } + + /** + * @param T $value + * + * @return (T is null ? null : DateInterval) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateInterval + { + if ($value === null || $value instanceof DateInterval) { + return $value; + } + + $negative = false; + + if (isset($value[0]) && ($value[0] === '+' || $value[0] === '-')) { + $negative = $value[0] === '-'; + $value = substr($value, 1); + } + + try { + $interval = new DateInterval($value); + + if ($negative) { + $interval->invert = 1; + } + + return $interval; + } catch (Throwable $exception) { + throw InvalidFormat::new($value, static::class, self::FORMAT, $exception); + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/DateTimeImmutableType.php b/backend/vendor/doctrine/dbal/src/Types/DateTimeImmutableType.php new file mode 100644 index 0000000..2d49d1d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/DateTimeImmutableType.php @@ -0,0 +1,80 @@ +getDateTimeTypeDeclarationSQL($column); + } + + /** + * @param T $value + * + * @return (T is null ? null : string) + * + * @template T + */ + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string + { + if ($value === null) { + return $value; + } + + if ($value instanceof DateTimeImmutable) { + return $value->format($platform->getDateTimeFormatString()); + } + + throw InvalidType::new( + $value, + static::class, + ['null', DateTimeImmutable::class], + ); + } + + /** + * @param T $value + * + * @return (T is null ? null : DateTimeImmutable) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTimeImmutable + { + if ($value === null || $value instanceof DateTimeImmutable) { + return $value; + } + + $dateTime = DateTimeImmutable::createFromFormat($platform->getDateTimeFormatString(), $value); + + if ($dateTime !== false) { + return $dateTime; + } + + try { + return new DateTimeImmutable($value); + } catch (Exception $e) { + throw InvalidFormat::new( + $value, + static::class, + $platform->getDateTimeFormatString(), + $e, + ); + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/DateTimeType.php b/backend/vendor/doctrine/dbal/src/Types/DateTimeType.php new file mode 100644 index 0000000..9fd0ba0 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/DateTimeType.php @@ -0,0 +1,80 @@ +getDateTimeTypeDeclarationSQL($column); + } + + /** + * @param T $value + * + * @return (T is null ? null : string) + * + * @template T + */ + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string + { + if ($value === null) { + return $value; + } + + if ($value instanceof DateTime) { + return $value->format($platform->getDateTimeFormatString()); + } + + throw InvalidType::new( + $value, + static::class, + ['null', DateTime::class], + ); + } + + /** + * @param T $value + * + * @return (T is null ? null : DateTime) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTime + { + if ($value === null || $value instanceof DateTime) { + return $value; + } + + $dateTime = DateTime::createFromFormat($platform->getDateTimeFormatString(), $value); + + if ($dateTime !== false) { + return $dateTime; + } + + try { + return new DateTime($value); + } catch (Exception $e) { + throw InvalidFormat::new( + $value, + static::class, + $platform->getDateTimeFormatString(), + $e, + ); + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/DateTimeTzImmutableType.php b/backend/vendor/doctrine/dbal/src/Types/DateTimeTzImmutableType.php new file mode 100644 index 0000000..350964d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/DateTimeTzImmutableType.php @@ -0,0 +1,74 @@ +getDateTimeTzTypeDeclarationSQL($column); + } + + /** + * @phpstan-param T $value + * + * @return (T is null ? null : string) + * + * @template T + */ + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string + { + if ($value === null) { + return $value; + } + + if ($value instanceof DateTimeImmutable) { + return $value->format($platform->getDateTimeTzFormatString()); + } + + throw InvalidType::new( + $value, + static::class, + ['null', DateTimeImmutable::class], + ); + } + + /** + * @param T $value + * + * @return (T is null ? null : DateTimeImmutable) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTimeImmutable + { + if ($value === null || $value instanceof DateTimeImmutable) { + return $value; + } + + $dateTime = DateTimeImmutable::createFromFormat($platform->getDateTimeTzFormatString(), $value); + + if ($dateTime !== false) { + return $dateTime; + } + + throw InvalidFormat::new( + $value, + static::class, + $platform->getDateTimeTzFormatString(), + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/DateTimeTzType.php b/backend/vendor/doctrine/dbal/src/Types/DateTimeTzType.php new file mode 100644 index 0000000..98e6569 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/DateTimeTzType.php @@ -0,0 +1,87 @@ +getDateTimeTzTypeDeclarationSQL($column); + } + + /** + * @param T $value + * + * @return (T is null ? null : string) + * + * @template T + */ + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string + { + if ($value === null) { + return $value; + } + + if ($value instanceof DateTime) { + return $value->format($platform->getDateTimeTzFormatString()); + } + + throw InvalidType::new( + $value, + static::class, + ['null', DateTime::class], + ); + } + + /** + * @param T $value + * + * @return (T is null ? null : DateTime) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTime + { + if ($value === null || $value instanceof DateTime) { + return $value; + } + + $dateTime = DateTime::createFromFormat($platform->getDateTimeTzFormatString(), $value); + if ($dateTime !== false) { + return $dateTime; + } + + throw InvalidFormat::new( + $value, + static::class, + $platform->getDateTimeTzFormatString(), + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/DateType.php b/backend/vendor/doctrine/dbal/src/Types/DateType.php new file mode 100644 index 0000000..7dcbe4f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/DateType.php @@ -0,0 +1,69 @@ +getDateTypeDeclarationSQL($column); + } + + /** + * @phpstan-param T $value + * + * @return (T is null ? null : string) + * + * @template T + */ + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): mixed + { + if ($value === null) { + return $value; + } + + if ($value instanceof DateTime) { + return $value->format($platform->getDateFormatString()); + } + + throw InvalidType::new($value, static::class, ['null', DateTime::class]); + } + + /** + * @param T $value + * + * @return (T is null ? null : DateTime) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTime + { + if ($value === null || $value instanceof DateTime) { + return $value; + } + + $dateTime = DateTime::createFromFormat('!' . $platform->getDateFormatString(), $value); + if ($dateTime !== false) { + return $dateTime; + } + + throw InvalidFormat::new( + $value, + static::class, + $platform->getDateFormatString(), + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/DecimalType.php b/backend/vendor/doctrine/dbal/src/Types/DecimalType.php new file mode 100644 index 0000000..7301a33 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/DecimalType.php @@ -0,0 +1,35 @@ +getDecimalTypeDeclarationSQL($column); + } + + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?string + { + // Some drivers can represent decimals as float/int + // See also: https://github.com/doctrine/dbal/pull/4818 + if (is_float($value) || is_int($value)) { + return (string) $value; + } + + return $value; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/EnumType.php b/backend/vendor/doctrine/dbal/src/Types/EnumType.php new file mode 100644 index 0000000..489dc4b --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/EnumType.php @@ -0,0 +1,18 @@ +getEnumDeclarationSQL($column); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/Exception/InvalidFormat.php b/backend/vendor/doctrine/dbal/src/Types/Exception/InvalidFormat.php new file mode 100644 index 0000000..221da2f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/Exception/InvalidFormat.php @@ -0,0 +1,37 @@ + 32 ? substr($value, 0, 20) . '...' : $value, + $toType, + $expectedFormat ?? '', + ), + 0, + $previous, + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/Exception/InvalidType.php b/backend/vendor/doctrine/dbal/src/Types/Exception/InvalidType.php new file mode 100644 index 0000000..743e41f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/Exception/InvalidType.php @@ -0,0 +1,51 @@ + 32 ? substr($value, 0, 20) . '...' : $value, + $toType, + ); + } + + return new self($message, 0, $previous); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/FloatType.php b/backend/vendor/doctrine/dbal/src/Types/FloatType.php new file mode 100644 index 0000000..40e11f9 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/FloatType.php @@ -0,0 +1,30 @@ +getFloatDeclarationSQL($column); + } + + /** + * @param T $value + * + * @return (T is null ? null : float) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?float + { + return $value === null ? null : (float) $value; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/GuidType.php b/backend/vendor/doctrine/dbal/src/Types/GuidType.php new file mode 100644 index 0000000..cc7cc5f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/GuidType.php @@ -0,0 +1,21 @@ +getGuidTypeDeclarationSQL($column); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/IntegerType.php b/backend/vendor/doctrine/dbal/src/Types/IntegerType.php new file mode 100644 index 0000000..8a711c0 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/IntegerType.php @@ -0,0 +1,39 @@ +getIntegerTypeDeclarationSQL($column); + } + + /** + * @param T $value + * + * @return (T is null ? null : int) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?int + { + return $value === null ? null : (int) $value; + } + + public function getBindingType(): ParameterType + { + return ParameterType::INTEGER; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/JsonObjectType.php b/backend/vendor/doctrine/dbal/src/Types/JsonObjectType.php new file mode 100644 index 0000000..f57172f --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/JsonObjectType.php @@ -0,0 +1,28 @@ +getJsonTypeDeclarationSQL($column); + } + + protected function isAssociative(): bool + { + return false; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/JsonType.php b/backend/vendor/doctrine/dbal/src/Types/JsonType.php new file mode 100644 index 0000000..08e8189 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/JsonType.php @@ -0,0 +1,28 @@ +getJsonTypeDeclarationSQL($column); + } + + protected function isAssociative(): bool + { + return true; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/JsonTypeConvert.php b/backend/vendor/doctrine/dbal/src/Types/JsonTypeConvert.php new file mode 100644 index 0000000..757ee5a --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/JsonTypeConvert.php @@ -0,0 +1,61 @@ +getMessage(), $e); + } + } + + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): mixed + { + if ($value === null || $value === '') { + return null; + } + + if (is_resource($value)) { + $value = stream_get_contents($value); + } + + try { + return json_decode($value, $this->isAssociative(), 512, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw ValueNotConvertible::new($value, 'json', $e->getMessage(), $e); + } + } + + abstract protected function isAssociative(): bool; +} diff --git a/backend/vendor/doctrine/dbal/src/Types/JsonbObjectType.php b/backend/vendor/doctrine/dbal/src/Types/JsonbObjectType.php new file mode 100644 index 0000000..5c39693 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/JsonbObjectType.php @@ -0,0 +1,28 @@ +getJsonbTypeDeclarationSQL($column); + } + + protected function isAssociative(): bool + { + return false; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/JsonbType.php b/backend/vendor/doctrine/dbal/src/Types/JsonbType.php new file mode 100644 index 0000000..f84e5d8 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/JsonbType.php @@ -0,0 +1,21 @@ +getJsonbTypeDeclarationSQL($column); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/NumberType.php b/backend/vendor/doctrine/dbal/src/Types/NumberType.php new file mode 100644 index 0000000..3b3d6d1 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/NumberType.php @@ -0,0 +1,54 @@ +getDecimalTypeDeclarationSQL($column); + } + + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string + { + if ($value === null) { + return null; + } + + if (! $value instanceof Number) { + throw InvalidType::new($value, static::class, ['null', Number::class]); + } + + return (string) $value; + } + + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?Number + { + if ($value === null) { + return null; + } + + // SQLite might return a decimal as float. + if (is_float($value)) { + $value = (string) $value; + } + + try { + return new Number($value); + } catch (TypeError | ValueError $e) { + throw ValueNotConvertible::new($value, static::class, previous: $e); + } + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/PhpDateMappingType.php b/backend/vendor/doctrine/dbal/src/Types/PhpDateMappingType.php new file mode 100644 index 0000000..200f277 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/PhpDateMappingType.php @@ -0,0 +1,14 @@ +getClobTypeDeclarationSQL($column); + } + + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string + { + if (! is_array($value) || count($value) === 0) { + return null; + } + + return implode(',', $value); + } + + /** @return list */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): array + { + if ($value === null) { + return []; + } + + $value = is_resource($value) ? stream_get_contents($value) : $value; + + return explode(',', $value); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/SmallFloatType.php b/backend/vendor/doctrine/dbal/src/Types/SmallFloatType.php new file mode 100644 index 0000000..431ddb2 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/SmallFloatType.php @@ -0,0 +1,30 @@ +getSmallFloatDeclarationSQL($column); + } + + /** + * @param T $value + * + * @return (T is null ? null : float) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?float + { + return $value === null ? null : (float) $value; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/SmallIntType.php b/backend/vendor/doctrine/dbal/src/Types/SmallIntType.php new file mode 100644 index 0000000..ba0899c --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/SmallIntType.php @@ -0,0 +1,39 @@ +getSmallIntTypeDeclarationSQL($column); + } + + /** + * @param T $value + * + * @return (T is null ? null : int) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?int + { + return $value === null ? null : (int) $value; + } + + public function getBindingType(): ParameterType + { + return ParameterType::INTEGER; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/StringType.php b/backend/vendor/doctrine/dbal/src/Types/StringType.php new file mode 100644 index 0000000..d3f92aa --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/StringType.php @@ -0,0 +1,21 @@ +getStringTypeDeclarationSQL($column); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/TextType.php b/backend/vendor/doctrine/dbal/src/Types/TextType.php new file mode 100644 index 0000000..a682be5 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/TextType.php @@ -0,0 +1,29 @@ +getClobTypeDeclarationSQL($column); + } + + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): mixed + { + return is_resource($value) ? stream_get_contents($value) : $value; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/TimeImmutableType.php b/backend/vendor/doctrine/dbal/src/Types/TimeImmutableType.php new file mode 100644 index 0000000..c1c24d8 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/TimeImmutableType.php @@ -0,0 +1,74 @@ +getTimeTypeDeclarationSQL($column); + } + + /** + * @param T $value + * + * @return (T is null ? null : string) + * + * @template T + */ + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string + { + if ($value === null) { + return $value; + } + + if ($value instanceof DateTimeImmutable) { + return $value->format($platform->getTimeFormatString()); + } + + throw InvalidType::new( + $value, + static::class, + ['null', DateTimeImmutable::class], + ); + } + + /** + * @param T $value + * + * @return (T is null ? null : DateTimeImmutable) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTimeImmutable + { + if ($value === null || $value instanceof DateTimeImmutable) { + return $value; + } + + $dateTime = DateTimeImmutable::createFromFormat('!' . $platform->getTimeFormatString(), $value); + + if ($dateTime !== false) { + return $dateTime; + } + + throw InvalidFormat::new( + $value, + static::class, + $platform->getTimeFormatString(), + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/TimeType.php b/backend/vendor/doctrine/dbal/src/Types/TimeType.php new file mode 100644 index 0000000..0f96fd5 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/TimeType.php @@ -0,0 +1,69 @@ +getTimeTypeDeclarationSQL($column); + } + + /** + * @param T $value + * + * @return (T is null ? null : string) + * + * @template T + */ + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string + { + if ($value === null) { + return $value; + } + + if ($value instanceof DateTime) { + return $value->format($platform->getTimeFormatString()); + } + + throw InvalidType::new($value, static::class, ['null', DateTime::class]); + } + + /** + * @param T $value + * + * @return (T is null ? null : DateTime) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTime + { + if ($value === null || $value instanceof DateTime) { + return $value; + } + + $dateTime = DateTime::createFromFormat('!' . $platform->getTimeFormatString(), $value); + if ($dateTime !== false) { + return $dateTime; + } + + throw InvalidFormat::new( + $value, + static::class, + $platform->getTimeFormatString(), + ); + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/Type.php b/backend/vendor/doctrine/dbal/src/Types/Type.php new file mode 100644 index 0000000..e5c34ac --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/Type.php @@ -0,0 +1,245 @@ + AsciiStringType::class, + Types::BIGINT => BigIntType::class, + Types::BINARY => BinaryType::class, + Types::BLOB => BlobType::class, + Types::BOOLEAN => BooleanType::class, + Types::DATE_MUTABLE => DateType::class, + Types::DATE_IMMUTABLE => DateImmutableType::class, + Types::DATEINTERVAL => DateIntervalType::class, + Types::DATETIME_MUTABLE => DateTimeType::class, + Types::DATETIME_IMMUTABLE => DateTimeImmutableType::class, + Types::DATETIMETZ_MUTABLE => DateTimeTzType::class, + Types::DATETIMETZ_IMMUTABLE => DateTimeTzImmutableType::class, + Types::DECIMAL => DecimalType::class, + Types::NUMBER => NumberType::class, + Types::ENUM => EnumType::class, + Types::FLOAT => FloatType::class, + Types::GUID => GuidType::class, + Types::INTEGER => IntegerType::class, + Types::JSON => JsonType::class, + Types::JSON_OBJECT => JsonObjectType::class, + Types::JSONB => JsonbType::class, + Types::JSONB_OBJECT => JsonbObjectType::class, + Types::SIMPLE_ARRAY => SimpleArrayType::class, + Types::SMALLFLOAT => SmallFloatType::class, + Types::SMALLINT => SmallIntType::class, + Types::STRING => StringType::class, + Types::TEXT => TextType::class, + Types::TIME_MUTABLE => TimeType::class, + Types::TIME_IMMUTABLE => TimeImmutableType::class, + ]; + + private static ?TypeRegistry $typeRegistry = null; + + /** + * Converts a value from its PHP representation to its database representation + * of this type. + * + * @param mixed $value The value to convert. + * @param AbstractPlatform $platform The currently used database platform. + * + * @return mixed The database representation of the value. + * + * @throws ConversionException + */ + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): mixed + { + return $value; + } + + /** + * Converts a value from its database representation to its PHP representation + * of this type. + * + * @param mixed $value The value to convert. + * @param AbstractPlatform $platform The currently used database platform. + * + * @return mixed The PHP representation of the value. + * + * @throws ConversionException + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): mixed + { + return $value; + } + + /** + * Gets the SQL declaration snippet for a column of this type. + * + * @param array $column The column definition + * @param AbstractPlatform $platform The currently used database platform. + */ + abstract public function getSQLDeclaration(array $column, AbstractPlatform $platform): string; + + /** @throws TypesException */ + final public static function getTypeRegistry(): TypeRegistry + { + return self::$typeRegistry ??= self::createTypeRegistry(); + } + + /** @throws TypesException */ + private static function createTypeRegistry(): TypeRegistry + { + return new TypeRegistry( + array_map( + static fn ($class) => new $class(), + self::BUILTIN_TYPES_MAP, + ), + ); + } + + /** + * Factory method to create type instances. + * + * @param string $name The name of the type. + * + * @throws TypesException + */ + public static function getType(string $name): self + { + return self::getTypeRegistry()->get($name); + } + + /** + * Finds a name for the given type. + * + * @throws TypesException + */ + public static function lookupName(self $type): string + { + return self::getTypeRegistry()->lookupName($type); + } + + /** + * Adds a custom type to the type map. + * + * @param string $name The name of the type. + * @param class-string|Type $type The custom type or the class name of the custom type. + * + * @throws Exception + */ + public static function addType(string $name, string|Type $type): void + { + if (is_string($type)) { + try { + $type = new $type(); + } catch (ArgumentCountError $e) { // @phpstan-ignore catch.neverThrown (it can be thrown) + throw TypeArgumentCountError::new($name, $e); + } + } + + self::getTypeRegistry()->register($name, $type); + } + + /** + * Checks if exists support for a type. + * + * @param string $name The name of the type. + * + * @return bool TRUE if type is supported; FALSE otherwise. + * + * @throws TypesException + */ + public static function hasType(string $name): bool + { + return self::getTypeRegistry()->has($name); + } + + /** + * Overrides an already defined type to use a different implementation. + * + * @param class-string|Type $type The custom type or the class name of the custom type. + * + * @throws Exception + */ + public static function overrideType(string $name, string|Type $type): void + { + if (is_string($type)) { + try { + $type = new $type(); + } catch (ArgumentCountError $e) { // @phpstan-ignore catch.neverThrown (it can be thrown) + throw TypeArgumentCountError::new($name, $e); + } + } + + self::getTypeRegistry()->override($name, $type); + } + + /** + * Gets the (preferred) binding type for values of this type that + * can be used when binding parameters to prepared statements. + */ + public function getBindingType(): ParameterType + { + return ParameterType::STRING; + } + + /** + * Gets the types array map which holds all registered types and the corresponding + * type class + * + * @return array + * + * @throws TypesException + */ + public static function getTypesMap(): array + { + return array_map( + static fn (Type $type): string => $type::class, + self::getTypeRegistry()->getMap(), + ); + } + + /** + * Modifies the SQL expression (identifier, parameter) to convert to a database value. + */ + public function convertToDatabaseValueSQL(string $sqlExpr, AbstractPlatform $platform): string + { + return $sqlExpr; + } + + /** + * Modifies the SQL expression (identifier, parameter) to convert to a PHP value. + */ + public function convertToPHPValueSQL(string $sqlExpr, AbstractPlatform $platform): string + { + return $sqlExpr; + } + + /** + * Gets an array of database types that map to this Doctrine type. + * + * @return array + */ + public function getMappedDatabaseTypes(AbstractPlatform $platform): array + { + return []; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/TypeRegistry.php b/backend/vendor/doctrine/dbal/src/Types/TypeRegistry.php new file mode 100644 index 0000000..fce4ab0 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/TypeRegistry.php @@ -0,0 +1,136 @@ + Map of type names and their corresponding flyweight objects. */ + private array $instances; + /** @var array */ + private array $instancesReverseIndex; + + /** + * @param array $instances + * + * @throws TypesException + */ + public function __construct(array $instances = []) + { + $this->instances = []; + $this->instancesReverseIndex = []; + foreach ($instances as $name => $type) { + $this->register($name, $type); + } + } + + /** + * Finds a type by the given name. + * + * @throws TypesException + */ + public function get(string $name): Type + { + $type = $this->instances[$name] ?? null; + if ($type === null) { + throw UnknownColumnType::new($name); + } + + return $type; + } + + /** + * Finds a name for the given type. + * + * @throws TypesException + */ + public function lookupName(Type $type): string + { + $name = $this->findTypeName($type); + + if ($name === null) { + throw TypeNotRegistered::new($type); + } + + return $name; + } + + /** + * Checks if there is a type of the given name. + */ + public function has(string $name): bool + { + return isset($this->instances[$name]); + } + + /** + * Registers a custom type to the type map. + * + * @throws TypesException + */ + public function register(string $name, Type $type): void + { + if (isset($this->instances[$name])) { + throw TypesAlreadyExists::new($name); + } + + if ($this->findTypeName($type) !== null) { + throw TypeAlreadyRegistered::new($type); + } + + $this->instances[$name] = $type; + $this->instancesReverseIndex[spl_object_id($type)] = $name; + } + + /** + * Overrides an already defined type to use a different implementation. + * + * @throws Exception + */ + public function override(string $name, Type $type): void + { + $origType = $this->instances[$name] ?? null; + if ($origType === null) { + throw TypeNotFound::new($name); + } + + if (($this->findTypeName($type) ?? $name) !== $name) { + throw TypeAlreadyRegistered::new($type); + } + + unset($this->instancesReverseIndex[spl_object_id($origType)]); + $this->instances[$name] = $type; + $this->instancesReverseIndex[spl_object_id($type)] = $name; + } + + /** + * Gets the map of all registered types and their corresponding type instances. + * + * @internal + * + * @return array + */ + public function getMap(): array + { + return $this->instances; + } + + private function findTypeName(Type $type): ?string + { + return $this->instancesReverseIndex[spl_object_id($type)] ?? null; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/Types.php b/backend/vendor/doctrine/dbal/src/Types/Types.php new file mode 100644 index 0000000..91a3e4d --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/Types.php @@ -0,0 +1,46 @@ +format($platform->getDateTimeFormatString()); + } + + throw InvalidType::new( + $value, + static::class, + ['null', DateTimeImmutable::class], + ); + } + + /** + * @param T $value + * + * @return (T is null ? null : DateTimeImmutable) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTimeImmutable + { + if ($value === null || $value instanceof DateTimeImmutable) { + return $value; + } + + try { + $dateTime = new DateTimeImmutable($value); + } catch (Exception $e) { + throw ValueNotConvertible::new($value, DateTimeImmutable::class, $e->getMessage(), $e); + } + + return $dateTime; + } +} diff --git a/backend/vendor/doctrine/dbal/src/Types/VarDateTimeType.php b/backend/vendor/doctrine/dbal/src/Types/VarDateTimeType.php new file mode 100644 index 0000000..55dec49 --- /dev/null +++ b/backend/vendor/doctrine/dbal/src/Types/VarDateTimeType.php @@ -0,0 +1,42 @@ + 0 it is necessary to use this type. + */ +class VarDateTimeType extends DateTimeType +{ + /** + * @param T $value + * + * @return (T is null ? null : DateTime) + * + * @template T + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DateTime + { + if ($value === null || $value instanceof DateTime) { + return $value; + } + + try { + $dateTime = new DateTime($value); + } catch (Exception $e) { + throw ValueNotConvertible::new($value, DateTime::class, $e->getMessage(), $e); + } + + return $dateTime; + } +} diff --git a/backend/vendor/doctrine/deprecations/LICENSE b/backend/vendor/doctrine/deprecations/LICENSE new file mode 100644 index 0000000..156905c --- /dev/null +++ b/backend/vendor/doctrine/deprecations/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2020-2021 Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/backend/vendor/doctrine/deprecations/README.md b/backend/vendor/doctrine/deprecations/README.md new file mode 100644 index 0000000..7cbc606 --- /dev/null +++ b/backend/vendor/doctrine/deprecations/README.md @@ -0,0 +1,216 @@ +# Doctrine Deprecations + +A small (side-effect free by default) layer on top of +`trigger_error(E_USER_DEPRECATED)` or PSR-3 logging. + +- no side-effects by default, making it a perfect fit for libraries that don't know how the error handler works they operate under +- options to avoid having to rely on error handlers global state by using PSR-3 logging +- deduplicate deprecation messages to avoid excessive triggering and reduce overhead + +We recommend to collect Deprecations using a PSR logger instead of relying on +the global error handler. + +## Usage from consumer perspective: + +Enable Doctrine deprecations to be sent to a PSR3 logger: + +```php +\Doctrine\Deprecations\Deprecation::enableWithPsrLogger($logger); +``` + +Enable Doctrine deprecations to be sent as `@trigger_error($message, E_USER_DEPRECATED)` +messages by setting the `DOCTRINE_DEPRECATIONS` environment variable to `trigger`. +Alternatively, call: + +```php +\Doctrine\Deprecations\Deprecation::enableWithTriggerError(); +``` + +If you only want to enable deprecation tracking, without logging or calling `trigger_error` +then set the `DOCTRINE_DEPRECATIONS` environment variable to `track`. +Alternatively, call: + +```php +\Doctrine\Deprecations\Deprecation::enableTrackingDeprecations(); +``` + +Tracking is enabled with all three modes and provides access to all triggered +deprecations and their individual count: + +```php +$deprecations = \Doctrine\Deprecations\Deprecation::getTriggeredDeprecations(); + +foreach ($deprecations as $identifier => $count) { + echo $identifier . " was triggered " . $count . " times\n"; +} +``` + +### Suppressing Specific Deprecations + +Disable triggering about specific deprecations: + +```php +\Doctrine\Deprecations\Deprecation::ignoreDeprecations("https://link/to/deprecations-description-identifier"); +``` + +Disable all deprecations from a package + +```php +\Doctrine\Deprecations\Deprecation::ignorePackage("doctrine/orm"); +``` + +### Other Operations + +When used within PHPUnit or other tools that could collect multiple instances of the same deprecations +the deduplication can be disabled: + +```php +\Doctrine\Deprecations\Deprecation::withoutDeduplication(); +``` + +Disable deprecation tracking again: + +```php +\Doctrine\Deprecations\Deprecation::disable(); +``` + +## Usage from a library/producer perspective: + +When you want to unconditionally trigger a deprecation even when called +from the library itself then the `trigger` method is the way to go: + +```php +\Doctrine\Deprecations\Deprecation::trigger( + "doctrine/orm", + "https://link/to/deprecations-description", + "message" +); +``` + +If variable arguments are provided at the end, they are used with `sprintf` on +the message. + +```php +\Doctrine\Deprecations\Deprecation::trigger( + "doctrine/orm", + "https://github.com/doctrine/orm/issue/1234", + "message %s %d", + "foo", + 1234 +); +``` + +When you want to trigger a deprecation only when it is called by a function +outside of the current package, but not trigger when the package itself is the cause, +then use: + +```php +\Doctrine\Deprecations\Deprecation::triggerIfCalledFromOutside( + "doctrine/orm", + "https://link/to/deprecations-description", + "message" +); +``` + +Based on the issue link each deprecation message is only triggered once per +request. + +A limited stacktrace is included in the deprecation message to find the +offending location. + +Note: A producer/library should never call `Deprecation::enableWith` methods +and leave the decision how to handle deprecations to application and +frameworks. + +## Usage in PHPUnit tests + +There is a `VerifyDeprecations` trait that you can use to make assertions on +the occurrence of deprecations within a test. + +```php +use Doctrine\Deprecations\PHPUnit\VerifyDeprecations; + +class MyTest extends TestCase +{ + use VerifyDeprecations; + + public function testSomethingDeprecation() + { + $this->expectDeprecationWithIdentifier('https://github.com/doctrine/orm/issue/1234'); + + triggerTheCodeWithDeprecation(); + } + + public function testSomethingDeprecationFixed() + { + $this->expectNoDeprecationWithIdentifier('https://github.com/doctrine/orm/issue/1234'); + + triggerTheCodeWithoutDeprecation(); + } +} +``` + +## Displaying deprecations after running a PHPUnit test suite + +It is possible to integrate this library with PHPUnit to display all +deprecations triggered during the test suite execution. + +```xml + + + + + + + + + + + + src + + + +``` + +Note that you can still trigger Deprecations in your code, provided you use the +`#[IgnoreDeprecations]` to ignore them for tests that call it. + +At the moment, it is not possible to disable deduplication with an environment +variable, but you can use a bootstrap file to achieve that: + +```php +// tests/bootstrap.php + + … + +``` + +## What is a deprecation identifier? + +An identifier for deprecations is just a link to any resource, most often a +Github Issue or Pull Request explaining the deprecation and potentially its +alternative. diff --git a/backend/vendor/doctrine/deprecations/composer.json b/backend/vendor/doctrine/deprecations/composer.json new file mode 100644 index 0000000..14a81cf --- /dev/null +++ b/backend/vendor/doctrine/deprecations/composer.json @@ -0,0 +1,39 @@ +{ + "name": "doctrine/deprecations", + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "license": "MIT", + "type": "library", + "homepage": "https://www.doctrine-project.org/", + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^12 || ^14", + "phpstan/phpstan": "1.4.10 || 2.1.30", + "phpstan/phpstan-phpunit": "^1.0 || ^2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12.4 || ^13.0", + "psr/log": "^1 || ^2 || ^3" + }, + "conflict": { + "phpunit/phpunit": "<=7.5 || >=14" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "DeprecationTests\\": "test_fixtures/src", + "Doctrine\\Foo\\": "test_fixtures/vendor/doctrine/foo" + } + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + } +} diff --git a/backend/vendor/doctrine/deprecations/src/Deprecation.php b/backend/vendor/doctrine/deprecations/src/Deprecation.php new file mode 100644 index 0000000..1801e6c --- /dev/null +++ b/backend/vendor/doctrine/deprecations/src/Deprecation.php @@ -0,0 +1,309 @@ +|null */ + private static $type; + + /** @var LoggerInterface|null */ + private static $logger; + + /** @var array */ + private static $ignoredPackages = []; + + /** @var array */ + private static $triggeredDeprecations = []; + + /** @var array */ + private static $ignoredLinks = []; + + /** @var bool */ + private static $deduplication = true; + + /** + * Trigger a deprecation for the given package and identfier. + * + * The link should point to a Github issue or Wiki entry detailing the + * deprecation. It is additionally used to de-duplicate the trigger of the + * same deprecation during a request. + * + * @param float|int|string $args + */ + public static function trigger(string $package, string $link, string $message, ...$args): void + { + $type = self::$type ?? self::getTypeFromEnv(); + + if ($type === self::TYPE_NONE) { + return; + } + + if (isset(self::$ignoredLinks[$link])) { + return; + } + + if (array_key_exists($link, self::$triggeredDeprecations)) { + self::$triggeredDeprecations[$link]++; + } else { + self::$triggeredDeprecations[$link] = 1; + } + + if (self::$deduplication === true && self::$triggeredDeprecations[$link] > 1) { + return; + } + + if (isset(self::$ignoredPackages[$package])) { + return; + } + + $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); + + $message = sprintf($message, ...$args); + + self::delegateTriggerToBackend($message, $backtrace, $link, $package); + } + + /** + * Trigger a deprecation for the given package and identifier when called from outside. + * + * "Outside" means we assume that $package is currently installed as a + * dependency and the caller is not a file in that package. When $package + * is installed as a root package then deprecations triggered from the + * tests folder are also considered "outside". + * + * This deprecation method assumes that you are using Composer to install + * the dependency and are using the default /vendor/ folder and not a + * Composer plugin to change the install location. The assumption is also + * that $package is the exact composer packge name. + * + * Compared to {@link trigger()} this method causes some overhead when + * deprecation tracking is enabled even during deduplication, because it + * needs to call {@link debug_backtrace()} + * + * @param float|int|string $args + */ + public static function triggerIfCalledFromOutside(string $package, string $link, string $message, ...$args): void + { + $type = self::$type ?? self::getTypeFromEnv(); + + if ($type === self::TYPE_NONE) { + return; + } + + $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); + + // first check that the caller is not from a tests folder, in which case we always let deprecations pass + if (isset($backtrace[1]['file'], $backtrace[0]['file']) && strpos($backtrace[1]['file'], DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR) === false) { + $path = DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $package) . DIRECTORY_SEPARATOR; + + if (strpos($backtrace[0]['file'], $path) === false) { + return; + } + + if (strpos($backtrace[1]['file'], $path) !== false) { + return; + } + } + + if (isset(self::$ignoredLinks[$link])) { + return; + } + + if (array_key_exists($link, self::$triggeredDeprecations)) { + self::$triggeredDeprecations[$link]++; + } else { + self::$triggeredDeprecations[$link] = 1; + } + + if (self::$deduplication === true && self::$triggeredDeprecations[$link] > 1) { + return; + } + + if (isset(self::$ignoredPackages[$package])) { + return; + } + + $message = sprintf($message, ...$args); + + self::delegateTriggerToBackend($message, $backtrace, $link, $package); + } + + /** @param list $backtrace */ + private static function delegateTriggerToBackend(string $message, array $backtrace, string $link, string $package): void + { + $type = self::$type ?? self::getTypeFromEnv(); + + if (($type & self::TYPE_PSR_LOGGER) > 0) { + $context = [ + 'file' => $backtrace[0]['file'] ?? null, + 'line' => $backtrace[0]['line'] ?? null, + 'package' => $package, + 'link' => $link, + ]; + + assert(self::$logger !== null); + + self::$logger->notice($message, $context); + } + + if (! (($type & self::TYPE_TRIGGER_ERROR) > 0)) { + return; + } + + $message .= sprintf( + ' (%s:%d called by %s:%d, %s, package %s)', + self::basename($backtrace[0]['file'] ?? 'native code'), + $backtrace[0]['line'] ?? 0, + self::basename($backtrace[1]['file'] ?? 'native code'), + $backtrace[1]['line'] ?? 0, + $link, + $package + ); + + @trigger_error($message, E_USER_DEPRECATED); + } + + /** + * A non-local-aware version of PHPs basename function. + */ + private static function basename(string $filename): string + { + $pos = strrpos($filename, DIRECTORY_SEPARATOR); + + if ($pos === false) { + return $filename; + } + + return substr($filename, $pos + 1); + } + + public static function enableTrackingDeprecations(): void + { + self::$type = self::$type ?? self::getTypeFromEnv(); + self::$type |= self::TYPE_TRACK_DEPRECATIONS; + } + + public static function enableWithTriggerError(): void + { + self::$type = self::$type ?? self::getTypeFromEnv(); + self::$type |= self::TYPE_TRIGGER_ERROR; + } + + public static function enableWithPsrLogger(LoggerInterface $logger): void + { + self::$type = self::$type ?? self::getTypeFromEnv(); + self::$type |= self::TYPE_PSR_LOGGER; + self::$logger = $logger; + } + + public static function withoutDeduplication(): void + { + self::$deduplication = false; + } + + public static function disable(): void + { + self::$type = self::TYPE_NONE; + self::$logger = null; + self::$deduplication = true; + self::$ignoredLinks = []; + + foreach (self::$triggeredDeprecations as $link => $count) { + self::$triggeredDeprecations[$link] = 0; + } + } + + public static function ignorePackage(string $packageName): void + { + self::$ignoredPackages[$packageName] = true; + } + + public static function ignoreDeprecations(string ...$links): void + { + foreach ($links as $link) { + self::$ignoredLinks[$link] = true; + } + } + + public static function getUniqueTriggeredDeprecationsCount(): int + { + return array_reduce(self::$triggeredDeprecations, static function (int $carry, int $count) { + return $carry + $count; + }, 0); + } + + /** + * Returns each triggered deprecation link identifier and the amount of occurrences. + * + * @return array + */ + public static function getTriggeredDeprecations(): array + { + return self::$triggeredDeprecations; + } + + /** @return int-mask-of */ + private static function getTypeFromEnv(): int + { + switch ($_SERVER['DOCTRINE_DEPRECATIONS'] ?? $_ENV['DOCTRINE_DEPRECATIONS'] ?? null) { + case 'trigger': + self::$type = self::TYPE_TRIGGER_ERROR; + break; + + case 'track': + self::$type = self::TYPE_TRACK_DEPRECATIONS; + break; + + default: + self::$type = self::TYPE_NONE; + break; + } + + return self::$type; + } +} diff --git a/backend/vendor/doctrine/deprecations/src/PHPUnit/VerifyDeprecations.php b/backend/vendor/doctrine/deprecations/src/PHPUnit/VerifyDeprecations.php new file mode 100644 index 0000000..7e168bd --- /dev/null +++ b/backend/vendor/doctrine/deprecations/src/PHPUnit/VerifyDeprecations.php @@ -0,0 +1,66 @@ + */ + private $doctrineDeprecationsExpectations = []; + + /** @var array */ + private $doctrineNoDeprecationsExpectations = []; + + public function expectDeprecationWithIdentifier(string $identifier): void + { + $this->doctrineDeprecationsExpectations[$identifier] = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0; + } + + public function expectNoDeprecationWithIdentifier(string $identifier): void + { + $this->doctrineNoDeprecationsExpectations[$identifier] = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0; + } + + /** @before */ + #[Before] + public function enableDeprecationTracking(): void + { + Deprecation::enableTrackingDeprecations(); + } + + /** @after */ + #[After] + public function verifyDeprecationsAreTriggered(): void + { + foreach ($this->doctrineDeprecationsExpectations as $identifier => $expectation) { + $actualCount = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0; + + $this->assertTrue( + $actualCount > $expectation, + sprintf( + "Expected deprecation with identifier '%s' was not triggered by code executed in test.", + $identifier + ) + ); + } + + foreach ($this->doctrineNoDeprecationsExpectations as $identifier => $expectation) { + $actualCount = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0; + + $this->assertTrue( + $actualCount === $expectation, + sprintf( + "Deprecation with identifier '%s' was triggered by code executed in test, but expected not to.", + $identifier + ) + ); + } + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/LICENSE b/backend/vendor/doctrine/doctrine-bundle/LICENSE new file mode 100644 index 0000000..655a5ce --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2011 Fabien Potencier, Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/backend/vendor/doctrine/doctrine-bundle/README.md b/backend/vendor/doctrine/doctrine-bundle/README.md new file mode 100644 index 0000000..4820b29 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/README.md @@ -0,0 +1,25 @@ +# Doctrine Bundle + +Doctrine DBAL & ORM Bundle for the Symfony Framework. + +[![Continuous Integration](https://github.com/doctrine/DoctrineBundle/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/doctrine/DoctrineBundle/actions/workflows/continuous-integration.yml) +[![codecov](https://codecov.io/gh/doctrine/DoctrineBundle/graph/badge.svg?token=qtm3EQ3WgV)](https://codecov.io/gh/doctrine/DoctrineBundle) + +## What is Doctrine? + +The Doctrine Project is the home of a selected set of PHP libraries primarily focused on providing persistence +services and related functionality. Its prize projects are a Object Relational Mapper and the Database Abstraction +Layer it is built on top of. You can read more about the projects below or view a list of all projects. + +Object relational mapper (ORM) for PHP that sits on top of a powerful database abstraction layer (DBAL). +One of its key features is the option to write database queries in a proprietary object oriented SQL dialect +called Doctrine Query Language (DQL), inspired by Hibernates HQL. This provides developers with a powerful +alternative to SQL that maintains flexibility without requiring unnecessary code duplication. + +DBAL is a powerful database abstraction layer with many features for database schema introspection, +schema management and PDO abstraction. + +## Documentation + +The documentation is rendered on [the symfony.com website](https://symfony.com/doc/current/reference/configuration/doctrine.html). +The source of the documentation is available in the docs folder. diff --git a/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.10.md b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.10.md new file mode 100644 index 0000000..e9e03c2 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.10.md @@ -0,0 +1,27 @@ +UPGRADE FROM 2.9 to 2.10 +======================== + +Configuration +------------- + +### Preparing for a new `report_fields_where_declared` mapping driver mode + +Doctrine ORM 2.16+ makes a change to how the annotations and attribute mapping drivers report fields inherited from parent classes. For details, see https://github.com/doctrine/orm/pull/10455. It will trigger a deprecation notice unless the new mode is activated. In ORM 3.0, the new mode will be the only one. + +The new mode ~does not~ should not make a difference for regular, valid use cases, but may lead to `MappingException`s for users with certain configurations that were not meant to be supported by the ORM in the first place. To avoid surprising users (even when their configuration is invalid) during a 2.16 _minor_ version upgrade, the transition to this new mode was implemented as an opt-in. This way, you can try and deal with the change any time you see fit. + +In version 2.10+ of this bundle, a new configuration setting `report_fields_where_declared` was added at the entity manager configuration level. Set it to `true` to switch the mapping driver for the corresponding entity manager to the new mode. It is only relevant for mapping configurations using attributes or annotations. + +Unless you set it to `true`, Doctrine ORM will emit deprecation messages mentioning this new setting. + +### Preparing for the XSD validation for XML drivers + +Doctrine ORM 2.14+ adds support for validating the XSD of XML mapping files. In ORM 3.0, this validation will be mandatory. + +As the ecosystem is known to rely on custom elements in the XML mapping files that are forbidden when validating the XSD (for instance when using `gedmo/doctrine-extensions`), this validation is opt-in thanks to a `validate_xml_mapping` setting at the entity manager configuration level. + +Unless you set it to `true`, Doctrine ORM will emit deprecation messages mentioning the XSD validation. + +### Deprecations + +- `Doctrine\Bundle\DoctrineBundle\EventSubscriber\EventSubscriberInterface` has been deprecated. Use the `#[AsDoctrineListener]` attribute instead. diff --git a/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.12.md b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.12.md new file mode 100644 index 0000000..77e17d2 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.12.md @@ -0,0 +1,13 @@ +UPGRADE FROM 2.11 to 2.12 +======================== + +Configuration +------------- + +### Controller resolver auto mapping default configuration will be changed + +The default value of `doctrine.orm.controller_resolver.auto_mapping` will be changed from `true` to `false` in 3.0. + +Auto mapping uses any route parameter that matches with a field name of the Entity to resolve as criteria in a find by query. + +If you are relying on this functionality, you will need to configure it explicitly to silence the deprecation notice. diff --git a/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.13.md b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.13.md new file mode 100644 index 0000000..2b0f957 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.13.md @@ -0,0 +1,13 @@ +UPGRADE FROM 2.12 to 2.13 +======================== + +Configuration +------------- + +### Controller resolver auto mapping deprecated + +The controller resolver auto mapping functionality has been deprecated with Symfony 7.1, and is replaced with explicit mapped route parameters. Enabling the auto mapper by default using this bundle is now deprecated as well. + +Auto mapping uses any route parameter that matches with a field name of the Entity to resolve as criteria in a find by query. + +If you are relying on this functionality, you can update your code to use explicit mapped route parameters instead. diff --git a/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.17.md b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.17.md new file mode 100644 index 0000000..5257834 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.17.md @@ -0,0 +1,28 @@ +UPGRADE FROM 2.16 to 2.17 +========================= + +DoctrineExtension +================= + +Minor breaking change: +`Doctrine\Bundle\DoctrineBundle\DependencyInjection\DoctrineExtension` no +longer extends +`Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension`. + +Configuration +------------- + +### The `doctrine.orm.entity_managers.some_em.report_fields_where_declared` configuration option is deprecated + +This option is a no-op when using `doctrine/orm` 3 and has been conditionally +deprecated. You should stop using it as soon as you upgrade to Doctrine ORM 3. + +### The `doctrine.dbal.connections.some_connection.disable_type_comments` configuration option is deprecated + +This option is a no-op when using `doctrine/dbal` 4 and has been conditionally +deprecated. You should stop using it as soon as you upgrade to Doctrine DBAL 4. + +### The `doctrine.dbal.connections.some_connection.use_savepoints` configuration option is deprecated + +This option is a no-op when using `doctrine/dbal` 4 and has been conditionally +deprecated. You should stop using it as soon as you upgrade to Doctrine DBAL 4. diff --git a/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.18.md b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.18.md new file mode 100644 index 0000000..8d6ada0 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-2.18.md @@ -0,0 +1,15 @@ +UPGRADE FROM 2.17 to 2.18 +========================= + +DoctrineOrmMappingsPass +----------------------- + +### The `DoctrineOrmMappingsPass::createYamlMappingDriver()` method is deprecated + +This method is deprecated with no replacement planned and will be removed in +DoctrineBundle 3.0. + +### The `DoctrineOrmMappingsPass::createAnnotationMappingDriver()` method is deprecated + +This method is deprecated with no replacement planned and will be removed in +DoctrineBundle 3.0. diff --git a/backend/vendor/doctrine/doctrine-bundle/UPGRADE-3.0.md b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-3.0.md new file mode 100644 index 0000000..365cd13 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/UPGRADE-3.0.md @@ -0,0 +1,19 @@ +UPGRADE FROM 2.x to 3.0 +======================= + +Configuration +------------- + +### Controller resolver auto mapping can no longer be configured + +The `doctrine.orm.controller_resolver.auto_mapping` option now only accepts `false` as value, to disallow the usage of the controller resolver auto mapping feature by default. The configuration option will be fully removed in 4.0. + +Auto mapping used any route parameter that matches with a field name of the Entity to resolve as criteria in a find by query. This method has been deprecated in Symfony 7.1 and is replaced with mapped route parameters. + +If you were relying on this functionality, you will need to update your code to use explicit mapped route parameters instead. + +Types +----- + + * The `commented` configuration option for types is no longer supported and + deprecated. diff --git a/backend/vendor/doctrine/doctrine-bundle/composer.json b/backend/vendor/doctrine/doctrine-bundle/composer.json new file mode 100644 index 0000000..4a0309f --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/composer.json @@ -0,0 +1,108 @@ +{ + "name": "doctrine/doctrine-bundle", + "description": "Symfony DoctrineBundle", + "license": "MIT", + "type": "symfony-bundle", + "keywords": [ + "DBAL", + "ORM", + "Database", + "Persistence" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Doctrine Project", + "homepage": "https://www.doctrine-project.org/" + } + ], + "homepage": "https://www.doctrine-project.org", + "require": { + "php": "^8.1", + "doctrine/dbal": "^3.7.0 || ^4.0", + "doctrine/deprecations": "^1.0", + "doctrine/persistence": "^3.1 || ^4", + "doctrine/sql-formatter": "^1.0.1", + "symfony/cache": "^6.4 || ^7.0", + "symfony/config": "^6.4 || ^7.0", + "symfony/console": "^6.4 || ^7.0", + "symfony/dependency-injection": "^6.4 || ^7.0", + "symfony/doctrine-bridge": "^6.4.3 || ^7.0.3", + "symfony/framework-bundle": "^6.4 || ^7.0", + "symfony/service-contracts": "^2.5 || ^3" + }, + "require-dev": { + "doctrine/annotations": "^1 || ^2", + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^14", + "doctrine/orm": "^2.17 || ^3.1", + "friendsofphp/proxy-manager-lts": "^1.0", + "phpstan/phpstan": "2.1.1", + "phpstan/phpstan-phpunit": "2.0.3", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.53 || ^12.3.10", + "psr/log": "^1.1.4 || ^2.0 || ^3.0", + "symfony/doctrine-messenger": "^6.4 || ^7.0", + "symfony/expression-language": "^6.4 || ^7.0", + "symfony/messenger": "^6.4 || ^7.0", + "symfony/property-info": "^6.4 || ^7.0", + "symfony/security-bundle": "^6.4 || ^7.0", + "symfony/stopwatch": "^6.4 || ^7.0", + "symfony/string": "^6.4 || ^7.0", + "symfony/twig-bridge": "^6.4 || ^7.0", + "symfony/validator": "^6.4 || ^7.0", + "symfony/var-exporter": "^6.4.1 || ^7.0.1", + "symfony/web-profiler-bundle": "^6.4 || ^7.0", + "symfony/yaml": "^6.4 || ^7.0", + "twig/twig": "^2.14.7 || ^3.0.4" + }, + "conflict": { + "doctrine/annotations": ">=3.0", + "doctrine/cache": "< 1.11", + "doctrine/orm": "<2.17 || >=4.0", + "symfony/var-exporter": "< 6.4.1 || 7.0.0", + "twig/twig": "<2.13 || >=3.0 <3.0.4" + }, + "suggest": { + "ext-pdo": "*", + "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", + "symfony/web-profiler-bundle": "To use the data collector." + }, + "minimum-stability": "dev", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineBundle\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineBundle\\Tests\\": "tests", + "Fixtures\\": "tests/DependencyInjection/Fixtures" + } + }, + "config": { + "allow-plugins": { + "composer/package-versions-deprecated": true, + "dealerdirect/phpcodesniffer-composer-installer": true, + "symfony/flex": true + }, + "sort-packages": true + }, + "scripts": { + "auto-scripts": { + "cache:clear": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd" + } + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/config/dbal.php b/backend/vendor/doctrine/doctrine-bundle/config/dbal.php new file mode 100644 index 0000000..b4d4cde --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/config/dbal.php @@ -0,0 +1,145 @@ +parameters() + ->set('doctrine.dbal.configuration.class', Configuration::class) + ->set('doctrine.data_collector.class', DoctrineDataCollector::class) + ->set('doctrine.dbal.connection.event_manager.class', ContainerAwareEventManager::class) + ->set('doctrine.dbal.connection_factory.class', ConnectionFactory::class) + ->set('doctrine.dbal.events.mysql_session_init.class', MysqlSessionInit::class) + ->set('doctrine.dbal.events.oracle_session_init.class', OracleSessionInit::class) + ->set('doctrine.class', Registry::class) + ->set('doctrine.entity_managers', []) + ->set('doctrine.default_entity_manager', ''); + + $container->services() + + ->alias(Connection::class, 'database_connection') + ->alias(ManagerRegistry::class, 'doctrine') + ->alias(LegacyManagerRegistry::class, 'doctrine') + + ->set('data_collector.doctrine', (string) param('doctrine.data_collector.class')) + ->args([ + service('doctrine'), + true, + service('doctrine.debug_data_holder')->nullOnInvalid(), + ]) + ->tag('data_collector', ['template' => '@Doctrine/Collector/db.html.twig', 'id' => 'db', 'priority' => 250]) + + ->set('doctrine.dbal.connection_factory', (string) param('doctrine.dbal.connection_factory.class')) + ->args([ + (string) param('doctrine.dbal.connection_factory.types'), + service('doctrine.dbal.connection_factory.dsn_parser'), + ]) + + ->set('doctrine.dbal.connection_factory.dsn_parser', DsnParser::class) + ->args([ + [], + ]) + + ->set('doctrine.dbal.connection', Connection::class) + ->abstract() + ->factory([service('doctrine.dbal.connection_factory'), 'createConnection']) + + ->set('doctrine.dbal.connection.event_manager', (string) param('doctrine.dbal.connection.event_manager.class')) + ->abstract() + ->args([ + service('service_container'), + ]) + + ->set('doctrine.dbal.connection.configuration', (string) param('doctrine.dbal.configuration.class')) + ->abstract() + + ->set('doctrine', (string) param('doctrine.class')) + ->public() + ->args([ + service('service_container'), + (string) param('doctrine.connections'), + (string) param('doctrine.entity_managers'), + (string) param('doctrine.default_connection'), + (string) param('doctrine.default_entity_manager'), + ]) + ->tag('kernel.reset', ['method' => 'reset']) + + ->set('doctrine.twig.doctrine_extension', DoctrineExtension::class) + ->tag('twig.extension') + + ->set('doctrine.dbal.schema_asset_filter_manager', SchemaAssetsFilterManager::class) + ->abstract() + + ->set('doctrine.dbal.well_known_schema_asset_filter', BlacklistSchemaAssetFilter::class) + ->args([ + [], + ]) + + ->set('doctrine.database_create_command', CreateDatabaseDoctrineCommand::class) + ->args([ + service('doctrine'), + ]) + ->tag('console.command', ['command' => 'doctrine:database:create']) + + ->set('doctrine.database_drop_command', DropDatabaseDoctrineCommand::class) + ->args([ + service('doctrine'), + ]) + ->tag('console.command', ['command' => 'doctrine:database:drop']) + + ->set('doctrine.query_sql_command', RunSqlDoctrineCommand::class) + ->args([ + service(ManagerRegistryAwareConnectionProvider::class)->nullOnInvalid(), + ]) + ->tag('console.command', ['command' => 'doctrine:query:sql']) + + ->set(RunSqlCommand::class) + ->args([ + service(ManagerRegistryAwareConnectionProvider::class)->nullOnInvalid(), + ]) + ->tag('console.command', ['command' => 'dbal:run-sql']) + + ->set(ProfilerController::class) + ->args([ + service('twig'), + service('doctrine'), + service('profiler'), + ]) + ->tag('controller.service_arguments') + + ->set('doctrine.dbal.idle_connection_listener', Listener::class) + ->args([ + service('doctrine.dbal.connection_expiries'), + service('service_container'), + ]) + ->tag('kernel.event_subscriber') + + ->set('doctrine.dbal.default_schema_manager_factory', DefaultSchemaManagerFactory::class) + + ->set('doctrine.dbal.legacy_schema_manager_factory', LegacySchemaManagerFactory::class); +}; diff --git a/backend/vendor/doctrine/doctrine-bundle/config/messenger.php b/backend/vendor/doctrine/doctrine-bundle/config/messenger.php new file mode 100644 index 0000000..54eb429 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/config/messenger.php @@ -0,0 +1,62 @@ +services() + + ->set('messenger.middleware.doctrine_transaction', DoctrineTransactionMiddleware::class) + ->abstract() + ->args([ + service('doctrine'), + ]) + + ->set('messenger.middleware.doctrine_ping_connection', DoctrinePingConnectionMiddleware::class) + ->abstract() + ->args([ + service('doctrine'), + ]) + + ->set('messenger.middleware.doctrine_close_connection', DoctrineCloseConnectionMiddleware::class) + ->abstract() + ->args([ + service('doctrine'), + ]) + + ->set('messenger.middleware.doctrine_open_transaction_logger', DoctrineOpenTransactionLoggerMiddleware::class) + ->abstract() + ->args([ + service('doctrine'), + null, + service('logger'), + ]) + + ->set('doctrine.orm.messenger.event_subscriber.doctrine_clear_entity_manager', DoctrineClearEntityManagerWorkerSubscriber::class) + ->tag('kernel.event_subscriber') + ->args([ + service('doctrine'), + ]) + + ->set('messenger.transport.doctrine.factory', DoctrineTransportFactory::class) + ->tag('messenger.transport_factory') + ->args([ + service('doctrine'), + ]) + + ->set('doctrine.orm.messenger.doctrine_schema_listener', MessengerTransportDoctrineSchemaListener::class) + ->args([ + tagged_iterator('messenger.receiver'), + ]) + ->tag('doctrine.event_listener', ['event' => 'postGenerateSchema']) + ->tag('doctrine.event_listener', ['event' => 'onSchemaCreateTable']); +}; diff --git a/backend/vendor/doctrine/doctrine-bundle/config/middlewares.php b/backend/vendor/doctrine/doctrine-bundle/config/middlewares.php new file mode 100644 index 0000000..a857faa --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/config/middlewares.php @@ -0,0 +1,44 @@ +services() + + ->set('doctrine.dbal.connection_expiries', ArrayObject::class) + + ->set('doctrine.dbal.logging_middleware', Middleware::class) + ->abstract() + ->args([ + service('logger'), + ]) + ->tag('monolog.logger', ['channel' => 'doctrine']) + + ->set('doctrine.debug_data_holder', BacktraceDebugDataHolder::class) + ->args([ + [], + ]) + ->tag('kernel.reset', ['method' => 'reset']) + + ->set('doctrine.dbal.debug_middleware', DebugMiddleware::class) + ->abstract() + ->args([ + service('doctrine.debug_data_holder'), + service('debug.stopwatch')->nullOnInvalid(), + ]) + + ->set('doctrine.dbal.idle_connection_middleware', IdleConnectionMiddleware::class) + ->abstract() + ->args([ + service('doctrine.dbal.connection_expiries'), + null, + ]); +}; diff --git a/backend/vendor/doctrine/doctrine-bundle/config/orm.php b/backend/vendor/doctrine/doctrine-bundle/config/orm.php new file mode 100644 index 0000000..819c10f --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/config/orm.php @@ -0,0 +1,368 @@ +parameters() + ->set('doctrine.orm.configuration.class', Configuration::class) + ->set('doctrine.orm.entity_manager.class', EntityManager::class) + ->set('doctrine.orm.manager_configurator.class', ManagerConfigurator::class) + + // cache (keep classes as strings to avoid legacy class resolution issues) + ->set('doctrine.orm.cache.array.class', 'Doctrine\\Common\\Cache\\ArrayCache') + ->set('doctrine.orm.cache.apc.class', 'Doctrine\\Common\\Cache\\ApcCache') + ->set('doctrine.orm.cache.memcache.class', 'Doctrine\\Common\\Cache\\MemcacheCache') + ->set('doctrine.orm.cache.memcache_host', 'localhost') + ->set('doctrine.orm.cache.memcache_port', 11211) + ->set('doctrine.orm.cache.memcache_instance.class', 'Memcache') + ->set('doctrine.orm.cache.memcached.class', 'Doctrine\\Common\\Cache\\MemcachedCache') + ->set('doctrine.orm.cache.memcached_host', 'localhost') + ->set('doctrine.orm.cache.memcached_port', 11211) + ->set('doctrine.orm.cache.memcached_instance.class', 'Memcached') + ->set('doctrine.orm.cache.redis.class', 'Doctrine\\Common\\Cache\\RedisCache') + ->set('doctrine.orm.cache.redis_host', 'localhost') + ->set('doctrine.orm.cache.redis_port', 6379) + ->set('doctrine.orm.cache.redis_instance.class', 'Redis') + ->set('doctrine.orm.cache.xcache.class', 'Doctrine\\Common\\Cache\\XcacheCache') + ->set('doctrine.orm.cache.wincache.class', 'Doctrine\\Common\\Cache\\WinCacheCache') + ->set('doctrine.orm.cache.zenddata.class', 'Doctrine\\Common\\Cache\\ZendDataCache') + + // metadata drivers + ->set('doctrine.orm.metadata.driver_chain.class', MappingDriverChain::class) + ->set('doctrine.orm.metadata.annotation.class', AnnotationDriver::class) + ->set('doctrine.orm.metadata.xml.class', SimplifiedXmlDriver::class) + ->set('doctrine.orm.metadata.yml.class', SimplifiedYamlDriver::class) + ->set('doctrine.orm.metadata.php.class', PHPDriver::class) + ->set('doctrine.orm.metadata.staticphp.class', StaticPHPDriver::class) + ->set('doctrine.orm.metadata.attribute.class', AttributeDriver::class) + + // cache warmer + ->set('doctrine.orm.proxy_cache_warmer.class', ProxyCacheWarmer::class) + + // form field factory guesser + ->set('form.type_guesser.doctrine.class', DoctrineOrmTypeGuesser::class) + + // validator + ->set('doctrine.orm.validator.unique.class', UniqueEntityValidator::class) + ->set('doctrine.orm.validator_initializer.class', DoctrineInitializer::class) + + // security + ->set('doctrine.orm.security.user.provider.class', EntityUserProvider::class) + + // listeners + ->set('doctrine.orm.listeners.resolve_target_entity.class', ResolveTargetEntityListener::class) + ->set('doctrine.orm.listeners.attach_entity_listeners.class', AttachEntityListenersListener::class) + + // naming strategy + ->set('doctrine.orm.naming_strategy.default.class', DefaultNamingStrategy::class) + ->set('doctrine.orm.naming_strategy.underscore.class', UnderscoreNamingStrategy::class) + + // quote strategy + ->set('doctrine.orm.quote_strategy.default.class', DefaultQuoteStrategy::class) + ->set('doctrine.orm.quote_strategy.ansi.class', AnsiQuoteStrategy::class) + + // typed field mapper + ->set('doctrine.orm.typed_field_mapper.default.class', DefaultTypedFieldMapper::class) + + // entity listener resolver + ->set('doctrine.orm.entity_listener_resolver.class', ContainerEntityListenerResolver::class) + + // second level cache + ->set('doctrine.orm.second_level_cache.default_cache_factory.class', DefaultCacheFactory::class) + ->set('doctrine.orm.second_level_cache.default_region.class', DefaultRegion::class) + ->set('doctrine.orm.second_level_cache.filelock_region.class', FileLockRegion::class) + ->set('doctrine.orm.second_level_cache.logger_chain.class', CacheLoggerChain::class) + ->set('doctrine.orm.second_level_cache.logger_statistics.class', StatisticsCacheLogger::class) + ->set('doctrine.orm.second_level_cache.cache_configuration.class', CacheConfiguration::class) + ->set('doctrine.orm.second_level_cache.regions_configuration.class', RegionsConfiguration::class); + + $container->services() + + ->alias(EntityManagerInterface::class, 'doctrine.orm.entity_manager') + + ->alias('doctrine.orm.metadata.annotation_reader', 'annotation_reader') + + ->set('doctrine.orm.proxy_cache_warmer', (string) param('doctrine.orm.proxy_cache_warmer.class')) + ->tag('kernel.cache_warmer') + ->args([ + service('doctrine'), + ]) + + ->set('form.type_guesser.doctrine', (string) param('form.type_guesser.doctrine.class')) + ->tag('form.type_guesser') + ->args([ + service('doctrine'), + ]) + + ->set('form.type.entity', EntityType::class) + ->tag('form.type', ['alias' => 'entity']) + ->args([ + service('doctrine'), + ]) + + ->set('doctrine.orm.configuration', (string) param('doctrine.orm.configuration.class')) + ->abstract() + + ->set('doctrine.orm.entity_manager.abstract', (string) param('doctrine.orm.entity_manager.class')) + ->abstract() + ->lazy() + + ->set('doctrine.orm.container_repository_factory', ContainerRepositoryFactory::class) + ->args([ + inline_service(ServiceLocator::class)->args([ + [], + ]), + ]) + + ->set('doctrine.orm.manager_configurator.abstract', (string) param('doctrine.orm.manager_configurator.class')) + ->abstract() + ->args([ + [], + [], + ]) + + ->set('doctrine.orm.validator.unique', (string) param('doctrine.orm.validator.unique.class')) + ->tag('validator.constraint_validator', ['alias' => 'doctrine.orm.validator.unique']) + ->args([ + service('doctrine'), + ]) + + ->set('doctrine.orm.validator_initializer', (string) param('doctrine.orm.validator_initializer.class')) + ->tag('validator.initializer') + ->args([ + service('doctrine'), + ]) + + ->set('doctrine.orm.security.user.provider', (string) param('doctrine.orm.security.user.provider.class')) + ->abstract() + ->args([ + service('doctrine'), + ]) + + ->set('doctrine.orm.listeners.resolve_target_entity', (string) param('doctrine.orm.listeners.resolve_target_entity.class')) + + ->set('doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener', DoctrineDbalCacheAdapterSchemaListener::class) + ->args([ + [], + ]) + ->tag('doctrine.event_listener', ['event' => 'postGenerateSchema']) + + ->set('doctrine.orm.listeners.doctrine_token_provider_schema_listener', RememberMeTokenProviderDoctrineSchemaListener::class) + ->args([ + tagged_iterator('security.remember_me_handler'), + ]) + ->tag('doctrine.event_listener', ['event' => 'postGenerateSchema']) + + ->set('doctrine.orm.listeners.pdo_session_handler_schema_listener', PdoSessionHandlerSchemaListener::class) + ->args([ + service('session.handler'), + ]) + ->tag('doctrine.event_listener', ['event' => 'postGenerateSchema']) + + ->set('doctrine.orm.listeners.lock_store_schema_listener', LockStoreSchemaListener::class) + ->args([ + tagged_iterator('lock.store'), + ]) + ->tag('doctrine.event_listener', ['event' => 'postGenerateSchema']) + + ->set('doctrine.orm.naming_strategy.default', (string) param('doctrine.orm.naming_strategy.default.class')) + + ->set('doctrine.orm.naming_strategy.underscore', (string) param('doctrine.orm.naming_strategy.underscore.class')) + + ->set('doctrine.orm.naming_strategy.underscore_number_aware', (string) param('doctrine.orm.naming_strategy.underscore.class')) + ->args([ + CASE_LOWER, + true, + ]) + + ->set('doctrine.orm.quote_strategy.default', (string) param('doctrine.orm.quote_strategy.default.class')) + + ->set('doctrine.orm.quote_strategy.ansi', (string) param('doctrine.orm.quote_strategy.ansi.class')) + + ->set('doctrine.orm.typed_field_mapper.default', (string) param('doctrine.orm.typed_field_mapper.default.class')) + + ->set('doctrine.ulid_generator', 'Symfony\\Bridge\\Doctrine\\IdGenerator\\UlidGenerator') + ->args([ + service('ulid.factory')->ignoreOnInvalid(), + ]) + ->tag('doctrine.id_generator') + + ->set('doctrine.uuid_generator', 'Symfony\\Bridge\\Doctrine\\IdGenerator\\UuidGenerator') + ->args([ + service('uuid.factory')->ignoreOnInvalid(), + ]) + ->tag('doctrine.id_generator') + + ->set('doctrine.orm.command.entity_manager_provider', ManagerRegistryAwareEntityManagerProvider::class) + ->args([ + service('doctrine'), + ]) + + ->set('doctrine.orm.entity_value_resolver', EntityValueResolver::class) + ->args([ + service('doctrine'), + service('doctrine.orm.entity_value_resolver.expression_language')->ignoreOnInvalid(), + ]) + ->tag('controller.argument_value_resolver', ['priority' => 110, 'name' => EntityValueResolver::class]) + + ->set('doctrine.orm.entity_value_resolver.expression_language', ExpressionLanguage::class) + + ->set('doctrine.cache_clear_metadata_command', MetadataCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:cache:clear-metadata']) + + ->set('doctrine.cache_clear_query_cache_command', QueryCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:cache:clear-query']) + + ->set('doctrine.cache_clear_result_command', ResultCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:cache:clear-result']) + + ->set('doctrine.cache_collection_region_command', CollectionRegionCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:cache:clear-collection-region']) + + ->set('doctrine.mapping_convert_command', ConvertMappingCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:mapping:convert']) + + ->set('doctrine.schema_create_command', CreateCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:schema:create']) + + ->set('doctrine.schema_drop_command', DropCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:schema:drop']) + + ->set('doctrine.ensure_production_settings_command', EnsureProductionSettingsCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:ensure-production-settings']) + + ->set('doctrine.clear_entity_region_command', EntityRegionCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:cache:clear-entity-region']) + + ->set('doctrine.mapping_info_command', InfoCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:mapping:info']) + + ->set('doctrine.mapping_describe_command', MappingDescribeCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:mapping:describe']) + + ->set('doctrine.clear_query_region_command', QueryRegionCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:cache:clear-query-region']) + + ->set('doctrine.query_dql_command', RunDqlCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:query:dql']) + + ->set('doctrine.schema_update_command', UpdateCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:schema:update']) + + ->set('doctrine.schema_validate_command', ValidateSchemaCommand::class) + ->args([ + service('doctrine.orm.command.entity_manager_provider'), + ]) + ->tag('console.command', ['command' => 'doctrine:schema:validate']) + + ->set('doctrine.mapping_import_command', ImportMappingDoctrineCommand::class) + ->args([ + service('doctrine'), + (string) param('kernel.bundles'), + ]) + ->tag('console.command', ['command' => 'doctrine:mapping:import']); +}; diff --git a/backend/vendor/doctrine/doctrine-bundle/config/schema/doctrine-1.0.xsd b/backend/vendor/doctrine/doctrine-bundle/config/schema/doctrine-1.0.xsd new file mode 100644 index 0000000..de599e2 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/config/schema/doctrine-1.0.xsd @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Attribute/AsDoctrineListener.php b/backend/vendor/doctrine/doctrine-bundle/src/Attribute/AsDoctrineListener.php new file mode 100644 index 0000000..0c11e03 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Attribute/AsDoctrineListener.php @@ -0,0 +1,21 @@ +phpArrayFile)) { + return false; + } + + $metadataFactory = $this->entityManager->getMetadataFactory(); + if ($metadataFactory->getLoadedMetadata()) { + throw new LogicException('DoctrineMetadataCacheWarmer must load metadata first, check priority of your warmers.'); + } + + $metadataFactory->setCache($arrayAdapter); + $metadataFactory->getAllMetadata(); + + return true; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/CreateDatabaseDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/CreateDatabaseDoctrineCommand.php new file mode 100644 index 0000000..344b53e --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/CreateDatabaseDoctrineCommand.php @@ -0,0 +1,103 @@ +setName('doctrine:database:create') + ->setDescription('Creates the configured database') + ->addOption('connection', 'c', InputOption::VALUE_REQUIRED, 'The connection to use for this command') + ->addOption('if-not-exists', null, InputOption::VALUE_NONE, 'Don\'t trigger an error, when the database already exists') + ->setHelp(<<<'EOT' +The %command.name% command creates the default connections database: + + php %command.full_name% + +You can also optionally specify the name of a connection to create the database for: + + php %command.full_name% --connection=default +EOT); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $connectionName = $input->getOption('connection'); + if (empty($connectionName)) { + $connectionName = $this->getDoctrine()->getDefaultConnectionName(); + } + + $connection = $this->getDoctrineConnection($connectionName); + + $ifNotExists = $input->getOption('if-not-exists'); + + $params = $connection->getParams(); + + if (isset($params['primary'])) { + $params = $params['primary']; + } + + $hasPath = isset($params['path']); + $name = $hasPath ? $params['path'] : ($params['dbname'] ?? false); + if (! $name) { + throw new InvalidArgumentException("Connection does not contain a 'path' or 'dbname' parameter and cannot be created."); + } + + // Need to get rid of _every_ occurrence of dbname from connection configuration as we have already extracted all relevant info from url + /** @psalm-suppress InvalidArrayOffset Need to be compatible with DBAL < 4, which still has `$params['url']` */ + /** @phpstan-ignore unset.offset */ + unset($params['dbname'], $params['path'], $params['url']); + + if ($connection->getDatabasePlatform() instanceof PostgreSQLPlatform) { + /** @phpstan-ignore nullCoalesce.offset (needed for DBAL < 4) */ + $params['dbname'] = $params['default_dbname'] ?? 'postgres'; + } + + $tmpConnection = DriverManager::getConnection($params, $connection->getConfiguration()); + $schemaManager = $tmpConnection->createSchemaManager(); + $shouldNotCreateDatabase = $ifNotExists && in_array($name, $schemaManager->listDatabases()); + + // Only quote if we don't have a path + if (! $hasPath) { + $name = $tmpConnection->getDatabasePlatform()->quoteSingleIdentifier($name); + } + + $error = false; + try { + if ($shouldNotCreateDatabase) { + $output->writeln(sprintf('Database %s for connection named %s already exists. Skipped.', $name, $connectionName)); + } else { + $schemaManager->createDatabase($name); + $output->writeln(sprintf('Created database %s for connection named %s', $name, $connectionName)); + } + } catch (Throwable $e) { + $output->writeln(sprintf('Could not create database %s for connection named %s', $name, $connectionName)); + $output->writeln(sprintf('%s', $e->getMessage())); + $error = true; + } + + $tmpConnection->close(); + + return $error ? 1 : 0; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/DoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/DoctrineCommand.php new file mode 100644 index 0000000..c723a0f --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/DoctrineCommand.php @@ -0,0 +1,85 @@ +setGenerateAnnotations(false); + $entityGenerator->setGenerateStubMethods(true); + $entityGenerator->setRegenerateEntityIfExists(false); + $entityGenerator->setUpdateEntityIfExists(true); + $entityGenerator->setNumSpaces(4); + $entityGenerator->setAnnotationPrefix('ORM\\'); + + return $entityGenerator; + } + + /** + * Get a doctrine entity manager by symfony name. + * + * @param string $name + * @param int|null $shardId + * + * @return EntityManagerInterface + */ + protected function getEntityManager($name, $shardId = null) + { + $manager = $this->getDoctrine()->getManager($name); + + if ($shardId !== null) { + throw new InvalidArgumentException('Shards are not supported anymore using doctrine/dbal >= 3'); + } + + assert($manager instanceof EntityManagerInterface); + + return $manager; + } + + /** + * Get a doctrine dbal connection by symfony name. + * + * @param string $name + * + * @return Connection + */ + protected function getDoctrineConnection($name) + { + return $this->getDoctrine()->getConnection($name); + } + + /** @return ManagerRegistry */ + protected function getDoctrine() + { + return $this->doctrine; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/DropDatabaseDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/DropDatabaseDoctrineCommand.php new file mode 100644 index 0000000..e7c8696 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/DropDatabaseDoctrineCommand.php @@ -0,0 +1,133 @@ +setName('doctrine:database:drop') + ->setDescription('Drops the configured database') + ->addOption('connection', 'c', InputOption::VALUE_REQUIRED, 'The connection to use for this command') + ->addOption('if-exists', null, InputOption::VALUE_NONE, 'Don\'t trigger an error, when the database doesn\'t exist') + ->addOption('force', 'f', InputOption::VALUE_NONE, 'Set this parameter to execute this action') + ->setHelp(<<<'EOT' +The %command.name% command drops the default connections database: + + php %command.full_name% + +The --force parameter has to be used to actually drop the database. + +You can also optionally specify the name of a connection to drop the database for: + + php %command.full_name% --connection=default + +Be careful: All data in a given database will be lost when executing this command. +EOT); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $connectionName = $input->getOption('connection'); + if (empty($connectionName)) { + $connectionName = $this->getDoctrine()->getDefaultConnectionName(); + } + + $connection = $this->getDoctrineConnection($connectionName); + + $ifExists = $input->getOption('if-exists'); + + $params = $connection->getParams(); + + if (isset($params['primary'])) { + $params = $params['primary']; + } + + $name = $params['path'] ?? ($params['dbname'] ?? false); + if (! $name) { + throw new InvalidArgumentException("Connection does not contain a 'path' or 'dbname' parameter and cannot be dropped."); + } + + /* @phpstan-ignore unset.offset (Need to be compatible with DBAL < 4, which still has `$params['url']`) */ + unset($params['dbname'], $params['url']); + + if ($connection->getDatabasePlatform() instanceof PostgreSQLPlatform) { + /** @phpstan-ignore nullCoalesce.offset (for DBAL < 4) */ + $params['dbname'] = $params['default_dbname'] ?? 'postgres'; + } + + if (! $input->getOption('force')) { + $output->writeln('ATTENTION: This operation should not be executed in a production environment.'); + $output->writeln(''); + $output->writeln(sprintf('Would drop the database %s for connection named %s.', $name, $connectionName)); + $output->writeln('Please run the operation with --force to execute'); + $output->writeln('All data will be lost!'); + + return self::RETURN_CODE_NO_FORCE; + } + + // Reopen connection without database name set + // as some vendors do not allow dropping the database connected to. + $connection->close(); + $connection = DriverManager::getConnection($params, $connection->getConfiguration()); + $schemaManager = $connection->createSchemaManager(); + $shouldDropDatabase = ! $ifExists || in_array($name, $schemaManager->listDatabases()); + + // Only quote if we don't have a path + if (! isset($params['path'])) { + $name = $connection->getDatabasePlatform()->quoteSingleIdentifier($name); + } + + try { + if ($shouldDropDatabase) { + if ($schemaManager instanceof SQLiteSchemaManager) { + // dropDatabase() is deprecated for Sqlite + $connection->close(); + if (file_exists($name)) { + unlink($name); + } + } else { + $schemaManager->dropDatabase($name); + } + + $output->writeln(sprintf('Dropped database %s for connection named %s', $name, $connectionName)); + } else { + $output->writeln(sprintf('Database %s for connection named %s doesn\'t exist. Skipped.', $name, $connectionName)); + } + + return 0; + } catch (Throwable $e) { + $output->writeln(sprintf('Could not drop database %s for connection named %s', $name, $connectionName)); + $output->writeln(sprintf('%s', $e->getMessage())); + + return self::RETURN_CODE_NOT_DROP; + } + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/ImportMappingDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/ImportMappingDoctrineCommand.php new file mode 100644 index 0000000..dbfe895 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/ImportMappingDoctrineCommand.php @@ -0,0 +1,168 @@ +setName('doctrine:mapping:import') + ->addArgument('name', InputArgument::REQUIRED, 'The bundle or namespace to import the mapping information to') + ->addArgument('mapping-type', InputArgument::OPTIONAL, 'The mapping type to export the imported mapping information to') + ->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command') + ->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be mapped.') + ->addOption('force', null, InputOption::VALUE_NONE, 'Force to overwrite existing mapping files.') + ->addOption('path', null, InputOption::VALUE_REQUIRED, 'The path where the files would be generated (not used when a bundle is passed).') + ->setDescription('Imports mapping information from an existing database') + ->setHelp(<<<'EOT' +The %command.name% command imports mapping information +from an existing database: + +Generate annotation mappings into the src/ directory using App as the namespace: +php %command.full_name% App\\Entity annotation --path=src/Entity + +Generate xml mappings into the config/doctrine/ directory using App as the namespace: +php %command.full_name% App\\Entity xml --path=config/doctrine + +Generate XML mappings into a bundle: +php %command.full_name% "MyCustomBundle" xml + +You can also optionally specify which entity manager to import from with the +--em option: + +php %command.full_name% "MyCustomBundle" xml --em=default + +If you don't want to map every entity that can be found in the database, use the +--filter option. It will try to match the targeted mapped entity with the +provided pattern string. + +php %command.full_name% "MyCustomBundle" xml --filter=MyMatchedEntity + +Use the --force option, if you want to override existing mapping files: + +php %command.full_name% "MyCustomBundle" xml --force +EOT); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $type = $input->getArgument('mapping-type') ?: 'xml'; + if ($type === 'yaml') { + $type = 'yml'; + } + + $namespaceOrBundle = $input->getArgument('name'); + if (isset($this->bundles[$namespaceOrBundle])) { + /** @phpstan-ignore method.notFound */ + $bundle = $this->getApplication()->getKernel()->getBundle($namespaceOrBundle); + $namespace = $bundle->getNamespace() . '\Entity'; + + $destPath = $bundle->getPath(); + if ($type === 'annotation') { + $destPath .= '/Entity'; + } else { + $destPath .= '/Resources/config/doctrine'; + } + } else { + // assume a namespace has been passed + $namespace = $namespaceOrBundle; + $destPath = $input->getOption('path'); + if ($destPath === null) { + throw new InvalidArgumentException('The --path option is required when passing a namespace (e.g. --path=src). If you intended to pass a bundle name, check your spelling.'); + } + } + + /* @phpstan-ignore class.notFound */ + $cme = new ClassMetadataExporter(); + $exporter = $cme->getExporter($type); + $exporter->setOverwriteExistingFiles($input->getOption('force')); + + if ($type === 'annotation') { + $entityGenerator = $this->getEntityGenerator(); + $exporter->setEntityGenerator($entityGenerator); + } + + $em = $this->getEntityManager($input->getOption('em')); + + /* @phpstan-ignore method.notFound (Available in DBAL < 4) */ + $databaseDriver = new DatabaseDriver($em->getConnection()->getSchemaManager()); + $em->getConfiguration()->setMetadataDriverImpl($databaseDriver); + + $emName = $input->getOption('em'); + $emName = $emName ? $emName : 'default'; + + $cmf = new DisconnectedClassMetadataFactory(); + $cmf->setEntityManager($em); + $metadata = $cmf->getAllMetadata(); + $metadata = MetadataFilter::filter($metadata, $input->getOption('filter')); + if ($metadata) { + $output->writeln(sprintf('Importing mapping information from "%s" entity manager', $emName)); + foreach ($metadata as $class) { + assert($class instanceof ClassMetadata); + $className = $class->name; + $class->name = $namespace . '\\' . $className; + if ($type === 'annotation') { + $path = $destPath . '/' . str_replace('\\', '.', $className) . '.php'; + } else { + $path = $destPath . '/' . str_replace('\\', '.', $className) . '.orm.' . $type; + } + + $output->writeln(sprintf(' > writing %s', $path)); + $code = $exporter->exportClassMetadata($class); + $dir = dirname($path); + if (! is_dir($dir)) { + mkdir($dir, 0775, true); + } + + file_put_contents($path, $code); + chmod($path, 0664); + } + + return 0; + } + + $output->writeln('Database does not have any mapping information.'); + $output->writeln(''); + + return 1; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ClearMetadataCacheDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ClearMetadataCacheDoctrineCommand.php new file mode 100644 index 0000000..e390f17 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ClearMetadataCacheDoctrineCommand.php @@ -0,0 +1,33 @@ +setName('doctrine:cache:clear-metadata') + ->setDescription('Clears all metadata cache for an entity manager'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ClearQueryCacheDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ClearQueryCacheDoctrineCommand.php new file mode 100644 index 0000000..67502b2 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ClearQueryCacheDoctrineCommand.php @@ -0,0 +1,33 @@ +setName('doctrine:cache:clear-query') + ->setDescription('Clears all query cache for an entity manager'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ClearResultCacheDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ClearResultCacheDoctrineCommand.php new file mode 100644 index 0000000..27844f3 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ClearResultCacheDoctrineCommand.php @@ -0,0 +1,33 @@ +setName('doctrine:cache:clear-result') + ->setDescription('Clears result cache for an entity manager'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/CollectionRegionDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/CollectionRegionDoctrineCommand.php new file mode 100644 index 0000000..07059be --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/CollectionRegionDoctrineCommand.php @@ -0,0 +1,32 @@ +setName('doctrine:cache:clear-collection-region'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ConvertMappingDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ConvertMappingDoctrineCommand.php new file mode 100644 index 0000000..7437ae7 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ConvertMappingDoctrineCommand.php @@ -0,0 +1,60 @@ +setName('doctrine:mapping:convert'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } + + /** + * @param string $toType + * @param string $destPath + * + * @return AbstractExporter + */ + protected function getExporter($toType, $destPath) + { + $exporter = parent::getExporter($toType, $destPath); + assert($exporter instanceof AbstractExporter); + if ($exporter instanceof XmlExporter) { + $exporter->setExtension('.orm.xml'); + } elseif ($exporter instanceof YamlExporter) { + $exporter->setExtension('.orm.yml'); + } + + return $exporter; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/CreateSchemaDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/CreateSchemaDoctrineCommand.php new file mode 100644 index 0000000..86e42c6 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/CreateSchemaDoctrineCommand.php @@ -0,0 +1,34 @@ +setName('doctrine:schema:create') + ->setDescription('Executes (or dumps) the SQL needed to generate the database schema'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/DoctrineCommandHelper.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/DoctrineCommandHelper.php new file mode 100644 index 0000000..075bb28 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/DoctrineCommandHelper.php @@ -0,0 +1,45 @@ +getKernel()->getContainer()->get('doctrine')->getManager($emName); + assert($em instanceof EntityManagerInterface); + $helperSet = $application->getHelperSet(); + /* @phpstan-ignore class.notFound, argument.type (ORM < 3 specific) */ + $helperSet->set(new EntityManagerHelper($em), 'em'); + + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/1513', + 'Providing an EntityManager using "%s" is deprecated. Use an instance of "%s" instead.', + /* @phpstan-ignore class.notFound */ + EntityManagerHelper::class, + EntityManagerProvider::class, + ); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/DropSchemaDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/DropSchemaDoctrineCommand.php new file mode 100644 index 0000000..74d54b9 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/DropSchemaDoctrineCommand.php @@ -0,0 +1,33 @@ +setName('doctrine:schema:drop') + ->setDescription('Executes (or dumps) the SQL needed to drop the current database schema'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/EnsureProductionSettingsDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/EnsureProductionSettingsDoctrineCommand.php new file mode 100644 index 0000000..d5b6886 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/EnsureProductionSettingsDoctrineCommand.php @@ -0,0 +1,34 @@ +setName('doctrine:ensure-production-settings'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/EntityRegionCacheDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/EntityRegionCacheDoctrineCommand.php new file mode 100644 index 0000000..26815fe --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/EntityRegionCacheDoctrineCommand.php @@ -0,0 +1,32 @@ +setName('doctrine:cache:clear-entity-region'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/InfoDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/InfoDoctrineCommand.php new file mode 100644 index 0000000..72c4329 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/InfoDoctrineCommand.php @@ -0,0 +1,30 @@ +setName('doctrine:mapping:info'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/OrmProxyCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/OrmProxyCommand.php new file mode 100644 index 0000000..5d89f4c --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/OrmProxyCommand.php @@ -0,0 +1,41 @@ +entityManagerProvider) { + /* @phpstan-ignore argument.type (ORM < 3 specific) */ + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + } + + return parent::execute($input, $output); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/QueryRegionCacheDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/QueryRegionCacheDoctrineCommand.php new file mode 100644 index 0000000..c004c10 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/QueryRegionCacheDoctrineCommand.php @@ -0,0 +1,32 @@ +setName('doctrine:cache:clear-query-region'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/RunDqlDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/RunDqlDoctrineCommand.php new file mode 100644 index 0000000..cde5824 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/RunDqlDoctrineCommand.php @@ -0,0 +1,48 @@ +setName('doctrine:query:dql') + ->setHelp(<<<'EOT' +The %command.name% command executes the given DQL query and +outputs the results: + +php %command.full_name% "SELECT u FROM UserBundle:User u" + +You can also optional specify some additional options like what type of +hydration to use when executing the query: + +php %command.full_name% "SELECT u FROM UserBundle:User u" --hydrate=array + +Additionally you can specify the first result and maximum amount of results to +show: + +php %command.full_name% "SELECT u FROM UserBundle:User u" --first-result=0 --max-result=30 +EOT); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/RunSqlDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/RunSqlDoctrineCommand.php new file mode 100644 index 0000000..d33e75d --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/RunSqlDoctrineCommand.php @@ -0,0 +1,44 @@ +setName('doctrine:query:sql') + ->setHelp(<<<'EOT' +The %command.name% command executes the given SQL query and +outputs the results: + +php %command.full_name% "SELECT * FROM users" +EOT); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/1231', + 'The "%s" (doctrine:query:sql) is deprecated, use dbal:run-sql command instead.', + self::class, + ); + + return parent::execute($input, $output); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/UpdateSchemaDoctrineCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/UpdateSchemaDoctrineCommand.php new file mode 100644 index 0000000..22b9f88 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/UpdateSchemaDoctrineCommand.php @@ -0,0 +1,33 @@ +setName('doctrine:schema:update'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ValidateSchemaCommand.php b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ValidateSchemaCommand.php new file mode 100644 index 0000000..0de59e5 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Command/Proxy/ValidateSchemaCommand.php @@ -0,0 +1,32 @@ +setName('doctrine:schema:validate'); + + if ($this->getDefinition()->hasOption('em')) { + return; + } + + $this->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/ConnectionFactory.php b/backend/vendor/doctrine/doctrine-bundle/src/ConnectionFactory.php new file mode 100644 index 0000000..1245e38 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/ConnectionFactory.php @@ -0,0 +1,299 @@ + 'ibm_db2', + 'mssql' => 'pdo_sqlsrv', + 'mysql' => 'pdo_mysql', + 'mysql2' => 'pdo_mysql', // Amazon RDS, for some weird reason + 'postgres' => 'pdo_pgsql', + 'postgresql' => 'pdo_pgsql', + 'pgsql' => 'pdo_pgsql', + 'sqlite' => 'pdo_sqlite', + 'sqlite3' => 'pdo_sqlite', + ]; + + /** @phpstan-ignore property.onlyWritten */ + private readonly DsnParser $dsnParser; + + private bool $initialized = false; + + /** @param mixed[][] $typesConfig */ + public function __construct( + private readonly array $typesConfig = [], + DsnParser|null $dsnParser = null, + ) { + $this->dsnParser = $dsnParser ?? new DsnParser(self::DEFAULT_SCHEME_MAP); + } + + /** + * Create a connection by name. + * + * @param mixed[] $params + * @param array $mappingTypes + * @phpstan-param Params $params + * + * @return Connection + */ + public function createConnection(array $params, Configuration|null $config = null, EventManager|null $eventManager = null, array $mappingTypes = []) + { + if (! method_exists(Connection::class, 'getEventManager') && $eventManager !== null) { + throw new InvalidArgumentException('Passing an EventManager instance is not supported with DBAL > 3'); + } + + if (! $this->initialized) { + $this->initializeTypes(); + } + + $overriddenOptions = []; + /** @phpstan-ignore isset.offset (We should adjust when https://github.com/phpstan/phpstan/issues/12414 is fixed) */ + if (isset($params['connection_override_options'])) { + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/1342', + 'The "connection_override_options" connection parameter is deprecated', + ); + $overriddenOptions = $params['connection_override_options']; + unset($params['connection_override_options']); + } + + $params = $this->parseDatabaseUrl($params); + + // URL support for PrimaryReplicaConnection + if (isset($params['primary'])) { + $params['primary'] = $this->parseDatabaseUrl($params['primary']); + } + + if (isset($params['replica'])) { + foreach ($params['replica'] as $key => $replicaParams) { + $params['replica'][$key] = $this->parseDatabaseUrl($replicaParams); + } + } + + /** @phpstan-ignore-next-line We should adjust when https://github.com/phpstan/phpstan/issues/12414 is fixed */ + if (! isset($params['pdo']) && (! isset($params['charset']) || $overriddenOptions || isset($params['dbname_suffix']))) { + $wrapperClass = null; + + if (isset($params['wrapperClass'])) { + if (! is_subclass_of($params['wrapperClass'], Connection::class)) { + if (class_exists(InvalidWrapperClass::class)) { + throw InvalidWrapperClass::new($params['wrapperClass']); + } + + /* @phpstan-ignore staticMethod.notFound */ + throw DBALException::invalidWrapperClass($params['wrapperClass']); + } + + $wrapperClass = $params['wrapperClass']; + $params['wrapperClass'] = null; + } + + $connection = DriverManager::getConnection(...array_merge([$params, $config], $eventManager ? [$eventManager] : [])); + $params = $this->addDatabaseSuffix(array_merge($connection->getParams(), $overriddenOptions)); + $driver = $connection->getDriver(); + /** @phpstan-ignore arguments.count (DBAL < 4.x doesn't accept an argument) */ + $platform = $driver->getDatabasePlatform( + ...(class_exists(StaticServerVersionProvider::class) + ? [new StaticServerVersionProvider($params['serverVersion'] ?? $params['primary']['serverVersion'] ?? '')] + : [] + ), + ); + + if (! isset($params['charset'])) { + if ($platform instanceof AbstractMySQLPlatform) { + $params['charset'] = 'utf8mb4'; + + if (isset($params['defaultTableOptions']['collate'])) { + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/dbal/issues/5214', + 'The "collate" default table option is deprecated in favor of "collation" and will be removed in doctrine/doctrine-bundle 3.0. ', + ); + $params['defaultTableOptions']['collation'] = $params['defaultTableOptions']['collate']; + unset($params['defaultTableOptions']['collate']); + } + + if (! isset($params['defaultTableOptions']['collation'])) { + $params['defaultTableOptions']['collation'] = 'utf8mb4_unicode_ci'; + } + } else { + $params['charset'] = 'utf8'; + } + } + + if ($wrapperClass !== null) { + $params['wrapperClass'] = $wrapperClass; + } else { + $wrapperClass = Connection::class; + } + + $connection = new $wrapperClass($params, $driver, $config, $eventManager); + } else { + $connection = DriverManager::getConnection(...array_merge([$params, $config], $eventManager ? [$eventManager] : [])); + } + + if (! empty($mappingTypes)) { + $platform = $this->getDatabasePlatform($connection); + foreach ($mappingTypes as $dbType => $doctrineType) { + $platform->registerDoctrineTypeMapping($dbType, $doctrineType); + } + } + + return $connection; + } + + /** + * Try to get the database platform. + * + * This could fail if types should be registered to an predefined/unused connection + * and the platform version is unknown. + * + * @link https://github.com/doctrine/DoctrineBundle/issues/673 + * + * @throws DBALException + */ + private function getDatabasePlatform(Connection $connection): AbstractPlatform + { + try { + return $connection->getDatabasePlatform(); + } catch (DriverException $driverException) { + $class = class_exists(DBALException::class) ? DBALException::class : ConnectionException::class; + + /* @phpstan-ignore new.interface */ + throw new $class( + 'An exception occurred while establishing a connection to figure out your platform version.' . PHP_EOL . + "You can circumvent this by setting a 'server_version' configuration value" . PHP_EOL . PHP_EOL . + 'For further information have a look at:' . PHP_EOL . + 'https://github.com/doctrine/DoctrineBundle/issues/673', + 0, + $driverException, + ); + } + } + + /** + * initialize the types + */ + private function initializeTypes(): void + { + foreach ($this->typesConfig as $typeName => $typeConfig) { + if (Type::hasType($typeName)) { + Type::overrideType($typeName, $typeConfig['class']); + } else { + Type::addType($typeName, $typeConfig['class']); + } + } + + $this->initialized = true; + } + + /** + * @param array $params + * + * @return array + */ + private function addDatabaseSuffix(array $params): array + { + if (isset($params['dbname']) && isset($params['dbname_suffix'])) { + $params['dbname'] .= $params['dbname_suffix']; + } + + foreach ($params['replica'] ?? [] as $key => $replicaParams) { + if (! isset($replicaParams['dbname'], $replicaParams['dbname_suffix'])) { + continue; + } + + $params['replica'][$key]['dbname'] .= $replicaParams['dbname_suffix']; + } + + if (isset($params['primary']['dbname'], $params['primary']['dbname_suffix'])) { + $params['primary']['dbname'] .= $params['primary']['dbname_suffix']; + } + + return $params; + } + + /** + * Extracts parts from a database URL, if present, and returns an + * updated list of parameters. + * + * @param mixed[] $params The list of parameters. + * @phpstan-param Params $params + * + * @return mixed[] A modified list of parameters with info from a database + * URL extracted into individual parameter parts. + * @phpstan-return Params + * + * @throws DBALException + * + * @phpstan-ignore throws.unusedType + */ + private function parseDatabaseUrl(array $params): array + { + /** @phpstan-ignore isset.offset (for DBAL < 4) */ + if (! isset($params['url'])) { + return $params; + } + + /** @phpstan-ignore deadCode.unreachable */ + try { + $parsedParams = $this->dsnParser->parse($params['url']); + } catch (MalformedDsnException $e) { + throw new MalformedDsnException('Malformed parameter "url".', 0, $e); + } + + if (isset($parsedParams['driver'])) { + // The requested driver from the URL scheme takes precedence + // over the default custom driver from the connection parameters (if any). + unset($params['driverClass']); + } + + $params = array_merge($params, $parsedParams); + + // If a schemeless connection URL is given, we require a default driver or default custom driver + // as connection parameter. + if (! isset($params['driverClass']) && ! isset($params['driver'])) { + if (class_exists(DriverRequired::class)) { + throw DriverRequired::new($params['url']); + } + + throw DBALException::driverRequired($params['url']); + } + + unset($params['url']); + + return $params; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Controller/ProfilerController.php b/backend/vendor/doctrine/doctrine-bundle/src/Controller/ProfilerController.php new file mode 100644 index 0000000..91ef8c4 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Controller/ProfilerController.php @@ -0,0 +1,130 @@ +profiler->disable(); + + $profile = $this->profiler->loadProfile($token); + $collector = $profile->getCollector('db'); + + assert($collector instanceof DoctrineDataCollector); + + $queries = $collector->getQueries(); + + if (! isset($queries[$connectionName][$query])) { + return new Response('This query does not exist.'); + } + + $query = $queries[$connectionName][$query]; + if (! $query['explainable']) { + return new Response('This query cannot be explained.'); + } + + $connection = $this->registry->getConnection($connectionName); + assert($connection instanceof Connection); + try { + $platform = $connection->getDatabasePlatform(); + if ($platform instanceof SQLitePlatform) { + $results = $this->explainSQLitePlatform($connection, $query); + } elseif ($platform instanceof SQLServerPlatform) { + throw new Exception('Explain for SQLServerPlatform is currently not supported. Contributions are welcome.'); + } elseif ($platform instanceof OraclePlatform) { + $results = $this->explainOraclePlatform($connection, $query); + } else { + $results = $this->explainOtherPlatform($connection, $query); + } + } catch (Throwable) { + return new Response('This query cannot be explained.'); + } + + return new Response($this->twig->render('@Doctrine/Collector/explain.html.twig', [ + 'data' => $results, + 'query' => $query, + ])); + } + + /** + * @param mixed[] $query + * + * @return mixed[] + */ + private function explainSQLitePlatform(Connection $connection, array $query): array + { + $params = $query['params']; + + if ($params instanceof Data) { + $params = $params->getValue(true); + } + + return $connection->executeQuery('EXPLAIN QUERY PLAN ' . $query['sql'], $params, $query['types']) + ->fetchAllAssociative(); + } + + /** + * @param mixed[] $query + * + * @return mixed[] + */ + private function explainOtherPlatform(Connection $connection, array $query): array + { + $params = $query['params']; + + if ($params instanceof Data) { + $params = $params->getValue(true); + } + + return $connection->executeQuery('EXPLAIN ' . $query['sql'], $params, $query['types']) + ->fetchAllAssociative(); + } + + /** + * @param mixed[] $query + * + * @return mixed[] + */ + private function explainOraclePlatform(Connection $connection, array $query): array + { + $connection->executeQuery('EXPLAIN PLAN FOR ' . $query['sql']); + + return $connection->executeQuery('SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY())') + ->fetchAllAssociative(); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DataCollector/DoctrineDataCollector.php b/backend/vendor/doctrine/doctrine-bundle/src/DataCollector/DoctrineDataCollector.php new file mode 100644 index 0000000..5f2d92a --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DataCollector/DoctrineDataCollector.php @@ -0,0 +1,334 @@ +, + * runnable: bool, + * types: ?array, + * } + * @phpstan-type DataType = array{ + * caches: array{ + * enabled: bool, + * counts: array<"puts"|"hits"|"misses", int>, + * log_enabled: bool, + * regions: array<"puts"|"hits"|"misses", array>, + * }, + * connections: list, + * entities: array>, + * errors: array>>, + * managers: list, + * queries: array>, + * entityCounts: array> + * } + * @psalm-property DataType $data + */ +class DoctrineDataCollector extends BaseCollector +{ + private int|null $invalidEntityCount = null; + + private int|null $managedEntityCount = null; + + /** + * @var mixed[][]|null + * @phpstan-var ?array> + * @phpstan-ignore property.unusedType + */ + private array|null $groupedQueries = null; + + public function __construct( + private readonly ManagerRegistry $registry, + private readonly bool $shouldValidateSchema = true, + DebugDataHolder|null $debugDataHolder = null, + ) { + parent::__construct($registry, $debugDataHolder); + } + + public function collect(Request $request, Response $response, Throwable|null $exception = null): void + { + parent::collect($request, $response, $exception); + + $errors = []; + $entities = []; + $entityCounts = []; + $caches = [ + 'enabled' => false, + 'log_enabled' => false, + 'counts' => [ + 'puts' => 0, + 'hits' => 0, + 'misses' => 0, + ], + 'regions' => [ + 'puts' => [], + 'hits' => [], + 'misses' => [], + ], + ]; + + foreach ($this->registry->getManagers() as $name => $em) { + assert($em instanceof EntityManagerInterface); + if ($this->shouldValidateSchema) { + $entities[$name] = []; + + $factory = $em->getMetadataFactory(); + $validator = new SchemaValidator($em); + + foreach ($factory->getLoadedMetadata() as $class) { + if (isset($entities[$name][$class->getName()])) { + continue; + } + + $classErrors = $validator->validateClass($class); + $r = $class->getReflectionClass(); + $entities[$name][$class->getName()] = [ + 'class' => $class->getName(), + 'file' => $r->getFileName(), + 'line' => $r->getStartLine(), + ]; + + if (empty($classErrors)) { + continue; + } + + $errors[$name][$class->getName()] = $classErrors; + } + } + + $entityCounts[$name] = []; + foreach ($em->getUnitOfWork()->getIdentityMap() as $className => $entityList) { + $entityCounts[$name][$className] = count($entityList); + } + + // Sort entities by count (in descending order) + arsort($entityCounts[$name]); + + $emConfig = $em->getConfiguration(); + $slcEnabled = $emConfig->isSecondLevelCacheEnabled(); + + if (! $slcEnabled) { + continue; + } + + $caches['enabled'] = true; + + $cacheConfiguration = $emConfig->getSecondLevelCacheConfiguration(); + assert($cacheConfiguration instanceof CacheConfiguration); + $cacheLoggerChain = $cacheConfiguration->getCacheLogger(); + assert($cacheLoggerChain instanceof CacheLoggerChain || $cacheLoggerChain === null); + + if (! $cacheLoggerChain || ! $cacheLoggerChain->getLogger('statistics')) { + continue; + } + + $cacheLoggerStats = $cacheLoggerChain->getLogger('statistics'); + assert($cacheLoggerStats instanceof StatisticsCacheLogger); + $caches['log_enabled'] = true; + + $caches['counts']['puts'] += $cacheLoggerStats->getPutCount(); + $caches['counts']['hits'] += $cacheLoggerStats->getHitCount(); + $caches['counts']['misses'] += $cacheLoggerStats->getMissCount(); + + foreach ($cacheLoggerStats->getRegionsPut() as $key => $value) { + if (! isset($caches['regions']['puts'][$key])) { + $caches['regions']['puts'][$key] = 0; + } + + $caches['regions']['puts'][$key] += $value; + } + + foreach ($cacheLoggerStats->getRegionsHit() as $key => $value) { + if (! isset($caches['regions']['hits'][$key])) { + $caches['regions']['hits'][$key] = 0; + } + + $caches['regions']['hits'][$key] += $value; + } + + foreach ($cacheLoggerStats->getRegionsMiss() as $key => $value) { + if (! isset($caches['regions']['misses'][$key])) { + $caches['regions']['misses'][$key] = 0; + } + + $caches['regions']['misses'][$key] += $value; + } + } + + $this->data['entities'] = $entities; + $this->data['errors'] = $errors; + $this->data['caches'] = $caches; + $this->data['entityCounts'] = $entityCounts; + $this->groupedQueries = null; + } + + /** @return array> */ + public function getEntities() + { + return $this->data['entities']; + } + + /** @return array>> */ + public function getMappingErrors() + { + return $this->data['errors']; + } + + /** @return int */ + public function getCacheHitsCount() + { + return $this->data['caches']['counts']['hits']; + } + + /** @return int */ + public function getCachePutsCount() + { + return $this->data['caches']['counts']['puts']; + } + + /** @return int */ + public function getCacheMissesCount() + { + return $this->data['caches']['counts']['misses']; + } + + /** @return bool */ + public function getCacheEnabled() + { + return $this->data['caches']['enabled']; + } + + /** + * @return array> + * @phpstan-return array<"puts"|"hits"|"misses", array> + */ + public function getCacheRegions() + { + return $this->data['caches']['regions']; + } + + /** @return array */ + public function getCacheCounts() + { + return $this->data['caches']['counts']; + } + + /** @return int */ + public function getInvalidEntityCount() + { + return $this->invalidEntityCount ??= array_sum(array_map('count', $this->data['errors'])); + } + + public function getManagedEntityCount(): int + { + if ($this->managedEntityCount === null) { + $total = 0; + foreach ($this->data['entityCounts'] as $entities) { + $total += array_sum($entities); + } + + $this->managedEntityCount = $total; + } + + return $this->managedEntityCount; + } + + /** @return array> */ + public function getManagedEntityCountByClass(): array + { + return $this->data['entityCounts']; + } + + /** + * @return string[][] + * @phpstan-return array> + */ + public function getGroupedQueries() + { + if ($this->groupedQueries !== null) { + return $this->groupedQueries; + } + + $this->groupedQueries = []; + $totalExecutionMS = 0; + foreach ($this->data['queries'] as $connection => $queries) { + $connectionGroupedQueries = []; + foreach ($queries as $i => $query) { + $key = $query['sql']; + if (! isset($connectionGroupedQueries[$key])) { + $connectionGroupedQueries[$key] = $query; + $connectionGroupedQueries[$key]['executionMS'] = 0; + $connectionGroupedQueries[$key]['count'] = 0; + $connectionGroupedQueries[$key]['index'] = $i; // "Explain query" relies on query index in 'queries'. + } + + $connectionGroupedQueries[$key]['executionMS'] += $query['executionMS']; + $connectionGroupedQueries[$key]['count']++; + $totalExecutionMS += $query['executionMS']; + } + + usort($connectionGroupedQueries, static function ($a, $b) { + if ($a['executionMS'] === $b['executionMS']) { + return 0; + } + + return $a['executionMS'] < $b['executionMS'] ? 1 : -1; + }); + $this->groupedQueries[$connection] = $connectionGroupedQueries; + } + + foreach ($this->groupedQueries as $connection => $queries) { + foreach ($queries as $i => $query) { + $this->groupedQueries[$connection][$i]['executionPercent'] = + $this->executionTimePercentage($query['executionMS'], $totalExecutionMS); + } + } + + return $this->groupedQueries; + } + + private function executionTimePercentage(float $executionTimeMS, float $totalExecutionTimeMS): float + { + if (! $totalExecutionTimeMS) { + return 0; + } + + return $executionTimeMS / $totalExecutionTimeMS * 100; + } + + /** @return int */ + public function getGroupedQueryCount() + { + $count = 0; + foreach ($this->getGroupedQueries() as $connectionGroupedQueries) { + $count += count($connectionGroupedQueries); + } + + return $count; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Dbal/BlacklistSchemaAssetFilter.php b/backend/vendor/doctrine/doctrine-bundle/src/Dbal/BlacklistSchemaAssetFilter.php new file mode 100644 index 0000000..5cac2ea --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Dbal/BlacklistSchemaAssetFilter.php @@ -0,0 +1,29 @@ +getName(); + } + + return ! in_array($assetName, $this->blacklist, true); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Dbal/ManagerRegistryAwareConnectionProvider.php b/backend/vendor/doctrine/doctrine-bundle/src/Dbal/ManagerRegistryAwareConnectionProvider.php new file mode 100644 index 0000000..816f401 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Dbal/ManagerRegistryAwareConnectionProvider.php @@ -0,0 +1,27 @@ +managerRegistry->getConnection(); + } + + public function getConnection(string $name): Connection + { + return $this->managerRegistry->getConnection($name); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Dbal/RegexSchemaAssetFilter.php b/backend/vendor/doctrine/doctrine-bundle/src/Dbal/RegexSchemaAssetFilter.php new file mode 100644 index 0000000..6b6f20f --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Dbal/RegexSchemaAssetFilter.php @@ -0,0 +1,26 @@ +getName(); + } + + return (bool) preg_match($this->filterExpression, $assetName); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Dbal/SchemaAssetsFilterManager.php b/backend/vendor/doctrine/doctrine-bundle/src/Dbal/SchemaAssetsFilterManager.php new file mode 100644 index 0000000..586f03a --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Dbal/SchemaAssetsFilterManager.php @@ -0,0 +1,31 @@ +schemaAssetFilters as $schemaAssetFilter) { + if ($schemaAssetFilter($assetName) === false) { + return false; + } + } + + return true; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/CacheCompatibilityPass.php b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/CacheCompatibilityPass.php new file mode 100644 index 0000000..46f15dc --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/CacheCompatibilityPass.php @@ -0,0 +1,127 @@ +findTaggedServiceIds(self::CONFIGURATION_TAG)) as $id) { + foreach ($container->getDefinition($id)->getMethodCalls() as $methodCall) { + if ($methodCall[0] === 'setSecondLevelCacheConfiguration') { + $this->updateSecondLevelCache($container, $methodCall[1][0]); + continue; + } + + if (! in_array($methodCall[0], self::CACHE_METHODS_PSR6_SUPPORT, true)) { + continue; + } + + $aliasId = (string) $methodCall[1][0]; + $definitionId = (string) $container->getAlias($aliasId); + + $this->wrapIfNecessary($container, $aliasId, $definitionId); + } + } + } + + private function updateSecondLevelCache(ContainerBuilder $container, Definition $slcConfigDefinition): void + { + foreach ($slcConfigDefinition->getMethodCalls() as $methodCall) { + if ($methodCall[0] !== 'setCacheFactory') { + continue; + } + + $factoryDefinition = $methodCall[1][0]; + assert($factoryDefinition instanceof Definition); + $aliasId = (string) $factoryDefinition->getArgument(1); + $this->wrapIfNecessary($container, $aliasId, (string) $container->getAlias($aliasId)); + foreach ($factoryDefinition->getMethodCalls() as $factoryMethodCall) { + if ($factoryMethodCall[0] !== 'setRegion') { + continue; + } + + $regionDefinition = $container->getDefinition((string) $factoryMethodCall[1][0]); + + // Get inner service for FileLock + if ($regionDefinition->getClass() === '%doctrine.orm.second_level_cache.filelock_region.class%') { + $regionDefinition = $container->getDefinition((string) $regionDefinition->getArgument(0)); + } + + // We don't know how to adjust custom region classes + if ($regionDefinition->getClass() !== '%doctrine.orm.second_level_cache.default_region.class%') { + continue; + } + + $driverId = (string) $regionDefinition->getArgument(1); + if (! $container->hasAlias($driverId)) { + continue; + } + + $this->wrapIfNecessary($container, $driverId, (string) $container->getAlias($driverId)); + } + + break; + } + } + + private function createCompatibilityLayerDefinition(ContainerBuilder $container, string $definitionId): Definition|null + { + $definition = $container->getDefinition($definitionId); + + while (! $definition->getClass() && $definition instanceof ChildDefinition) { + $definition = $container->findDefinition($definition->getParent()); + } + + if (is_a($definition->getClass(), CacheItemPoolInterface::class, true)) { + return null; + } + + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/1365', + 'Configuring doctrine/cache is deprecated. Please update the cache service "%s" to use a PSR-6 cache.', + $definitionId, + ); + + return (new Definition(CacheItemPoolInterface::class)) + ->setFactory([CacheAdapter::class, 'wrap']) + ->addArgument(new Reference($definitionId)); + } + + private function wrapIfNecessary(ContainerBuilder $container, string $aliasId, string $definitionId): void + { + $compatibilityLayer = $this->createCompatibilityLayerDefinition($container, $definitionId); + if ($compatibilityLayer === null) { + return; + } + + $compatibilityLayerId = $definitionId . '.compatibility_layer'; + $container->setAlias($aliasId, $compatibilityLayerId); + $container->setDefinition($compatibilityLayerId, $compatibilityLayer); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/CacheSchemaSubscriberPass.php b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/CacheSchemaSubscriberPass.php new file mode 100644 index 0000000..b29ed79 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/CacheSchemaSubscriberPass.php @@ -0,0 +1,45 @@ +hasDefinition('doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener')) { + return; + } + + $subscriber = $container->getDefinition('doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener'); + + $cacheAdaptersReferences = []; + foreach ($container->getDefinitions() as $id => $definition) { + if ($definition->isAbstract() || $definition->isSynthetic()) { + continue; + } + + if ($definition->getClass() !== DoctrineDbalAdapter::class) { + continue; + } + + $cacheAdaptersReferences[] = new Reference($id); + } + + $subscriber->replaceArgument(0, $cacheAdaptersReferences); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/DbalSchemaFilterPass.php b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/DbalSchemaFilterPass.php new file mode 100644 index 0000000..5ee4199 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/DbalSchemaFilterPass.php @@ -0,0 +1,55 @@ +findTaggedServiceIds('doctrine.dbal.schema_filter'); + + $connectionFilters = []; + foreach ($filters as $id => $tagAttributes) { + foreach ($tagAttributes as $attributes) { + $name = $attributes['connection'] ?? $container->getParameter('doctrine.default_connection'); + + if (! isset($connectionFilters[$name])) { + $connectionFilters[$name] = []; + } + + $connectionFilters[$name][] = new Reference($id); + } + } + + foreach ($connectionFilters as $name => $references) { + $configurationId = sprintf('doctrine.dbal.%s_connection.configuration', $name); + + if (! $container->hasDefinition($configurationId)) { + continue; + } + + $definition = new ChildDefinition('doctrine.dbal.schema_asset_filter_manager'); + $definition->setArgument(0, $references); + + $id = sprintf('doctrine.dbal.%s_schema_asset_filter_manager', $name); + $container->setDefinition($id, $definition); + $container->findDefinition($configurationId) + ->addMethodCall('setSchemaAssetsFilter', [new Reference($id)]); + } + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php new file mode 100644 index 0000000..4ec6bd3 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php @@ -0,0 +1,205 @@ +findTaggedServiceIds('doctrine.orm.entity_listener', true) as $id => $tags) { + foreach ($tags as $attributes) { + $serviceTags[] = [ + 'serviceId' => $id, + 'attributes' => $attributes, + ]; + } + } + + usort($serviceTags, static fn (array $a, array $b) => ($b['attributes']['priority'] ?? 0) <=> ($a['attributes']['priority'] ?? 0)); + + foreach ($serviceTags as $tag) { + $id = $tag['serviceId']; + $attributes = $tag['attributes']; + $name = $attributes['entity_manager'] ?? $container->getParameter('doctrine.default_entity_manager'); + $entityManager = sprintf('doctrine.orm.%s_entity_manager', $name); + + if (! $container->hasDefinition($entityManager)) { + continue; + } + + $resolverId = sprintf('doctrine.orm.%s_entity_listener_resolver', $name); + + if (! $container->has($resolverId)) { + continue; + } + + $resolver = $container->findDefinition($resolverId); + $resolver->setPublic(true); + + if (isset($attributes['entity'])) { + $this->attachToListener($container, $name, $this->getConcreteDefinitionClass($container->findDefinition($id), $container, $id), $attributes); + } + + $resolverClass = $this->getResolverClass($resolver, $container, $resolverId); + $resolverSupportsLazyListeners = is_a($resolverClass, EntityListenerServiceResolver::class, true); + + $lazyByAttribute = isset($attributes['lazy']) && $attributes['lazy']; + if ($lazyByAttribute && ! $resolverSupportsLazyListeners) { + throw new InvalidArgumentException(sprintf( + 'Lazy-loaded entity listeners can only be resolved by a resolver implementing %s.', + EntityListenerServiceResolver::class, + )); + } + + if (! isset($attributes['lazy']) && $resolverSupportsLazyListeners || $lazyByAttribute) { + $listener = $container->findDefinition($id); + + $resolver->addMethodCall('registerService', [$this->getConcreteDefinitionClass($listener, $container, $id), $id]); + + // if the resolver uses the default class we will use a service locator for all listeners + if ($resolverClass === ContainerEntityListenerResolver::class) { + if (! isset($lazyServiceReferencesByResolver[$resolverId])) { + $lazyServiceReferencesByResolver[$resolverId] = []; + } + + $lazyServiceReferencesByResolver[$resolverId][$id] = new Reference($id); + } else { + $listener->setPublic(true); + } + } else { + $resolver->addMethodCall('register', [new Reference($id)]); + } + } + + foreach ($lazyServiceReferencesByResolver as $resolverId => $listenerReferences) { + $container->findDefinition($resolverId)->setArgument(0, ServiceLocatorTagPass::register($container, $listenerReferences)); + } + } + + /** @param array{entity: class-string, event?: ?string, method?: string} $attributes */ + private function attachToListener(ContainerBuilder $container, string $name, string $class, array $attributes): void + { + $listenerId = sprintf('doctrine.orm.%s_listeners.attach_entity_listeners', $name); + + if (! $container->has($listenerId)) { + return; + } + + $args = [ + $attributes['entity'], + $class, + $attributes['event'] ?? null, + ]; + + if (isset($attributes['method'])) { + $args[] = $attributes['method']; + } elseif (isset($attributes['event']) && ! method_exists($class, $attributes['event']) && method_exists($class, '__invoke')) { + $args[] = '__invoke'; + } + + $container->findDefinition($listenerId)->addMethodCall('addEntityListener', $args); + } + + private function getResolverClass(Definition $resolver, ContainerBuilder $container, string $id): string + { + $resolverClass = $this->getConcreteDefinitionClass($resolver, $container, $id); + + if (substr($resolverClass, 0, 1) === '%') { + // resolve container parameter first + $resolverClass = $container->getParameterBag()->resolveValue($resolverClass); + } + + return $resolverClass; + } + + private function getConcreteDefinitionClass(Definition $definition, ContainerBuilder $container, string $id): string + { + $class = $definition->getClass(); + if ($class) { + return $class; + } + + while ($definition instanceof ChildDefinition) { + $definition = $container->findDefinition($definition->getParent()); + + $class = $definition->getClass(); + if ($class) { + return $class; + } + } + + throw new InvalidArgumentException(sprintf('The service "%s" must define its class.', $id)); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/IdGeneratorPass.php b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/IdGeneratorPass.php new file mode 100644 index 0000000..22cb270 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/IdGeneratorPass.php @@ -0,0 +1,80 @@ +findTaggedServiceIds(self::ID_GENERATOR_TAG)); + + // when ORM is not enabled + if (! $container->hasDefinition('doctrine.orm.configuration') || ! $generatorIds) { + return; + } + + $generatorRefs = array_map(static fn (string $id): Reference => new Reference($id), $generatorIds); + + $ref = ServiceLocatorTagPass::register($container, array_combine($generatorIds, $generatorRefs)); + $container->setAlias('doctrine.id_generator_locator', new Alias((string) $ref, false)); + + foreach ($container->findTaggedServiceIds(self::CONFIGURATION_TAG) as $id => $tags) { + $configurationDef = $container->getDefinition($id); + $methodCalls = $configurationDef->getMethodCalls(); + $metadataDriverImpl = null; + + foreach ($methodCalls as $i => [$method, $arguments]) { + if ($method === 'setMetadataDriverImpl') { + $metadataDriverImpl = (string) $arguments[0]; + } + + if ($method !== 'setClassMetadataFactoryName') { + continue; + } + + if ($arguments[0] !== ORMClassMetadataFactory::class && $arguments[0] !== ClassMetadataFactory::class) { + $class = $container->getReflectionClass($arguments[0]); + + if ($class && $class->isSubclassOf(ClassMetadataFactory::class)) { + break; + } + + continue 2; + } + + $methodCalls[$i] = ['setClassMetadataFactoryName', [ClassMetadataFactory::class]]; + } + + if ($metadataDriverImpl === null) { + continue; + } + + $configurationDef->setMethodCalls($methodCalls); + $container->register('.' . $metadataDriverImpl, MappingDriver::class) + ->setDecoratedService($metadataDriverImpl) + ->setArguments([ + new Reference(sprintf('.%s.inner', $metadataDriverImpl)), + new Reference('doctrine.id_generator_locator'), + ]); + } + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/MiddlewaresPass.php b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/MiddlewaresPass.php new file mode 100644 index 0000000..4b5da35 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/MiddlewaresPass.php @@ -0,0 +1,90 @@ +hasParameter('doctrine.connections')) { + return; + } + + $middlewareAbstractDefs = []; + $middlewareConnections = []; + $middlewarePriorities = []; + foreach ($container->findTaggedServiceIds('doctrine.middleware') as $id => $tags) { + $middlewareAbstractDefs[$id] = $container->getDefinition($id); + // When a def has doctrine.middleware tags with connection attributes equal to connection names + // registration of this middleware is limited to the connections with these names + foreach ($tags as $tag) { + if (! isset($tag['connection'])) { + if (isset($tag['priority']) && ! isset($middlewarePriorities[$id])) { + $middlewarePriorities[$id] = $tag['priority']; + } + + continue; + } + + $middlewareConnections[$id][$tag['connection']] = $tag['priority'] ?? null; + } + } + + foreach (array_keys($container->getParameter('doctrine.connections')) as $name) { + $middlewareRefs = []; + $i = 0; + foreach ($middlewareAbstractDefs as $id => $abstractDef) { + if (isset($middlewareConnections[$id]) && ! array_key_exists($name, $middlewareConnections[$id])) { + continue; + } + + $childDef = $container->setDefinition( + $childId = sprintf('%s.%s', $id, $name), + (new ChildDefinition($id)) + ->setTags($abstractDef->getTags())->clearTag('doctrine.middleware') + ->setAutoconfigured($abstractDef->isAutoconfigured()) + ->setAutowired($abstractDef->isAutowired()), + ); + $middlewareRefs[$id] = [new Reference($childId), ++$i]; + + if (! is_subclass_of($abstractDef->getClass(), ConnectionNameAwareInterface::class)) { + continue; + } + + $childDef->addMethodCall('setConnectionName', [$name]); + } + + $middlewareRefs = array_map( + static fn (string $id, array $ref) => [ + $middlewareConnections[$id][$name] ?? $middlewarePriorities[$id] ?? 0, + $ref[1], + $ref[0], + ], + array_keys($middlewareRefs), + array_values($middlewareRefs), + ); + usort($middlewareRefs, static fn (array $a, array $b): int => $b[0] <=> $a[0] ?: $a[1] <=> $b[1]); + $middlewareRefs = array_map(static fn (array $value): Reference => $value[2], $middlewareRefs); + + $container + ->getDefinition(sprintf('doctrine.dbal.%s_connection.configuration', $name)) + ->addMethodCall('setMiddlewares', [$middlewareRefs]); + } + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/RemoveLoggingMiddlewarePass.php b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/RemoveLoggingMiddlewarePass.php new file mode 100644 index 0000000..920e785 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/RemoveLoggingMiddlewarePass.php @@ -0,0 +1,21 @@ +has('logger')) { + return; + } + + $container->removeDefinition('doctrine.dbal.logging_middleware'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/RemoveProfilerControllerPass.php b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/RemoveProfilerControllerPass.php new file mode 100644 index 0000000..acecf52 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/RemoveProfilerControllerPass.php @@ -0,0 +1,22 @@ +has('twig') && $container->has('profiler')) { + return; + } + + $container->removeDefinition(ProfilerController::class); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/ServiceRepositoryCompilerPass.php b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/ServiceRepositoryCompilerPass.php new file mode 100644 index 0000000..857d7e5 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/ServiceRepositoryCompilerPass.php @@ -0,0 +1,35 @@ +hasDefinition('doctrine.orm.container_repository_factory')) { + return; + } + + $locatorDef = $container->getDefinition('doctrine.orm.container_repository_factory'); + + $repoServiceIds = array_keys($container->findTaggedServiceIds(self::REPOSITORY_SERVICE_TAG)); + $repoReferences = array_map(static fn (string $id): Reference => new Reference($id), $repoServiceIds); + + $ref = ServiceLocatorTagPass::register($container, array_combine($repoServiceIds, $repoReferences)); + $locatorDef->replaceArgument(0, $ref); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Configuration.php b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Configuration.php new file mode 100644 index 0000000..196c8e9 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Configuration.php @@ -0,0 +1,922 @@ +getRootNode(); + + $this->addDbalSection($rootNode); + $this->addOrmSection($rootNode); + + return $treeBuilder; + } + + /** + * Add DBAL section to configuration tree + */ + private function addDbalSection(ArrayNodeDefinition $node): void + { + // Key that should not be rewritten to the connection config + $excludedKeys = ['default_connection' => true, 'driver_schemes' => true, 'driver_scheme' => true, 'types' => true, 'type' => true]; + + $node + ->children() + ->arrayNode('dbal') + ->beforeNormalization() + ->ifTrue(static function ($v) use ($excludedKeys) { + if (! is_array($v)) { + return false; + } + + if (array_key_exists('connections', $v) || array_key_exists('connection', $v)) { + return false; + } + + // Is there actually anything to use once excluded keys are considered? + return (bool) array_diff_key($v, $excludedKeys); + }) + ->then(static function ($v) use ($excludedKeys) { + $connection = []; + foreach ($v as $key => $value) { + if (isset($excludedKeys[$key])) { + continue; + } + + $connection[$key] = $v[$key]; + unset($v[$key]); + } + + $v['connections'] = [($v['default_connection'] ?? 'default') => $connection]; + + return $v; + }) + ->end() + ->children() + ->scalarNode('default_connection')->end() + ->end() + ->fixXmlConfig('type') + ->children() + ->arrayNode('types') + ->useAttributeAsKey('name') + ->prototype('array') + ->beforeNormalization() + ->ifString() + ->then(static fn ($v) => ['class' => $v]) + ->end() + ->children() + ->scalarNode('class')->isRequired()->end() + ->booleanNode('commented') + ->setDeprecated( + 'doctrine/doctrine-bundle', + '2.0', + 'The doctrine-bundle type commenting features were removed; the corresponding config parameter was deprecated in 2.0 and will be dropped in 3.0.', + ) + ->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('driver_scheme') + ->children() + ->arrayNode('driver_schemes') + ->useAttributeAsKey('scheme') + ->normalizeKeys(false) + ->scalarPrototype()->end() + ->info('Defines a driver for given URL schemes. Schemes being driver names cannot be redefined. However, other default schemes can be overwritten.') + ->validate() + ->always() + ->then(static function (array $value) { + $unsupportedSchemes = []; + + foreach ($value as $scheme => $driver) { + if (! in_array($scheme, ['pdo-mysql', 'pdo-sqlite', 'pdo-pgsql', 'pdo-oci', 'oci8', 'ibm-db2', 'pdo-sqlsrv', 'mysqli', 'pgsql', 'sqlsrv', 'sqlite3'], true)) { + continue; + } + + $unsupportedSchemes[] = $scheme; + } + + if ($unsupportedSchemes) { + throw new InvalidArgumentException(sprintf('Registering a scheme with the name of one of the official drivers is forbidden, as those are defined in DBAL itself. The following schemes are forbidden: %s', implode(', ', $unsupportedSchemes))); + } + + return $value; + }) + ->end() + ->end() + ->end() + ->fixXmlConfig('connection') + ->append($this->getDbalConnectionsNode()) + ->end(); + } + + /** + * Return the dbal connections node + */ + private function getDbalConnectionsNode(): ArrayNodeDefinition + { + $treeBuilder = new TreeBuilder('connections'); + $node = $treeBuilder->getRootNode(); + + $connectionNode = $node + ->requiresAtLeastOneElement() + ->useAttributeAsKey('name') + ->prototype('array'); + + $this->configureDbalDriverNode($connectionNode); + + $collationKey = defined('Doctrine\DBAL\Connection::PARAM_ASCII_STR_ARRAY') + ? 'collate' + : 'collation'; + + $connectionNode + ->fixXmlConfig('option') + ->fixXmlConfig('mapping_type') + ->fixXmlConfig('slave') + ->fixXmlConfig('replica') + ->fixXmlConfig('default_table_option') + ->children() + ->scalarNode('driver')->defaultValue('pdo_mysql')->end() + ->scalarNode('platform_service') + ->setDeprecated( + 'doctrine/doctrine-bundle', + '2.9', + 'The "platform_service" configuration key is deprecated since doctrine-bundle 2.9. DBAL 4 will not support setting a custom platform via connection params anymore.', + ) + ->end() + ->booleanNode('auto_commit')->end() + ->scalarNode('schema_filter')->end() + ->booleanNode('logging')->defaultValue($this->debug)->end() + ->booleanNode('profiling')->defaultValue($this->debug)->end() + ->booleanNode('profiling_collect_backtrace') + ->defaultValue(false) + ->info('Enables collecting backtraces when profiling is enabled') + ->end() + ->booleanNode('profiling_collect_schema_errors') + ->defaultValue(true) + ->info('Enables collecting schema errors when profiling is enabled') + ->end() + ->booleanNode('disable_type_comments') + ->beforeNormalization() + ->ifTrue(static fn ($v): bool => isset($v) && ! method_exists(Connection::class, 'getEventManager')) + ->then(static function ($v) { + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/2048', + 'The "disable_type_comments" configuration key is deprecated when using DBAL 4 and will be removed in DoctrineBundle 3.0.', + ); + + return $v; + }) + ->end() + ->end() + ->scalarNode('server_version')->end() + ->integerNode('idle_connection_ttl')->defaultValue(600)->end() + ->scalarNode('driver_class')->end() + ->scalarNode('wrapper_class')->end() + ->booleanNode('keep_slave') + ->setDeprecated( + 'doctrine/doctrine-bundle', + '2.2', + 'The "keep_slave" configuration key is deprecated since doctrine-bundle 2.2. Use the "keep_replica" configuration key instead.', + ) + ->end() + ->booleanNode('keep_replica')->end() + ->arrayNode('options') + ->useAttributeAsKey('key') + ->prototype('variable')->end() + ->end() + ->arrayNode('mapping_types') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->arrayNode('default_table_options') + ->info(sprintf( + "This option is used by the schema-tool and affects generated SQL. Possible keys include 'charset','%s', and 'engine'.", + $collationKey, + )) + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->scalarNode('schema_manager_factory') + ->cannotBeEmpty() + ->defaultValue($this->getDefaultSchemaManagerFactory()) + ->end() + ->scalarNode('result_cache')->end() + ->end(); + + // dbal < 2.11 + $slaveNode = $connectionNode + ->children() + ->arrayNode('slaves') + ->setDeprecated( + 'doctrine/doctrine-bundle', + '2.2', + 'The "slaves" configuration key will be renamed to "replicas" in doctrine-bundle 3.0. "slaves" is deprecated since doctrine-bundle 2.2.', + ) + ->useAttributeAsKey('name') + ->prototype('array'); + $this->configureDbalDriverNode($slaveNode); + + // dbal >= 2.11 + $replicaNode = $connectionNode + ->children() + ->arrayNode('replicas') + ->useAttributeAsKey('name') + ->prototype('array'); + $this->configureDbalDriverNode($replicaNode); + + return $node; + } + + /** + * Adds config keys related to params processed by the DBAL drivers + * + * These keys are available for replica configurations too. + */ + private function configureDbalDriverNode(ArrayNodeDefinition $node): void + { + $node + ->validate() + ->always(static function (array $values) { + if (! isset($values['url'])) { + return $values; + } + + $urlConflictingOptions = ['host' => true, 'port' => true, 'user' => true, 'password' => true, 'path' => true, 'dbname' => true, 'unix_socket' => true, 'memory' => true]; + $urlConflictingValues = array_keys(array_intersect_key($values, $urlConflictingOptions)); + + if ($urlConflictingValues) { + $tail = count($urlConflictingValues) > 1 ? sprintf('or "%s" options', array_pop($urlConflictingValues)) : 'option'; + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/1342', + 'Setting the "doctrine.dbal.%s" %s while the "url" one is defined is deprecated', + implode('", "', $urlConflictingValues), + $tail, + ); + } + + return $values; + }) + ->end() + ->children() + ->scalarNode('url')->info('A URL with connection information; any parameter value parsed from this string will override explicitly set parameters')->end() + ->scalarNode('dbname')->end() + ->scalarNode('host')->info('Defaults to "localhost" at runtime.')->end() + ->scalarNode('port')->info('Defaults to null at runtime.')->end() + ->scalarNode('user')->info('Defaults to "root" at runtime.')->end() + ->scalarNode('password')->info('Defaults to null at runtime.')->end() + ->booleanNode('override_url')->setDeprecated( + 'doctrine/doctrine-bundle', + '2.4', + 'The "doctrine.dbal.override_url" configuration key is deprecated.', + )->end() + ->scalarNode('dbname_suffix')->info('Adds the given suffix to the configured database name, this option has no effects for the SQLite platform')->end() + ->scalarNode('application_name')->end() + ->scalarNode('charset')->end() + ->scalarNode('path')->end() + ->booleanNode('memory')->end() + ->scalarNode('unix_socket')->info('The unix socket to use for MySQL')->end() + ->booleanNode('persistent')->info('True to use as persistent connection for the ibm_db2 driver')->end() + ->scalarNode('protocol')->info('The protocol to use for the ibm_db2 driver (default to TCPIP if omitted)')->end() + ->booleanNode('service') + ->info('True to use SERVICE_NAME as connection parameter instead of SID for Oracle') + ->end() + ->scalarNode('servicename') + ->info( + 'Overrules dbname parameter if given and used as SERVICE_NAME or SID connection parameter ' . + 'for Oracle depending on the service parameter.', + ) + ->end() + ->scalarNode('sessionMode') + ->info('The session mode to use for the oci8 driver') + ->end() + ->scalarNode('server') + ->info('The name of a running database server to connect to for SQL Anywhere.') + ->end() + ->scalarNode('default_dbname') + ->info( + 'Override the default database (postgres) to connect to for PostgreSQL connexion.', + ) + ->end() + ->scalarNode('sslmode') + ->info( + 'Determines whether or with what priority a SSL TCP/IP connection will be negotiated with ' . + 'the server for PostgreSQL.', + ) + ->end() + ->scalarNode('sslrootcert') + ->info( + 'The name of a file containing SSL certificate authority (CA) certificate(s). ' . + 'If the file exists, the server\'s certificate will be verified to be signed by one of these authorities.', + ) + ->end() + ->scalarNode('sslcert') + ->info( + 'The path to the SSL client certificate file for PostgreSQL.', + ) + ->end() + ->scalarNode('sslkey') + ->info( + 'The path to the SSL client key file for PostgreSQL.', + ) + ->end() + ->scalarNode('sslcrl') + ->info( + 'The file name of the SSL certificate revocation list for PostgreSQL.', + ) + ->end() + ->booleanNode('pooled')->info('True to use a pooled server with the oci8/pdo_oracle driver')->end() + ->booleanNode('MultipleActiveResultSets')->info('Configuring MultipleActiveResultSets for the pdo_sqlsrv driver')->end() + ->booleanNode('use_savepoints') + ->info('Use savepoints for nested transactions') + ->beforeNormalization() + ->ifTrue(static fn ($v): bool => isset($v) && ! method_exists(Connection::class, 'getEventManager')) + ->then(static function ($v) { + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/2055', + 'The "use_savepoints" configuration key is deprecated when using DBAL 4 and will be removed in DoctrineBundle 3.0.', + ); + + return $v; + }) + ->end() + ->end() + ->scalarNode('instancename') + ->info( + 'Optional parameter, complete whether to add the INSTANCE_NAME parameter in the connection.' . + ' It is generally used to connect to an Oracle RAC server to select the name' . + ' of a particular instance.', + ) + ->end() + ->scalarNode('connectstring') + ->info( + 'Complete Easy Connect connection descriptor, see https://docs.oracle.com/database/121/NETAG/naming.htm.' . + 'When using this option, you will still need to provide the user and password parameters, but the other ' . + 'parameters will no longer be used. Note that when using this parameter, the getHost and getPort methods' . + ' from Doctrine\DBAL\Connection will no longer function as expected.', + ) + ->end() + ->end() + ->beforeNormalization() + ->ifTrue(static fn ($v) => ! isset($v['sessionMode']) && isset($v['session_mode'])) + ->then(static function ($v) { + $v['sessionMode'] = $v['session_mode']; + unset($v['session_mode']); + + return $v; + }) + ->end() + ->beforeNormalization() + ->ifTrue(static fn ($v) => ! isset($v['MultipleActiveResultSets']) && isset($v['multiple_active_result_sets'])) + ->then(static function ($v) { + $v['MultipleActiveResultSets'] = $v['multiple_active_result_sets']; + unset($v['multiple_active_result_sets']); + + return $v; + }) + ->end(); + } + + /** + * Add the ORM section to configuration tree + */ + private function addOrmSection(ArrayNodeDefinition $node): void + { + // Key that should not be rewritten to the entity-manager config + $excludedKeys = [ + 'default_entity_manager' => true, + 'auto_generate_proxy_classes' => true, + 'enable_lazy_ghost_objects' => true, + 'enable_native_lazy_objects' => true, + 'proxy_dir' => true, + 'proxy_namespace' => true, + 'resolve_target_entities' => true, + 'resolve_target_entity' => true, + 'controller_resolver' => true, + ]; + + $node + ->children() + ->arrayNode('orm') + ->beforeNormalization() + ->ifTrue(static function ($v) use ($excludedKeys) { + if (! empty($v) && ! class_exists(EntityManager::class)) { + throw new LogicException('The doctrine/orm package is required when the doctrine.orm config is set.'); + } + + if (! is_array($v)) { + return false; + } + + if (array_key_exists('entity_managers', $v) || array_key_exists('entity_manager', $v)) { + return false; + } + + // Is there actually anything to use once excluded keys are considered? + return (bool) array_diff_key($v, $excludedKeys); + }) + ->then(static function ($v) use ($excludedKeys) { + $entityManager = []; + foreach ($v as $key => $value) { + if (isset($excludedKeys[$key])) { + continue; + } + + $entityManager[$key] = $v[$key]; + unset($v[$key]); + } + + $v['entity_managers'] = [($v['default_entity_manager'] ?? 'default') => $entityManager]; + + return $v; + }) + ->end() + ->children() + ->scalarNode('default_entity_manager')->end() + ->scalarNode('auto_generate_proxy_classes')->defaultValue(false) + ->info('Auto generate mode possible values are: "NEVER", "ALWAYS", "FILE_NOT_EXISTS", "EVAL", "FILE_NOT_EXISTS_OR_CHANGED", this option is ignored when the "enable_native_lazy_objects" option is true') + ->validate() + ->ifTrue(function ($v) { + $generationModes = $this->getAutoGenerateModes(); + + if (is_int($v) && in_array($v, $generationModes['values']/*array(0, 1, 2, 3)*/)) { + return false; + } + + if (is_bool($v)) { + return false; + } + + if (is_string($v)) { + if (in_array(strtoupper($v), $generationModes['names']/*array('NEVER', 'ALWAYS', 'FILE_NOT_EXISTS', 'EVAL', 'FILE_NOT_EXISTS_OR_CHANGED')*/)) { + return false; + } + } + + return true; + }) + ->thenInvalid('Invalid auto generate mode value %s') + ->end() + ->validate() + ->ifString() + ->then(static fn (string $v) => constant('Doctrine\ORM\Proxy\ProxyFactory::AUTOGENERATE_' . strtoupper($v))) + ->end() + ->end() + ->booleanNode('enable_lazy_ghost_objects') + ->defaultValue(! method_exists(ProxyFactory::class, 'resetUninitializedProxy')) + ->info('Enables the new implementation of proxies based on lazy ghosts instead of using the legacy implementation') + ->end() + ->booleanNode('enable_native_lazy_objects') + ->defaultFalse() + ->info('Enables the new native implementation of PHP lazy objects instead of generated proxies') + ->end() + ->scalarNode('proxy_dir') + ->defaultValue('%kernel.build_dir%/doctrine/orm/Proxies') + ->info('Configures the path where generated proxy classes are saved when using non-native lazy objects, this option is ignored when the "enable_native_lazy_objects" option is true') + ->end() + ->scalarNode('proxy_namespace') + ->defaultValue('Proxies') + ->info('Defines the root namespace for generated proxy classes when using non-native lazy objects, this option is ignored when the "enable_native_lazy_objects" option is true') + ->end() + ->arrayNode('controller_resolver') + ->canBeDisabled() + ->children() + ->booleanNode('auto_mapping') + ->defaultNull() + ->info('Set to false to disable using route placeholders as lookup criteria when the primary key doesn\'t match the argument name') + ->end() + ->booleanNode('evict_cache') + ->info('Set to true to fetch the entity from the database instead of using the cache, if any') + ->defaultFalse() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('entity_manager') + ->append($this->getOrmEntityManagersNode()) + ->fixXmlConfig('resolve_target_entity', 'resolve_target_entities') + ->append($this->getOrmTargetEntityResolverNode()) + ->end() + ->end(); + } + + /** + * Return ORM target entity resolver node + */ + private function getOrmTargetEntityResolverNode(): NodeDefinition + { + $treeBuilder = new TreeBuilder('resolve_target_entities'); + $node = $treeBuilder->getRootNode(); + + $node + ->useAttributeAsKey('interface') + ->prototype('scalar') + ->cannotBeEmpty() + ->end(); + + return $node; + } + + /** + * Return ORM entity listener node + */ + private function getOrmEntityListenersNode(): NodeDefinition + { + $treeBuilder = new TreeBuilder('entity_listeners'); + $node = $treeBuilder->getRootNode(); + + $normalizer = static function ($mappings) { + $entities = []; + + foreach ($mappings as $entityClass => $mapping) { + $listeners = []; + + foreach ($mapping as $listenerClass => $listenerEvent) { + $events = []; + + foreach ($listenerEvent as $eventType => $eventMapping) { + if ($eventMapping === null) { + $eventMapping = [null]; + } + + foreach ($eventMapping as $method) { + $events[] = [ + 'type' => $eventType, + 'method' => $method, + ]; + } + } + + $listeners[] = [ + 'class' => $listenerClass, + 'event' => $events, + ]; + } + + $entities[] = [ + 'class' => $entityClass, + 'listener' => $listeners, + ]; + } + + return ['entities' => $entities]; + }; + + $node + ->beforeNormalization() + // Yaml normalization + ->ifTrue(static fn ($v) => is_array(reset($v)) && is_string(key(reset($v)))) + ->then($normalizer) + ->end() + ->fixXmlConfig('entity', 'entities') + ->children() + ->arrayNode('entities') + ->useAttributeAsKey('class') + ->prototype('array') + ->fixXmlConfig('listener') + ->children() + ->arrayNode('listeners') + ->useAttributeAsKey('class') + ->prototype('array') + ->fixXmlConfig('event') + ->children() + ->arrayNode('events') + ->prototype('array') + ->children() + ->scalarNode('type')->end() + ->scalarNode('method')->defaultNull()->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end(); + + return $node; + } + + /** + * Return ORM entity manager node + */ + private function getOrmEntityManagersNode(): ArrayNodeDefinition + { + $treeBuilder = new TreeBuilder('entity_managers'); + $node = $treeBuilder->getRootNode(); + + $node + ->requiresAtLeastOneElement() + ->useAttributeAsKey('name') + ->prototype('array') + ->addDefaultsIfNotSet() + ->append($this->getOrmCacheDriverNode('query_cache_driver')) + ->append($this->getOrmCacheDriverNode('metadata_cache_driver')) + ->append($this->getOrmCacheDriverNode('result_cache_driver')) + ->append($this->getOrmEntityListenersNode()) + ->fixXmlConfig('schema_ignore_class', 'schema_ignore_classes') + ->children() + ->scalarNode('connection')->end() + ->scalarNode('class_metadata_factory_name')->defaultValue(ClassMetadataFactory::class)->end() + ->scalarNode('default_repository_class')->defaultValue(EntityRepository::class)->end() + ->scalarNode('auto_mapping')->defaultFalse()->end() + ->scalarNode('naming_strategy')->defaultValue('doctrine.orm.naming_strategy.default')->end() + ->scalarNode('quote_strategy')->defaultValue('doctrine.orm.quote_strategy.default')->end() + ->scalarNode('typed_field_mapper')->defaultValue('doctrine.orm.typed_field_mapper.default')->end() + ->scalarNode('entity_listener_resolver')->defaultNull()->end() + ->scalarNode('fetch_mode_subselect_batch_size')->end() + ->scalarNode('repository_factory')->defaultValue('doctrine.orm.container_repository_factory')->end() + ->arrayNode('schema_ignore_classes') + ->prototype('scalar')->end() + ->end() + ->booleanNode('report_fields_where_declared') + ->beforeNormalization() + ->ifTrue(static fn ($v): bool => isset($v) && ! class_exists(AnnotationDriver::class)) + ->then(static function ($v) { + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/1962', + 'The "report_fields_where_declared" configuration option is deprecated and will be removed in DoctrineBundle 3.0. When using ORM 3, report_fields_where_declared will always be true.', + ); + + return $v; + }) + ->end() + ->defaultValue(! class_exists(AnnotationDriver::class)) + ->info('Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.16 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/10455.') + ->validate() + ->ifTrue(static fn (bool $v): bool => ! class_exists(AnnotationDriver::class) && ! $v) + ->thenInvalid('The setting "report_fields_where_declared" cannot be disabled for ORM 3.') + ->end() + ->end() + ->booleanNode('validate_xml_mapping')->defaultFalse()->info('Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.14. See https://github.com/doctrine/orm/pull/6728.')->end() + ->end() + ->children() + ->arrayNode('second_level_cache') + ->children() + ->append($this->getOrmCacheDriverNode('region_cache_driver')) + ->scalarNode('region_lock_lifetime')->defaultValue(60)->end() + ->booleanNode('log_enabled')->defaultValue($this->debug)->end() + ->scalarNode('region_lifetime')->defaultValue(3600)->end() + ->booleanNode('enabled')->defaultValue(true)->end() + ->scalarNode('factory')->end() + ->end() + ->fixXmlConfig('region') + ->children() + ->arrayNode('regions') + ->useAttributeAsKey('name') + ->prototype('array') + ->children() + ->append($this->getOrmCacheDriverNode('cache_driver')) + ->scalarNode('lock_path')->defaultValue('%kernel.cache_dir%/doctrine/orm/slc/filelock')->end() + ->scalarNode('lock_lifetime')->defaultValue(60)->end() + ->scalarNode('type')->defaultValue('default')->end() + ->scalarNode('lifetime')->defaultValue(0)->end() + ->scalarNode('service')->end() + ->scalarNode('name')->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('logger') + ->children() + ->arrayNode('loggers') + ->useAttributeAsKey('name') + ->prototype('array') + ->children() + ->scalarNode('name')->end() + ->scalarNode('service')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('hydrator') + ->children() + ->arrayNode('hydrators') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->end() + ->fixXmlConfig('mapping') + ->children() + ->arrayNode('mappings') + ->useAttributeAsKey('name') + ->prototype('array') + ->beforeNormalization() + ->ifString() + ->then(static fn ($v) => ['type' => $v]) + ->end() + ->treatNullLike([]) + ->treatFalseLike(['mapping' => false]) + ->performNoDeepMerging() + ->children() + ->scalarNode('mapping')->defaultValue(true)->end() + ->scalarNode('type')->end() + ->scalarNode('dir')->end() + ->scalarNode('alias')->end() + ->scalarNode('prefix')->end() + ->booleanNode('is_bundle')->end() + ->end() + ->end() + ->end() + ->arrayNode('dql') + ->fixXmlConfig('string_function') + ->fixXmlConfig('numeric_function') + ->fixXmlConfig('datetime_function') + ->children() + ->arrayNode('string_functions') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->arrayNode('numeric_functions') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->arrayNode('datetime_functions') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('filter') + ->children() + ->arrayNode('filters') + ->info('Register SQL Filters in the entity manager') + ->useAttributeAsKey('name') + ->prototype('array') + ->beforeNormalization() + ->ifString() + ->then(static fn ($v) => ['class' => $v]) + ->end() + ->beforeNormalization() + // The content of the XML node is returned as the "value" key so we need to rename it + ->ifTrue(static fn ($v) => is_array($v) && isset($v['value'])) + ->then(static function ($v) { + $v['class'] = $v['value']; + unset($v['value']); + + return $v; + }) + ->end() + ->fixXmlConfig('parameter') + ->children() + ->scalarNode('class')->isRequired()->end() + ->booleanNode('enabled')->defaultFalse()->end() + ->arrayNode('parameters') + ->useAttributeAsKey('name') + ->prototype('variable')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('identity_generation_preference') + ->children() + ->arrayNode('identity_generation_preferences') + ->info('Configures the preferences for identity generation when using the AUTO strategy. Valid values are "SEQUENCE" or "IDENTITY".') + ->useAttributeAsKey('platform') + ->prototype('scalar') + ->beforeNormalization() + ->ifString() + ->then(static fn (string $v) => constant(ClassMetadata::class . '::GENERATOR_TYPE_' . strtoupper($v))) + ->end() + ->end() + ->end() + ->end() + ->end(); + + return $node; + } + + /** + * Return an ORM cache driver node for a given entity manager + */ + private function getOrmCacheDriverNode(string $name): ArrayNodeDefinition + { + $treeBuilder = new TreeBuilder($name); + $node = $treeBuilder->getRootNode(); + + $node + ->beforeNormalization() + ->ifString() + ->then(static fn ($v): array => ['type' => $v]) + ->end() + ->children() + ->scalarNode('type')->defaultNull()->end() + ->scalarNode('id')->end() + ->scalarNode('pool')->end() + ->end(); + + if ($name !== 'metadata_cache_driver') { + $node->addDefaultsIfNotSet(); + } + + return $node; + } + + /** + * Find proxy auto generate modes for their names and int values + * + * @return array{names: list, values: list} + */ + private function getAutoGenerateModes(): array + { + $constPrefix = 'AUTOGENERATE_'; + $prefixLen = strlen($constPrefix); + $refClass = new ReflectionClass(ProxyFactory::class); + $constsArray = $refClass->getConstants(); + $namesArray = []; + $valuesArray = []; + + foreach ($constsArray as $key => $value) { + if (strpos($key, $constPrefix) !== 0) { + continue; + } + + $namesArray[] = substr($key, $prefixLen); + $valuesArray[] = (int) $value; + } + + return [ + 'names' => $namesArray, + 'values' => $valuesArray, + ]; + } + + private function getDefaultSchemaManagerFactory(): string + { + if (class_exists(LegacySchemaManagerFactory::class)) { + return 'doctrine.dbal.legacy_schema_manager_factory'; + } + + return 'doctrine.dbal.default_schema_manager_factory'; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/DoctrineExtension.php b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/DoctrineExtension.php new file mode 100644 index 0000000..591cb00 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/DoctrineExtension.php @@ -0,0 +1,1747 @@ +, + * driver_schemes: array, + * default_connection: string, + * types: array, + * } + */ +class DoctrineExtension extends Extension +{ + /** + * Used inside metadata driver method to simplify aggregation of data. + * + * @var array List of alias => namespace + */ + protected array $aliasMap = []; + + /** + * Used inside metadata driver method to simplify aggregation of data. + * + * @var array> List of driver type => prefix => path + */ + protected array $drivers = []; + + /** + * @param array $objectManager A configured object manager + * + * @return void + * + * @throws InvalidArgumentException + */ + protected function loadMappingInformation(array $objectManager, ContainerBuilder $container) + { + if ($objectManager['auto_mapping']) { + // automatically register bundle mappings + foreach (array_keys($container->getParameter('kernel.bundles')) as $bundle) { + if (isset($objectManager['mappings'][$bundle])) { + continue; + } + + $objectManager['mappings'][$bundle] = [ + 'mapping' => true, + 'is_bundle' => true, + ]; + } + } + + foreach ($objectManager['mappings'] as $mappingName => $mappingConfig) { + if ($mappingConfig !== null && $mappingConfig['mapping'] === false) { + continue; + } + + $mappingConfig = array_replace([ + 'dir' => false, + 'type' => false, + 'prefix' => false, + ], (array) $mappingConfig); + + $mappingConfig['dir'] = $container->getParameterBag()->resolveValue($mappingConfig['dir']); + // a bundle configuration is detected by realizing that the specified dir is not absolute and existing + if (! isset($mappingConfig['is_bundle'])) { + $mappingConfig['is_bundle'] = ! is_dir((string) $mappingConfig['dir']); + } + + if ($mappingConfig['is_bundle']) { + $bundle = null; + $bundleMetadata = null; + foreach ($container->getParameter('kernel.bundles') as $name => $class) { + if ($mappingName === $name) { + $bundle = new ReflectionClass($class); + $bundleMetadata = $container->getParameter('kernel.bundles_metadata')[$name]; + + break; + } + } + + if ($bundle === null) { + throw new InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled.', $mappingName)); + } + + $mappingConfig = $this->getMappingDriverBundleConfigDefaults($mappingConfig, $bundle, $container, $bundleMetadata['path']); + if (! $mappingConfig) { + continue; + } + } elseif (! $mappingConfig['type']) { + $mappingConfig['type'] = $this->detectMappingType($mappingConfig['dir'], $container); + } + + $this->assertValidMappingConfiguration($mappingConfig, $objectManager['name']); + $this->setMappingDriverConfig($mappingConfig, $mappingName); + $this->setMappingDriverAlias($mappingConfig, $mappingName); + } + } + + /** + * Register the alias for this mapping driver. + * + * Aliases can be used in the Query languages of all the Doctrine object managers to simplify writing tasks. + * + * @param array $mappingConfig + * + * @return void + */ + protected function setMappingDriverAlias(array $mappingConfig, string $mappingName) + { + if (isset($mappingConfig['alias'])) { + $this->aliasMap[$mappingConfig['alias']] = $mappingConfig['prefix']; + } else { + $this->aliasMap[$mappingName] = $mappingConfig['prefix']; + } + } + + /** + * Register the mapping driver configuration for later use with the object managers metadata driver chain. + * + * @param array $mappingConfig + * + * @return void + * + * @throws InvalidArgumentException + */ + protected function setMappingDriverConfig(array $mappingConfig, string $mappingName) + { + $mappingDirectory = $mappingConfig['dir']; + if (! is_dir($mappingDirectory)) { + throw new InvalidArgumentException(sprintf('Invalid Doctrine mapping path given. Cannot load Doctrine mapping/bundle named "%s".', $mappingName)); + } + + $this->drivers[$mappingConfig['type']][$mappingConfig['prefix']] = realpath($mappingDirectory) ?: $mappingDirectory; + } + + /** + * If this is a bundle controlled mapping all the missing information can be autodetected by this method. + * + * Returns false when autodetection failed, an array of the completed information otherwise. + * + * @param array $bundleConfig + */ + protected function getMappingDriverBundleConfigDefaults( + array $bundleConfig, + ReflectionClass $bundle, + ContainerBuilder $container, + string|null $bundleDir = null, + ): array|false { + $bundleClassDir = dirname($bundle->getFileName()); + $bundleDir ??= $bundleClassDir; + + if (! $bundleConfig['type']) { + $bundleConfig['type'] = $this->detectMetadataDriver($bundleDir, $container); + + if (! $bundleConfig['type'] && $bundleDir !== $bundleClassDir) { + $bundleConfig['type'] = $this->detectMetadataDriver($bundleClassDir, $container); + } + } + + if (! $bundleConfig['type']) { + // skip this bundle, no mapping information was found. + return false; + } + + if (! $bundleConfig['dir']) { + if (in_array($bundleConfig['type'], ['annotation', 'staticphp', 'attribute'])) { + $bundleConfig['dir'] = $bundleClassDir . '/' . $this->getMappingObjectDefaultName(); + } else { + $bundleConfig['dir'] = $bundleDir . '/' . $this->getMappingResourceConfigDirectory($bundleDir); + } + } else { + $bundleConfig['dir'] = $bundleDir . '/' . $bundleConfig['dir']; + } + + if (! $bundleConfig['prefix']) { + $bundleConfig['prefix'] = $bundle->getNamespaceName() . '\\' . $this->getMappingObjectDefaultName(); + } + + return $bundleConfig; + } + + /** + * Register all the collected mapping information with the object manager by registering the appropriate mapping drivers. + * + * @param array $objectManager + * + * @return void + */ + protected function registerMappingDrivers(array $objectManager, ContainerBuilder $container) + { + // configure metadata driver for each bundle based on the type of mapping files found + if ($container->hasDefinition($this->getObjectManagerElementName($objectManager['name'] . '_metadata_driver'))) { + $chainDriverDef = $container->getDefinition($this->getObjectManagerElementName($objectManager['name'] . '_metadata_driver')); + } else { + $chainDriverDef = new Definition($this->getMetadataDriverClass('driver_chain')); + } + + foreach ($this->drivers as $driverType => $driverPaths) { + $mappingService = $this->getObjectManagerElementName($objectManager['name'] . '_' . $driverType . '_metadata_driver'); + if ($container->hasDefinition($mappingService)) { + $mappingDriverDef = $container->getDefinition($mappingService); + $args = $mappingDriverDef->getArguments(); + if ($driverType === 'annotation') { + $args[1] = array_merge(array_values($driverPaths), $args[1]); + } else { + $args[0] = array_merge(array_values($driverPaths), $args[0]); + } + + $mappingDriverDef->setArguments($args); + } elseif ($driverType === 'attribute') { + $mappingDriverDef = new Definition($this->getMetadataDriverClass($driverType), [ + array_values($driverPaths), + ]); + } elseif ($driverType === 'annotation') { + $mappingDriverDef = new Definition($this->getMetadataDriverClass($driverType), [ + new Reference($this->getObjectManagerElementName('metadata.annotation_reader')), + array_values($driverPaths), + ]); + } else { + $mappingDriverDef = new Definition($this->getMetadataDriverClass($driverType), [ + array_values($driverPaths), + ]); + } + + if ( + str_contains($mappingDriverDef->getClass(), 'yml') || str_contains($mappingDriverDef->getClass(), 'xml') + || str_contains($mappingDriverDef->getClass(), 'Yaml') || str_contains($mappingDriverDef->getClass(), 'Xml') + ) { + $mappingDriverDef->setArguments([array_flip($driverPaths)]); + $mappingDriverDef->addMethodCall('setGlobalBasename', ['mapping']); + } + + $container->setDefinition($mappingService, $mappingDriverDef); + + foreach ($driverPaths as $prefix => $driverPath) { + $chainDriverDef->addMethodCall('addDriver', [new Reference($mappingService), $prefix]); + } + } + + $container->setDefinition($this->getObjectManagerElementName($objectManager['name'] . '_metadata_driver'), $chainDriverDef); + } + + /** + * Assertion if the specified mapping information is valid. + * + * @param array $mappingConfig + * + * @return void + * + * @throws InvalidArgumentException + */ + protected function assertValidMappingConfiguration(array $mappingConfig, string $objectManagerName) + { + if (! $mappingConfig['type'] || ! $mappingConfig['dir'] || ! $mappingConfig['prefix']) { + throw new InvalidArgumentException(sprintf('Mapping definitions for Doctrine manager "%s" require at least the "type", "dir" and "prefix" options.', $objectManagerName)); + } + + if (! is_dir($mappingConfig['dir'])) { + throw new InvalidArgumentException(sprintf('Specified non-existing directory "%s" as Doctrine mapping source.', $mappingConfig['dir'])); + } + + if (! in_array($mappingConfig['type'], ['xml', 'yml', 'annotation', 'php', 'staticphp', 'attribute'])) { + throw new InvalidArgumentException(sprintf('Can only configure "xml", "yml", "annotation", "php", "staticphp" or "attribute" through the DoctrineBundle. Use your own bundle to configure other metadata drivers. You can register them by adding a new driver to the "%s" service definition.', $this->getObjectManagerElementName($objectManagerName . '_metadata_driver'))); + } + } + + /** + * Detects what metadata driver to use for the supplied directory. + */ + protected function detectMetadataDriver(string $dir, ContainerBuilder $container): string|null + { + $configPath = $this->getMappingResourceConfigDirectory($dir); + $extension = $this->getMappingResourceExtension(); + + if (glob($dir . '/' . $configPath . '/*.' . $extension . '.xml', GLOB_NOSORT)) { + $driver = 'xml'; + } elseif (glob($dir . '/' . $configPath . '/*.' . $extension . '.yml', GLOB_NOSORT)) { + $driver = 'yml'; + } elseif (glob($dir . '/' . $configPath . '/*.' . $extension . '.php', GLOB_NOSORT)) { + $driver = 'php'; + } else { + // add the closest existing directory as a resource + $resource = $dir . '/' . $configPath; + while (! is_dir($resource)) { + $resource = dirname($resource); + } + + $container->fileExists($resource, false); + + $discoveryPath = $dir . '/' . $this->getMappingObjectDefaultName(); + if ($container->fileExists($discoveryPath, false)) { + return $this->detectMappingType($discoveryPath, $container); + } + + return null; + } + + $container->fileExists($dir . '/' . $configPath, false); + + return $driver; + } + + /** + * Detects what mapping type to use for the supplied directory. + * + * @return string A mapping type 'attribute' or 'annotation' + */ + private function detectMappingType(string $directory, ContainerBuilder $container): string + { + $type = 'attribute'; + + $glob = new GlobResource($directory, '*', true); + $container->addResource($glob); + + $quotedMappingObjectName = preg_quote($this->getMappingObjectDefaultName(), '/'); + + foreach ($glob as $file) { + $content = file_get_contents((string) $file); + + if ( + preg_match('/^#\[.*' . $quotedMappingObjectName . '\b/m', $content) + || preg_match('/^#\[.*Embeddable\b/m', $content) + || preg_match('/^#\[.*MappedSuperclass\b/m', $content) + ) { + break; + } + + if ( + self::textContainsAnnotation($quotedMappingObjectName, $content) + || self::textContainsAnnotation('Embeddable', $content) + || self::textContainsAnnotation('MappedSuperclass', $content) + ) { + $type = 'annotation'; + break; + } + } + + return $type; + } + + /** + * Check if the file content contains a class-like annotation + * + * @internal + */ + public static function textContainsAnnotation(string $quotedMappingObjectName, string $content): bool + { + return preg_match('/^(?:[ ]\*|\/\*\*)[ ]@ # Match phpdoc start or line with an at + \\\\? # Can start with antislash + ([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*\\\\)* # Match namespace components ending with antislash + ' . $quotedMappingObjectName . ' # The target class + \b # Match word boundary + /mx', $content) === 1; + } + + /** + * Returns a modified version of $managerConfigs. + * + * The manager called $autoMappedManager will map all bundles that are not mapped by other managers. + * + * @param array> $managerConfigs + * @param array $bundles + * + * @return array> + */ + protected function fixManagersAutoMappings(array $managerConfigs, array $bundles): array + { + $autoMappedManager = $this->validateAutoMapping($managerConfigs); + + if ($autoMappedManager !== null) { + foreach (array_keys($bundles) as $bundle) { + foreach ($managerConfigs as $manager) { + if (isset($manager['mappings'][$bundle])) { + continue 2; + } + } + + $managerConfigs[$autoMappedManager]['mappings'][$bundle] = [ + 'mapping' => true, + 'is_bundle' => true, + ]; + } + + $managerConfigs[$autoMappedManager]['auto_mapping'] = false; + } + + return $managerConfigs; + } + + /** + * Search for a manager that is declared as 'auto_mapping' = true. + * + * @param array> $managerConfigs + * + * @throws LogicException + */ + private function validateAutoMapping(array $managerConfigs): string|null + { + $autoMappedManager = null; + foreach ($managerConfigs as $name => $manager) { + if (! $manager['auto_mapping']) { + continue; + } + + if ($autoMappedManager !== null) { + throw new LogicException(sprintf('You cannot enable "auto_mapping" on more than one manager at the same time (found in "%s" and "%s"").', $autoMappedManager, $name)); + } + + $autoMappedManager = $name; + } + + return $autoMappedManager; + } + + private string $defaultConnection; + + /** + * {@inheritDoc} + * + * @return void + */ + public function load(array $configs, ContainerBuilder $container) + { + $configuration = $this->getConfiguration($configs, $container); + $config = $this->processConfigurationPrependingDefaults($configuration, $configs); + + if (! empty($config['dbal'])) { + $this->dbalLoad($config['dbal'], $container); + + $this->loadMessengerServices($container); + } + + if (empty($config['orm'])) { + return; + } + + if (empty($config['dbal'])) { + throw new LogicException('Configuring the ORM layer requires to configure the DBAL layer as well.'); + } + + $this->ormLoad($config['orm'], $container); + } + + /** + * Process user configuration and adds a default DBAL connection and/or a + * default EM if required, then process again the configuration to get + * default values for each. + * + * @param array> $configs + * + * @return array + */ + private function processConfigurationPrependingDefaults(ConfigurationInterface $configuration, array $configs): array + { + $config = $this->processConfiguration($configuration, $configs); + $configToAdd = []; + + // if no DB connection defined, prepend an empty one for the default + // connection name in order to make Symfony Config resolve the default + // values + if (isset($config['dbal']) && empty($config['dbal']['connections'])) { + $configToAdd['dbal'] = ['connections' => [($config['dbal']['default_connection'] ?? 'default') => []]]; + } + + // if no EM defined, prepend an empty one for the default EM name in + // order to make Symfony Config resolve the default values + if (isset($config['orm']) && empty($config['orm']['entity_managers'])) { + $configToAdd['orm'] = ['entity_managers' => [($config['orm']['default_entity_manager'] ?? 'default') => []]]; + } + + if (! $configToAdd) { + return $config; + } + + return $this->processConfiguration($configuration, array_merge([$configToAdd], $configs)); + } + + /** + * Loads the DBAL configuration. + * + * Usage example: + * + * + * + * @param DBALConfig $config An array of configuration settings + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function dbalLoad(array $config, ContainerBuilder $container) + { + $loader = new PhpFileLoader($container, new FileLocator(__DIR__ . '/../../config')); + $loader->load('dbal.php'); + + if (empty($config['default_connection'])) { + $keys = array_keys($config['connections']); + $config['default_connection'] = reset($keys); + } + + $this->defaultConnection = $config['default_connection']; + + $container->setAlias('database_connection', sprintf('doctrine.dbal.%s_connection', $this->defaultConnection)); + $container->getAlias('database_connection')->setPublic(true); + $container->setAlias('doctrine.dbal.event_manager', new Alias(sprintf('doctrine.dbal.%s_connection.event_manager', $this->defaultConnection), false)); + + $container->setParameter('doctrine.dbal.connection_factory.types', $config['types']); + + $container->getDefinition('doctrine.dbal.connection_factory.dsn_parser')->setArgument(0, array_merge(ConnectionFactory::DEFAULT_SCHEME_MAP, $config['driver_schemes'])); + + $connections = []; + + foreach (array_keys($config['connections']) as $name) { + $connections[$name] = sprintf('doctrine.dbal.%s_connection', $name); + } + + $container->setParameter('doctrine.connections', $connections); + $container->setParameter('doctrine.default_connection', $this->defaultConnection); + + $connWithLogging = []; + $connWithProfiling = []; + $connWithBacktrace = []; + $ttlByConnection = []; + + foreach ($config['connections'] as $name => $connection) { + if ($connection['logging']) { + $connWithLogging[] = $name; + } + + if ($connection['profiling']) { + $connWithProfiling[] = $name; + + if ($connection['profiling_collect_backtrace']) { + $connWithBacktrace[] = $name; + } + } + + if ($connection['idle_connection_ttl'] > 0) { + $ttlByConnection[$name] = $connection['idle_connection_ttl']; + } + + $this->loadDbalConnection($name, $connection, $container); + } + + $container->registerForAutoconfiguration(MiddlewareInterface::class)->addTag('doctrine.middleware'); + + $container->registerAttributeForAutoconfiguration(AsMiddleware::class, static function (ChildDefinition $definition, AsMiddleware $attribute) { + $priority = isset($attribute->priority) ? ['priority' => $attribute->priority] : []; + + if ($attribute->connections === []) { + $definition->addTag('doctrine.middleware', $priority); + + return; + } + + foreach ($attribute->connections as $connName) { + $definition->addTag('doctrine.middleware', array_merge($priority, ['connection' => $connName])); + } + }); + + $this->registerDbalMiddlewares($container, $connWithLogging, $connWithProfiling, $connWithBacktrace, array_keys($ttlByConnection)); + + $container->getDefinition('doctrine.dbal.idle_connection_middleware')->setArgument(1, $ttlByConnection); + + if (class_exists(Listener::class)) { + return; + } + + $container->removeDefinition('doctrine.dbal.idle_connection_listener'); + $container->removeDefinition('doctrine.dbal.idle_connection_middleware'); + } + + /** + * Loads a configured DBAL connection. + * + * @param string $name The name of the connection + * @param array $connection A dbal connection configuration. + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function loadDbalConnection($name, array $connection, ContainerBuilder $container) + { + $configuration = $container->setDefinition(sprintf('doctrine.dbal.%s_connection.configuration', $name), new ChildDefinition('doctrine.dbal.connection.configuration')); + unset($connection['logging']); + + $dataCollectorDefinition = $container->getDefinition('data_collector.doctrine'); + $dataCollectorDefinition->replaceArgument(1, $connection['profiling_collect_schema_errors']); + + unset( + $connection['profiling'], + $connection['profiling_collect_backtrace'], + $connection['profiling_collect_schema_errors'], + ); + + if (isset($connection['auto_commit'])) { + $configuration->addMethodCall('setAutoCommit', [$connection['auto_commit']]); + } + + unset($connection['auto_commit']); + + if (isset($connection['disable_type_comments'])) { + $configuration->addMethodCall('setDisableTypeComments', [$connection['disable_type_comments']]); + } + + unset($connection['disable_type_comments']); + + if (isset($connection['schema_filter']) && $connection['schema_filter']) { + $definition = new Definition(RegexSchemaAssetFilter::class, [$connection['schema_filter']]); + $definition->addTag('doctrine.dbal.schema_filter', ['connection' => $name]); + $container->setDefinition(sprintf('doctrine.dbal.%s_regex_schema_filter', $name), $definition); + } + + unset($connection['schema_filter']); + + // event manager + $container->setDefinition(sprintf('doctrine.dbal.%s_connection.event_manager', $name), new ChildDefinition('doctrine.dbal.connection.event_manager')); + + // connection + $options = $this->getConnectionOptions($connection); + + $connectionId = sprintf('doctrine.dbal.%s_connection', $name); + + $def = $container + ->setDefinition($connectionId, new ChildDefinition('doctrine.dbal.connection')) + ->setPublic(true) + ->setArguments([ + $options, + new Reference(sprintf('doctrine.dbal.%s_connection.configuration', $name)), + // event manager is only supported on DBAL < 4 + method_exists(Connection::class, 'getEventManager') ? new Reference(sprintf('doctrine.dbal.%s_connection.event_manager', $name)) : null, + $connection['mapping_types'], + ]); + + $container + ->registerAliasForArgument($connectionId, Connection::class, sprintf('%s.connection', $name)) + ->setPublic(false); + + // Set class in case "wrapper_class" option was used to assist IDEs + if (isset($options['wrapperClass'])) { + $def->setClass($options['wrapperClass']); + } + + if (isset($connection['use_savepoints'])) { + // DBAL >= 4 always has savepoints enabled. So we only need to call "setNestTransactionsWithSavepoints" for DBAL < 4 + if (method_exists(Connection::class, 'getEventManager')) { + if ($connection['use_savepoints']) { + $def->addMethodCall('setNestTransactionsWithSavepoints', [$connection['use_savepoints']]); + } + } elseif (! $connection['use_savepoints']) { + throw new LogicException('The "use_savepoints" option can only be set to "true" and should ideally not be set when using DBAL >= 4'); + } + } + + $container->setDefinition( + ManagerRegistryAwareConnectionProvider::class, + new Definition(ManagerRegistryAwareConnectionProvider::class, [$container->getDefinition('doctrine')]), + ); + + $configuration->addMethodCall('setSchemaManagerFactory', [new Reference($connection['schema_manager_factory'])]); + + if (isset($connection['result_cache'])) { + $configuration->addMethodCall('setResultCache', [new Reference($connection['result_cache'])]); + } + + if (class_exists(LegacySchemaManagerFactory::class)) { + return; + } + + $container->removeDefinition('doctrine.dbal.legacy_schema_manager_factory'); + } + + /** + * @param array $connection + * + * @return mixed[] + */ + protected function getConnectionOptions(array $connection): array + { + $options = $connection; + + $connectionDefaults = [ + 'host' => 'localhost', + 'port' => null, + 'user' => 'root', + 'password' => null, + ]; + + if ($options['override_url'] ?? false) { + $options['connection_override_options'] = array_intersect_key($options, ['dbname' => null] + $connectionDefaults); + } + + unset($options['override_url']); + unset($options['schema_manager_factory']); + + $options += $connectionDefaults; + + foreach (['replicas', 'slaves'] as $connectionKey) { + foreach (array_keys($options[$connectionKey]) as $name) { + $options[$connectionKey][$name] += $connectionDefaults; + } + } + + if (isset($options['platform_service'])) { + $options['platform'] = new Reference($options['platform_service']); + unset($options['platform_service']); + } + + unset($options['mapping_types']); + + foreach ( + [ + 'options' => 'driverOptions', + 'driver_class' => 'driverClass', + 'wrapper_class' => 'wrapperClass', + 'keep_slave' => 'keepReplica', + 'keep_replica' => 'keepReplica', + 'replicas' => 'replica', + 'server_version' => 'serverVersion', + 'default_table_options' => 'defaultTableOptions', + ] as $old => $new + ) { + if (! isset($options[$old])) { + continue; + } + + $options[$new] = $options[$old]; + unset($options[$old]); + } + + foreach (['replica', 'slaves'] as $connectionKey) { + foreach ($options[$connectionKey] as $name => $value) { + $driverOptions = $value['driverOptions'] ?? []; + $parentDriverOptions = $options['driverOptions'] ?? []; + if ($driverOptions === [] && $parentDriverOptions === []) { + continue; + } + + $options[$connectionKey][$name]['driverOptions'] = $driverOptions + $parentDriverOptions; + } + } + + if (! empty($options['slaves']) || ! empty($options['replica'])) { + $nonRewrittenKeys = [ + 'driver' => true, + 'driverClass' => true, + 'wrapperClass' => true, + 'keepSlave' => true, + 'keepReplica' => true, + 'platform' => true, + 'slaves' => true, + 'primary' => true, + 'replica' => true, + 'serverVersion' => true, + 'defaultTableOptions' => true, + // included by safety but should have been unset already + 'logging' => true, + 'profiling' => true, + 'mapping_types' => true, + 'platform_service' => true, + ]; + foreach ($options as $key => $value) { + if (isset($nonRewrittenKeys[$key])) { + continue; + } + + $options['primary'][$key] = $value; + unset($options[$key]); + } + + if (empty($options['wrapperClass'])) { + // Change the wrapper class only if user did not configure custom one. + $options['wrapperClass'] = PrimaryReadReplicaConnection::class; + } + } else { + unset($options['slaves'], $options['replica']); + } + + return $options; + } + + /** + * Loads the Doctrine ORM configuration. + * + * Usage example: + * + * + * + * @param array $config An array of configuration settings + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function ormLoad(array $config, ContainerBuilder $container) + { + if (! class_exists(UnitOfWork::class)) { + throw new LogicException('To configure the ORM layer, you must first install the doctrine/orm package.'); + } + + $loader = new PhpFileLoader($container, new FileLocator(__DIR__ . '/../../config')); + $loader->load('orm.php'); + + if (class_exists(AbstractType::class)) { + $container->getDefinition('form.type.entity')->addTag('kernel.reset', ['method' => 'reset']); + } + + if (! class_exists(Annotation::class)) { + $container->removeAlias('doctrine.orm.metadata.annotation_reader'); + } + + if (! class_exists(UlidGenerator::class)) { + $container->removeDefinition('doctrine.ulid_generator'); + } + + if (! class_exists(UuidGenerator::class)) { + $container->removeDefinition('doctrine.uuid_generator'); + } + + if (! class_exists(ExpressionLanguage::class)) { + $container->removeDefinition('doctrine.orm.entity_value_resolver.expression_language'); + } + + $controllerResolverDefaults = []; + + if (! $config['controller_resolver']['enabled']) { + $controllerResolverDefaults['disabled'] = true; + } + + if ($config['controller_resolver']['auto_mapping'] === null) { + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/1762', + 'The default value of "doctrine.orm.controller_resolver.auto_mapping" will be changed from `true` to `false`. Explicitly configure `true` to keep existing behaviour.', + ); + $config['controller_resolver']['auto_mapping'] = true; + } + + if ($config['controller_resolver']['auto_mapping'] === true) { + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/1804', + 'Enabling the controller resolver automapping feature has been deprecated. Symfony Mapped Route Parameters should be used as replacement.', + ); + } + + if (! $config['controller_resolver']['auto_mapping']) { + $controllerResolverDefaults['mapping'] = []; + } + + if ($config['controller_resolver']['evict_cache']) { + $controllerResolverDefaults['evict_cache'] = true; + } + + $valueResolverDefinition = $container->getDefinition('doctrine.orm.entity_value_resolver'); + $valueResolverDefinition->setArgument(2, (new Definition(MapEntity::class))->setArguments([ + null, + null, + null, + $controllerResolverDefaults['mapping'] ?? null, + null, + null, + null, + $controllerResolverDefaults['evict_cache'] ?? null, + $controllerResolverDefaults['disabled'] ?? false, + ])); + + // Symfony 7.3 and higher expose type alias support in the EntityValueResolver + $valueResolverDefinition->setArgument(3, $config['resolve_target_entities']); + + // not available in Doctrine ORM 3.0 and higher + if (! class_exists(ConvertMappingCommand::class)) { + $container->removeDefinition('doctrine.mapping_convert_command'); + } + + if (! class_exists(EnsureProductionSettingsCommand::class)) { + $container->removeDefinition('doctrine.ensure_production_settings_command'); + } + + if (! class_exists(ClassMetadataExporter::class)) { + $container->removeDefinition('doctrine.mapping_import_command'); + } + + $entityManagers = []; + foreach (array_keys($config['entity_managers']) as $name) { + $entityManagers[$name] = sprintf('doctrine.orm.%s_entity_manager', $name); + } + + $container->setParameter('doctrine.entity_managers', $entityManagers); + + if (empty($config['default_entity_manager'])) { + $tmp = array_keys($entityManagers); + $config['default_entity_manager'] = reset($tmp); + } + + $container->setParameter('doctrine.default_entity_manager', $config['default_entity_manager']); + + if ($config['enable_lazy_ghost_objects'] ?? false) { + if (! class_exists(ProxyHelper::class)) { + throw new LogicException( + 'Lazy ghost objects cannot be enabled because the "symfony/var-exporter" library' + . ' is not installed. Please run "composer require symfony/var-exporter".', + ); + } + } elseif (! method_exists(ProxyFactory::class, 'resetUninitializedProxy')) { + throw new LogicException( + 'Lazy ghost objects cannot be disabled for ORM 3.', + ); + } else { + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/1568', + 'Not setting "doctrine.orm.enable_lazy_ghost_objects" to true is deprecated.', + ); + } + + if ($config['enable_native_lazy_objects'] ?? false) { + /** @phpstan-ignore function.alreadyNarrowedType */ + if (! method_exists(ORMConfiguration::class, 'enableNativeLazyObjects')) { + throw new LogicException( + 'Native lazy objects are not supported with your installed version of the ORM. Please upgrade to "doctrine/orm >= 3.4".', + ); + } + + if (PHP_VERSION_ID < 80400) { + throw new LogicException('Using native lazy objects requires PHP 8.4 or higher.'); + } + + $container->removeDefinition('doctrine.orm.proxy_cache_warmer'); + } elseif (! class_exists(AnnotationDriver::class) && PHP_VERSION_ID >= 80400) { + // Only emit the deprecation notice for ORM 3 and PHP 8.4+ users + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/1905', + 'Not setting "doctrine.orm.enable_native_lazy_objects" to true is deprecated.', + ); + } + + $options = ['auto_generate_proxy_classes', 'enable_lazy_ghost_objects', 'enable_native_lazy_objects', 'proxy_dir', 'proxy_namespace']; + foreach ($options as $key) { + $container->setParameter('doctrine.orm.' . $key, $config[$key]); + } + + $container->setAlias('doctrine.orm.entity_manager', $defaultEntityManagerDefinitionId = sprintf('doctrine.orm.%s_entity_manager', $config['default_entity_manager'])); + $container->getAlias('doctrine.orm.entity_manager')->setPublic(true); + + $config['entity_managers'] = $this->fixManagersAutoMappings($config['entity_managers'], $container->getParameter('kernel.bundles')); + + foreach ($config['entity_managers'] as $name => $entityManager) { + $entityManager['name'] = $name; + $this->loadOrmEntityManager($entityManager, $container); + + if (interface_exists(PropertyInfoExtractorInterface::class)) { + $this->loadPropertyInfoExtractor($name, $container); + } + + if (! interface_exists(LoaderInterface::class)) { + continue; + } + + $this->loadValidatorLoader($name, $container); + } + + if ($config['resolve_target_entities']) { + $def = $container->findDefinition('doctrine.orm.listeners.resolve_target_entity'); + foreach ($config['resolve_target_entities'] as $name => $implementation) { + $def->addMethodCall('addResolveTargetEntity', [ + $name, + $implementation, + [], + ]); + } + + $def + ->addTag('doctrine.event_listener', ['event' => Events::loadClassMetadata]) + ->addTag('doctrine.event_listener', ['event' => Events::onClassMetadataNotFound]); + } + + $container->registerForAutoconfiguration(ServiceEntityRepositoryInterface::class) + ->addTag(ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG); + + $container->registerForAutoconfiguration(EventSubscriberInterface::class) + ->addTag('doctrine.event_subscriber'); + + $container->registerForAutoconfiguration(AbstractIdGenerator::class) + ->addTag(IdGeneratorPass::ID_GENERATOR_TAG); + + $container->registerAttributeForAutoconfiguration(AsEntityListener::class, static function (ChildDefinition $definition, AsEntityListener $attribute) { + $definition->addTag('doctrine.orm.entity_listener', [ + 'event' => $attribute->event, + 'method' => $attribute->method, + 'lazy' => $attribute->lazy, + 'entity_manager' => $attribute->entityManager, + 'entity' => $attribute->entity, + 'priority' => $attribute->priority, + ]); + }); + $container->registerAttributeForAutoconfiguration(AsDoctrineListener::class, static function (ChildDefinition $definition, AsDoctrineListener $attribute) { + $definition->addTag('doctrine.event_listener', [ + 'event' => $attribute->event, + 'priority' => $attribute->priority, + 'connection' => $attribute->connection, + ]); + }); + + $container->registerAttributeForAutoconfiguration(Embeddable::class, static function (ChildDefinition $definition) { + $definition->setAbstract(true)->addTag('container.excluded', ['source' => sprintf('with #[%s] attribute', Embeddable::class)]); + }); + $container->registerAttributeForAutoconfiguration(Entity::class, static function (ChildDefinition $definition) { + $definition->setAbstract(true)->addTag('container.excluded', ['source' => sprintf('with #[%s] attribute', Entity::class)]); + }); + $container->registerAttributeForAutoconfiguration(MappedSuperclass::class, static function (ChildDefinition $definition) { + $definition->setAbstract(true)->addTag('container.excluded', ['source' => sprintf('with #[%s] attribute', MappedSuperclass::class)]); + }); + + /** @see DoctrineBundle::boot() */ + $container->getDefinition($defaultEntityManagerDefinitionId) + ->addTag('container.preload', [ + 'class' => Autoloader::class, + ]); + } + + /** + * Loads a configured ORM entity manager. + * + * @param array $entityManager A configured ORM entity manager. + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function loadOrmEntityManager(array $entityManager, ContainerBuilder $container) + { + $ormConfigDef = $container->setDefinition(sprintf('doctrine.orm.%s_configuration', $entityManager['name']), new ChildDefinition('doctrine.orm.configuration')); + $ormConfigDef->addTag(IdGeneratorPass::CONFIGURATION_TAG); + + $this->loadOrmEntityManagerMappingInformation($entityManager, $ormConfigDef, $container); + $this->loadOrmCacheDrivers($entityManager, $container); + + if (isset($entityManager['entity_listener_resolver']) && $entityManager['entity_listener_resolver']) { + $container->setAlias(sprintf('doctrine.orm.%s_entity_listener_resolver', $entityManager['name']), $entityManager['entity_listener_resolver']); + } else { + $definition = new Definition('%doctrine.orm.entity_listener_resolver.class%'); + $definition->addArgument(new Reference('service_container')); + $container->setDefinition(sprintf('doctrine.orm.%s_entity_listener_resolver', $entityManager['name']), $definition); + } + + $methods = [ + 'setMetadataCache' => new Reference(sprintf('doctrine.orm.%s_metadata_cache', $entityManager['name'])), + 'setQueryCache' => new Reference(sprintf('doctrine.orm.%s_query_cache', $entityManager['name'])), + 'setResultCache' => new Reference(sprintf('doctrine.orm.%s_result_cache', $entityManager['name'])), + 'setMetadataDriverImpl' => new Reference('doctrine.orm.' . $entityManager['name'] . '_metadata_driver'), + 'setProxyDir' => '%doctrine.orm.proxy_dir%', + 'setProxyNamespace' => '%doctrine.orm.proxy_namespace%', + 'setAutoGenerateProxyClasses' => '%doctrine.orm.auto_generate_proxy_classes%', + 'setSchemaIgnoreClasses' => $entityManager['schema_ignore_classes'], + 'setClassMetadataFactoryName' => $entityManager['class_metadata_factory_name'], + 'setDefaultRepositoryClassName' => $entityManager['default_repository_class'], + 'setNamingStrategy' => new Reference($entityManager['naming_strategy']), + 'setQuoteStrategy' => new Reference($entityManager['quote_strategy']), + 'setTypedFieldMapper' => new Reference($entityManager['typed_field_mapper']), + 'setEntityListenerResolver' => new Reference(sprintf('doctrine.orm.%s_entity_listener_resolver', $entityManager['name'])), + 'setLazyGhostObjectEnabled' => '%doctrine.orm.enable_lazy_ghost_objects%', + 'setIdentityGenerationPreferences' => $entityManager['identity_generation_preferences'], + ]; + + if (PHP_VERSION_ID >= 80400 && class_exists(LegacyReflectionFields::class)) { + $enableNativeLazyObjects = $container->getParameter('doctrine.orm.enable_native_lazy_objects'); + + assert(is_bool($enableNativeLazyObjects)); + + $methods['enableNativeLazyObjects'] = $enableNativeLazyObjects; + + // Do not set deprecated proxy configurations when native lazy objects are enabled with `doctrine/orm:^3.5` + /** @phpstan-ignore function.alreadyNarrowedType */ + if ($enableNativeLazyObjects && method_exists(ORMSetup::class, 'createAttributeMetadataConfig')) { + unset( + $methods['setProxyDir'], + $methods['setProxyNamespace'], + $methods['setAutoGenerateProxyClasses'], + ); + } + } + + if (isset($entityManager['fetch_mode_subselect_batch_size'])) { + $methods['setEagerFetchBatchSize'] = $entityManager['fetch_mode_subselect_batch_size']; + } + + $listenerId = sprintf('doctrine.orm.%s_listeners.attach_entity_listeners', $entityManager['name']); + $listenerDef = $container->setDefinition($listenerId, new Definition('%doctrine.orm.listeners.attach_entity_listeners.class%')); + $listenerTagParams = ['event' => 'loadClassMetadata']; + if (isset($entityManager['connection'])) { + $listenerTagParams['connection'] = $entityManager['connection']; + } + + $listenerDef->addTag('doctrine.event_listener', $listenerTagParams); + + if (isset($entityManager['second_level_cache'])) { + $this->loadOrmSecondLevelCache($entityManager, $ormConfigDef, $container); + } + + if ($entityManager['repository_factory']) { + $methods['setRepositoryFactory'] = new Reference($entityManager['repository_factory']); + } + + foreach ($methods as $method => $arg) { + $ormConfigDef->addMethodCall($method, [$arg]); + } + + foreach ($entityManager['hydrators'] as $name => $class) { + $ormConfigDef->addMethodCall('addCustomHydrationMode', [$name, $class]); + } + + if (! empty($entityManager['dql'])) { + foreach ($entityManager['dql']['string_functions'] as $name => $function) { + $ormConfigDef->addMethodCall('addCustomStringFunction', [$name, $function]); + } + + foreach ($entityManager['dql']['numeric_functions'] as $name => $function) { + $ormConfigDef->addMethodCall('addCustomNumericFunction', [$name, $function]); + } + + foreach ($entityManager['dql']['datetime_functions'] as $name => $function) { + $ormConfigDef->addMethodCall('addCustomDatetimeFunction', [$name, $function]); + } + } + + $enabledFilters = []; + $filtersParameters = []; + foreach ($entityManager['filters'] as $name => $filter) { + $ormConfigDef->addMethodCall('addFilter', [$name, $filter['class']]); + if ($filter['enabled']) { + $enabledFilters[] = $name; + } + + if (! $filter['parameters']) { + continue; + } + + $filtersParameters[$name] = $filter['parameters']; + } + + $managerConfiguratorName = sprintf('doctrine.orm.%s_manager_configurator', $entityManager['name']); + $container + ->setDefinition($managerConfiguratorName, new ChildDefinition('doctrine.orm.manager_configurator.abstract')) + ->replaceArgument(0, $enabledFilters) + ->replaceArgument(1, $filtersParameters); + + if (! isset($entityManager['connection'])) { + $entityManager['connection'] = $this->defaultConnection; + } + + $entityManagerId = sprintf('doctrine.orm.%s_entity_manager', $entityManager['name']); + + $container + ->setDefinition($entityManagerId, new ChildDefinition('doctrine.orm.entity_manager.abstract')) + ->setPublic(true) + ->setArguments([ + new Reference(sprintf('doctrine.dbal.%s_connection', $entityManager['connection'])), + new Reference(sprintf('doctrine.orm.%s_configuration', $entityManager['name'])), + new Reference(sprintf('doctrine.dbal.%s_connection.event_manager', $entityManager['connection'])), + ]) + ->setConfigurator([new Reference($managerConfiguratorName), 'configure']); + + $container + ->registerAliasForArgument($entityManagerId, EntityManagerInterface::class, sprintf('%s.entity_manager', $entityManager['name'])) + ->setPublic(false); + + $container->setAlias( + sprintf('doctrine.orm.%s_entity_manager.event_manager', $entityManager['name']), + new Alias(sprintf('doctrine.dbal.%s_connection.event_manager', $entityManager['connection']), false), + ); + + if (! isset($entityManager['entity_listeners'])) { + return; + } + + $entities = $entityManager['entity_listeners']['entities']; + + foreach ($entities as $entityListenerClass => $entity) { + foreach ($entity['listeners'] as $listenerClass => $listener) { + foreach ($listener['events'] as $listenerEvent) { + $listenerEventName = $listenerEvent['type']; + $listenerMethod = $listenerEvent['method']; + + $listenerDef->addMethodCall('addEntityListener', [ + $entityListenerClass, + $listenerClass, + $listenerEventName, + $listenerMethod, + ]); + } + } + } + } + + /** + * Loads an ORM entity managers bundle mapping information. + * + * There are two distinct configuration possibilities for mapping information: + * + * 1. Specify a bundle and optionally details where the entity and mapping information reside. + * 2. Specify an arbitrary mapping location. + * + * @param array $entityManager A configured ORM entity manager + * @param Definition $ormConfigDef A Definition instance + * @param ContainerBuilder $container A ContainerBuilder instance + * + * @example + * + * doctrine.orm: + * mappings: + * MyBundle1: ~ + * MyBundle2: yml + * MyBundle3: { type: annotation, dir: Entities/ } + * MyBundle4: { type: xml, dir: Resources/config/doctrine/mapping } + * MyBundle5: { type: attribute, dir: Entities/ } + * MyBundle6: + * type: yml + * dir: bundle-mappings/ + * alias: BundleAlias + * arbitrary_key: + * type: xml + * dir: %kernel.project_dir%/src/vendor/DoctrineExtensions/lib/DoctrineExtensions/Entities + * prefix: DoctrineExtensions\Entities\ + * alias: DExt + * + * In the case of bundles everything is really optional (which leads to autodetection for this bundle) but + * in the mappings key everything except alias is a required argument. + */ + protected function loadOrmEntityManagerMappingInformation(array $entityManager, Definition $ormConfigDef, ContainerBuilder $container) + { + // reset state of drivers and alias map. They are only used by this methods and children. + $this->drivers = []; + $this->aliasMap = []; + + $this->loadMappingInformation($entityManager, $container); + $this->registerMappingDrivers($entityManager, $container); + + $container->getDefinition($this->getObjectManagerElementName($entityManager['name'] . '_metadata_driver')); + /** @psalm-suppress NoValue $this->drivers is set by $this->loadMappingInformation() call */ + foreach (array_keys($this->drivers) as $driverType) { + $mappingService = $this->getObjectManagerElementName($entityManager['name'] . '_' . $driverType . '_metadata_driver'); + $mappingDriverDef = $container->getDefinition($mappingService); + $args = $mappingDriverDef->getArguments(); + if ($driverType === 'annotation') { + $args[2] = $entityManager['report_fields_where_declared']; + } elseif ($driverType === 'attribute') { + $args[1] = $entityManager['report_fields_where_declared']; + } elseif ($driverType === 'xml') { + $args[1] ??= SimplifiedXmlDriver::DEFAULT_FILE_EXTENSION; + $args[2] = $entityManager['validate_xml_mapping']; + } else { + continue; + } + + $mappingDriverDef->setArguments($args); + } + + $ormConfigDef->addMethodCall('setEntityNamespaces', [$this->aliasMap]); + } + + /** + * Loads an ORM second level cache bundle mapping information. + * + * @param array $entityManager A configured ORM entity manager + * @param Definition $ormConfigDef A Definition instance + * @param ContainerBuilder $container A ContainerBuilder instance + * + * @example + * entity_managers: + * default: + * second_level_cache: + * region_lifetime: 3600 + * region_lock_lifetime: 60 + * region_cache_driver: apc + * log_enabled: true + * regions: + * my_service_region: + * type: service + * service : "my_service_region" + * + * my_query_region: + * lifetime: 300 + * cache_driver: array + * type: filelock + * + * my_entity_region: + * lifetime: 600 + * cache_driver: + * type: apc + */ + protected function loadOrmSecondLevelCache(array $entityManager, Definition $ormConfigDef, ContainerBuilder $container) + { + $driverId = null; + $enabled = $entityManager['second_level_cache']['enabled']; + + if (isset($entityManager['second_level_cache']['region_cache_driver'])) { + $driverName = 'second_level_cache.region_cache_driver'; + $driverMap = $entityManager['second_level_cache']['region_cache_driver']; + $driverId = $this->loadCacheDriver($driverName, $entityManager['name'], $driverMap, $container); + } + + $configId = sprintf('doctrine.orm.%s_second_level_cache.cache_configuration', $entityManager['name']); + $regionsId = sprintf('doctrine.orm.%s_second_level_cache.regions_configuration', $entityManager['name']); + $driverId = $driverId ?: sprintf('doctrine.orm.%s_second_level_cache.region_cache_driver', $entityManager['name']); + $configDef = $container->setDefinition($configId, new Definition('%doctrine.orm.second_level_cache.cache_configuration.class%')); + $regionsDef = $container + ->setDefinition($regionsId, new Definition('%doctrine.orm.second_level_cache.regions_configuration.class%')) + ->setArguments([$entityManager['second_level_cache']['region_lifetime'], $entityManager['second_level_cache']['region_lock_lifetime']]); + + $slcFactoryId = sprintf('doctrine.orm.%s_second_level_cache.default_cache_factory', $entityManager['name']); + $factoryClass = $entityManager['second_level_cache']['factory'] ?? '%doctrine.orm.second_level_cache.default_cache_factory.class%'; + + $definition = new Definition($factoryClass, [new Reference($regionsId), new Reference($driverId)]); + + $slcFactoryDef = $container + ->setDefinition($slcFactoryId, $definition); + + if (isset($entityManager['second_level_cache']['regions'])) { + foreach ($entityManager['second_level_cache']['regions'] as $name => $region) { + $regionRef = null; + $regionType = $region['type']; + + if ($regionType === 'service') { + $regionId = sprintf('doctrine.orm.%s_second_level_cache.region.%s', $entityManager['name'], $name); + $regionRef = new Reference($region['service']); + + $container->setAlias($regionId, new Alias($region['service'], false)); + } + + if ($regionType === 'default' || $regionType === 'filelock') { + $regionId = sprintf('doctrine.orm.%s_second_level_cache.region.%s', $entityManager['name'], $name); + $driverName = sprintf('second_level_cache.region.%s_driver', $name); + $driverMap = $region['cache_driver']; + $driverId = $this->loadCacheDriver($driverName, $entityManager['name'], $driverMap, $container); + $regionRef = new Reference($regionId); + + $container + ->setDefinition($regionId, new Definition('%doctrine.orm.second_level_cache.default_region.class%')) + ->setArguments([$name, new Reference($driverId), $region['lifetime']]); + } + + if ($regionType === 'filelock') { + $regionId = sprintf('doctrine.orm.%s_second_level_cache.region.%s_filelock', $entityManager['name'], $name); + + $container + ->setDefinition($regionId, new Definition('%doctrine.orm.second_level_cache.filelock_region.class%')) + ->setArguments([$regionRef, $region['lock_path'], $region['lock_lifetime']]); + + $regionRef = new Reference($regionId); + $regionsDef->addMethodCall('getLockLifetime', [$name, $region['lock_lifetime']]); + } + + $regionsDef->addMethodCall('setLifetime', [$name, $region['lifetime']]); + $slcFactoryDef->addMethodCall('setRegion', [$regionRef]); + } + } + + if ($entityManager['second_level_cache']['log_enabled']) { + $loggerChainId = sprintf('doctrine.orm.%s_second_level_cache.logger_chain', $entityManager['name']); + $loggerStatsId = sprintf('doctrine.orm.%s_second_level_cache.logger_statistics', $entityManager['name']); + $loggerChaingDef = $container->setDefinition($loggerChainId, new Definition('%doctrine.orm.second_level_cache.logger_chain.class%')); + $loggerStatsDef = $container->setDefinition($loggerStatsId, new Definition('%doctrine.orm.second_level_cache.logger_statistics.class%')); + + $loggerChaingDef->addMethodCall('setLogger', ['statistics', $loggerStatsDef]); + $configDef->addMethodCall('setCacheLogger', [$loggerChaingDef]); + + foreach ($entityManager['second_level_cache']['loggers'] as $name => $logger) { + $loggerId = sprintf('doctrine.orm.%s_second_level_cache.logger.%s', $entityManager['name'], $name); + $loggerRef = new Reference($logger['service']); + + $container->setAlias($loggerId, new Alias($logger['service'], false)); + $loggerChaingDef->addMethodCall('setLogger', [$name, $loggerRef]); + } + } + + $configDef->addMethodCall('setCacheFactory', [$slcFactoryDef]); + $configDef->addMethodCall('setRegionsConfiguration', [$regionsDef]); + $ormConfigDef->addMethodCall('setSecondLevelCacheEnabled', [$enabled]); + $ormConfigDef->addMethodCall('setSecondLevelCacheConfiguration', [$configDef]); + } + + /** + * Prefixes the relative dependency injection container path with the object manager prefix. + * + * @param string $name + * + * @example $name is 'entity_manager' then the result would be 'doctrine.orm.entity_manager' + */ + protected function getObjectManagerElementName($name): string + { + return 'doctrine.orm.' . $name; + } + + /** + * Noun that describes the mapped objects such as Entity or Document. + * + * Will be used for autodetection of persistent objects directory. + */ + protected function getMappingObjectDefaultName(): string + { + return 'Entity'; + } + + /** + * Relative path from the bundle root to the directory where mapping files reside. + */ + protected function getMappingResourceConfigDirectory(string|null $bundleDir = null): string + { + if ($bundleDir !== null && is_dir($bundleDir . '/config/doctrine')) { + return 'config/doctrine'; + } + + return 'Resources/config/doctrine'; + } + + /** + * Extension used by the mapping files. + */ + protected function getMappingResourceExtension(): string + { + return 'orm'; + } + + /** + * Loads a cache driver. + * + * @param string $cacheName + * @param string $objectManagerName + * @param array $cacheDriver + * + * @throws InvalidArgumentException + */ + protected function loadCacheDriver( + $cacheName, + $objectManagerName, + array $cacheDriver, + ContainerBuilder $container, + ): string { + $aliasId = $this->getObjectManagerElementName(sprintf('%s_%s', $objectManagerName, $cacheName)); + + switch ($cacheDriver['type'] ?? 'pool') { + case 'service': + $serviceId = $cacheDriver['id']; + break; + + case 'pool': + $serviceId = $cacheDriver['pool'] ?? $this->createArrayAdapterCachePool($container, $objectManagerName, $cacheName); + break; + + default: + throw new InvalidArgumentException(sprintf( + 'Unknown cache of type "%s" configured for cache "%s" in entity manager "%s".', + $cacheDriver['type'], + $cacheName, + $objectManagerName, + )); + } + + $container->setAlias($aliasId, new Alias($serviceId, false)); + + return $aliasId; + } + + /** + * Loads a configured entity managers cache drivers. + * + * @param array $entityManager A configured ORM entity manager. + */ + protected function loadOrmCacheDrivers(array $entityManager, ContainerBuilder $container) + { + if (isset($entityManager['metadata_cache_driver'])) { + $this->loadCacheDriver('metadata_cache', $entityManager['name'], $entityManager['metadata_cache_driver'], $container); + } else { + $this->createMetadataCache($entityManager['name'], $container); + } + + $this->loadCacheDriver('result_cache', $entityManager['name'], $entityManager['result_cache_driver'], $container); + $this->loadCacheDriver('query_cache', $entityManager['name'], $entityManager['query_cache_driver'], $container); + } + + private function createMetadataCache(string $objectManagerName, ContainerBuilder $container): void + { + $aliasId = $this->getObjectManagerElementName(sprintf('%s_%s', $objectManagerName, 'metadata_cache')); + $cacheId = sprintf('cache.doctrine.orm.%s.%s', $objectManagerName, 'metadata'); + + $cache = new Definition(ArrayAdapter::class); + + if (! $container->getParameter('kernel.debug')) { + $phpArrayFile = '%kernel.build_dir%' . sprintf('/doctrine/orm/%s_metadata.php', $objectManagerName); + $cacheWarmerServiceId = $this->getObjectManagerElementName(sprintf('%s_%s', $objectManagerName, 'metadata_cache_warmer')); + + $container->register($cacheWarmerServiceId, DoctrineMetadataCacheWarmer::class) + ->setArguments([new Reference(sprintf('doctrine.orm.%s_entity_manager', $objectManagerName)), $phpArrayFile]) + ->addTag('kernel.cache_warmer', ['priority' => 1000]); // priority should be higher than ProxyCacheWarmer + + $cache = new Definition(PhpArrayAdapter::class, [$phpArrayFile, $cache]); + } + + $container->setDefinition($cacheId, $cache); + $container->setAlias($aliasId, $cacheId); + } + + /** + * Loads a property info extractor for each defined entity manager. + */ + private function loadPropertyInfoExtractor(string $entityManagerName, ContainerBuilder $container): void + { + $propertyExtractorDefinition = $container->register(sprintf('doctrine.orm.%s_entity_manager.property_info_extractor', $entityManagerName), DoctrineExtractor::class); + $argumentId = sprintf('doctrine.orm.%s_entity_manager', $entityManagerName); + + $propertyExtractorDefinition->addArgument(new Reference($argumentId)); + + $propertyExtractorDefinition->addTag('property_info.list_extractor', ['priority' => -1001]); + $propertyExtractorDefinition->addTag('property_info.type_extractor', ['priority' => -999]); + $propertyExtractorDefinition->addTag('property_info.access_extractor', ['priority' => -999]); + } + + /** + * Loads a validator loader for each defined entity manager. + */ + private function loadValidatorLoader(string $entityManagerName, ContainerBuilder $container): void + { + $validatorLoaderDefinition = $container->register(sprintf('doctrine.orm.%s_entity_manager.validator_loader', $entityManagerName), DoctrineLoader::class); + $validatorLoaderDefinition->addArgument(new Reference(sprintf('doctrine.orm.%s_entity_manager', $entityManagerName))); + + $validatorLoaderDefinition->addTag('validator.auto_mapper', ['priority' => -100]); + } + + public function getXsdValidationBasePath(): string + { + return __DIR__ . '/../../config/schema'; + } + + public function getNamespace(): string + { + return 'http://symfony.com/schema/dic/doctrine'; + } + + /** + * {@inheritDoc} + */ + public function getConfiguration(array $config, ContainerBuilder $container): Configuration + { + return new Configuration((bool) $container->getParameter('kernel.debug')); + } + + /** + * The class name used by the various mapping drivers. + */ + protected function getMetadataDriverClass(string $driverType): string + { + switch ($driverType) { + case 'driver_chain': + return MappingDriverChain::class; + + case 'annotation': + if (! class_exists(AnnotationDriver::class)) { + throw new LogicException('The annotation driver is only available in doctrine/orm v2.'); + } + + return AnnotationDriver::class; + + case 'xml': + return SimplifiedXmlDriver::class; + + case 'yml': + /* @phpstan-ignore class.notFound */ + return SimplifiedYamlDriver::class; + + case 'php': + /* @phpstan-ignore class.notFound */ + return class_exists(PHPDriver::class) ? PHPDriver::class : LegacyPHPDriver::class; + + case 'staticphp': + /* @phpstan-ignore class.notFound */ + return class_exists(StaticPHPDriver::class) ? StaticPHPDriver::class : LegacyStaticPHPDriver::class; + + case 'attribute': + return AttributeDriver::class; + + default: + throw new LogicException(sprintf('Unknown "%s" metadata driver type.', $driverType)); + } + } + + private function loadMessengerServices(ContainerBuilder $container): void + { + // If the Messenger component is installed, wire it: + + if (! interface_exists(MessageBusInterface::class)) { + return; + } + + $loader = new PhpFileLoader($container, new FileLocator(__DIR__ . '/../../config')); + $loader->load('messenger.php'); + + /** + * The Doctrine transport component (symfony/doctrine-messenger) is optional. + * Remove service definition, if it is not available + */ + if (class_exists(DoctrineTransportFactory::class)) { + return; + } + + $container->removeDefinition('messenger.transport.doctrine.factory'); + $container->removeDefinition('doctrine.orm.messenger.doctrine_schema_listener'); + } + + private function createArrayAdapterCachePool(ContainerBuilder $container, string $objectManagerName, string $cacheName): string + { + $id = sprintf('cache.doctrine.orm.%s.%s', $objectManagerName, str_replace('_cache', '', $cacheName)); + + $poolDefinition = $container->register($id, ArrayAdapter::class); + $poolDefinition->addTag('cache.pool'); + $container->setDefinition($id, $poolDefinition); + + return $id; + } + + /** + * @param string[] $connWithLogging + * @param string[] $connWithProfiling + * @param string[] $connWithBacktrace + * @param string[] $connWithTtl + */ + private function registerDbalMiddlewares( + ContainerBuilder $container, + array $connWithLogging, + array $connWithProfiling, + array $connWithBacktrace, + array $connWithTtl, + ): void { + $loader = new PhpFileLoader($container, new FileLocator(__DIR__ . '/../../config')); + $loader->load('middlewares.php'); + + $loggingMiddlewareAbstractDef = $container->getDefinition('doctrine.dbal.logging_middleware'); + foreach ($connWithLogging as $connName) { + $loggingMiddlewareAbstractDef->addTag('doctrine.middleware', ['connection' => $connName, 'priority' => 10]); + } + + $container->getDefinition('doctrine.debug_data_holder')->replaceArgument(0, $connWithBacktrace); + $debugMiddlewareAbstractDef = $container->getDefinition('doctrine.dbal.debug_middleware'); + foreach ($connWithProfiling as $connName) { + $debugMiddlewareAbstractDef + ->addTag('doctrine.middleware', ['connection' => $connName, 'priority' => 10]); + } + + $idleConnectionMiddlewareAbstractDef = $container->getDefinition('doctrine.dbal.idle_connection_middleware'); + foreach ($connWithTtl as $connName) { + $idleConnectionMiddlewareAbstractDef + ->addTag('doctrine.middleware', ['connection' => $connName, 'priority' => 10]); + } + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/DoctrineBundle.php b/backend/vendor/doctrine/doctrine-bundle/src/DoctrineBundle.php new file mode 100644 index 0000000..b258059 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/DoctrineBundle.php @@ -0,0 +1,179 @@ +addCompilerPass(new class () implements CompilerPassInterface { + public function process(ContainerBuilder $container): void + { + if ($container->has('session.handler')) { + return; + } + + $container->removeDefinition('doctrine.orm.listeners.pdo_session_handler_schema_listener'); + } + }, PassConfig::TYPE_BEFORE_OPTIMIZATION); + + $container->addCompilerPass(new RegisterEventListenersAndSubscribersPass('doctrine.connections', 'doctrine.dbal.%s_connection.event_manager', 'doctrine'), PassConfig::TYPE_BEFORE_OPTIMIZATION); + + if ($container->hasExtension('security')) { + $security = $container->getExtension('security'); + + if ($security instanceof SecurityExtension) { + $security->addUserProviderFactory(new EntityFactory('entity', 'doctrine.orm.security.user.provider')); + } + } + + $container->addCompilerPass(new CacheCompatibilityPass()); + $container->addCompilerPass(new DoctrineValidationPass('orm')); + $container->addCompilerPass(new EntityListenerPass()); + $container->addCompilerPass(new ServiceRepositoryCompilerPass()); + $container->addCompilerPass(new IdGeneratorPass()); + $container->addCompilerPass(new DbalSchemaFilterPass()); + $container->addCompilerPass(new CacheSchemaSubscriberPass(), PassConfig::TYPE_BEFORE_REMOVING, -10); + $container->addCompilerPass(new RemoveProfilerControllerPass()); + $container->addCompilerPass(new RemoveLoggingMiddlewarePass()); + $container->addCompilerPass(new MiddlewaresPass()); + $container->addCompilerPass(new RegisterUidTypePass()); + + if (! class_exists(RegisterDatePointTypePass::class)) { + return; + } + + $container->addCompilerPass(new RegisterDatePointTypePass()); + } + + public function boot(): void + { + // Register an autoloader for proxies when native lazy objects are not in use + // to avoid issues when unserializing them when the ORM is used. + if ($this->container->hasParameter('doctrine.orm.enable_native_lazy_objects') && $this->container->getParameter('doctrine.orm.enable_native_lazy_objects')) { + return; + } + + if (! $this->container->hasParameter('doctrine.orm.proxy_namespace')) { + return; + } + + $namespace = (string) $this->container->getParameter('doctrine.orm.proxy_namespace'); + $dir = (string) $this->container->getParameter('doctrine.orm.proxy_dir'); + $proxyGenerator = null; + + if ($this->container->getParameter('doctrine.orm.auto_generate_proxy_classes')) { + // See https://github.com/symfony/symfony/pull/3419 for usage of references + /** @psalm-suppress UnsupportedPropertyReferenceUsage */ + $container = &$this->container; + + $proxyGenerator = static function ($proxyDir, $proxyNamespace, $class) use (&$container): void { + $originalClassName = (new DefaultProxyClassNameResolver())->resolveClassName($class); + $registry = $container->get('doctrine'); + assert($registry instanceof Registry); + + foreach ($registry->getManagers() as $em) { + assert($em instanceof EntityManagerInterface); + if (! $em->getConfiguration()->getAutoGenerateProxyClasses()) { + continue; + } + + $metadataFactory = $em->getMetadataFactory(); + + if ($metadataFactory->isTransient($originalClassName)) { + continue; + } + + $classMetadata = $metadataFactory->getMetadataFor($originalClassName); + + $em->getProxyFactory()->generateProxyClasses([$classMetadata]); + + clearstatcache(true, Autoloader::resolveFile($proxyDir, $proxyNamespace, $class)); + + break; + } + }; + } + + $this->autoloader = Autoloader::register($dir, $namespace, $proxyGenerator); + } + + public function shutdown(): void + { + if ($this->autoloader !== null) { + spl_autoload_unregister($this->autoloader); + $this->autoloader = null; + } + + // Clear all entity managers to clear references to entities for GC + if ($this->container->hasParameter('doctrine.entity_managers')) { + foreach ($this->container->getParameter('doctrine.entity_managers') as $id) { + if (! $this->container->initialized($id)) { + continue; + } + + $this->container->get($id)->clear(); + } + } + + // Close all connections to avoid reaching too many connections in the process when booting again later (tests) + if (! $this->container->hasParameter('doctrine.connections')) { + return; + } + + foreach ($this->container->getParameter('doctrine.connections') as $id) { + if (! $this->container->initialized($id)) { + continue; + } + + $this->container->get($id)->close(); + } + } + + public function registerCommands(Application $application): void + { + } + + public function getPath(): string + { + return dirname(__DIR__); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/EventSubscriber/EventSubscriberInterface.php b/backend/vendor/doctrine/doctrine-bundle/src/EventSubscriber/EventSubscriberInterface.php new file mode 100644 index 0000000..550aac5 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/EventSubscriber/EventSubscriberInterface.php @@ -0,0 +1,12 @@ +> $filtersParameters + */ + public function __construct( + private readonly array $enabledFilters = [], + private readonly array $filtersParameters = [], + ) { + } + + /** + * Create a connection by name. + * + * @return void + */ + public function configure(EntityManagerInterface $entityManager) + { + $this->enableFilters($entityManager); + } + + /** + * Enables filters for a given entity manager + */ + private function enableFilters(EntityManagerInterface $entityManager): void + { + if (empty($this->enabledFilters)) { + return; + } + + $filterCollection = $entityManager->getFilters(); + foreach ($this->enabledFilters as $filter) { + $this->setFilterParameters($filter, $filterCollection->enable($filter)); + } + } + + /** + * Sets default parameters for a given filter + */ + private function setFilterParameters(string $name, SQLFilter $filter): void + { + if (empty($this->filtersParameters[$name])) { + return; + } + + $parameters = $this->filtersParameters[$name]; + foreach ($parameters as $paramName => $paramValue) { + $filter->setParameter($paramName, $paramValue); + } + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Mapping/ClassMetadataCollection.php b/backend/vendor/doctrine/doctrine-bundle/src/Mapping/ClassMetadataCollection.php new file mode 100644 index 0000000..f3bbcfd --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Mapping/ClassMetadataCollection.php @@ -0,0 +1,49 @@ +metadata; + } + + /** @param string $path */ + public function setPath($path) + { + $this->path = $path; + } + + /** @return string|null */ + public function getPath() + { + return $this->path; + } + + /** @param string $namespace */ + public function setNamespace($namespace) + { + $this->namespace = $namespace; + } + + /** @return string|null */ + public function getNamespace() + { + return $this->namespace; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Mapping/ClassMetadataFactory.php b/backend/vendor/doctrine/doctrine-bundle/src/Mapping/ClassMetadataFactory.php new file mode 100644 index 0000000..5f70ca3 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Mapping/ClassMetadataFactory.php @@ -0,0 +1,36 @@ +customGeneratorDefinition; + + if (! isset($customGeneratorDefinition['instance'])) { + return; + } + + /** @phpstan-ignore function.impossibleType, instanceof.alwaysFalse */ + assert($customGeneratorDefinition['instance'] instanceof AbstractIdGenerator); + + $class->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_CUSTOM); + $class->setIdGenerator($customGeneratorDefinition['instance']); + unset($customGeneratorDefinition['instance']); + $class->setCustomGeneratorDefinition($customGeneratorDefinition); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Mapping/ContainerEntityListenerResolver.php b/backend/vendor/doctrine/doctrine-bundle/src/Mapping/ContainerEntityListenerResolver.php new file mode 100644 index 0000000..fc9dfe1 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Mapping/ContainerEntityListenerResolver.php @@ -0,0 +1,100 @@ +instances = []; + + return; + } + + $className = $this->normalizeClassName($className); + + unset($this->instances[$className]); + } + + /** + * {@inheritDoc} + */ + public function register($object): void + { + if (! is_object($object)) { + throw new InvalidArgumentException(sprintf('An object was expected, but got "%s".', gettype($object))); + } + + $className = $this->normalizeClassName($object::class); + + $this->instances[$className] = $object; + } + + /** + * {@inheritDoc} + */ + public function registerService($className, $serviceId) + { + $this->serviceIds[$this->normalizeClassName($className)] = $serviceId; + } + + /** + * {@inheritDoc} + */ + public function resolve($className): object + { + $className = $this->normalizeClassName($className); + + if (! isset($this->instances[$className])) { + if (isset($this->serviceIds[$className])) { + $this->instances[$className] = $this->resolveService($this->serviceIds[$className]); + } else { + $this->instances[$className] = new $className(); + } + } + + return $this->instances[$className]; + } + + private function resolveService(string $serviceId): object + { + if (! $this->container->has($serviceId)) { + throw new RuntimeException(sprintf('There is no service named "%s"', $serviceId)); + } + + return $this->container->get($serviceId); + } + + private function normalizeClassName(string $className): string + { + return trim($className, '\\'); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Mapping/DisconnectedMetadataFactory.php b/backend/vendor/doctrine/doctrine-bundle/src/Mapping/DisconnectedMetadataFactory.php new file mode 100644 index 0000000..fa572c0 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Mapping/DisconnectedMetadataFactory.php @@ -0,0 +1,176 @@ +getNamespace(); + $metadata = $this->getMetadataForNamespace($namespace); + if (! $metadata->getMetadata()) { + throw new RuntimeException(sprintf('Bundle "%s" does not contain any mapped entities.', $bundle->getName())); + } + + $path = $this->getBasePathForClass($bundle->getName(), $bundle->getNamespace(), $bundle->getPath()); + + $metadata->setPath($path); + $metadata->setNamespace($bundle->getNamespace()); + + return $metadata; + } + + /** + * Gets the metadata of a class. + * + * @param string $class A class name + * @param string $path The path where the class is stored (if known) + * + * @return ClassMetadataCollection A ClassMetadataCollection instance + * + * @throws MappingException When class is not valid entity or mapped superclass. + */ + public function getClassMetadata($class, $path = null) + { + $metadata = $this->getMetadataForClass($class); + if (! $metadata->getMetadata()) { + throw MappingException::classIsNotAValidEntityOrMappedSuperClass($class); + } + + $this->findNamespaceAndPathForMetadata($metadata, $path); + + return $metadata; + } + + /** + * Gets the metadata of all classes of a namespace. + * + * @param string $namespace A namespace name + * @param string $path The path where the class is stored (if known) + * + * @return ClassMetadataCollection A ClassMetadataCollection instance + * + * @throws RuntimeException When namespace not contain mapped entities. + */ + public function getNamespaceMetadata($namespace, $path = null) + { + $metadata = $this->getMetadataForNamespace($namespace); + if (! $metadata->getMetadata()) { + throw new RuntimeException(sprintf('Namespace "%s" does not contain any mapped entities.', $namespace)); + } + + $this->findNamespaceAndPathForMetadata($metadata, $path); + + return $metadata; + } + + /** + * Find and configure path and namespace for the metadata collection. + * + * @param string|null $path + * + * @throws RuntimeException When unable to determine the path. + */ + public function findNamespaceAndPathForMetadata(ClassMetadataCollection $metadata, $path = null) + { + $r = new ReflectionClass($metadata->getMetadata()[0]->name); + $metadata->setPath($this->getBasePathForClass($r->getName(), $r->getNamespaceName(), dirname($r->getFilename()))); + $metadata->setNamespace($r->getNamespaceName()); + } + + /** + * Get a base path for a class + * + * @throws RuntimeException When base path not found. + */ + private function getBasePathForClass(string $name, string $namespace, string $path): string + { + $namespace = str_replace('\\', '/', $namespace); + $search = str_replace('\\', '/', $path); + $destination = str_replace('/' . $namespace, '', $search, $c); + + if ($c !== 1) { + throw new RuntimeException(sprintf('Can\'t find base path for "%s" (path: "%s", destination: "%s").', $name, $path, $destination)); + } + + return $destination; + } + + private function getMetadataForNamespace(string $namespace): ClassMetadataCollection + { + $metadata = []; + foreach ($this->getAllMetadata() as $m) { + if (strpos($m->name, $namespace) !== 0) { + continue; + } + + $metadata[] = $m; + } + + return new ClassMetadataCollection($metadata); + } + + private function getMetadataForClass(string $entity): ClassMetadataCollection + { + foreach ($this->registry->getManagers() as $em) { + /* @phpstan-ignore class.notFound */ + $cmf = new DisconnectedClassMetadataFactory(); + $cmf->setEntityManager($em); + + if (! $cmf->isTransient($entity)) { + return new ClassMetadataCollection([$cmf->getMetadataFor($entity)]); + } + } + + return new ClassMetadataCollection([]); + } + + /** @return ClassMetadata[] */ + private function getAllMetadata(): array + { + $metadata = []; + foreach ($this->registry->getManagers() as $em) { + /* @phpstan-ignore class.notFound */ + $cmf = new DisconnectedClassMetadataFactory(); + $cmf->setEntityManager($em); + foreach ($cmf->getAllMetadata() as $m) { + $metadata[] = $m; + } + } + + return $metadata; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Mapping/EntityListenerServiceResolver.php b/backend/vendor/doctrine/doctrine-bundle/src/Mapping/EntityListenerServiceResolver.php new file mode 100644 index 0000000..487f673 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Mapping/EntityListenerServiceResolver.php @@ -0,0 +1,17 @@ +driver->getAllClassNames(); + } + + /** + * {@inheritDoc} + */ + public function isTransient($className): bool + { + return $this->driver->isTransient($className); + } + + /** + * {@inheritDoc} + */ + public function loadMetadataForClass($className, ClassMetadata $metadata): void + { + $this->driver->loadMetadataForClass($className, $metadata); + + if ( + ! $metadata instanceof OrmClassMetadata + || $metadata->generatorType !== OrmClassMetadata::GENERATOR_TYPE_CUSTOM + || ! isset($metadata->customGeneratorDefinition['class']) + || ! $this->idGeneratorLocator->has($metadata->customGeneratorDefinition['class']) + ) { + return; + } + + $idGenerator = $this->idGeneratorLocator->get($metadata->customGeneratorDefinition['class']); + $metadata->setCustomGeneratorDefinition(['instance' => $idGenerator] + $metadata->customGeneratorDefinition); + $metadata->setIdGeneratorType(OrmClassMetadata::GENERATOR_TYPE_NONE); + } + + /** + * Returns the inner driver + */ + public function getDriver(): MappingDriverInterface + { + return $this->driver; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Middleware/BacktraceDebugDataHolder.php b/backend/vendor/doctrine/doctrine-bundle/src/Middleware/BacktraceDebugDataHolder.php new file mode 100644 index 0000000..4f1ef47 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Middleware/BacktraceDebugDataHolder.php @@ -0,0 +1,90 @@ +[]> */ + private array $backtraces = []; + + /** @param string[] $connWithBacktraces */ + public function __construct( + private readonly array $connWithBacktraces, + ) { + } + + public function reset(): void + { + parent::reset(); + + $this->backtraces = []; + } + + public function addQuery(string $connectionName, Query $query): void + { + parent::addQuery($connectionName, $query); + + if (! in_array($connectionName, $this->connWithBacktraces, true)) { + return; + } + + // array_slice to skip middleware calls in the trace + $this->backtraces[$connectionName][] = array_slice(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), 2); + } + + /** @return array[]> */ + public function getData(): array + { + $dataWithBacktraces = []; + + $data = parent::getData(); + foreach ($data as $connectionName => $dataForConn) { + $dataWithBacktraces[$connectionName] = $this->getDataForConnection($connectionName, $dataForConn); + } + + return $dataWithBacktraces; + } + + /** + * @param mixed[][] $dataForConn + * + * @return mixed[][] + */ + private function getDataForConnection(string $connectionName, array $dataForConn): array + { + $data = []; + + foreach ($dataForConn as $idx => $record) { + $data[] = $this->addBacktracesIfAvailable($connectionName, $record, $idx); + } + + return $data; + } + + /** + * @param mixed[] $record + * + * @return mixed[] + */ + private function addBacktracesIfAvailable(string $connectionName, array $record, int $idx): array + { + if (! isset($this->backtraces[$connectionName])) { + return $record; + } + + $record['backtrace'] = $this->backtraces[$connectionName][$idx]; + + return $record; + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Middleware/ConnectionNameAwareInterface.php b/backend/vendor/doctrine/doctrine-bundle/src/Middleware/ConnectionNameAwareInterface.php new file mode 100644 index 0000000..8415871 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Middleware/ConnectionNameAwareInterface.php @@ -0,0 +1,10 @@ +connectionName = $name; + } + + public function wrap(DriverInterface $driver): DriverInterface + { + return new Driver($driver, $this->debugDataHolder, $this->stopwatch, $this->connectionName); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Middleware/IdleConnectionMiddleware.php b/backend/vendor/doctrine/doctrine-bundle/src/Middleware/IdleConnectionMiddleware.php new file mode 100644 index 0000000..370a508 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Middleware/IdleConnectionMiddleware.php @@ -0,0 +1,40 @@ + $connectionExpiries + * @param array $ttlByConnection + */ + public function __construct( + private readonly ArrayObject $connectionExpiries, + private readonly array $ttlByConnection, + ) { + } + + public function setConnectionName(string $name): void + { + $this->connectionName = $name; + } + + public function wrap(Driver $driver): IdleConnectionDriver + { + return new IdleConnectionDriver( + $driver, + $this->connectionExpiries, + $this->ttlByConnection[$this->connectionName], + $this->connectionName, + ); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Orm/ManagerRegistryAwareEntityManagerProvider.php b/backend/vendor/doctrine/doctrine-bundle/src/Orm/ManagerRegistryAwareEntityManagerProvider.php new file mode 100644 index 0000000..f076666 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Orm/ManagerRegistryAwareEntityManagerProvider.php @@ -0,0 +1,43 @@ +getManager($this->managerRegistry->getDefaultManagerName()); + } + + public function getManager(string $name): EntityManagerInterface + { + $em = $this->managerRegistry->getManager($name); + + if ($em instanceof EntityManagerInterface) { + return $em; + } + + throw new RuntimeException( + sprintf( + 'Only managers of type "%s" are supported. Instance of "%s given.', + EntityManagerInterface::class, + get_debug_type($em), + ), + ); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Registry.php b/backend/vendor/doctrine/doctrine-bundle/src/Registry.php new file mode 100644 index 0000000..8af79a2 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Registry.php @@ -0,0 +1,113 @@ +container = $container; + + parent::__construct('ORM', $connections, $entityManagers, $defaultConnection, $defaultEntityManager, Proxy::class); + } + + /** + * Resolves a registered namespace alias to the full namespace. + * + * This method looks for the alias in all registered entity managers. + * + * @see Configuration::getEntityNamespace + * + * @param string $alias The alias + * + * @return string The full namespace + */ + public function getAliasNamespace($alias) + { + foreach (array_keys($this->getManagers()) as $name) { + $objectManager = $this->getManager($name); + + if (! $objectManager instanceof EntityManagerInterface) { + continue; + } + + try { + /** @phpstan-ignore method.notFound (ORM < 3 specific) */ + return $objectManager->getConfiguration()->getEntityNamespace($alias); + /* @phpstan-ignore class.notFound */ + } catch (ORMException) { + } + } + + /* @phpstan-ignore class.notFound */ + throw ORMException::unknownEntityNamespace($alias); + } + + public function reset(): void + { + foreach ($this->getManagerNames() as $managerName => $serviceId) { + $this->resetOrClearManager($managerName, $serviceId); + } + } + + private function resetOrClearManager(string $managerName, string $serviceId): void + { + if (! $this->container->initialized($serviceId)) { + return; + } + + $manager = $this->container->get($serviceId); + + assert($manager instanceof EntityManagerInterface); + + // Determine if the version of symfony/dependency-injection is >= 7.3 + /** @phpstan-ignore function.alreadyNarrowedType */ + $sfNativeLazyObjects = method_exists('Symfony\Component\DependencyInjection\ContainerBuilder', 'findTaggedResourceIds'); + + if (PHP_VERSION_ID < 80400 || ! $sfNativeLazyObjects) { + if ((! $manager instanceof LazyLoadingInterface && ! $manager instanceof LazyObjectInterface) || $manager->isOpen()) { + $manager->clear(); + + return; + } + } else { + $r = new ReflectionClass($manager); + if ($r->isUninitializedLazyObject($manager)) { + return; + } + + if ($manager->isOpen()) { + $manager->clear(); + + return; + } + } + + $this->resetManager($managerName); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Repository/ContainerRepositoryFactory.php b/backend/vendor/doctrine/doctrine-bundle/src/Repository/ContainerRepositoryFactory.php new file mode 100644 index 0000000..098732b --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Repository/ContainerRepositoryFactory.php @@ -0,0 +1,118 @@ + */ + private array $managedRepositories = []; + + /** @param ContainerInterface $container A service locator containing the repositories */ + public function __construct( + private readonly ContainerInterface $container, + ) { + } + + /** + * @param class-string $entityName + * + * @return ObjectRepository + * @phpstan-return ($strictTypeCheck is true ? EntityRepository : ObjectRepository) + * + * @template T of object + */ + private function doGetRepository(EntityManagerInterface $entityManager, string $entityName, bool $strictTypeCheck): ObjectRepository + { + $metadata = $entityManager->getClassMetadata($entityName); + $repositoryServiceId = $metadata->customRepositoryClassName; + + $customRepositoryName = $metadata->customRepositoryClassName; + if ($customRepositoryName !== null) { + // fetch from the container + if ($this->container->has($customRepositoryName)) { + $repository = $this->container->get($customRepositoryName); + + if (! $repository instanceof EntityRepository && $strictTypeCheck) { + throw new RuntimeException(sprintf('The service "%s" must extend EntityRepository (e.g. by extending ServiceEntityRepository), "%s" given.', $repositoryServiceId, get_debug_type($repository))); + } + + if (! $repository instanceof ObjectRepository) { + throw new RuntimeException(sprintf('The service "%s" must implement ObjectRepository (or extend a base class, like ServiceEntityRepository), "%s" given.', $repositoryServiceId, get_debug_type($repository))); + } + + if (! $repository instanceof EntityRepository) { + Deprecation::trigger( + 'doctrine/doctrine-bundle', + 'https://github.com/doctrine/DoctrineBundle/pull/1722', + 'The service "%s" of type "%s" should extend "%s", not doing so is deprecated.', + $repositoryServiceId, + get_debug_type($repository), + EntityRepository::class, + ); + } + + /** @phpstan-var ObjectRepository */ + return $repository; + } + + // if not in the container but the class/id implements the interface, throw an error + if (is_a($customRepositoryName, ServiceEntityRepositoryInterface::class, true)) { + throw new RuntimeException(sprintf('The "%s" entity repository implements "%s", but its service could not be found. Make sure the service exists and is tagged with "%s".', $customRepositoryName, ServiceEntityRepositoryInterface::class, ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG)); + } + + if (! class_exists($customRepositoryName)) { + throw new RuntimeException(sprintf('The "%s" entity has a repositoryClass set to "%s", but this is not a valid class. Check your class naming. If this is meant to be a service id, make sure this service exists and is tagged with "%s".', $metadata->name, $customRepositoryName, ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG)); + } + + // allow the repository to be created below + } + + return $this->getOrCreateRepository($entityManager, $metadata); + } + + /** + * @param ClassMetadata $metadata + * + * @return ObjectRepository + * + * @template TEntity of object + */ + private function getOrCreateRepository( + EntityManagerInterface $entityManager, + ClassMetadata $metadata, + ): ObjectRepository { + $repositoryHash = $metadata->getName() . spl_object_hash($entityManager); + if (isset($this->managedRepositories[$repositoryHash])) { + /** @phpstan-var ObjectRepository */ + return $this->managedRepositories[$repositoryHash]; + } + + $repositoryClassName = $metadata->customRepositoryClassName ?: $entityManager->getConfiguration()->getDefaultRepositoryClassName(); + + /** @phpstan-var ObjectRepository */ + return $this->managedRepositories[$repositoryHash] = new $repositoryClassName($entityManager, $metadata); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Repository/LazyServiceEntityRepository.php b/backend/vendor/doctrine/doctrine-bundle/src/Repository/LazyServiceEntityRepository.php new file mode 100644 index 0000000..48dbb86 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Repository/LazyServiceEntityRepository.php @@ -0,0 +1,77 @@ + + */ +class LazyServiceEntityRepository extends EntityRepository implements ServiceEntityRepositoryInterface +{ + /** + * @param string $entityClass The class name of the entity this repository manages + * @phpstan-param class-string $entityClass + */ + public function __construct( + private readonly ManagerRegistry $registry, + private readonly string $entityClass, + ) { + if ($this instanceof LazyObjectInterface) { + $this->initialize(); + + return; + } + + unset($this->_em); + unset($this->_class); + unset($this->_entityName); + } + + /** @return mixed */ + public function __get(string $name) + { + $this->initialize(); + + $scope = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['class'] ?? null; + + return (fn (): mixed => $this->$name)->bindTo($this, $scope)(); + } + + public function __isset(string $name): bool + { + $this->initialize(); + + $scope = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['class'] ?? null; + + return (fn (): bool => isset($this->$name))->bindTo($this, $scope)(); + } + + private function initialize(): void + { + $manager = $this->registry->getManagerForClass($this->entityClass); + + if (! $manager instanceof EntityManagerInterface) { + throw new LogicException(sprintf( + 'Could not find the entity manager for class "%s". Check your Doctrine configuration to make sure it is configured to load this entity’s metadata.', + $this->entityClass, + )); + } + + parent::__construct($manager, $manager->getClassMetadata($this->entityClass)); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Repository/RepositoryFactoryCompatibility.php b/backend/vendor/doctrine/doctrine-bundle/src/Repository/RepositoryFactoryCompatibility.php new file mode 100644 index 0000000..cd23ba2 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Repository/RepositoryFactoryCompatibility.php @@ -0,0 +1,43 @@ +hasReturnType()) { + // ORM >= 3 + /** @internal */ + trait RepositoryFactoryCompatibility + { + /** + * Gets the repository for an entity class. + * + * @param class-string $entityName + * + * @return EntityRepository + * + * @template T of object + */ + public function getRepository(EntityManagerInterface $entityManager, string $entityName): EntityRepository + { + return $this->doGetRepository($entityManager, $entityName, true); + } + } +} else { + // ORM 2 + /** @internal */ + trait RepositoryFactoryCompatibility + { + /** {@inheritDoc} */ + public function getRepository(EntityManagerInterface $entityManager, $entityName): ObjectRepository + { + return $this->doGetRepository($entityManager, $entityName, false); + } + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Repository/ServiceEntityRepository.php b/backend/vendor/doctrine/doctrine-bundle/src/Repository/ServiceEntityRepository.php new file mode 100644 index 0000000..48545d8 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Repository/ServiceEntityRepository.php @@ -0,0 +1,55 @@ + + */ + class ServiceEntityRepository extends LazyServiceEntityRepository + { + } +} else { + // ORM 3 + /** + * Optional EntityRepository base class with a simplified constructor (for autowiring). + * + * To use in your class, inject the "registry" service and call + * the parent constructor. For example: + * + * class YourEntityRepository extends ServiceEntityRepository + * { + * public function __construct(ManagerRegistry $registry) + * { + * parent::__construct($registry, YourEntity::class); + * } + * } + * + * @template T of object + * @template-extends ServiceEntityRepositoryProxy + */ + class ServiceEntityRepository extends ServiceEntityRepositoryProxy + { + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Repository/ServiceEntityRepositoryInterface.php b/backend/vendor/doctrine/doctrine-bundle/src/Repository/ServiceEntityRepositoryInterface.php new file mode 100644 index 0000000..ddbb923 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Repository/ServiceEntityRepositoryInterface.php @@ -0,0 +1,12 @@ + + */ +class ServiceEntityRepositoryProxy extends EntityRepository implements ServiceEntityRepositoryInterface +{ + /** @var EntityRepository */ + private EntityRepository|null $repository = null; + + /** @param class-string $entityClass The class name of the entity this repository manages */ + public function __construct( + private readonly ManagerRegistry $registry, + private readonly string $entityClass, + ) { + if (! $this instanceof LazyObjectInterface) { + return; + } + + $this->repository = $this->resolveRepository(); + } + + public function createQueryBuilder(string $alias, string|null $indexBy = null): QueryBuilder + { + return ($this->repository ??= $this->resolveRepository()) + ->createQueryBuilder($alias, $indexBy); + } + + public function createResultSetMappingBuilder(string $alias): ResultSetMappingBuilder + { + return ($this->repository ??= $this->resolveRepository()) + ->createResultSetMappingBuilder($alias); + } + + public function find(mixed $id, LockMode|int|null $lockMode = null, int|null $lockVersion = null): object|null + { + /** @psalm-suppress InvalidReturnStatement This proxy is used only in combination with newer parent class */ + return ($this->repository ??= $this->resolveRepository()) + ->find($id, $lockMode, $lockVersion); + } + + /** + * {@inheritDoc} + * + * @psalm-suppress InvalidReturnStatement This proxy is used only in combination with newer parent class + * @psalm-suppress InvalidReturnType This proxy is used only in combination with newer parent class + */ + public function findBy(array $criteria, array|null $orderBy = null, int|null $limit = null, int|null $offset = null): array + { + return ($this->repository ??= $this->resolveRepository()) + ->findBy($criteria, $orderBy, $limit, $offset); + } + + /** {@inheritDoc} */ + public function findOneBy(array $criteria, array|null $orderBy = null): object|null + { + /** @psalm-suppress InvalidReturnStatement This proxy is used only in combination with newer parent class */ + return ($this->repository ??= $this->resolveRepository()) + ->findOneBy($criteria, $orderBy); + } + + /** {@inheritDoc} */ + public function count(array $criteria = []): int + { + return ($this->repository ??= $this->resolveRepository())->count($criteria); + } + + /** + * {@inheritDoc} + */ + public function __call(string $method, array $arguments): mixed + { + return ($this->repository ??= $this->resolveRepository())->$method(...$arguments); + } + + protected function getEntityName(): string + { + return ($this->repository ??= $this->resolveRepository())->getEntityName(); + } + + protected function getEntityManager(): EntityManagerInterface + { + return ($this->repository ??= $this->resolveRepository())->getEntityManager(); + } + + /** @psalm-suppress InvalidReturnType This proxy is used only in combination with newer parent class */ + protected function getClassMetadata(): ClassMetadata + { + /** @psalm-suppress InvalidReturnStatement This proxy is used only in combination with newer parent class */ + return ($this->repository ??= $this->resolveRepository())->getClassMetadata(); + } + + /** @phpstan-return AbstractLazyCollection&Selectable */ + public function matching(Criteria $criteria): AbstractLazyCollection&Selectable + { + return ($this->repository ??= $this->resolveRepository())->matching($criteria); + } + + /** @return EntityRepository */ + private function resolveRepository(): EntityRepository + { + $manager = $this->registry->getManagerForClass($this->entityClass); + + if (! $manager instanceof EntityManagerInterface) { + throw new LogicException(sprintf( + 'Could not find the entity manager for class "%s". Check your Doctrine configuration to make sure it is configured to load this entity’s metadata.', + $this->entityClass, + )); + } + + /** @var ClassMetadata $classMetadata */ + $classMetadata = $manager->getClassMetadata($this->entityClass); + + return new EntityRepository($manager, $classMetadata); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/src/Twig/DoctrineExtension.php b/backend/vendor/doctrine/doctrine-bundle/src/Twig/DoctrineExtension.php new file mode 100644 index 0000000..c21e84f --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/src/Twig/DoctrineExtension.php @@ -0,0 +1,211 @@ + ['html']]), + new TwigFilter('doctrine_format_sql', [$this, 'formatSql'], ['is_safe' => ['html']]), + new TwigFilter('doctrine_replace_query_parameters', [$this, 'replaceQueryParameters']), + ]; + $options = ['deprecated' => true]; + // exists since twig/twig 3.15 + if (class_exists(DeprecatedCallableInfo::class)) { + $options = ['deprecation_info' => new DeprecatedCallableInfo('doctrine/doctrine-bundle', '2.1')]; + } + + return array_merge($out, [ + new TwigFilter('doctrine_pretty_query', [$this, 'formatQuery'], ['is_safe' => ['html']] + $options), + ]); + } + + /** + * Escape parameters of a SQL query + * DON'T USE THIS FUNCTION OUTSIDE ITS INTENDED SCOPE + * + * @internal + * + * @return string + */ + public static function escapeFunction(mixed $parameter) + { + $result = $parameter; + + switch (true) { + // Check if result is non-unicode string using PCRE_UTF8 modifier + case is_string($result) && ! preg_match('//u', $result): + $result = '0x' . strtoupper(bin2hex($result)); + break; + + case is_string($result): + $result = "'" . addslashes($result) . "'"; + break; + + case is_array($result): + foreach ($result as &$value) { + $value = static::escapeFunction($value); + } + + $result = implode(', ', $result) ?: 'NULL'; + break; + + case $result instanceof Stringable: + $result = addslashes((string) $result); + break; + + case $result === null: + $result = 'NULL'; + break; + + case is_bool($result): + $result = $result ? '1' : '0'; + break; + } + + return $result; + } + + /** + * Return a query with the parameters replaced + * + * @param string $query + * @param array|Data $parameters + * + * @return string + */ + public function replaceQueryParameters($query, $parameters) + { + if ($parameters instanceof Data) { + $parameters = $parameters->getValue(true); + } + + $keys = array_keys($parameters); + if (count(array_filter($keys, 'is_int')) === count($keys)) { + $parameters = array_values($parameters); + } + + $i = 0; + + return preg_replace_callback( + '/(?setUpSqlFormatter(true, true); + + if ($highlightOnly) { + return $this->sqlFormatter->highlight($sql); + } + + return sprintf( + '
%s
', + $this->sqlFormatter->format($sql), + ); + } + + public function prettifySql(string $sql): string + { + $this->setUpSqlFormatter(); + + return $this->sqlFormatter->highlight($sql); + } + + public function formatSql(string $sql, bool $highlight): string + { + $this->setUpSqlFormatter($highlight); + + return $this->sqlFormatter->format($sql); + } + + private function setUpSqlFormatter(bool $highlight = true, bool $legacy = false): void + { + $this->sqlFormatter = new SqlFormatter($highlight ? new HtmlHighlighter([ + HtmlHighlighter::HIGHLIGHT_PRE => 'class="highlight highlight-sql"', + HtmlHighlighter::HIGHLIGHT_QUOTE => 'class="string"', + HtmlHighlighter::HIGHLIGHT_BACKTICK_QUOTE => 'class="string"', + HtmlHighlighter::HIGHLIGHT_RESERVED => 'class="keyword"', + HtmlHighlighter::HIGHLIGHT_BOUNDARY => 'class="symbol"', + HtmlHighlighter::HIGHLIGHT_NUMBER => 'class="number"', + HtmlHighlighter::HIGHLIGHT_WORD => 'class="word"', + HtmlHighlighter::HIGHLIGHT_ERROR => 'class="error"', + HtmlHighlighter::HIGHLIGHT_COMMENT => 'class="comment"', + HtmlHighlighter::HIGHLIGHT_VARIABLE => 'class="variable"', + ], ! $legacy) : new NullHighlighter()); + } +} diff --git a/backend/vendor/doctrine/doctrine-bundle/templates/Collector/database.svg b/backend/vendor/doctrine/doctrine-bundle/templates/Collector/database.svg new file mode 100644 index 0000000..40a2b45 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/templates/Collector/database.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/backend/vendor/doctrine/doctrine-bundle/templates/Collector/db.html.twig b/backend/vendor/doctrine/doctrine-bundle/templates/Collector/db.html.twig new file mode 100644 index 0000000..9d44f4f --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/templates/Collector/db.html.twig @@ -0,0 +1,558 @@ +{% extends request.isXmlHttpRequest ? '@WebProfiler/Profiler/ajax_layout.html.twig' : '@WebProfiler/Profiler/layout.html.twig' %} + +{% import _self as helper %} + +{% block toolbar %} + {% if collector.querycount > 0 or collector.invalidEntityCount > 0 %} + + {% set icon %} + {% set status = collector.invalidEntityCount > 0 ? 'red' : collector.querycount > 50 ? 'yellow' %} + + {% if profiler_markup_version >= 3 %} + {{ include('@Doctrine/Collector/database.svg') }} + {% else %} + {{ include('@Doctrine/Collector/icon.svg') }} + {% endif %} + + {% if collector.querycount == 0 and collector.invalidEntityCount > 0 %} + {{ collector.invalidEntityCount }} + errors + {% else %} + {{ collector.querycount }} + + in + {{ '%0.2f'|format(collector.time * 1000) }} + ms + + {% endif %} + {% endset %} + + {% set text %} +
+ Database Queries + {{ collector.querycount }} +
+
+ Different statements + {{ collector.groupedQueryCount }} +
+
+ Query time + {{ '%0.2f'|format(collector.time * 1000) }} ms +
+
+ Invalid entities + {{ collector.invalidEntityCount }} +
+
+ Managed entities + {{ collector.managedEntityCount }} +
+ {% if collector.cacheEnabled %} +
+ Cache hits + {{ collector.cacheHitsCount }} +
+
+ Cache misses + {{ collector.cacheMissesCount }} +
+
+ Cache puts + {{ collector.cachePutsCount }} +
+ {% else %} +
+ Second Level Cache + disabled +
+ {% endif %} + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status|default('') }) }} + + {% endif %} +{% endblock %} + +{% block menu %} + + {{ include('@Doctrine/Collector/' ~ (profiler_markup_version < 3 ? 'icon' : 'database') ~ '.svg') }} + Doctrine + {% if collector.invalidEntityCount %} + + {{ collector.invalidEntityCount }} + + {% endif %} + +{% endblock %} + +{% block panel %} + {% if 'explain' == page %} + {{ render(controller('Doctrine\\Bundle\\DoctrineBundle\\Controller\\ProfilerController::explainAction', { + token: token, + panel: 'db', + connectionName: request.query.get('connection'), + query: request.query.get('query') + })) }} + {% else %} + {{ block('queries') }} + {% endif %} +{% endblock %} + +{% block queries %} + + +

Query Metrics

+ +
+
+
+ {{ collector.querycount }} + Database Queries +
+ +
+ {{ collector.groupedQueryCount }} + Different statements +
+ +
+ {{ '%0.2f'|format(collector.time * 1000) }} ms + Query time +
+ +
+ {{ collector.invalidEntityCount }} + Invalid entities +
+ +
+ {{ collector.managedEntityCount }} + Managed entities +
+
+ + {% if collector.cacheEnabled %} +
+
+ {{ collector.cacheHitsCount }} + Cache hits +
+
+ {{ collector.cacheMissesCount }} + Cache misses +
+
+ {{ collector.cachePutsCount }} + Cache puts +
+
+ {% endif %} +
+ +
+
+ {% set group_queries = request.query.getBoolean('group') %} +

+ {% if group_queries %} + Grouped Statements + {% else %} + Queries + {% endif %} +

+ +
+ {% if not collector.queries %} +
+

No executed queries.

+
+ {% else %} + {% if group_queries %} +

Show all queries

+ {% else %} +

Group similar statements

+ {% endif %} + + {% for connection, queries in collector.queries %} + {% if collector.connections|length > 1 %} +

{{ connection }} connection

+ {% endif %} + + {% if queries is empty %} +
+

No database queries were performed.

+
+ {% else %} + {% if group_queries %} + {% set queries = collector.groupedQueries[connection] %} + {% endif %} +
+ + + {% if group_queries %} + + + {% else %} + + + {% endif %} + + + + + {% for i, query in queries %} + {% set i = group_queries ? query.index : i %} + + {% if group_queries %} + + + {% else %} + + + {% endif %} + + + {% endfor %} + +
TimeCount#TimeInfo
+ + {{ '%0.2f'|format(query.executionMS * 1000) }} ms
({{ '%0.2f'|format(query.executionPercent) }}%)
+
{{ query.count }}{{ loop.index }}{{ '%0.2f'|format(query.executionMS * 1000) }} ms + {{ query.sql|doctrine_prettify_sql }} + +
+ Parameters: {{ profiler_dump(query.params, 2) }} +
+ +
+ View formatted query + + {% if query.runnable %} +    + View runnable query + {% endif %} + + {% if query.explainable %} +    + Explain query + {% endif %} + + {% if query.backtrace is defined %} +    + View query backtrace + {% endif %} +
+ + + + {% if query.runnable %} + + {% endif %} + + {% if query.explainable %} +
+ {% endif %} + + {% if query.backtrace is defined %} + + {% endif %} +
+ {% endif %} + {% endfor %} + {% endif %} + + + +
+

Database Connections

+
+ {% if not collector.connections %} +
+

There are no configured database connections.

+
+ {% else %} + {{ helper.render_simple_table('Name', 'Service', collector.connections) }} + {% endif %} +
+
+ +
+

Entity Managers

+
+ + {% if not collector.managers %} +
+

There are no configured entity managers.

+
+ {% else %} + {{ helper.render_simple_table('Name', 'Service', collector.managers) }} + {% endif %} +
+
+ +
+

Second Level Cache

+
+ + {% if not collector.cacheEnabled %} +
+

Second Level Cache is not enabled.

+
+ {% else %} + {% if not collector.cacheCounts %} +
+

Second level cache information is not available.

+
+ {% else %} +
+
+ {{ collector.cacheCounts.hits }} + Hits +
+ +
+ {{ collector.cacheCounts.misses }} + Misses +
+ +
+ {{ collector.cacheCounts.puts }} + Puts +
+
+ + {% if collector.cacheRegions.hits %} +

Number of cache hits

+ {{ helper.render_simple_table('Region', 'Hits', collector.cacheRegions.hits) }} + {% endif %} + + {% if collector.cacheRegions.misses %} +

Number of cache misses

+ {{ helper.render_simple_table('Region', 'Misses', collector.cacheRegions.misses) }} + {% endif %} + + {% if collector.cacheRegions.puts %} +

Number of cache puts

+ {{ helper.render_simple_table('Region', 'Puts', collector.cacheRegions.puts) }} + {% endif %} + {% endif %} + {% endif %} +
+
+ +
+

Managed Entities

+
+ {% if not collector.managedEntityCountByClass %} +
+

No managed entities.

+
+ {% else %} + {% for manager, entityCounts in collector.managedEntityCountByClass %} +

{{ manager }} entity manager

+ {{ helper.render_simple_table('Class', 'Amount of managed objects', entityCounts) }} + {% endfor %} + {% endif %} +
+
+ +
+

Entities Mapping

+
+ + {% if not collector.entities %} +
+

No mapped entities.

+
+ {% else %} + {% for manager, classes in collector.entities %} + {% if collector.managers|length > 1 %} +

{{ manager }} entity manager

+ {% endif %} + + {% if classes is empty %} +
+

No loaded entities.

+
+ {% else %} + + + + + + + + + {% for class in classes %} + {% set contains_errors = collector.mappingErrors[manager] is defined and collector.mappingErrors[manager][class.class] is defined %} + + + + + {% endfor %} + +
ClassMapping errors
+ {{ class. class}} + + {% if contains_errors %} +
    + {% for error in collector.mappingErrors[manager][class.class] %} +
  • {{ error }}
  • + {% endfor %} +
+ {% else %} + No errors. + {% endif %} +
+ {% endif %} + {% endfor %} + {% endif %} +
+
+ + + +{% endblock %} + +{% macro render_simple_table(label1, label2, data) %} + + + + + + + + + {% for key, value in data %} + + + + + {% endfor %} + +
{{ label1 }}{{ label2 }}
{{ key }}{{ value }}
+{% endmacro %} diff --git a/backend/vendor/doctrine/doctrine-bundle/templates/Collector/explain.html.twig b/backend/vendor/doctrine/doctrine-bundle/templates/Collector/explain.html.twig new file mode 100644 index 0000000..3b2dd7f --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/templates/Collector/explain.html.twig @@ -0,0 +1,28 @@ +{% if data[0]|length > 1 %} + {# The platform returns a table for the explanation (e.g. MySQL), display all columns #} + + + + {% for label in data[0]|keys %} + + {% endfor %} + + + + {% for row in data %} + + {% for key, item in row %} + + {% endfor %} + + {% endfor %} + +
{{ label }}
{{ item|replace({',': ', '}) }}
+{% else %} + {# The Platform returns a single column for a textual explanation (e.g. PostgreSQL), display all lines #} +
+        {%- for row in data -%}
+            {{ row|first }}{{ "\n" }}
+        {%- endfor -%}
+    
+{% endif %} diff --git a/backend/vendor/doctrine/doctrine-bundle/templates/Collector/icon.svg b/backend/vendor/doctrine/doctrine-bundle/templates/Collector/icon.svg new file mode 100644 index 0000000..93998db --- /dev/null +++ b/backend/vendor/doctrine/doctrine-bundle/templates/Collector/icon.svg @@ -0,0 +1,4 @@ + + + diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/.symfony.bundle.yaml b/backend/vendor/doctrine/doctrine-migrations-bundle/.symfony.bundle.yaml new file mode 100644 index 0000000..c690cf2 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/.symfony.bundle.yaml @@ -0,0 +1,12 @@ +branches: + - "3.0.x" + - "3.1.x" + - "3.2.x" + - "3.3.x" + - "3.4.x" + - "3.5.x" + - "3.6.x" + - "4.0.x" +maintained_branches: ["3.5.x", "3.6.x", "4.0.x"] +doc_dir: "docs/" +dev_branch: "4.0.x" diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/LICENSE b/backend/vendor/doctrine/doctrine-migrations-bundle/LICENSE new file mode 100644 index 0000000..aa7a99a --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2013 Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/README.markdown b/backend/vendor/doctrine/doctrine-migrations-bundle/README.markdown new file mode 100644 index 0000000..bd0817a --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/README.markdown @@ -0,0 +1,9 @@ +DoctrineMigrationsBundle +======================== + +This bundle integrates the [Doctrine Migrations library](http://www.doctrine-project.org/projects/migrations.html) +into Symfony applications. Database migrations help you version the changes in +your database schema and apply them in a predictable way on every server running +the application. + +[Read the documentation of this bundle](https://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html). diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/UPGRADE.md b/backend/vendor/doctrine/doctrine-migrations-bundle/UPGRADE.md new file mode 100644 index 0000000..9348b5b --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/UPGRADE.md @@ -0,0 +1,94 @@ +# Upgrade + +## Upgrade to 3.5 + +## Final classes + +Some classes have been marked as `@final` because they are not supposed to be +extended. They will be `final`, and most of them will be marked with +`@internal` in 4.0.0. + +## From 2.x to 3.0.0 + +- The configuration for the migration namespace and directory changed as follows: + +Before + +```yaml +doctrine_migrations: + dir_name: '%kernel.project_dir%/src/Migrations' + namespace: DoctrineMigrations +``` + +After + +```yaml +doctrine_migrations: + migrations_paths: + 'DoctrineMigrations': '%kernel.project_dir%/src/Migrations' +``` + +- The configuration for the metadata table definition changed as follows: + +Before + +```yaml +doctrine_migrations: + table_name: 'migration_versions' + column_name: 'version' + column_length: 14 + executed_at_column_name: 'executed_at' +``` + +After + +```yaml +doctrine_migrations: + storage: + table_storage: + table_name: 'migration_versions' + version_column_name: 'version' + version_column_length: 191 + executed_at_column_name: 'executed_at' +``` +If your project did not originally specify its own table definition configuration, you will need to configure the table name after the upgrade: + +```yaml +doctrine_migrations: + storage: + table_storage: + table_name: 'migration_versions' +``` +and then run the `doctrine:migrations:sync-metadata-storage` command. +- The migration name has been dropped: + +Before + +```yaml +doctrine_migrations: + name: 'Application Migrations' +``` + +After + +The parameter `name` has been dropped. + + +- The default for `table_name` changed from `migration_versions` to `doctrine_migration_versions`. If you did not +specify the `table_name` option, you now need to declare it explicitly to not lose migration data. + +```yaml +doctrine_migrations: + storage: + table_storage: + table_name: 'migration_versions' +``` + +### Underlying doctrine/migrations library + +Upgrading this bundle to `3.0` will also update the `doctrine/migrations` library to the version `3.0`. +Backward incompatible changes in `doctrine/migrations` 3.0 +are documented in the dedicated [UPGRADE](https://github.com/doctrine/migrations/blob/3.0.x/UPGRADE.md) document. + +- The container is not automatically injected anymore when a migration implements `ContainerAwareInterface`. Custom +migration factories should be used to inject additional dependencies into migrations. diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/composer.json b/backend/vendor/doctrine/doctrine-migrations-bundle/composer.json new file mode 100644 index 0000000..457cb41 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/composer.json @@ -0,0 +1,61 @@ +{ + "name": "doctrine/doctrine-migrations-bundle", + "description": "Symfony DoctrineMigrationsBundle", + "license": "MIT", + "type": "symfony-bundle", + "keywords": [ + "DBAL", + "Migrations", + "Schema" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Doctrine Project", + "homepage": "https://www.doctrine-project.org" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "homepage": "https://www.doctrine-project.org", + "require": { + "php": "^7.2 || ^8.0", + "doctrine/doctrine-bundle": "^2.4 || ^3.0", + "doctrine/migrations": "^3.2", + "symfony/deprecation-contracts": "^2.1 || ^3", + "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/semver": "^3.0", + "doctrine/coding-standard": "^12 || ^14", + "doctrine/orm": "^2.6 || ^3", + "phpstan/phpstan": "^1.4 || ^2", + "phpstan/phpstan-deprecation-rules": "^1 || ^2", + "phpstan/phpstan-phpunit": "^1 || ^2", + "phpstan/phpstan-strict-rules": "^1.1 || ^2", + "phpstan/phpstan-symfony": "^1.3 || ^2", + "phpunit/phpunit": "^8.5 || ^9.5", + "symfony/phpunit-bridge": "^6.3 || ^7 || ^8", + "symfony/var-exporter": "^5.4 || ^6 || ^7 || ^8" + }, + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\MigrationsBundle\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Doctrine\\Bundle\\MigrationsBundle\\Tests\\": "tests" + } + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + } +} diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/config/schema/doctrine_migrations-3.0.xsd b/backend/vendor/doctrine/doctrine-migrations-bundle/config/schema/doctrine_migrations-3.0.xsd new file mode 100644 index 0000000..0c5990c --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/config/schema/doctrine_migrations-3.0.xsd @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/config/services.php b/backend/vendor/doctrine/doctrine-migrations-bundle/config/services.php new file mode 100644 index 0000000..125e38d --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/config/services.php @@ -0,0 +1,175 @@ +services() + ->set('doctrine.migrations.dependency_factory', DependencyFactory::class) + ->args([ + service('doctrine.migrations.configuration_loader'), + abstract_arg('loader service'), + service('logger')->nullOnInvalid(), + ]) + + ->set('doctrine.migrations.configuration_loader', ExistingConfiguration::class) + ->args([service('doctrine.migrations.configuration')]) + + ->set('doctrine.migrations.connection_loader', ExistingConnection::class) + + ->set('doctrine.migrations.em_loader', ExistingEntityManager::class) + + ->set('doctrine.migrations.entity_manager_registry_loader', ManagerRegistryEntityManager::class) + ->args([service('doctrine')]) + ->factory([ManagerRegistryEntityManager::class, 'withSimpleDefault']) + + ->set('doctrine.migrations.connection_registry_loader', ConnectionRegistryConnection::class) + ->args([service('doctrine')]) + ->factory([ConnectionRegistryConnection::class, 'withSimpleDefault']) + + ->set('doctrine.migrations.configuration', Configuration::class) + + ->set('doctrine.migrations.migrations_factory', MigrationFactory::class) + ->factory([service('doctrine.migrations.dependency_factory'), 'getMigrationFactory']) + + ->set('doctrine.migrations.container_aware_migrations_factory', ContainerAwareMigrationFactory::class) + ->decorate('doctrine.migrations.migrations_factory') + ->args([ + service('doctrine.migrations.container_aware_migrations_factory.inner'), + service('service_container'), + ]) + + ->set('doctrine.migrations.service_migrations_repository', ServiceMigrationsRepository::class) + ->args([ + abstract_arg('migrations locator'), + ]) + + ->set('doctrine.migrations.connection', Connection::class) + ->factory([service('doctrine.migrations.dependency_factory'), 'getConnection']) + + ->set('doctrine.migrations.logger', LoggerInterface::class) + ->factory([service('doctrine.migrations.dependency_factory'), 'getLogger']) + + ->set('doctrine_migrations.diff_command', DiffCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:diff', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:diff']) + + ->set('doctrine_migrations.sync_metadata_command', SyncMetadataCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:sync-metadata-storage', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:sync-metadata-storage']) + + ->set('doctrine_migrations.versions_command', ListCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:versions', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:list']) + + ->set('doctrine_migrations.current_command', CurrentCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:current', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:current']) + + ->set('doctrine_migrations.dump_schema_command', DumpSchemaCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:dump-schema', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:dump-schema']) + + ->set('doctrine_migrations.execute_command', ExecuteCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:execute', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:execute']) + + ->set('doctrine_migrations.generate_command', GenerateCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:generate', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:generate']) + + ->set('doctrine_migrations.latest_command', LatestCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:latest', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:latest']) + + ->set('doctrine_migrations.migrate_command', MigrateCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:migrate', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:migrate']) + + ->set('doctrine_migrations.rollup_command', RollupCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:rollup', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:rollup']) + + ->set('doctrine_migrations.status_command', StatusCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:status', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:status']) + + ->set('doctrine_migrations.up_to_date_command', UpToDateCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:up-to-date', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:up-to-date']) + + ->set('doctrine_migrations.version_command', VersionCommand::class) + ->args([ + service('doctrine.migrations.dependency_factory'), + 'doctrine:migrations:version', + ]) + ->tag('console.command', ['command' => 'doctrine:migrations:version']) + + ->set('doctrine_migrations.schema_filter_listener', SchemaFilterListener::class) + // The "doctrine.dbal.schema_filter" tag is dynamically added for each connection + ->tag('kernel.event_listener', ['event' => 'console.command', 'method' => 'onConsoleCommand']); +}; diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/src/Collector/MigrationsCollector.php b/backend/vendor/doctrine/doctrine-migrations-bundle/src/Collector/MigrationsCollector.php new file mode 100644 index 0000000..6ea514d --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/src/Collector/MigrationsCollector.php @@ -0,0 +1,96 @@ +dependencyFactory = $dependencyFactory; + $this->flattener = $migrationsFlattener; + } + + /** @return void */ + public function collect(Request $request, Response $response, ?Throwable $exception = null) + { + if ($this->data !== []) { + return; + } + + $metadataStorage = $this->dependencyFactory->getMetadataStorage(); + $planCalculator = $this->dependencyFactory->getMigrationPlanCalculator(); + + try { + $executedMigrations = $metadataStorage->getExecutedMigrations(); + } catch (Exception $dbalException) { + $this->dependencyFactory->getLogger()->error( + 'error while trying to collect executed migrations', + ['exception' => $dbalException] + ); + + return; + } + + $availableMigrations = $planCalculator->getMigrations(); + + $this->data['available_migrations_count'] = count($availableMigrations); + $unavailableMigrations = $executedMigrations->unavailableSubset($availableMigrations); + $this->data['unavailable_migrations_count'] = count($unavailableMigrations); + + $newMigrations = $availableMigrations->newSubset($executedMigrations); + $this->data['new_migrations'] = $this->flattener->flattenAvailableMigrations($newMigrations); + $this->data['executed_migrations'] = $this->flattener->flattenExecutedMigrations($executedMigrations, $availableMigrations); + + $this->data['storage'] = get_class($metadataStorage); + $configuration = $this->dependencyFactory->getConfiguration(); + $storage = $configuration->getMetadataStorageConfiguration(); + if ($storage instanceof TableMetadataStorageConfiguration) { + $this->data['table'] = $storage->getTableName(); + $this->data['column'] = $storage->getVersionColumnName(); + } + + $connection = $this->dependencyFactory->getConnection(); + $this->data['driver'] = get_class($connection->getDriver()); + $this->data['name'] = $connection->getDatabase(); + + $this->data['namespaces'] = $configuration->getMigrationDirectories(); + } + + /** @return string */ + public function getName() + { + return 'doctrine_migrations'; + } + + /** @return array|Data */ + public function getData() + { + return $this->data; + } + + /** @return void */ + public function reset() + { + $this->data = []; + } +} diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/src/Collector/MigrationsFlattener.php b/backend/vendor/doctrine/doctrine-migrations-bundle/src/Collector/MigrationsFlattener.php new file mode 100644 index 0000000..aa29889 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/src/Collector/MigrationsFlattener.php @@ -0,0 +1,74 @@ + (string) $migration->getVersion(), + 'is_new' => true, + 'is_unavailable' => false, + 'description' => $migration->getMigration()->getDescription(), + 'executed_at' => null, + 'execution_time' => null, + 'file' => (new ReflectionClass($migration->getMigration()))->getFileName(), + ]; + }, $migrationsList->getItems()); + } + + /** + * @return array{ + * version: string, + * is_new: false, + * is_unavailable: bool, + * description: string|null, + * executed_at: DateTimeImmutable|null, + * execution_time: float|null, + * file: string|false|null, + * }[] + */ + public function flattenExecutedMigrations(ExecutedMigrationsList $migrationsList, AvailableMigrationsList $availableMigrations): array + { + return array_map(static function (ExecutedMigration $migration) use ($availableMigrations) { + $availableMigration = $availableMigrations->hasMigration($migration->getVersion()) + ? $availableMigrations->getMigration($migration->getVersion())->getMigration() + : null; + + return [ + 'version' => (string) $migration->getVersion(), + 'is_new' => false, + 'is_unavailable' => $availableMigration === null, + 'description' => $availableMigration !== null ? $availableMigration->getDescription() : null, + 'executed_at' => $migration->getExecutedAt(), + 'execution_time' => $migration->getExecutionTime(), + 'file' => $availableMigration !== null ? (new ReflectionClass($availableMigration))->getFileName() : null, + ]; + }, $migrationsList->getItems()); + } +} diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/CompilerPass/ConfigureDependencyFactoryPass.php b/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/CompilerPass/ConfigureDependencyFactoryPass.php new file mode 100644 index 0000000..5c88783 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/CompilerPass/ConfigureDependencyFactoryPass.php @@ -0,0 +1,116 @@ +has('doctrine')) { + throw new RuntimeException('DoctrineMigrationsBundle requires DoctrineBundle to be enabled.'); + } + + $diDefinition = $container->getDefinition('doctrine.migrations.dependency_factory'); + + $preferredConnection = $container->getParameter('doctrine.migrations.preferred_connection'); + assert(is_string($preferredConnection) || $preferredConnection === null); + // explicitly use configured connection + if ($preferredConnection !== null) { + $this->validatePreferredConnection($container, $preferredConnection); + + $loaderDefinition = $container->getDefinition('doctrine.migrations.connection_registry_loader'); + $loaderDefinition->setArgument(1, $preferredConnection); + + $diDefinition->setFactory([DependencyFactory::class, 'fromConnection']); + $diDefinition->setArgument(1, new Reference('doctrine.migrations.connection_registry_loader')); + + return; + } + + $preferredEm = $container->getParameter('doctrine.migrations.preferred_em'); + assert(is_string($preferredEm) || $preferredEm === null); + // explicitly use configured entity manager + if ($preferredEm !== null) { + $this->validatePreferredEm($container, $preferredEm); + + $loaderDefinition = $container->getDefinition('doctrine.migrations.entity_manager_registry_loader'); + $loaderDefinition->setArgument(1, $preferredEm); + + $diDefinition->setFactory([DependencyFactory::class, 'fromEntityManager']); + $diDefinition->setArgument(1, new Reference('doctrine.migrations.entity_manager_registry_loader')); + + return; + } + + // try to use any/default entity manager + if ( + $container->hasParameter('doctrine.entity_managers') + && is_array($container->getParameter('doctrine.entity_managers')) + && count($container->getParameter('doctrine.entity_managers')) > 0 + ) { + $diDefinition->setFactory([DependencyFactory::class, 'fromEntityManager']); + $diDefinition->setArgument(1, new Reference('doctrine.migrations.entity_manager_registry_loader')); + + return; + } + + // fallback on any/default connection + $diDefinition->setFactory([DependencyFactory::class, 'fromConnection']); + $diDefinition->setArgument(1, new Reference('doctrine.migrations.connection_registry_loader')); + } + + private function validatePreferredConnection(ContainerBuilder $container, string $preferredConnection): void + { + /** @var array $allowedConnections */ + $allowedConnections = $container->getParameter('doctrine.connections'); + if (! isset($allowedConnections[$preferredConnection])) { + throw new InvalidArgumentException(sprintf( + 'The "%s" connection is not defined. Did you mean one of the following: %s', + $preferredConnection, + implode(', ', array_keys($allowedConnections)) + )); + } + } + + private function validatePreferredEm(ContainerBuilder $container, string $preferredEm): void + { + if ( + ! $container->hasParameter('doctrine.entity_managers') + || ! is_array($container->getParameter('doctrine.entity_managers')) + || count($container->getParameter('doctrine.entity_managers')) === 0 + ) { + throw new InvalidArgumentException(sprintf( + 'The "%s" entity manager is not defined. It seems that you do not have configured any entity manager in the DoctrineBundle.', + $preferredEm + )); + } + + /** @var array $allowedEms */ + $allowedEms = $container->getParameter('doctrine.entity_managers'); + if (! isset($allowedEms[$preferredEm])) { + throw new InvalidArgumentException(sprintf( + 'The "%s" entity manager is not defined. Did you mean one of the following: %s', + $preferredEm, + implode(', ', array_keys($allowedEms)) + )); + } + } +} diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/CompilerPass/RegisterMigrationsPass.php b/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/CompilerPass/RegisterMigrationsPass.php new file mode 100644 index 0000000..0b6952c --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/CompilerPass/RegisterMigrationsPass.php @@ -0,0 +1,40 @@ +hasDefinition('doctrine.migrations.service_migrations_repository')) { + return; + } + + $migrationRefs = []; + + foreach ($container->findTaggedServiceIds('doctrine_migrations.migration', true) as $id => $attributes) { + $definition = $container->getDefinition($id); + $definition->setBindings([ + Connection::class => new BoundArgument(new Reference('doctrine.migrations.connection'), false), + LoggerInterface::class => new BoundArgument(new Reference('doctrine.migrations.logger'), false), + ]); + + $migrationRefs[$id] = new TypedReference($id, $definition->getClass()); + } + + $container->getDefinition('doctrine.migrations.service_migrations_repository') + ->replaceArgument(0, new ServiceLocatorArgument($migrationRefs)); + } +} diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/Configuration.php b/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/Configuration.php new file mode 100644 index 0000000..4f1fbae --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/Configuration.php @@ -0,0 +1,178 @@ +getRootNode(); + + $organizeMigrationModes = $this->getOrganizeMigrationsModes(); + + $rootNode + ->fixXmlConfig('migration', 'migrations') + ->fixXmlConfig('migrations_path', 'migrations_paths') + ->children() + ->booleanNode('enable_service_migrations') + ->info('Whether to enable fetching migrations from the service container.') + ->defaultFalse() + ->end() + + ->arrayNode('migrations_paths') + ->info('A list of namespace/path pairs where to look for migrations.') + ->defaultValue([]) + ->useAttributeAsKey('namespace') + ->prototype('scalar')->end() + ->end() + + ->arrayNode('services') + ->info('A set of services to pass to the underlying doctrine/migrations library, allowing to change its behaviour.') + ->useAttributeAsKey('service') + ->defaultValue([]) + ->validate() + ->ifTrue(static function (array $v): bool { + return count(array_filter(array_keys($v), static function (string $doctrineService): bool { + return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0; + })) !== 0; + }) + ->thenInvalid('Valid services for the DoctrineMigrationsBundle must be in the "Doctrine\Migrations" namespace.') + ->end() + ->prototype('scalar')->end() + ->end() + + ->arrayNode('factories') + ->info('A set of callables to pass to the underlying doctrine/migrations library as services, allowing to change its behaviour.') + ->useAttributeAsKey('factory') + ->defaultValue([]) + ->validate() + ->ifTrue(static function (array $v): bool { + return count(array_filter(array_keys($v), static function (string $doctrineService): bool { + return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0; + })) !== 0; + }) + ->thenInvalid('Valid callables for the DoctrineMigrationsBundle must be in the "Doctrine\Migrations" namespace.') + ->end() + ->prototype('scalar')->end() + ->end() + + ->arrayNode('storage') + ->addDefaultsIfNotSet() + ->info('Storage to use for migration status metadata.') + ->children() + ->arrayNode('table_storage') + ->addDefaultsIfNotSet() + ->info('The default metadata storage, implemented as a table in the database.') + ->children() + ->scalarNode('table_name')->defaultValue(null)->cannotBeEmpty()->end() + ->scalarNode('version_column_name')->defaultValue(null)->end() + ->scalarNode('version_column_length')->defaultValue(null)->end() + ->scalarNode('executed_at_column_name')->defaultValue(null)->end() + ->scalarNode('execution_time_column_name')->defaultValue(null)->end() + ->end() + ->end() + ->end() + ->end() + + ->arrayNode('migrations') + ->info('A list of migrations to load in addition to the one discovered via "migrations_paths".') + ->prototype('scalar')->end() + ->defaultValue([]) + ->end() + ->scalarNode('connection') + ->info('Connection name to use for the migrations database.') + ->defaultValue(null) + ->end() + ->scalarNode('em') + ->info('Entity manager name to use for the migrations database (available when doctrine/orm is installed).') + ->defaultValue(null) + ->end() + ->scalarNode('all_or_nothing') + ->info('Run all migrations in a transaction.') + ->defaultValue(false) + ->end() + ->scalarNode('check_database_platform') + ->info('Adds an extra check in the generated migrations to allow execution only on the same platform as they were initially generated on.') + ->defaultValue(true) + ->end() + ->scalarNode('custom_template') + ->info('Custom template path for generated migration classes.') + ->defaultValue(null) + ->end() + ->scalarNode('organize_migrations') + ->defaultValue(false) + ->info('Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false') + ->validate() + ->ifTrue(static function ($v) use ($organizeMigrationModes): bool { + if ($v === false) { + return false; + } + + return ! is_string($v) || ! in_array(strtoupper($v), $organizeMigrationModes, true); + }) + ->thenInvalid('Invalid organize migrations mode value %s') + ->end() + ->validate() + ->ifString() + ->then(static function ($v) { + return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_' . strtoupper($v)); + }) + ->end() + ->end() + ->booleanNode('enable_profiler') + ->info('Whether or not to enable the profiler collector to calculate and visualize migration status. This adds some queries overhead.') + ->defaultFalse() + ->end() + ->booleanNode('transactional') + ->info('Whether or not to wrap migrations in a single transaction.') + ->defaultTrue() + ->end() + ->end(); + + return $treeBuilder; + } + + /** + * Find organize migrations modes for their names + * + * @return string[] + */ + private function getOrganizeMigrationsModes(): array + { + $constPrefix = 'VERSIONS_ORGANIZATION_'; + $prefixLen = strlen($constPrefix); + $refClass = new ReflectionClass('Doctrine\Migrations\Configuration\Configuration'); + $constsArray = array_keys($refClass->getConstants()); + $namesArray = []; + + foreach ($constsArray as $constant) { + if (strpos($constant, $constPrefix) !== 0) { + continue; + } + + $namesArray[] = substr($constant, $prefixLen); + } + + return $namesArray; + } +} diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/DoctrineMigrationsExtension.php b/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/DoctrineMigrationsExtension.php new file mode 100644 index 0000000..0290c53 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/src/DependencyInjection/DoctrineMigrationsExtension.php @@ -0,0 +1,227 @@ +processConfiguration($configuration, $configs); + + $locator = new FileLocator(__DIR__ . '/../../config/'); + $loader = new PhpFileLoader($container, $locator); + + $loader->load('services.php'); + + if ($config['enable_service_migrations']) { + $container->registerForAutoconfiguration(AbstractMigration::class) + ->addTag('doctrine_migrations.migration'); + + if (! isset($config['services'][MigrationsRepository::class])) { + $config['services'][MigrationsRepository::class] = 'doctrine.migrations.service_migrations_repository'; + } + } else { + $container->removeDefinition('doctrine.migrations.service_migrations_repository'); + $container->removeDefinition('doctrine.migrations.connection'); + $container->removeDefinition('doctrine.migrations.logger'); + } + + $configurationDefinition = $container->getDefinition('doctrine.migrations.configuration'); + + foreach ($config['migrations_paths'] as $ns => $path) { + $path = $this->checkIfBundleRelativePath($path, $container); + $configurationDefinition->addMethodCall('addMigrationsDirectory', [$ns, $path]); + } + + foreach ($config['migrations'] as $migrationClass) { + $configurationDefinition->addMethodCall('addMigrationClass', [$migrationClass]); + } + + if ($config['organize_migrations'] !== false) { + $configurationDefinition->addMethodCall('setMigrationOrganization', [$config['organize_migrations']]); + } + + if ($config['custom_template'] !== null) { + $configurationDefinition->addMethodCall('setCustomTemplate', [$config['custom_template']]); + } + + $configurationDefinition->addMethodCall('setAllOrNothing', [$config['all_or_nothing']]); + $configurationDefinition->addMethodCall('setCheckDatabasePlatform', [$config['check_database_platform']]); + + if ($config['enable_profiler']) { + $this->registerCollector($container); + } + + $configurationDefinition->addMethodCall('setTransactional', [$config['transactional']]); + + $diDefinition = $container->getDefinition('doctrine.migrations.dependency_factory'); + + if (! isset($config['services'][MigrationFactory::class])) { + $config['services'][MigrationFactory::class] = 'doctrine.migrations.migrations_factory'; + } + + foreach ($config['services'] as $doctrineId => $symfonyId) { + $diDefinition->addMethodCall('setDefinition', [$doctrineId, new ServiceClosureArgument(new Reference($symfonyId))]); + } + + foreach ($config['factories'] as $doctrineId => $symfonyId) { + $diDefinition->addMethodCall('setDefinition', [$doctrineId, new Reference($symfonyId)]); + } + + if (isset($config['services'][MetadataStorage::class])) { + $container->removeDefinition('doctrine_migrations.schema_filter_listener'); + } else { + $filterDefinition = $container->getDefinition('doctrine_migrations.schema_filter_listener'); + $storageConfiguration = $config['storage']['table_storage']; + + $storageDefinition = new Definition(TableMetadataStorageConfiguration::class); + $container->setDefinition('doctrine.migrations.storage.table_storage', $storageDefinition); + $container->setAlias('doctrine.migrations.metadata_storage', 'doctrine.migrations.storage.table_storage'); + + if ($storageConfiguration['table_name'] === null) { + $filterDefinition->addArgument('doctrine_migration_versions'); + } else { + $storageDefinition->addMethodCall('setTableName', [$storageConfiguration['table_name']]); + $filterDefinition->addArgument($storageConfiguration['table_name']); + } + + if ($storageConfiguration['version_column_name'] !== null) { + $storageDefinition->addMethodCall('setVersionColumnName', [$storageConfiguration['version_column_name']]); + } + + if ($storageConfiguration['version_column_length'] !== null) { + $storageDefinition->addMethodCall('setVersionColumnLength', [$storageConfiguration['version_column_length']]); + } + + if ($storageConfiguration['executed_at_column_name'] !== null) { + $storageDefinition->addMethodCall('setExecutedAtColumnName', [$storageConfiguration['executed_at_column_name']]); + } + + if ($storageConfiguration['execution_time_column_name'] !== null) { + $storageDefinition->addMethodCall('setExecutionTimeColumnName', [$storageConfiguration['execution_time_column_name']]); + } + + $configurationDefinition->addMethodCall('setMetadataStorageConfiguration', [new Reference('doctrine.migrations.storage.table_storage')]); + + // Add tag to the filter for each Doctrine connection, so the table is ignored for multiple connections + if ($container->hasParameter('doctrine.connections')) { + /** @var array $connections */ + $connections = $container->getParameter('doctrine.connections'); + foreach (array_keys($connections) as $connection) { + $filterDefinition->addTag('doctrine.dbal.schema_filter', ['connection' => $connection]); + } + } + } + + if ($config['em'] !== null && $config['connection'] !== null) { + throw new InvalidArgumentException( + 'You cannot specify both "connection" and "em" in the DoctrineMigrationsBundle configurations.' + ); + } + + $container->setParameter('doctrine.migrations.preferred_em', $config['em']); + $container->setParameter('doctrine.migrations.preferred_connection', $config['connection']); + + if (interface_exists(ContainerAwareInterface::class)) { + return; + } + + $container->removeDefinition('doctrine.migrations.container_aware_migrations_factory'); + } + + private function checkIfBundleRelativePath(string $path, ContainerBuilder $container): string + { + if (isset($path[0]) && $path[0] === '@') { + $pathParts = explode('/', $path); + $bundleName = substr($pathParts[0], 1); + + $bundlePath = $this->getBundlePath($bundleName, $container); + + return $bundlePath . substr($path, strlen('@' . $bundleName)); + } + + return $path; + } + + private function getBundlePath(string $bundleName, ContainerBuilder $container): string + { + $bundleMetadata = $container->getParameter('kernel.bundles_metadata'); + assert(is_array($bundleMetadata)); + + if (! isset($bundleMetadata[$bundleName])) { + throw new RuntimeException(sprintf( + 'The bundle "%s" has not been registered, available bundles: %s', + $bundleName, + implode(', ', array_keys($bundleMetadata)) + )); + } + + return $bundleMetadata[$bundleName]['path']; + } + + private function registerCollector(ContainerBuilder $container): void + { + $flattenerDefinition = new Definition(MigrationsFlattener::class); + $container->setDefinition('doctrine_migrations.migrations_flattener', $flattenerDefinition); + + $collectorDefinition = new Definition(MigrationsCollector::class, [ + new Reference('doctrine.migrations.dependency_factory'), + new Reference('doctrine_migrations.migrations_flattener'), + ]); + $collectorDefinition + ->addTag('data_collector', [ + 'template' => '@DoctrineMigrations/Collector/migrations.html.twig', + 'id' => 'doctrine_migrations', + 'priority' => '249', + ]); + $container->setDefinition('doctrine_migrations.migrations_collector', $collectorDefinition); + } + + public function getXsdValidationBasePath(): string + { + return __DIR__ . '/../../config/schema'; + } + + public function getNamespace(): string + { + return 'http://symfony.com/schema/dic/doctrine/migrations/3.0'; + } +} diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/src/DoctrineMigrationsBundle.php b/backend/vendor/doctrine/doctrine-migrations-bundle/src/DoctrineMigrationsBundle.php new file mode 100644 index 0000000..43fd833 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/src/DoctrineMigrationsBundle.php @@ -0,0 +1,27 @@ +addCompilerPass(new ConfigureDependencyFactoryPass()); + $container->addCompilerPass(new RegisterMigrationsPass()); + } + + public function getPath(): string + { + return dirname(__DIR__); + } +} diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/src/EventListener/SchemaFilterListener.php b/backend/vendor/doctrine/doctrine-migrations-bundle/src/EventListener/SchemaFilterListener.php new file mode 100644 index 0000000..5a83e80 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/src/EventListener/SchemaFilterListener.php @@ -0,0 +1,55 @@ +configurationTableName = $configurationTableName; + } + + /** @var bool */ + private $enabled = false; + + /** @param AbstractAsset|string $asset */ + public function __invoke($asset): bool + { + if (! $this->enabled) { + return true; + } + + if ($asset instanceof AbstractAsset) { + $asset = $asset->getName(); + } + + return $asset !== $this->configurationTableName; + } + + public function onConsoleCommand(ConsoleCommandEvent $event): void + { + $command = $event->getCommand(); + + if (! $command instanceof ValidateSchemaCommand && ! $command instanceof UpdateCommand) { + return; + } + + $this->enabled = true; + } +} diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/src/MigrationsFactory/ContainerAwareMigrationFactory.php b/backend/vendor/doctrine/doctrine-migrations-bundle/src/MigrationsFactory/ContainerAwareMigrationFactory.php new file mode 100644 index 0000000..9513111 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/src/MigrationsFactory/ContainerAwareMigrationFactory.php @@ -0,0 +1,41 @@ += 7 */ +class ContainerAwareMigrationFactory implements MigrationFactory +{ + /** @var ContainerInterface */ + private $container; + + /** @var MigrationFactory */ + private $migrationFactory; + + public function __construct(MigrationFactory $migrationFactory, ContainerInterface $container) + { + $this->container = $container; + $this->migrationFactory = $migrationFactory; + } + + public function createVersion(string $migrationClassName): AbstractMigration + { + $migration = $this->migrationFactory->createVersion($migrationClassName); + + if ($migration instanceof ContainerAwareInterface) { + trigger_deprecation('doctrine/doctrine-migrations-bundle', '3.3', 'Migration "%s" implements "%s" to gain access to the application\'s service container. This method is deprecated and won\'t work with Symfony 7.', $migrationClassName, ContainerAwareInterface::class); + + $migration->setContainer($this->container); + } + + return $migration; + } +} diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/src/MigrationsRepository/ServiceMigrationsRepository.php b/backend/vendor/doctrine/doctrine-migrations-bundle/src/MigrationsRepository/ServiceMigrationsRepository.php new file mode 100644 index 0000000..58b7c68 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/src/MigrationsRepository/ServiceMigrationsRepository.php @@ -0,0 +1,68 @@ + */ + private $container; + + /** @var array */ + private $migrations = []; + + /** @param ServiceProviderInterface $container */ + public function __construct(ServiceProviderInterface $container) + { + $this->container = $container; + } + + public function hasMigration(string $version): bool + { + return isset($this->migrations[$version]) || $this->container->has($version); + } + + public function getMigration(Version $version): AvailableMigration + { + $this->loadMigrationFromContainer($version); + + return $this->migrations[(string) $version]; + } + + /** + * Returns a non-sorted set of migrations. + */ + public function getMigrations(): AvailableMigrationsSet + { + foreach ($this->container->getProvidedServices() as $id) { + $this->loadMigrationFromContainer(new Version($id)); + } + + return new AvailableMigrationsSet($this->migrations); + } + + private function loadMigrationFromContainer(Version $version): void + { + $id = (string) $version; + + if (isset($this->migrations[$id])) { + return; + } + + if (! $this->container->has($id)) { + throw MigrationClassNotFound::new($id); + } + + $this->migrations[$id] = new AvailableMigration($version, $this->container->get($id)); + } +} diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/templates/Collector/icon-v3.svg b/backend/vendor/doctrine/doctrine-migrations-bundle/templates/Collector/icon-v3.svg new file mode 100644 index 0000000..0897e4b --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/templates/Collector/icon-v3.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/templates/Collector/icon.svg b/backend/vendor/doctrine/doctrine-migrations-bundle/templates/Collector/icon.svg new file mode 100644 index 0000000..c291807 --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/templates/Collector/icon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/backend/vendor/doctrine/doctrine-migrations-bundle/templates/Collector/migrations.html.twig b/backend/vendor/doctrine/doctrine-migrations-bundle/templates/Collector/migrations.html.twig new file mode 100644 index 0000000..a61934e --- /dev/null +++ b/backend/vendor/doctrine/doctrine-migrations-bundle/templates/Collector/migrations.html.twig @@ -0,0 +1,252 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block toolbar %} + {% if collector.data.unavailable_migrations_count is defined %} + {% set unavailable_migrations = collector.data.unavailable_migrations_count %} + {% set new_migrations = collector.data.new_migrations|length %} + {% if unavailable_migrations > 0 or new_migrations > 0 %} + {% set executed_migrations = collector.data.executed_migrations|length %} + {% set available_migrations = collector.data.available_migrations_count %} + {% set status_color = unavailable_migrations > 0 ? 'yellow' : '' %} + {% set status_color = new_migrations > 0 ? 'red' : status_color %} + + {% set icon %} + {% if profiler_markup_version < 3 %} + {{ include('@DoctrineMigrations/Collector/icon.svg') }} + {% else %} + {{ include('@DoctrineMigrations/Collector/icon-v3.svg') }} + {% endif %} + + {{ new_migrations + unavailable_migrations }} + {% endset %} + + {% set text %} +
+
+ Current Migration + {{ executed_migrations > 0 ? collector.data.executed_migrations|last.version|split('\\')|last : 'n/a' }} +
+
+ +
+
+ + Database Migrations + +
+
+ Executed + {{ executed_migrations }} +
+
+ Unavailable + {{ unavailable_migrations }} +
+
+ Available + {{ available_migrations }} +
+
+ New + {{ new_migrations }} +
+
+ {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} + {% endif %} + {% endif %} +{% endblock %} + +{% block menu %} + {% if collector.data.unavailable_migrations_count is defined %} + {% set unavailable_migrations = collector.data.unavailable_migrations_count %} + {% set new_migrations = collector.data.new_migrations|length %} + {% set label = unavailable_migrations > 0 ? 'label-status-warning' : '' %} + {% set label = new_migrations > 0 ? 'label-status-error' : label %} + + + {% if profiler_markup_version < 3 %} + {{ include('@DoctrineMigrations/Collector/icon.svg') }} + {% else %} + {{ include('@DoctrineMigrations/Collector/icon-v3.svg') }} + {% endif %} + + + Migrations + {% if unavailable_migrations > 0 or new_migrations > 0 %} + + {{ new_migrations + unavailable_migrations }} + + {% endif %} + + {% endif %} +{% endblock %} + +{% block panel %} + {% set num_executed_migrations = collector.data.executed_migrations|length %} + {% set num_unavailable_migrations = collector.data.unavailable_migrations_count %} + {% set num_available_migrations = collector.data.available_migrations_count %} + {% set num_new_migrations = collector.data.new_migrations|length %} + +

Doctrine Migrations

+
+
+ {{ num_executed_migrations }} + Executed +
+ + {% if profiler_markup_version >= 3 %} +
+ {% endif %} + +
+ {{ num_unavailable_migrations }} + Unavailable +
+
+ {{ num_available_migrations }} + Available +
+
+ {{ num_new_migrations }} + New +
+ + {% if profiler_markup_version >= 3 %} +
{# closes the
#} + {% endif %} +
+ +
+
+

+ Migrations + + {{ num_new_migrations > 0 ? num_new_migrations : num_unavailable_migrations > 0 ? num_unavailable_migrations : num_executed_migrations }} + +

+ +
+ {{ _self.render_migration_details(collector, profiler_markup_version) }} +
+
+ +
+

Configuration

+ +
+ {{ _self.render_configuration_details(collector, profiler_markup_version) }} +
+
+
+{% endblock %} + +{% macro render_migration_details(collector) %} + + + + + + + + + + + {% for migration in collector.data.new_migrations %} + {{ _self.render_migration(migration) }} + {% endfor %} + + {% for migration in collector.data.executed_migrations|reverse %} + {{ _self.render_migration(migration) }} + {% endfor %} +
VersionDescriptionStatusExecuted atExecution time
+{% endmacro %} + +{% macro render_configuration_details(collector) %} + + + + + + + + + + + {% if collector.data.table is defined %} + + + + + {% endif %} + {% if collector.data.column is defined %} + + + + + {% endif %} +
Storage
Type{{ collector.data.storage }}
Table Name{{ collector.data.table }}
Column Name{{ collector.data.column }}
+ + + + + + + + + + + + + + + +
Database
Driver{{ collector.data.driver }}
Name{{ collector.data.name }}
+ + + + + + + + {% for namespace, directory in collector.data.namespaces %} + + + + + {% endfor %} +
Migration Namespaces
{{ namespace }}{{ directory }}
+{% endmacro %} + +{% macro render_migration(migration, profiler_markup_version) %} + + + {% if migration.file %} + {{ migration.version }} + {% else %} + {{ migration.version }} + {% endif %} + + {{ migration.description }} + + {% if migration.is_new %} + NOT EXECUTED + {% elseif migration.is_unavailable %} + UNAVAILABLE + {% else %} + EXECUTED + {% endif %} + + {{ migration.executed_at ? migration.executed_at|date('M j, Y H:i') : 'n/a' }} + + {% if migration.execution_time is null %} + n/a + {% elseif migration.execution_time < 1 %} + {{ (migration.execution_time * 1000)|number_format(0) }} ms + {% else %} + {{ migration.execution_time|number_format(2) }} seconds + {% endif %} + + +{% endmacro %} diff --git a/backend/vendor/doctrine/event-manager/LICENSE b/backend/vendor/doctrine/event-manager/LICENSE new file mode 100644 index 0000000..8c38cc1 --- /dev/null +++ b/backend/vendor/doctrine/event-manager/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2015 Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/backend/vendor/doctrine/event-manager/README.md b/backend/vendor/doctrine/event-manager/README.md new file mode 100644 index 0000000..5b36f54 --- /dev/null +++ b/backend/vendor/doctrine/event-manager/README.md @@ -0,0 +1,13 @@ +# Doctrine Event Manager + +[![Build Status](https://github.com/doctrine/event-manager/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/event-manager/actions) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/event-manager/badges/quality-score.png?b=1.2.x)](https://scrutinizer-ci.com/g/doctrine/event-manager/?branch=1.2.x) +[![Code Coverage](https://scrutinizer-ci.com/g/doctrine/event-manager/badges/coverage.png?b=1.2.x)](https://scrutinizer-ci.com/g/doctrine/event-manager/?branch=1.2.x) + +The Doctrine Event Manager is a library that provides a simple event system. + +## More resources: + +* [Website](https://www.doctrine-project.org/) +* [Documentation](https://www.doctrine-project.org/projects/doctrine-event-manager/en/latest/) +* [Downloads](https://github.com/doctrine/event-manager/releases) diff --git a/backend/vendor/doctrine/event-manager/UPGRADE.md b/backend/vendor/doctrine/event-manager/UPGRADE.md new file mode 100644 index 0000000..25154ef --- /dev/null +++ b/backend/vendor/doctrine/event-manager/UPGRADE.md @@ -0,0 +1,15 @@ +# Upgrade to 2.0 + +## Made the `$event` parameter of `EventManager::getListeners()` mandatory + +When calling `EventManager::getListeners()` you need to specify the event that +you want to fetch the listeners for. Call `getAllListeners()` instead if you +want to access the listeners of all events. + +# Upgrade to 1.2 + +## Deprecated calling `EventManager::getListeners()` without an event name + +When calling `EventManager::getListeners()` without an event name, all +listeners were returned, keyed by event name. A new method `getAllListeners()` +has been added to provide this functionality. It should be used instead. diff --git a/backend/vendor/doctrine/event-manager/composer.json b/backend/vendor/doctrine/event-manager/composer.json new file mode 100644 index 0000000..7ff661f --- /dev/null +++ b/backend/vendor/doctrine/event-manager/composer.json @@ -0,0 +1,71 @@ +{ + "name": "doctrine/event-manager", + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "license": "MIT", + "type": "library", + "keywords": [ + "events", + "event", + "event dispatcher", + "event manager", + "event system" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "phpdocumentor/guides-cli": "^1.4", + "phpstan/phpstan": "^2.1.32", + "phpunit/phpunit": "^10.5.58" + }, + "conflict": { + "doctrine/common": "<2.9" + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Doctrine\\Tests\\Common\\": "tests" + } + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + }, + "sort-packages": true + }, + "scripts": { + "docs": "composer --working-dir docs update && ./docs/vendor/bin/build-docs.sh @additional_args" + } +} diff --git a/backend/vendor/doctrine/event-manager/src/EventArgs.php b/backend/vendor/doctrine/event-manager/src/EventArgs.php new file mode 100644 index 0000000..eea3d8a --- /dev/null +++ b/backend/vendor/doctrine/event-manager/src/EventArgs.php @@ -0,0 +1,37 @@ + + */ + public function getAllListeners(): array; + + /** + * Checks whether an event has any registered listeners. + */ + public function hasListeners(string $event): bool; +} diff --git a/backend/vendor/doctrine/event-manager/src/EventListenerRegistry.php b/backend/vendor/doctrine/event-manager/src/EventListenerRegistry.php new file mode 100644 index 0000000..bc8cd84 --- /dev/null +++ b/backend/vendor/doctrine/event-manager/src/EventListenerRegistry.php @@ -0,0 +1,26 @@ + => + * + * @var array + */ + private array $listeners = []; + + /** {@inheritDoc} */ + public function dispatchEvent(string $eventName, EventArgs|null $eventArgs = null): void + { + if (! isset($this->listeners[$eventName])) { + return; + } + + $eventArgs ??= EventArgs::getEmptyInstance(); + + foreach ($this->listeners[$eventName] as $listener) { + $listener->$eventName($eventArgs); + } + } + + /** {@inheritDoc} */ + public function getListeners(string $event): array + { + return $this->listeners[$event] ?? []; + } + + /** {@inheritDoc} */ + public function getAllListeners(): array + { + return $this->listeners; + } + + /** {@inheritDoc} */ + public function hasListeners(string $event): bool + { + return ! empty($this->listeners[$event]); + } + + /** {@inheritDoc} */ + public function addEventListener(string|array $events, object $listener): void + { + // Picks the hash code related to that listener + $oid = spl_object_id($listener); + + foreach ((array) $events as $event) { + // Overrides listener if a previous one was associated already + // Prevents duplicate listeners on same event (same instance only) + $this->listeners[$event][$oid] = $listener; + } + } + + /** {@inheritDoc} */ + public function removeEventListener(string|array $events, object $listener): void + { + // Picks the hash code related to that listener + $oid = spl_object_id($listener); + + foreach ((array) $events as $event) { + unset($this->listeners[$event][$oid]); + } + } + + /** {@inheritDoc} */ + public function addEventSubscriber(EventSubscriber $subscriber): void + { + $this->addEventListener($subscriber->getSubscribedEvents(), $subscriber); + } + + /** {@inheritDoc} */ + public function removeEventSubscriber(EventSubscriber $subscriber): void + { + $this->removeEventListener($subscriber->getSubscribedEvents(), $subscriber); + } +} diff --git a/backend/vendor/doctrine/event-manager/src/EventManagerInterface.php b/backend/vendor/doctrine/event-manager/src/EventManagerInterface.php new file mode 100644 index 0000000..82dd684 --- /dev/null +++ b/backend/vendor/doctrine/event-manager/src/EventManagerInterface.php @@ -0,0 +1,13 @@ +build(); + +By default it will create an English inflector. If you want to use another language, just pass the language +you want to create an inflector for to the ``createForLanguage()`` method: + +.. code-block:: php + + use Doctrine\Inflector\InflectorFactory; + use Doctrine\Inflector\Language; + + $inflector = InflectorFactory::createForLanguage(Language::SPANISH)->build(); + +The supported languages are as follows: + +- ``Language::ENGLISH`` +- ``Language::ESPERANTO`` +- ``Language::FRENCH`` +- ``Language::NORWEGIAN_BOKMAL`` +- ``Language::PORTUGUESE`` +- ``Language::SPANISH`` +- ``Language::TURKISH`` + +If you want to manually construct the inflector instead of using a factory, you can do so like this: + +.. code-block:: php + + use Doctrine\Inflector\CachedWordInflector; + use Doctrine\Inflector\RulesetInflector; + use Doctrine\Inflector\Rules\English; + + $inflector = new Inflector( + new CachedWordInflector(new RulesetInflector( + English\Rules::getSingularRuleset() + )), + new CachedWordInflector(new RulesetInflector( + English\Rules::getPluralRuleset() + )) + ); + +Adding Languages +---------------- + +If you are interested in adding support for your language, take a look at the other languages defined in the +``Doctrine\Inflector\Rules`` namespace and the tests located in ``Doctrine\Tests\Inflector\Rules``. You can copy +one of the languages and update the rules for your language. + +Once you have done this, send a pull request to the ``doctrine/inflector`` repository with the additions. + +Custom Setup +============ + +If you want to setup custom singular and plural rules, you can configure these in the factory: + +.. code-block:: php + + use Doctrine\Inflector\InflectorFactory; + use Doctrine\Inflector\Rules\Pattern; + use Doctrine\Inflector\Rules\Patterns; + use Doctrine\Inflector\Rules\Ruleset; + use Doctrine\Inflector\Rules\Substitution; + use Doctrine\Inflector\Rules\Substitutions; + use Doctrine\Inflector\Rules\Transformation; + use Doctrine\Inflector\Rules\Transformations; + use Doctrine\Inflector\Rules\Word; + + $inflector = InflectorFactory::create() + ->withSingularRules( + new Ruleset( + new Transformations( + new Transformation(new Pattern('/^(bil)er$/i'), '\1'), + new Transformation(new Pattern('/^(inflec|contribu)tors$/i'), '\1ta') + ), + new Patterns(new Pattern('singulars')), + new Substitutions(new Substitution(new Word('spins'), new Word('spinor'))) + ) + ) + ->withPluralRules( + new Ruleset( + new Transformations( + new Transformation(new Pattern('^(bil)er$'), '\1'), + new Transformation(new Pattern('^(inflec|contribu)tors$'), '\1ta') + ), + new Patterns(new Pattern('noflect'), new Pattern('abtuse')), + new Substitutions( + new Substitution(new Word('amaze'), new Word('amazable')), + new Substitution(new Word('phone'), new Word('phonezes')) + ) + ) + ) + ->build(); + +No operation inflector +---------------------- + +The ``Doctrine\Inflector\NoopWordInflector`` may be used to configure an inflector that doesn't perform any operation for +pluralization and/or singularization. If will simply return the input as output. + +This is an implementation of the `Null Object design pattern `_. + +.. code-block:: php + + use Doctrine\Inflector\Inflector; + use Doctrine\Inflector\NoopWordInflector; + + $inflector = new Inflector(new NoopWordInflector(), new NoopWordInflector()); + +Tableize +======== + +Converts ``ModelName`` to ``model_name``: + +.. code-block:: php + + echo $inflector->tableize('ModelName'); // model_name + +Classify +======== + +Converts ``model_name`` to ``ModelName``: + +.. code-block:: php + + echo $inflector->classify('model_name'); // ModelName + +Camelize +======== + +This method uses `Classify`_ and then converts the first character to lowercase: + +.. code-block:: php + + echo $inflector->camelize('model_name'); // modelName + +Capitalize +========== + +Takes a string and capitalizes all of the words, like PHP's built-in +``ucwords`` function. This extends that behavior, however, by allowing the +word delimiters to be configured, rather than only separating on +whitespace. + +Here is an example: + +.. code-block:: php + + $string = 'top-o-the-morning to all_of_you!'; + + echo $inflector->capitalize($string); // Top-O-The-Morning To All_of_you! + + echo $inflector->capitalize($string, '-_ '); // Top-O-The-Morning To All_Of_You! + +Pluralize +========= + +Returns a word in plural form. + +.. code-block:: php + + echo $inflector->pluralize('browser'); // browsers + +Singularize +=========== + +Returns a word in singular form. + +.. code-block:: php + + echo $inflector->singularize('browsers'); // browser + +Urlize +====== + +Generate a URL friendly string from a string of text: + +.. code-block:: php + + echo $inflector->urlize('My first blog post'); // my-first-blog-post + +Unaccent +======== + +You can unaccent a string of text using the ``unaccent()`` method: + +.. code-block:: php + + echo $inflector->unaccent('año'); // ano + +Legacy API +========== + +The API present in Inflector 1.x is still available, but will be deprecated in a future release and dropped for 3.0. +Support for languages other than English is available in the 2.0 API only. + +Acknowledgements +================ + +The language rules in this library have been adapted from several different sources, including but not limited to: + +- `Ruby On Rails Inflector `_ +- `ICanBoogie Inflector `_ +- `CakePHP Inflector `_ diff --git a/backend/vendor/doctrine/inflector/src/CachedWordInflector.php b/backend/vendor/doctrine/inflector/src/CachedWordInflector.php new file mode 100644 index 0000000..2d52908 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/CachedWordInflector.php @@ -0,0 +1,24 @@ +wordInflector = $wordInflector; + } + + public function inflect(string $word): string + { + return $this->cache[$word] ?? $this->cache[$word] = $this->wordInflector->inflect($word); + } +} diff --git a/backend/vendor/doctrine/inflector/src/GenericLanguageInflectorFactory.php b/backend/vendor/doctrine/inflector/src/GenericLanguageInflectorFactory.php new file mode 100644 index 0000000..166061d --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/GenericLanguageInflectorFactory.php @@ -0,0 +1,66 @@ +singularRulesets[] = $this->getSingularRuleset(); + $this->pluralRulesets[] = $this->getPluralRuleset(); + } + + final public function build(): Inflector + { + return new Inflector( + new CachedWordInflector(new RulesetInflector( + ...$this->singularRulesets + )), + new CachedWordInflector(new RulesetInflector( + ...$this->pluralRulesets + )) + ); + } + + final public function withSingularRules(?Ruleset $singularRules, bool $reset = false): LanguageInflectorFactory + { + if ($reset) { + $this->singularRulesets = []; + } + + if ($singularRules instanceof Ruleset) { + array_unshift($this->singularRulesets, $singularRules); + } + + return $this; + } + + final public function withPluralRules(?Ruleset $pluralRules, bool $reset = false): LanguageInflectorFactory + { + if ($reset) { + $this->pluralRulesets = []; + } + + if ($pluralRules instanceof Ruleset) { + array_unshift($this->pluralRulesets, $pluralRules); + } + + return $this; + } + + abstract protected function getSingularRuleset(): Ruleset; + + abstract protected function getPluralRuleset(): Ruleset; +} diff --git a/backend/vendor/doctrine/inflector/src/Inflector.php b/backend/vendor/doctrine/inflector/src/Inflector.php new file mode 100644 index 0000000..610a4cf --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Inflector.php @@ -0,0 +1,507 @@ + 'A', + 'Á' => 'A', + 'Â' => 'A', + 'Ã' => 'A', + 'Ä' => 'Ae', + 'Æ' => 'Ae', + 'Å' => 'Aa', + 'æ' => 'a', + 'Ç' => 'C', + 'È' => 'E', + 'É' => 'E', + 'Ê' => 'E', + 'Ë' => 'E', + 'Ì' => 'I', + 'Í' => 'I', + 'Î' => 'I', + 'Ï' => 'I', + 'Ñ' => 'N', + 'Ò' => 'O', + 'Ó' => 'O', + 'Ô' => 'O', + 'Õ' => 'O', + 'Ö' => 'Oe', + 'Ù' => 'U', + 'Ú' => 'U', + 'Û' => 'U', + 'Ü' => 'Ue', + 'Ý' => 'Y', + 'ß' => 'ss', + 'à' => 'a', + 'á' => 'a', + 'â' => 'a', + 'ã' => 'a', + 'ä' => 'ae', + 'å' => 'aa', + 'ç' => 'c', + 'è' => 'e', + 'é' => 'e', + 'ê' => 'e', + 'ë' => 'e', + 'ì' => 'i', + 'í' => 'i', + 'î' => 'i', + 'ï' => 'i', + 'ñ' => 'n', + 'ò' => 'o', + 'ó' => 'o', + 'ô' => 'o', + 'õ' => 'o', + 'ö' => 'oe', + 'ù' => 'u', + 'ú' => 'u', + 'û' => 'u', + 'ü' => 'ue', + 'ý' => 'y', + 'ÿ' => 'y', + 'Ā' => 'A', + 'ā' => 'a', + 'Ă' => 'A', + 'ă' => 'a', + 'Ą' => 'A', + 'ą' => 'a', + 'Ć' => 'C', + 'ć' => 'c', + 'Ĉ' => 'C', + 'ĉ' => 'c', + 'Ċ' => 'C', + 'ċ' => 'c', + 'Č' => 'C', + 'č' => 'c', + 'Ď' => 'D', + 'ď' => 'd', + 'Đ' => 'D', + 'đ' => 'd', + 'Ē' => 'E', + 'ē' => 'e', + 'Ĕ' => 'E', + 'ĕ' => 'e', + 'Ė' => 'E', + 'ė' => 'e', + 'Ę' => 'E', + 'ę' => 'e', + 'Ě' => 'E', + 'ě' => 'e', + 'Ĝ' => 'G', + 'ĝ' => 'g', + 'Ğ' => 'G', + 'ğ' => 'g', + 'Ġ' => 'G', + 'ġ' => 'g', + 'Ģ' => 'G', + 'ģ' => 'g', + 'Ĥ' => 'H', + 'ĥ' => 'h', + 'Ħ' => 'H', + 'ħ' => 'h', + 'Ĩ' => 'I', + 'ĩ' => 'i', + 'Ī' => 'I', + 'ī' => 'i', + 'Ĭ' => 'I', + 'ĭ' => 'i', + 'Į' => 'I', + 'į' => 'i', + 'İ' => 'I', + 'ı' => 'i', + 'IJ' => 'IJ', + 'ij' => 'ij', + 'Ĵ' => 'J', + 'ĵ' => 'j', + 'Ķ' => 'K', + 'ķ' => 'k', + 'ĸ' => 'k', + 'Ĺ' => 'L', + 'ĺ' => 'l', + 'Ļ' => 'L', + 'ļ' => 'l', + 'Ľ' => 'L', + 'ľ' => 'l', + 'Ŀ' => 'L', + 'ŀ' => 'l', + 'Ł' => 'L', + 'ł' => 'l', + 'Ń' => 'N', + 'ń' => 'n', + 'Ņ' => 'N', + 'ņ' => 'n', + 'Ň' => 'N', + 'ň' => 'n', + 'ʼn' => 'N', + 'Ŋ' => 'n', + 'ŋ' => 'N', + 'Ō' => 'O', + 'ō' => 'o', + 'Ŏ' => 'O', + 'ŏ' => 'o', + 'Ő' => 'O', + 'ő' => 'o', + 'Œ' => 'OE', + 'œ' => 'oe', + 'Ø' => 'O', + 'ø' => 'o', + 'Ŕ' => 'R', + 'ŕ' => 'r', + 'Ŗ' => 'R', + 'ŗ' => 'r', + 'Ř' => 'R', + 'ř' => 'r', + 'Ś' => 'S', + 'ś' => 's', + 'Ŝ' => 'S', + 'ŝ' => 's', + 'Ş' => 'S', + 'ş' => 's', + 'Š' => 'S', + 'š' => 's', + 'Ţ' => 'T', + 'ţ' => 't', + 'Ť' => 'T', + 'ť' => 't', + 'Ŧ' => 'T', + 'ŧ' => 't', + 'Ũ' => 'U', + 'ũ' => 'u', + 'Ū' => 'U', + 'ū' => 'u', + 'Ŭ' => 'U', + 'ŭ' => 'u', + 'Ů' => 'U', + 'ů' => 'u', + 'Ű' => 'U', + 'ű' => 'u', + 'Ų' => 'U', + 'ų' => 'u', + 'Ŵ' => 'W', + 'ŵ' => 'w', + 'Ŷ' => 'Y', + 'ŷ' => 'y', + 'Ÿ' => 'Y', + 'Ź' => 'Z', + 'ź' => 'z', + 'Ż' => 'Z', + 'ż' => 'z', + 'Ž' => 'Z', + 'ž' => 'z', + 'ſ' => 's', + '€' => 'E', + '£' => '', + ]; + + /** @var WordInflector */ + private $singularizer; + + /** @var WordInflector */ + private $pluralizer; + + public function __construct(WordInflector $singularizer, WordInflector $pluralizer) + { + $this->singularizer = $singularizer; + $this->pluralizer = $pluralizer; + } + + /** + * Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'. + */ + public function tableize(string $word): string + { + $tableized = preg_replace('~(?<=\\w)([A-Z])~u', '_$1', $word); + + if ($tableized === null) { + throw new RuntimeException(sprintf( + 'preg_replace returned null for value "%s"', + $word + )); + } + + return mb_strtolower($tableized); + } + + /** + * Converts a word into the format for a Doctrine class name. Converts 'table_name' to 'TableName'. + */ + public function classify(string $word): string + { + return str_replace([' ', '_', '-'], '', ucwords($word, ' _-')); + } + + /** + * Camelizes a word. This uses the classify() method and turns the first character to lowercase. + */ + public function camelize(string $word): string + { + return lcfirst($this->classify($word)); + } + + /** + * Uppercases words with configurable delimiters between words. + * + * Takes a string and capitalizes all of the words, like PHP's built-in + * ucwords function. This extends that behavior, however, by allowing the + * word delimiters to be configured, rather than only separating on + * whitespace. + * + * Here is an example: + * + * capitalize($string); + * // Top-O-The-Morning To All_of_you! + * + * echo $inflector->capitalize($string, '-_ '); + * // Top-O-The-Morning To All_Of_You! + * ?> + * + * + * @param string $string The string to operate on. + * @param string $delimiters A list of word separators. + * + * @return string The string with all delimiter-separated words capitalized. + */ + public function capitalize(string $string, string $delimiters = " \n\t\r\0\x0B-"): string + { + return ucwords($string, $delimiters); + } + + /** + * Checks if the given string seems like it has utf8 characters in it. + * + * @param string $string The string to check for utf8 characters in. + */ + public function seemsUtf8(string $string): bool + { + for ($i = 0; $i < strlen($string); $i++) { + if (ord($string[$i]) < 0x80) { + continue; // 0bbbbbbb + } + + if ((ord($string[$i]) & 0xE0) === 0xC0) { + $n = 1; // 110bbbbb + } elseif ((ord($string[$i]) & 0xF0) === 0xE0) { + $n = 2; // 1110bbbb + } elseif ((ord($string[$i]) & 0xF8) === 0xF0) { + $n = 3; // 11110bbb + } elseif ((ord($string[$i]) & 0xFC) === 0xF8) { + $n = 4; // 111110bb + } elseif ((ord($string[$i]) & 0xFE) === 0xFC) { + $n = 5; // 1111110b + } else { + return false; // Does not match any model + } + + for ($j = 0; $j < $n; $j++) { // n bytes matching 10bbbbbb follow ? + if (++$i === strlen($string) || ((ord($string[$i]) & 0xC0) !== 0x80)) { + return false; + } + } + } + + return true; + } + + /** + * Remove any illegal characters, accents, etc. + * + * @param string $string String to unaccent + * + * @return string Unaccented string + */ + public function unaccent(string $string): string + { + if (preg_match('/[\x80-\xff]/', $string) === false) { + return $string; + } + + if ($this->seemsUtf8($string)) { + $string = strtr($string, self::ACCENTED_CHARACTERS); + } else { + $characters = []; + + // Assume ISO-8859-1 if not UTF-8 + $characters['in'] = + chr(128) + . chr(131) + . chr(138) + . chr(142) + . chr(154) + . chr(158) + . chr(159) + . chr(162) + . chr(165) + . chr(181) + . chr(192) + . chr(193) + . chr(194) + . chr(195) + . chr(196) + . chr(197) + . chr(199) + . chr(200) + . chr(201) + . chr(202) + . chr(203) + . chr(204) + . chr(205) + . chr(206) + . chr(207) + . chr(209) + . chr(210) + . chr(211) + . chr(212) + . chr(213) + . chr(214) + . chr(216) + . chr(217) + . chr(218) + . chr(219) + . chr(220) + . chr(221) + . chr(224) + . chr(225) + . chr(226) + . chr(227) + . chr(228) + . chr(229) + . chr(231) + . chr(232) + . chr(233) + . chr(234) + . chr(235) + . chr(236) + . chr(237) + . chr(238) + . chr(239) + . chr(241) + . chr(242) + . chr(243) + . chr(244) + . chr(245) + . chr(246) + . chr(248) + . chr(249) + . chr(250) + . chr(251) + . chr(252) + . chr(253) + . chr(255); + + $characters['out'] = 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'; + + $string = strtr($string, $characters['in'], $characters['out']); + + $doubleChars = []; + + $doubleChars['in'] = [ + chr(140), + chr(156), + chr(198), + chr(208), + chr(222), + chr(223), + chr(230), + chr(240), + chr(254), + ]; + + $doubleChars['out'] = ['OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th']; + + $string = str_replace($doubleChars['in'], $doubleChars['out'], $string); + } + + return $string; + } + + /** + * Convert any passed string to a url friendly string. + * Converts 'My first blog post' to 'my-first-blog-post' + * + * @param string $string String to urlize. + * + * @return string Urlized string. + */ + public function urlize(string $string): string + { + // Remove all non url friendly characters with the unaccent function + $unaccented = $this->unaccent($string); + + if (function_exists('mb_strtolower')) { + $lowered = mb_strtolower($unaccented); + } else { + $lowered = strtolower($unaccented); + } + + $replacements = [ + '/\W/' => ' ', + '/([A-Z]+)([A-Z][a-z])/' => '\1_\2', + '/([a-z\d])([A-Z])/' => '\1_\2', + '/[^A-Z^a-z^0-9^\/]+/' => '-', + ]; + + $urlized = $lowered; + + foreach ($replacements as $pattern => $replacement) { + $replaced = preg_replace($pattern, $replacement, $urlized); + + if ($replaced === null) { + throw new RuntimeException(sprintf( + 'preg_replace returned null for value "%s"', + $urlized + )); + } + + $urlized = $replaced; + } + + return trim($urlized, '-'); + } + + /** + * Returns a word in singular form. + * + * @param string $word The word in plural form. + * + * @return string The word in singular form. + */ + public function singularize(string $word): string + { + return $this->singularizer->inflect($word); + } + + /** + * Returns a word in plural form. + * + * @param string $word The word in singular form. + * + * @return string The word in plural form. + */ + public function pluralize(string $word): string + { + return $this->pluralizer->inflect($word); + } +} diff --git a/backend/vendor/doctrine/inflector/src/InflectorFactory.php b/backend/vendor/doctrine/inflector/src/InflectorFactory.php new file mode 100644 index 0000000..3556b78 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/InflectorFactory.php @@ -0,0 +1,60 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/English/Uninflected.php b/backend/vendor/doctrine/inflector/src/Rules/English/Uninflected.php new file mode 100644 index 0000000..02257de --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/English/Uninflected.php @@ -0,0 +1,189 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Esperanto/Uninflected.php b/backend/vendor/doctrine/inflector/src/Rules/Esperanto/Uninflected.php new file mode 100644 index 0000000..ed04c93 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Esperanto/Uninflected.php @@ -0,0 +1,28 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/French/Uninflected.php b/backend/vendor/doctrine/inflector/src/Rules/French/Uninflected.php new file mode 100644 index 0000000..1c2b99a --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/French/Uninflected.php @@ -0,0 +1,31 @@ + */ + public static function getSingular(): iterable + { + // Reverse of -sce → -scia (fasce → fascia) + yield new Transformation(new Pattern('([aeiou])sce$'), '\\1scia'); + + // Reverse of -cie → -cia (farmacia → farmacie) + yield new Transformation(new Pattern('cie$'), 'cia'); + + // Reverse of -gie → -gia (bugia → bugie) + yield new Transformation(new Pattern('gie$'), 'gia'); + + // Reverse of -ce → -cia (arance → arancia) + yield new Transformation(new Pattern('([^aeiou])ce$'), '\1cia'); + + // Reverse of -ge → -gia (valige → valigia) + yield new Transformation(new Pattern('([^aeiou])ge$'), '\1gia'); + + // Reverse of -chi → -co (bachi → baco) + yield new Transformation(new Pattern('([bcdfghjklmnpqrstvwxyz][aeiou])chi$'), '\1co'); + + // Reverse of -ghi → -go (laghi → lago) + yield new Transformation(new Pattern('([bcdfghjklmnpqrstvwxyz][aeiou])ghi$'), '\1go'); + + // Reverse of -ci → -co (medici → medico) + yield new Transformation(new Pattern('([aeiou][bcdfghjklmnpqrstvwxyz])ci$'), '\1co'); + + // Reverse of -gi → -go (psicologi → psicologo) + yield new Transformation(new Pattern('([aeiou][bcdfghjklmnpqrstvwxyz])gi$'), '\1go'); + + // Reverse of -i → -io (zii → zio, negozi → negozio) + // This is more complex due to Italian's stress patterns, but we'll handle the basic case + yield new Transformation(new Pattern('([^aeiou])i$'), '\1io'); + + // Handle words that end with -i but should go to -co/-go (amici → amico, not amice) + yield new Transformation(new Pattern('([^aeiou])ci$'), '\1co'); + yield new Transformation(new Pattern('([^aeiou])gi$'), '\1go'); + + // Reverse of -a → -e + yield new Transformation(new Pattern('e$'), 'a'); + + // Reverse of -e → -i + yield new Transformation(new Pattern('i$'), 'e'); + + // Reverse of -o → -i + yield new Transformation(new Pattern('i$'), 'o'); + } + + /** @return iterable */ + public static function getPlural(): iterable + { + // Words ending in -scia without stress on 'i' become -sce (e.g. fascia → fasce) + yield new Transformation(new Pattern('([aeiou])scia$'), '\\1sce'); + + // Words ending in -cia/gia with stress on 'i' keep the 'i' in plural + yield new Transformation(new Pattern('cia$'), 'cie'); // e.g. farmacia → farmacie + yield new Transformation(new Pattern('gia$'), 'gie'); // e.g. bugia → bugie + + // Words ending in -cia/gia without stress on 'i' lose the 'i' in plural + yield new Transformation(new Pattern('([^aeiou])cia$'), '\\1ce'); // e.g. arancia → arance + yield new Transformation(new Pattern('([^aeiou])gia$'), '\\1ge'); // e.g. valigia → valige + + // Words ending in -co/-go with stress on 'o' become -chi/-ghi + yield new Transformation(new Pattern('([bcdfghjklmnpqrstvwxyz][aeiou])co$'), '\\1chi'); // e.g. baco → bachi + yield new Transformation(new Pattern('([bcdfghjklmnpqrstvwxyz][aeiou])go$'), '\\1ghi'); // e.g. lago → laghi + + // Words ending in -co/-go with stress on the penultimate syllable become -ci/-gi + yield new Transformation(new Pattern('([aeiou][bcdfghjklmnpqrstvwxyz])co$'), '\\1ci'); // e.g. medico → medici + yield new Transformation(new Pattern('([aeiou][bcdfghjklmnpqrstvwxyz])go$'), '\\1gi'); // e.g. psicologo → psicologi + + // Words ending in -io with stress on 'i' keep the 'i' in plural + yield new Transformation(new Pattern('([^aeiou])io$'), '\\1i'); // e.g. zio → zii + + // Words ending in -io with stress on 'o' lose the 'i' in plural + yield new Transformation(new Pattern('([aeiou])io$'), '\\1i'); // e.g. negozio → negozi + + // Standard ending rules + yield new Transformation(new Pattern('a$'), 'e'); // -a → -e + yield new Transformation(new Pattern('e$'), 'i'); // -e → -i + yield new Transformation(new Pattern('o$'), 'i'); // -o → -i + } + + /** @return iterable */ + public static function getIrregular(): iterable + { + // Irregular substitutions (singular => plural) + $irregulars = [ + 'ala' => 'ali', + 'albergo' => 'alberghi', + 'amica' => 'amiche', + 'amico' => 'amici', + 'ampio' => 'ampi', + 'arancia' => 'arance', + 'arma' => 'armi', + 'asparago' => 'asparagi', + 'banca' => 'banche', + 'belga' => 'belgi', + 'braccio' => 'braccia', + 'budello' => 'budella', + 'bue' => 'buoi', + 'caccia' => 'cacce', + 'calcagno' => 'calcagna', + 'camicia' => 'camicie', + 'cane' => 'cani', + 'capitale' => 'capitali', + 'carcere' => 'carceri', + 'casa' => 'case', + 'cavaliere' => 'cavalieri', + 'centinaio' => 'centinaia', + 'cerchio' => 'cerchia', + 'cervello' => 'cervella', + 'chiave' => 'chiavi', + 'chirurgo' => 'chirurgi', + 'ciglio' => 'ciglia', + 'città' => 'città', + 'corno' => 'corna', + 'corpo' => 'corpi', + 'crisi' => 'crisi', + 'dente' => 'denti', + 'dio' => 'dei', + 'dito' => 'dita', + 'dottore' => 'dottori', + 'fiore' => 'fiori', + 'fratello' => 'fratelli', + 'fuoco' => 'fuochi', + 'gamba' => 'gambe', + 'ginocchio' => 'ginocchia', + 'gioco' => 'giochi', + 'giornale' => 'giornali', + 'giraffa' => 'giraffe', + 'labbro' => 'labbra', + 'lenzuolo' => 'lenzuola', + 'libro' => 'libri', + 'madre' => 'madri', + 'maestro' => 'maestri', + 'magico' => 'magici', + 'mago' => 'maghi', + 'maniaco' => 'maniaci', + 'manico' => 'manici', + 'mano' => 'mani', + 'medico' => 'medici', + 'membro' => 'membri', + 'metropoli' => 'metropoli', + 'migliaio' => 'migliaia', + 'miglio' => 'miglia', + 'mille' => 'mila', + 'mio' => 'miei', + 'moglie' => 'mogli', + 'mosaico' => 'mosaici', + 'muro' => 'muri', + 'nemico' => 'nemici', + 'nome' => 'nomi', + 'occhio' => 'occhi', + 'orecchio' => 'orecchi', + 'osso' => 'ossa', + 'paio' => 'paia', + 'pane' => 'pani', + 'papa' => 'papi', + 'pasta' => 'paste', + 'penna' => 'penne', + 'pesce' => 'pesci', + 'piede' => 'piedi', + 'pittore' => 'pittori', + 'poeta' => 'poeti', + 'porco' => 'porci', + 'porto' => 'porti', + 'problema' => 'problemi', + 'ragazzo' => 'ragazzi', + 're' => 're', + 'rene' => 'reni', + 'riso' => 'risa', + 'rosa' => 'rosa', + 'sale' => 'sali', + 'sarto' => 'sarti', + 'scuola' => 'scuole', + 'serie' => 'serie', + 'serramento' => 'serramenta', + 'sorella' => 'sorelle', + 'specie' => 'specie', + 'staio' => 'staia', + 'stazione' => 'stazioni', + 'strido' => 'strida', + 'strillo' => 'strilla', + 'studio' => 'studi', + 'suo' => 'suoi', + 'superficie' => 'superfici', + 'tavolo' => 'tavoli', + 'tempio' => 'templi', + 'treno' => 'treni', + 'tuo' => 'tuoi', + 'uomo' => 'uomini', + 'uovo' => 'uova', + 'urlo' => 'urla', + 'valigia' => 'valigie', + 'vestigio' => 'vestigia', + 'vino' => 'vini', + 'viola' => 'viola', + 'zio' => 'zii', + ]; + + foreach ($irregulars as $singular => $plural) { + yield new Substitution(new Word($singular), new Word($plural)); + } + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Italian/InflectorFactory.php b/backend/vendor/doctrine/inflector/src/Rules/Italian/InflectorFactory.php new file mode 100644 index 0000000..41685c4 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Italian/InflectorFactory.php @@ -0,0 +1,21 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Italian/Uninflected.php b/backend/vendor/doctrine/inflector/src/Rules/Italian/Uninflected.php new file mode 100644 index 0000000..067a92a --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Italian/Uninflected.php @@ -0,0 +1,80 @@ + */ + public static function getSingular(): iterable + { + yield from self::getDefault(); + } + + /** @return iterable */ + public static function getPlural(): iterable + { + yield from self::getDefault(); + } + + /** @return iterable */ + private static function getDefault(): iterable + { + // Invariable words (same form in singular and plural) + $invariables = [ + 'alpaca', + 'auto', + 'bar', + 'blu', + 'boia', + 'boomerang', + 'brindisi', + 'campus', + 'computer', + 'crisi', + 'crocevia', + 'dopocena', + 'film', + 'foto', + 'fuchsia', + 'gnu', + 'gorilla', + 'gru', + 'iguana', + 'kamikaze', + 'karaoke', + 'koala', + 'lama', + 'menu', + 'metropoli', + 'moto', + 'opossum', + 'panda', + 'quiz', + 'radio', + 're', + 'scacciapensieri', + 'serie', + 'smartphone', + 'sosia', + 'sottoscala', + 'specie', + 'sport', + 'tablet', + 'taxi', + 'vaglia', + 'virtù', + 'virus', + 'yogurt', + 'foto', + 'fuchsia', + ]; + + foreach ($invariables as $word) { + yield new Pattern($word); + } + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/NorwegianBokmal/Inflectible.php b/backend/vendor/doctrine/inflector/src/Rules/NorwegianBokmal/Inflectible.php new file mode 100644 index 0000000..1e952d8 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/NorwegianBokmal/Inflectible.php @@ -0,0 +1,34 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/NorwegianBokmal/Uninflected.php b/backend/vendor/doctrine/inflector/src/Rules/NorwegianBokmal/Uninflected.php new file mode 100644 index 0000000..5d8d3b3 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/NorwegianBokmal/Uninflected.php @@ -0,0 +1,30 @@ +pattern = $pattern; + + if (isset($this->pattern[0]) && $this->pattern[0] === '/') { + $this->regex = $this->pattern; + } else { + $this->regex = '/' . $this->pattern . '/i'; + } + } + + public function getPattern(): string + { + return $this->pattern; + } + + public function getRegex(): string + { + return $this->regex; + } + + public function matches(string $word): bool + { + return preg_match($this->getRegex(), $word) === 1; + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Patterns.php b/backend/vendor/doctrine/inflector/src/Rules/Patterns.php new file mode 100644 index 0000000..16594c4 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Patterns.php @@ -0,0 +1,29 @@ +getPattern(); + }, $patterns); + + $this->regex = '/^(?:' . implode('|', $patterns) . ')$/i'; + } + + public function matches(string $word): bool + { + return preg_match($this->regex, $word, $regs) === 1; + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Portuguese/Inflectible.php b/backend/vendor/doctrine/inflector/src/Rules/Portuguese/Inflectible.php new file mode 100644 index 0000000..0d41fe7 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Portuguese/Inflectible.php @@ -0,0 +1,98 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Portuguese/Uninflected.php b/backend/vendor/doctrine/inflector/src/Rules/Portuguese/Uninflected.php new file mode 100644 index 0000000..b8e988f --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Portuguese/Uninflected.php @@ -0,0 +1,32 @@ +regular = $regular; + $this->uninflected = $uninflected; + $this->irregular = $irregular; + } + + public function getRegular(): Transformations + { + return $this->regular; + } + + public function getUninflected(): Patterns + { + return $this->uninflected; + } + + public function getIrregular(): Substitutions + { + return $this->irregular; + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Spanish/Inflectible.php b/backend/vendor/doctrine/inflector/src/Rules/Spanish/Inflectible.php new file mode 100644 index 0000000..9129460 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Spanish/Inflectible.php @@ -0,0 +1,47 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Spanish/Uninflected.php b/backend/vendor/doctrine/inflector/src/Rules/Spanish/Uninflected.php new file mode 100644 index 0000000..c26ebe9 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Spanish/Uninflected.php @@ -0,0 +1,30 @@ +from = $from; + $this->to = $to; + } + + public function getFrom(): Word + { + return $this->from; + } + + public function getTo(): Word + { + return $this->to; + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Substitutions.php b/backend/vendor/doctrine/inflector/src/Rules/Substitutions.php new file mode 100644 index 0000000..17ee296 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Substitutions.php @@ -0,0 +1,57 @@ +substitutions[$substitution->getFrom()->getWord()] = $substitution; + } + } + + public function getFlippedSubstitutions(): Substitutions + { + $substitutions = []; + + foreach ($this->substitutions as $substitution) { + $substitutions[] = new Substitution( + $substitution->getTo(), + $substitution->getFrom() + ); + } + + return new Substitutions(...$substitutions); + } + + public function inflect(string $word): string + { + $lowerWord = strtolower($word); + + if (isset($this->substitutions[$lowerWord])) { + $firstLetterUppercase = $lowerWord[0] !== $word[0]; + + $toWord = $this->substitutions[$lowerWord]->getTo()->getWord(); + + if ($firstLetterUppercase) { + return strtoupper($toWord[0]) . substr($toWord, 1); + } + + return $toWord; + } + + return $word; + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Transformation.php b/backend/vendor/doctrine/inflector/src/Rules/Transformation.php new file mode 100644 index 0000000..30dcd59 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Transformation.php @@ -0,0 +1,39 @@ +pattern = $pattern; + $this->replacement = $replacement; + } + + public function getPattern(): Pattern + { + return $this->pattern; + } + + public function getReplacement(): string + { + return $this->replacement; + } + + public function inflect(string $word): string + { + return (string) preg_replace($this->pattern->getRegex(), $this->replacement, $word); + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Transformations.php b/backend/vendor/doctrine/inflector/src/Rules/Transformations.php new file mode 100644 index 0000000..b6a48fa --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Transformations.php @@ -0,0 +1,29 @@ +transformations = $transformations; + } + + public function inflect(string $word): string + { + foreach ($this->transformations as $transformation) { + if ($transformation->getPattern()->matches($word)) { + return $transformation->inflect($word); + } + } + + return $word; + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Turkish/Inflectible.php b/backend/vendor/doctrine/inflector/src/Rules/Turkish/Inflectible.php new file mode 100644 index 0000000..a2bda0d --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Turkish/Inflectible.php @@ -0,0 +1,34 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/backend/vendor/doctrine/inflector/src/Rules/Turkish/Uninflected.php b/backend/vendor/doctrine/inflector/src/Rules/Turkish/Uninflected.php new file mode 100644 index 0000000..ec1c37d --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/Rules/Turkish/Uninflected.php @@ -0,0 +1,30 @@ +word = $word; + } + + public function getWord(): string + { + return $this->word; + } +} diff --git a/backend/vendor/doctrine/inflector/src/RulesetInflector.php b/backend/vendor/doctrine/inflector/src/RulesetInflector.php new file mode 100644 index 0000000..12b2ed5 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/RulesetInflector.php @@ -0,0 +1,56 @@ +rulesets = array_merge([$ruleset], $rulesets); + } + + public function inflect(string $word): string + { + if ($word === '') { + return ''; + } + + foreach ($this->rulesets as $ruleset) { + if ($ruleset->getUninflected()->matches($word)) { + return $word; + } + + $inflected = $ruleset->getIrregular()->inflect($word); + + if ($inflected !== $word) { + return $inflected; + } + + $inflected = $ruleset->getRegular()->inflect($word); + + if ($inflected !== $word) { + return $inflected; + } + } + + return $word; + } +} diff --git a/backend/vendor/doctrine/inflector/src/WordInflector.php b/backend/vendor/doctrine/inflector/src/WordInflector.php new file mode 100644 index 0000000..b88b1d6 --- /dev/null +++ b/backend/vendor/doctrine/inflector/src/WordInflector.php @@ -0,0 +1,10 @@ +instantiate(\My\ClassName\Here::class); +``` + +## Contributing + +Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out! + +## Credits + +This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which +has been donated to the doctrine organization, and which is now deprecated in favour of this package. diff --git a/backend/vendor/doctrine/instantiator/composer.json b/backend/vendor/doctrine/instantiator/composer.json new file mode 100644 index 0000000..179145e --- /dev/null +++ b/backend/vendor/doctrine/instantiator/composer.json @@ -0,0 +1,48 @@ +{ + "name": "doctrine/instantiator", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "type": "library", + "license": "MIT", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "instantiate", + "constructor" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "require": { + "php": "^8.1" + }, + "require-dev": { + "ext-phar": "*", + "ext-pdo": "*", + "doctrine/coding-standard": "^11", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "autoload-dev": { + "psr-0": { + "DoctrineTest\\InstantiatorPerformance\\": "tests", + "DoctrineTest\\InstantiatorTest\\": "tests", + "DoctrineTest\\InstantiatorTestAsset\\": "tests" + } + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + } +} diff --git a/backend/vendor/doctrine/instantiator/docs/en/index.rst b/backend/vendor/doctrine/instantiator/docs/en/index.rst new file mode 100644 index 0000000..0c85da0 --- /dev/null +++ b/backend/vendor/doctrine/instantiator/docs/en/index.rst @@ -0,0 +1,68 @@ +Introduction +============ + +This library provides a way of avoiding usage of constructors when instantiating PHP classes. + +Installation +============ + +The suggested installation method is via `composer`_: + +.. code-block:: console + + $ composer require doctrine/instantiator + +Usage +===== + +The instantiator is able to create new instances of any class without +using the constructor or any API of the class itself: + +.. code-block:: php + + instantiate(User::class); + +Contributing +============ + +- Follow the `Doctrine Coding Standard`_ +- The project will follow strict `object calisthenics`_ +- Any contribution must provide tests for additional introduced + conditions +- Any un-confirmed issue needs a failing test case before being + accepted +- Pull requests must be sent from a new hotfix/feature branch, not from + ``master``. + +Testing +======= + +The PHPUnit version to be used is the one installed as a dev- dependency +via composer: + +.. code-block:: console + + $ ./vendor/bin/phpunit + +Accepted coverage for new contributions is 80%. Any contribution not +satisfying this requirement won’t be merged. + +Credits +======= + +This library was migrated from `ocramius/instantiator`_, which has been +donated to the doctrine organization, and which is now deprecated in +favour of this package. + +.. _composer: https://getcomposer.org/ +.. _CONTRIBUTING.md: CONTRIBUTING.md +.. _ocramius/instantiator: https://github.com/Ocramius/Instantiator +.. _Doctrine Coding Standard: https://github.com/doctrine/coding-standard +.. _object calisthenics: http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php diff --git a/backend/vendor/doctrine/instantiator/docs/en/sidebar.rst b/backend/vendor/doctrine/instantiator/docs/en/sidebar.rst new file mode 100644 index 0000000..0c36479 --- /dev/null +++ b/backend/vendor/doctrine/instantiator/docs/en/sidebar.rst @@ -0,0 +1,4 @@ +.. toctree:: + :depth: 3 + + index diff --git a/backend/vendor/doctrine/instantiator/psalm.xml b/backend/vendor/doctrine/instantiator/psalm.xml new file mode 100644 index 0000000..e9b622b --- /dev/null +++ b/backend/vendor/doctrine/instantiator/psalm.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php b/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php new file mode 100644 index 0000000..1e59192 --- /dev/null +++ b/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php @@ -0,0 +1,14 @@ + $reflectionClass + * + * @template T of object + */ + public static function fromAbstractClass(ReflectionClass $reflectionClass): self + { + return new self(sprintf( + 'The provided class "%s" is abstract, and cannot be instantiated', + $reflectionClass->getName(), + )); + } + + public static function fromEnum(string $className): self + { + return new self(sprintf( + 'The provided class "%s" is an enum, and cannot be instantiated', + $className, + )); + } +} diff --git a/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php b/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php new file mode 100644 index 0000000..4f70ded --- /dev/null +++ b/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php @@ -0,0 +1,61 @@ + $reflectionClass + * + * @template T of object + */ + public static function fromSerializationTriggeredException( + ReflectionClass $reflectionClass, + Exception $exception, + ): self { + return new self( + sprintf( + 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization', + $reflectionClass->getName(), + ), + 0, + $exception, + ); + } + + /** + * @phpstan-param ReflectionClass $reflectionClass + * + * @template T of object + */ + public static function fromUncleanUnSerialization( + ReflectionClass $reflectionClass, + string $errorString, + int $errorCode, + string $errorFile, + int $errorLine, + ): self { + return new self( + sprintf( + 'Could not produce an instance of "%s" via un-serialization, since an error was triggered ' + . 'in file "%s" at line "%d"', + $reflectionClass->getName(), + $errorFile, + $errorLine, + ), + 0, + new Exception($errorString, $errorCode), + ); + } +} diff --git a/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php b/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php new file mode 100644 index 0000000..f803f89 --- /dev/null +++ b/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php @@ -0,0 +1,255 @@ + $className + * + * @phpstan-return T + * + * @throws ExceptionInterface + * + * @template T of object + */ + public function instantiate(string $className): object + { + if (isset(self::$cachedCloneables[$className])) { + /** @phpstan-var T */ + $cachedCloneable = self::$cachedCloneables[$className]; + + return clone $cachedCloneable; + } + + if (isset(self::$cachedInstantiators[$className])) { + $factory = self::$cachedInstantiators[$className]; + + return $factory(); + } + + return $this->buildAndCacheFromFactory($className); + } + + /** + * Builds the requested object and caches it in static properties for performance + * + * @phpstan-param class-string $className + * + * @phpstan-return T + * + * @template T of object + */ + private function buildAndCacheFromFactory(string $className): object + { + $factory = self::$cachedInstantiators[$className] = $this->buildFactory($className); + $instance = $factory(); + + if ($this->isSafeToClone(new ReflectionClass($instance))) { + self::$cachedCloneables[$className] = clone $instance; + } + + return $instance; + } + + /** + * Builds a callable capable of instantiating the given $className without + * invoking its constructor. + * + * @phpstan-param class-string $className + * + * @phpstan-return callable(): T + * + * @throws InvalidArgumentException + * @throws UnexpectedValueException + * @throws ReflectionException + * + * @template T of object + */ + private function buildFactory(string $className): callable + { + $reflectionClass = $this->getReflectionClass($className); + + if ($this->isInstantiableViaReflection($reflectionClass)) { + return [$reflectionClass, 'newInstanceWithoutConstructor']; + } + + $serializedString = sprintf( + '%s:%d:"%s":0:{}', + is_subclass_of($className, Serializable::class) ? self::SERIALIZATION_FORMAT_USE_UNSERIALIZER : self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER, + strlen($className), + $className, + ); + + $this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString); + + return static fn () => unserialize($serializedString); + } + + /** + * @phpstan-param class-string $className + * + * @phpstan-return ReflectionClass + * + * @throws InvalidArgumentException + * @throws ReflectionException + * + * @template T of object + */ + private function getReflectionClass(string $className): ReflectionClass + { + if (! class_exists($className)) { + throw InvalidArgumentException::fromNonExistingClass($className); + } + + if (enum_exists($className, false)) { + throw InvalidArgumentException::fromEnum($className); + } + + $reflection = new ReflectionClass($className); + + if ($reflection->isAbstract()) { + throw InvalidArgumentException::fromAbstractClass($reflection); + } + + return $reflection; + } + + /** + * @phpstan-param ReflectionClass $reflectionClass + * + * @throws UnexpectedValueException + * + * @template T of object + */ + private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, string $serializedString): void + { + set_error_handler(static function (int $code, string $message, string $file, int $line) use ($reflectionClass, &$error): bool { + $error = UnexpectedValueException::fromUncleanUnSerialization( + $reflectionClass, + $message, + $code, + $file, + $line, + ); + + return true; + }); + + try { + $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); + } finally { + restore_error_handler(); + } + + if ($error) { + throw $error; + } + } + + /** + * @phpstan-param ReflectionClass $reflectionClass + * + * @throws UnexpectedValueException + * + * @template T of object + */ + private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString): void + { + try { + unserialize($serializedString); + } catch (Exception $exception) { + throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception); + } + } + + /** + * @phpstan-param ReflectionClass $reflectionClass + * + * @template T of object + */ + private function isInstantiableViaReflection(ReflectionClass $reflectionClass): bool + { + return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal()); + } + + /** + * Verifies whether the given class is to be considered internal + * + * @phpstan-param ReflectionClass $reflectionClass + * + * @template T of object + */ + private function hasInternalAncestors(ReflectionClass $reflectionClass): bool + { + do { + if ($reflectionClass->isInternal()) { + return true; + } + + $reflectionClass = $reflectionClass->getParentClass(); + } while ($reflectionClass); + + return false; + } + + /** + * Checks if a class is cloneable + * + * Classes implementing `__clone` cannot be safely cloned, as that may cause side-effects. + * + * @phpstan-param ReflectionClass $reflectionClass + * + * @template T of object + */ + private function isSafeToClone(ReflectionClass $reflectionClass): bool + { + return $reflectionClass->isCloneable() + && ! $reflectionClass->hasMethod('__clone') + && ! $reflectionClass->isSubclassOf(ArrayIterator::class); + } +} diff --git a/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php b/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php new file mode 100644 index 0000000..c6ebe35 --- /dev/null +++ b/backend/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php @@ -0,0 +1,24 @@ + $className + * + * @phpstan-return T + * + * @throws ExceptionInterface + * + * @template T of object + */ + public function instantiate(string $className): object; +} diff --git a/backend/vendor/doctrine/lexer/LICENSE b/backend/vendor/doctrine/lexer/LICENSE new file mode 100644 index 0000000..e8fdec4 --- /dev/null +++ b/backend/vendor/doctrine/lexer/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2018 Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/backend/vendor/doctrine/lexer/README.md b/backend/vendor/doctrine/lexer/README.md new file mode 100644 index 0000000..784f2a2 --- /dev/null +++ b/backend/vendor/doctrine/lexer/README.md @@ -0,0 +1,9 @@ +# Doctrine Lexer + +[![Build Status](https://github.com/doctrine/lexer/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/lexer/actions) + +Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. + +This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). + +https://www.doctrine-project.org/projects/lexer.html diff --git a/backend/vendor/doctrine/lexer/UPGRADE.md b/backend/vendor/doctrine/lexer/UPGRADE.md new file mode 100644 index 0000000..1933fcb --- /dev/null +++ b/backend/vendor/doctrine/lexer/UPGRADE.md @@ -0,0 +1,22 @@ +Note about upgrading: Doctrine uses static and runtime mechanisms to raise +awareness about deprecated code. + +- Use of `@deprecated` docblock that is detected by IDEs (like PHPStorm) or + Static Analysis tools (like Psalm, phpstan) +- Use of our low-overhead runtime deprecation API, details: + https://github.com/doctrine/deprecations/ + +# Upgrade to 3.0.0 + +`Doctrine\Common\Lexer\Token` no longer implements `ArrayAccess`. +Parameter type declarations have been added to +`Doctrine\Common\Lexer\AbstractLexer` and `Doctrine\Common\Lexer\Token`. +You should add both parameter type declarations and return type declarations to +your lexers, based on the `@return` phpdoc. + +# Upgrade to 2.0.0 + +`AbstractLexer::glimpse()` and `AbstractLexer::peek()` now return +instances of `Doctrine\Common\Lexer\Token`, which is an array-like class +Using it as an array is deprecated in favor of using properties of that class. +Using `count()` on it is deprecated with no replacement. diff --git a/backend/vendor/doctrine/lexer/composer.json b/backend/vendor/doctrine/lexer/composer.json new file mode 100644 index 0000000..995dafa --- /dev/null +++ b/backend/vendor/doctrine/lexer/composer.json @@ -0,0 +1,55 @@ +{ + "name": "doctrine/lexer", + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "license": "MIT", + "type": "library", + "keywords": [ + "php", + "parser", + "lexer", + "annotations", + "docblock" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.21" + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Doctrine\\Tests\\Common\\Lexer\\": "tests" + } + }, + "config": { + "allow-plugins": { + "composer/package-versions-deprecated": true, + "dealerdirect/phpcodesniffer-composer-installer": true + }, + "sort-packages": true + } +} diff --git a/backend/vendor/doctrine/lexer/src/AbstractLexer.php b/backend/vendor/doctrine/lexer/src/AbstractLexer.php new file mode 100644 index 0000000..2436885 --- /dev/null +++ b/backend/vendor/doctrine/lexer/src/AbstractLexer.php @@ -0,0 +1,328 @@ +> + */ + private array $tokens = []; + + /** + * Current lexer position in input string. + */ + private int $position = 0; + + /** + * Current peek of current lexer position. + */ + private int $peek = 0; + + /** + * The next token in the input. + * + * @var Token|null + */ + public Token|null $lookahead; + + /** + * The last matched/seen token. + * + * @var Token|null + */ + public Token|null $token; + + /** + * Composed regex for input parsing. + * + * @var non-empty-string|null + */ + private string|null $regex = null; + + /** + * Sets the input data to be tokenized. + * + * The Lexer is immediately reset and the new input tokenized. + * Any unprocessed tokens from any previous input are lost. + * + * @param string $input The input to be tokenized. + * + * @return void + */ + public function setInput(string $input) + { + $this->input = $input; + $this->tokens = []; + + $this->reset(); + $this->scan($input); + } + + /** + * Resets the lexer. + * + * @return void + */ + public function reset() + { + $this->lookahead = null; + $this->token = null; + $this->peek = 0; + $this->position = 0; + } + + /** + * Resets the peek pointer to 0. + * + * @return void + */ + public function resetPeek() + { + $this->peek = 0; + } + + /** + * Resets the lexer position on the input to the given position. + * + * @param int $position Position to place the lexical scanner. + * + * @return void + */ + public function resetPosition(int $position = 0) + { + $this->position = $position; + } + + /** + * Retrieve the original lexer's input until a given position. + * + * @return string + */ + public function getInputUntilPosition(int $position) + { + return substr($this->input, 0, $position); + } + + /** + * Checks whether a given token matches the current lookahead. + * + * @param T $type + * + * @return bool + * + * @psalm-assert-if-true !=null $this->lookahead + */ + public function isNextToken(int|string|UnitEnum $type) + { + return $this->lookahead !== null && $this->lookahead->isA($type); + } + + /** + * Checks whether any of the given tokens matches the current lookahead. + * + * @param list $types + * + * @return bool + * + * @psalm-assert-if-true !=null $this->lookahead + */ + public function isNextTokenAny(array $types) + { + return $this->lookahead !== null && $this->lookahead->isA(...$types); + } + + /** + * Moves to the next token in the input string. + * + * @return bool + * + * @psalm-assert-if-true !null $this->lookahead + */ + public function moveNext() + { + $this->peek = 0; + $this->token = $this->lookahead; + $this->lookahead = isset($this->tokens[$this->position]) + ? $this->tokens[$this->position++] : null; + + return $this->lookahead !== null; + } + + /** + * Tells the lexer to skip input tokens until it sees a token with the given value. + * + * @param T $type The token type to skip until. + * + * @return void + */ + public function skipUntil(int|string|UnitEnum $type) + { + while ($this->lookahead !== null && ! $this->lookahead->isA($type)) { + $this->moveNext(); + } + } + + /** + * Checks if given value is identical to the given token. + * + * @return bool + */ + public function isA(string $value, int|string|UnitEnum $token) + { + return $this->getType($value) === $token; + } + + /** + * Moves the lookahead token forward. + * + * @return Token|null The next token or NULL if there are no more tokens ahead. + */ + public function peek() + { + if (isset($this->tokens[$this->position + $this->peek])) { + return $this->tokens[$this->position + $this->peek++]; + } + + return null; + } + + /** + * Peeks at the next token, returns it and immediately resets the peek. + * + * @return Token|null The next token or NULL if there are no more tokens ahead. + */ + public function glimpse() + { + $peek = $this->peek(); + $this->peek = 0; + + return $peek; + } + + /** + * Scans the input string for tokens. + * + * @param string $input A query string. + * + * @return void + */ + protected function scan(string $input) + { + if (! isset($this->regex)) { + $this->regex = sprintf( + '/(%s)|%s/%s', + implode(')|(', $this->getCatchablePatterns()), + implode('|', $this->getNonCatchablePatterns()), + $this->getModifiers(), + ); + } + + $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; + $matches = preg_split($this->regex, $input, -1, $flags); + + if ($matches === false) { + // Work around https://bugs.php.net/78122 + $matches = [[$input, 0]]; + } + + foreach ($matches as $match) { + // Must remain before 'value' assignment since it can change content + $firstMatch = $match[0]; + $type = $this->getType($firstMatch); + + $this->tokens[] = new Token( + $firstMatch, + $type, + $match[1], + ); + } + } + + /** + * Gets the literal for a given token. + * + * @param T $token + * + * @return int|string + */ + public function getLiteral(int|string|UnitEnum $token) + { + if ($token instanceof UnitEnum) { + return $token::class . '::' . $token->name; + } + + $className = static::class; + + $reflClass = new ReflectionClass($className); + $constants = $reflClass->getConstants(); + + foreach ($constants as $name => $value) { + if ($value === $token) { + return $className . '::' . $name; + } + } + + return $token; + } + + /** + * Regex modifiers + * + * @return string + */ + protected function getModifiers() + { + return 'iu'; + } + + /** + * Lexical catchable patterns. + * + * @return string[] + */ + abstract protected function getCatchablePatterns(); + + /** + * Lexical non-catchable patterns. + * + * @return string[] + */ + abstract protected function getNonCatchablePatterns(); + + /** + * Retrieve token type. Also processes the token value if necessary. + * + * @return T|null + * + * @param-out V $value + */ + abstract protected function getType(string &$value); +} diff --git a/backend/vendor/doctrine/lexer/src/Token.php b/backend/vendor/doctrine/lexer/src/Token.php new file mode 100644 index 0000000..b6df694 --- /dev/null +++ b/backend/vendor/doctrine/lexer/src/Token.php @@ -0,0 +1,56 @@ +value = $value; + $this->type = $type; + $this->position = $position; + } + + /** @param T ...$types */ + public function isA(...$types): bool + { + return in_array($this->type, $types, true); + } +} diff --git a/backend/vendor/doctrine/migrations/LICENSE b/backend/vendor/doctrine/migrations/LICENSE new file mode 100644 index 0000000..e8fdec4 --- /dev/null +++ b/backend/vendor/doctrine/migrations/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2018 Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/backend/vendor/doctrine/migrations/README.md b/backend/vendor/doctrine/migrations/README.md new file mode 100644 index 0000000..91a9f65 --- /dev/null +++ b/backend/vendor/doctrine/migrations/README.md @@ -0,0 +1,11 @@ +# Doctrine Migrations + +[![Build Status](https://github.com/doctrine/migrations/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/migrations/actions) +[![Code Coverage](https://codecov.io/gh/doctrine/migrations/branch/3.1.x/graph/badge.svg)](https://codecov.io/gh/doctrine/migrations/branch/3.1.x) +[![Packagist Downloads](https://img.shields.io/packagist/dm/doctrine/migrations)](https://packagist.org/packages/doctrine/migrations) +[![Packagist Version](https://img.shields.io/packagist/v/doctrine/migrations)](https://packagist.org/packages/doctrine/migrations) +[![GitHub license](https://img.shields.io/github/license/doctrine/migrations)](LICENSE) + +## Documentation + +All available documentation can be found [here](https://www.doctrine-project.org/projects/migrations.html). diff --git a/backend/vendor/doctrine/migrations/UPGRADE.md b/backend/vendor/doctrine/migrations/UPGRADE.md new file mode 100644 index 0000000..728c607 --- /dev/null +++ b/backend/vendor/doctrine/migrations/UPGRADE.md @@ -0,0 +1,302 @@ +# Upgrade to 3.6 + +## Console +- The `--all-or-nothing` option for `migrations:migrate` does not accept a value anymore, and passing it a + value will generate a deprecation. Specifying `--all-or-nothing` will wrap all the migrations to be + executed into a single transaction, regardless of the specified configuration. + + + +# Upgrade to 3.1 + +- The "version" is the FQCN of the migration class (existing entries in the migrations table will be automatically updated). +- `MigrationsEventArgs` and `MigrationsVersionEventArgs` expose different API, +please refer to the [Code BC breaks](#code-bc-breaks) section. + +## Console +- Console output changed. The commands use a different output style. If you were relying on specific output, + please update your scripts. + Console output is not covered by the BC promise, so please try not to rely on specific a output. + Different levels of verbosity are available now (`-v`, `-vv` and `-vvv` ). +- The `--show-versions` option from `migrations:status` command has been removed, + use `migrations:list` instead. +- The `--write-sql` option for `migrations:migrate` and `migrations:execute` does not imply dry-run anymore, +use the `--dry-run` parameter instead. +- The `--db` option has been renamed to `--conn`. + +## Migrations table + +- The migrations table now has a new column named `execution_time`. +- Running the `migrations:migrate` or `migrations:execute` command will automatically upgrade the migration +table structure; a dedicated `migrations:sync-metadata-storage` command is available to sync manually the migrations table. + +## Migration template + +- The `` placeholder has been replaced by the `` placeholder. + +## Configuration files + +*migrations.php Before* +```php + 'My Project Migrations', + 'migrations_namespace' => 'MyProject\Migrations', + 'table_name' => 'doctrine_migration_versions', + 'column_name' => 'version', + 'column_length' => 14, + 'executed_at_column_name' => 'executed_at', + 'migrations_directory' => '/data/doctrine/migrations-docs-example/lib/MyProject/Migrations', + 'all_or_nothing' => true, + 'check_database_platform' => true, +]; +``` +*migrations.php After* + +```php + [ + 'table_name' => 'doctrine_migration_versions', + 'version_column_name' => 'version', + 'version_column_length' => 191, + 'executed_at_column_name' => 'executed_at', + 'execution_time_column_name' => 'execution_time', + ], + + 'migrations_paths' => [ + 'MyProject\Migrations' => '/data/doctrine/migrations/lib/MyProject/Migrations', + 'MyProject\Component\Migrations' => './Component/MyProject/Migrations', + ], + + 'all_or_nothing' => true, + 'check_database_platform' => true, +]; +``` + +Files in XML, YAML or JSON also changed in a similar way. Please refer to the official documentation for more details. + +Note: the `name` property has been removed. + +Note: the option in `table_storage` needs to be updated only if you have changed the metadata table settings +by using v2 options such as `table_name`, `column_name`, `column_length` or `executed_at_column_name`. If you did not change +those settings, it is recommended to not provide the options and let doctrine figure out the best settings. + +## Code BC breaks + +Most of the code is protected by the `@internal` declaration and in a very rare cases you might have dealt with the +internals of this library. + +The most important BC breaks are in the `Doctrine\Migrations\Configuration\Configuration` class and in the helper +system that now has been replaced by the `Doctrine\Migrations\DependencyFactory` functionalities. + +Here is a list of the most important changes: + +- Namespace `Doctrine\Migrations\Configuration\Configuration` + - CHANGED: Class `Doctrine\Migrations\Configuration\Configuration` became final + - REMOVED: Constant `Doctrine\Migrations\Configuration\Configuration::VERSION_FORMAT` was removed, there is not more limitation on the version format + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#__construct()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setName()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getName()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getConnection()` was removed, + use `Doctrine\Migrations\DependencyFactory#getConnection()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsTableName()` was removed, + use `Doctrine\Migrations\Configuration\Configuration#setMetadataStorageConfiguration` with an instance of `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsTableName()` was removed, + use `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration#getMetadataStorageConfiguration` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsColumnName()` was removed, + use `Doctrine\Migrations\Configuration\Configuration#setMetadataStorageConfiguration` with an instance of `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsColumnName()` was removed, + use `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration#getMetadataStorageConfiguration` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getQuotedMigrationsColumnName()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsColumnLength()` was removed, + use `Doctrine\Migrations\Configuration\Configuration#setMetadataStorageConfiguration` with an instance of `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsColumnLength()` was removed, + use `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration#getMetadataStorageConfiguration` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsExecutedAtColumnName()` was removed, + use `Doctrine\Migrations\Configuration\Configuration#setMetadataStorageConfiguration` with an instance of `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsExecutedAtColumnName()` was removed, + use `Doctrine\Migrations\Metadata\Storage\MetadataStorageConfiguration#getMetadataStorageConfiguration` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getQuotedMigrationsExecutedAtColumnName()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsDirectory()` was removed, + use `Doctrine\Migrations\Configuration\Configuration#addMigrationsDirectory()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsDirectory()` was removed, + use `Doctrine\Migrations\Configuration\Configuration#getMigrationDirectories()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsNamespace()` was removed, + use `Doctrine\Migrations\Configuration\Configuration#addMigrationsDirectory()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsNamespace()` was removed, + use `Doctrine\Migrations\Configuration\Configuration#getMigrationDirectories()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setMigrationsFinder()` was removed, + use the dependency factory instead + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsFinder()` was removed, + use the dependency factory instead + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#hasVersionMigrated()` was removed, + use the dependency factory instead + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getVersionData()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#resolveVersionAlias()` was removed, + use `Doctrine\Migrations\Version\AliasResolver#resolveVersionAlias()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#isMigrationTableCreated()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#createMigrationTable()` was removed, + use `Doctrine\Migrations\Metadata\Storage\MetadataStorage#ensureInitialized()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getDateTime()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#generateVersionNumber()` was removed, + use `Doctrine\Migrations\Generator\ClassNameGenerator#generateClassName()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#connect()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#dispatchMigrationEvent()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#dispatchVersionEvent()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#dispatchEvent()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getNumberOfExecutedMigrations()` was removed, + use `Doctrine\Migrations\DependencyFactory#getMetadataStorage()->getExecutedMigrations()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getNumberOfAvailableMigrations()` was removed, + use `Doctrine\Migrations\DependencyFactory#getMigrationRepository()->getMigrations()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getLatestVersion()` was removed, + use `Doctrine\Migrations\Version\AliasResolver#resolveVersionAlias()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigratedVersions()` was removed, + use `Doctrine\Migrations\DependencyFactory#getMetadataStorage()->getExecutedMigrations()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getAvailableVersions()` was removed + use `Doctrine\Migrations\DependencyFactory#getMigrationRepository()->getMigrations()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getCurrentVersion()` was removed, + use `Doctrine\Migrations\Version\AliasResolver#resolveVersionAlias()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#registerMigrationsFromDirectory()` was removed, + use `Doctrine\Migrations\Configuration\Configuration#addMigrationsDirectory()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#registerMigration()` was removed, + use `Doctrine\Migrations\Configuration\Configuration#addMigrationClass()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#registerMigrations()` was removed + use `Doctrine\Migrations\Configuration\Configuration#addMigrationClass()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrations()` was removed, + use `Doctrine\Migrations\DependencyFactory#getMigrationRepository()->getMigrations()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getVersion()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getMigrationsToExecute()` was removed, + use `Doctrine\Migrations\Version\MigrationPlanCalculator#getPlanUntilVersion()` to create a migration plan + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getPrevVersion()` was removed, + use `Doctrine\Migrations\Version\AliasResolver#resolveVersionAlias()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getNextVersion()` was removed, + use `Doctrine\Migrations\Version\AliasResolver#resolveVersionAlias()` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getRelativeVersion()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getDeltaVersion()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#setOutputWriter()` was removed, + set the `Psr\Log\LoggerInterface` service in `Doctrine\Migrations\DependencyFactory` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getOutputWriter()` was removed, + get the `Psr\Log\LoggerInterface` service from `Doctrine\Migrations\DependencyFactory` + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getQueryWriter()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#getDependencyFactory()` was removed + - REMOVED: Method `Doctrine\Migrations\Configuration\Configuration#validate()` was removed + - Namespace `Doctrine\Migrations\Configuration\Connection\Loader\Exception` + - REMOVED: Class `Doctrine\Migrations\Configuration\Connection\Loader\Exception\LoaderException` has been deleted + - REMOVED: Class `Doctrine\Migrations\Configuration\Connection\Loader\Exception\InvalidConfiguration` has been deleted + - Namespace `Doctrine\Migrations\Configuration\Exception` + - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\ParameterIncompatibleWithFinder` has been deleted + - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\InvalidConfigurationKey` has been deleted + - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\MigrationsNamespaceRequired` has been deleted + - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\XmlNotValid` has been deleted + - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\YamlNotAvailable` has been deleted + - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\FileAlreadyLoaded` has been deleted + - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\JsonNotValid` has been deleted + - REMOVED: Class `Doctrine\Migrations\Configuration\Exception\YamlNotValid` has been deleted + - CHANGED: The number of required arguments for `Doctrine\Migrations\Configuration\Exception\FileNotFound::new()` increased from 0 to 1 + - Namespace `Doctrine\Migrations\Event\MigrationsEventArgs` + - CHANGED: Class `Doctrine\Migrations\Event\MigrationsEventArgs` became final + - REMOVED: Method `Doctrine\Migrations\Event\MigrationsEventArgs#getConfiguration()` was removed + - REMOVED: Method `Doctrine\Migrations\Event\MigrationsEventArgs#getDirection()` was removed, + use `Doctrine\Migrations\Event\MigrationsEventArgs#getPlan()` + - REMOVED: Method `Doctrine\Migrations\Event\MigrationsEventArgs#isDryRun()` was removed, + use `Doctrine\Migrations\Event\MigrationsEventArgs#getMigratorConfiguration()` + - CHANGED: `Doctrine\Migrations\Event\MigrationsEventArgs#__construct()` arguments have been updated + - Namespace `Doctrine\Migrations\Event\MigrationsVersionEventArgs` + - CHANGED: Class `Doctrine\Migrations\Event\MigrationsVersionEventArgs` became final + - REMOVED: Method `Doctrine\Migrations\Event\MigrationsVersionEventArgs#getVersion()` was removed + use `Doctrine\Migrations\Event\MigrationsEventArgs#getPlan()` + - Namespace `Doctrine\Migrations\Finder` + - REMOVED: These ancestors of `Doctrine\Migrations\Finder\RecursiveRegexFinder` have been removed: ["Doctrine\\Migrations\\Finder\\MigrationDeepFinder"] + - REMOVED: Class `Doctrine\Migrations\Finder\MigrationDeepFinder` has been deleted + - Namespace `Doctrine\Migrations\Tools\Console\Command` + - CHANGED: All non abstract classes in `Doctrine\Migrations\Tools\Console\Command\*` became final + - REMOVED: Class `Doctrine\Migrations\Tools\Console\Command\AbstractCommand` has been renamed into `Doctrine\Migrations\Tools\Console\Command\DoctrineCommand` and has been marked as internal + - CHANGED: Method `Doctrine\Migrations\Tools\Console\Command\*Command#__construct()` changed signature into `(?Doctrine\Migrations\DependencyFactory $di, ?string $name)` + - CHANGED: Method `initialize()` of Class `Doctrine\Migrations\Tools\Console\Command\AbstractCommand` visibility reduced from `public` to `protected` + - CHANGED: Method `execute()` of Class `Doctrine\Migrations\Tools\Console\Command\*Command` visibility reduced from `public` to `protected` + - REMOVED: Method `Doctrine\Migrations\Tools\Console\Command\DiffCommand#createMigrationDiffGenerator()` was removed + - Namespace `Doctrine\Migrations\Tools\Console\Exception` + - CHANGED: The number of required arguments for `Doctrine\Migrations\Tools\Console\Exception\SchemaDumpRequiresNoMigrations::new()` increased from 0 to 1 + - REMOVED: Class `Doctrine\Migrations\Tools\Console\Exception\ConnectionNotSpecified` has been deleted + - Namespace `Migrations\Tools\Console\Helper` + - REMOVED: All classes and namespaces are marked as internal or have been removed, + use `Doctrine\Migrations\DependencyFactory` instead + - Namespace `Doctrine\Migrations\AbstractMigration` + - CHANGED: The method `Doctrine\Migrations\AbstractMigration#__construct()` changed signature into `(Doctrine\DBAL\Connection $conn, PSR\Log\LoggerInterface $logger)` + - CHANGED: The method `Doctrine\Migrations\AbstractMigration#down()` is not abstract anymore, the default implementation will abort the migration process + - REMOVED: Property `Doctrine\Migrations\AbstractMigration#$version` was removed + - Namespace `Doctrine\Migrations\Provider` + - REMOVED: Class `Doctrine\Migrations\Provider\SchemaProviderInterface` has been deleted + - REMOVED: These ancestors of `Doctrine\Migrations\Provider\StubSchemaProvider` have been removed: ["Doctrine\\Migrations\\Provider\\SchemaProviderInterface"] + - Namespace `Doctrine\Migrations\Exception` + - REMOVED: Class `Doctrine\Migrations\Exception\MigrationNotConvertibleToSql` has been deleted + - REMOVED: Class `Doctrine\Migrations\Exception\MigrationsDirectoryRequired` has been deleted + - REMOVED: Class `Doctrine\Migrations\Version\Factory` became the interface `Doctrine\Migrations\Version\MigrationFactory` + - REMOVED: Class `Doctrine\Migrations\OutputWriter` has been deleted, + use `Psr\Log\Loggerinterface` + + + + +# Upgrade to 2.0 + +## BC Break: Moved `Doctrine\DBAL\Migrations` to `Doctrine\Migrations` + +Your migration classes that previously used to extend `Doctrine\DBAL\Migrations\AbstractMigration` now need to extend +`Doctrine\Migrations\AbstractMigration` instead. The `Doctrine\DBAL\Migrations\AbstractMigration` class will be +deprecated in the `1.8.0` release to prepare for the BC break. + +## BC Break: Removed `Doctrine\DBAL\Migrations\MigrationsVersion` + +The `Doctrine\DBAL\Migrations\MigrationsVersion` class is no longer available: please refrain from checking the Migrations version at runtime. + +## BC Break: Moved `Doctrine\Migrations\Migration` to `Doctrine\Migrations\Migrator` + +To make the name more clear and to differentiate from the `AbstractMigration` class, `Migration` was renamed to `Migrator`. + +## BC Break: Moved exception classes from `Doctrine\Migrations\%name%Exception` to `Doctrine\Migrations\Exception\%name%` +doctrine/migrations#636 +Follows concept introduced in ORM (doctrine/orm#6743 + doctrine/orm#7210) and naming follows pattern accepted in Doctrine CS. + +# Upgrade from 1.0-alpha1 to 1.0.0-alpha3 + +## AbstractMigration + +### Before: + +The method `getName()` was defined and it's implementation would change the order in which the migration would be processed. +It would cause discrepancies between the file order in a file browser and the order of execution of the migrations. + +### After: + +The `getName()` method as been removed | set final and new `getDescription()` method has been added. +The goal of this method is to be able to provide context for the migration. +This context is shown for the last migrated migration when the status command is called. + +## --write-sql option from the migrate command + +### Before: + +The `--write-sql` option would only output sql contained in the migration and would not update the table containing the migrated migrations. + +### After: + +That option now also output the sql queries necessary to update the table containing the state of the migrations. +If you want to go back to the previous behavior just make a request on the bug tracker as for now the need for it is not very clear. + +## MigrationsVersion::VERSION + +### Before: + +`MigrationsVersion::VERSION` used to be a property. +The returned value was fanciful. + +### After: + +It is now a a function so that a different value can be automatically send back if it's a modified version that's used. +The returned value is now the git tag. +The tag is in lowercase as the other doctrine projects. diff --git a/backend/vendor/doctrine/migrations/bin/doctrine-migrations b/backend/vendor/doctrine/migrations/bin/doctrine-migrations new file mode 100755 index 0000000..68394e8 --- /dev/null +++ b/backend/vendor/doctrine/migrations/bin/doctrine-migrations @@ -0,0 +1,8 @@ +#!/usr/bin/env php +=4" + }, + "suggest": { + "doctrine/sql-formatter": "Allows to generate formatted SQL with the diff command.", + "symfony/yaml": "Allows the use of yaml for migration configuration files." + }, + "autoload": { + "psr-4": { + "Doctrine\\Migrations\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Doctrine\\Migrations\\Tests\\": "tests" + } + }, + "bin": [ + "bin/doctrine-migrations" + ], + "config": { + "allow-plugins": { + "composer/package-versions-deprecated": true, + "dealerdirect/phpcodesniffer-composer-installer": true + }, + "sort-packages": true + }, + "scripts": { + "docs": "composer update --working-dir docs && ./docs/vendor/bin/build-docs.sh @additional_args" + } +} diff --git a/backend/vendor/doctrine/migrations/src/AbstractMigration.php b/backend/vendor/doctrine/migrations/src/AbstractMigration.php new file mode 100644 index 0000000..e13045c --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/AbstractMigration.php @@ -0,0 +1,163 @@ + */ + protected $sm; + + /** @var AbstractPlatform */ + protected $platform; + + /** @var Query[] */ + private array $plannedSql = []; + + private bool $frozen = false; + + public function __construct(Connection $connection, private readonly LoggerInterface $logger) + { + $this->connection = $connection; + $this->sm = $this->connection->createSchemaManager(); + $this->platform = $this->connection->getDatabasePlatform(); + } + + /** + * Indicates the transactional mode of this migration. + * + * If this function returns true (default) the migration will be executed + * in one transaction, otherwise non-transactional state will be used to + * execute each of the migration SQLs. + * + * Extending class should override this function to alter the return value. + */ + public function isTransactional(): bool + { + return true; + } + + public function getDescription(): string + { + return ''; + } + + public function warnIf(bool $condition, string $message = 'Unknown Reason'): void + { + if (! $condition) { + return; + } + + $this->logger->warning($message, ['migration' => $this]); + } + + /** @throws AbortMigration */ + public function abortIf(bool $condition, string $message = 'Unknown Reason'): void + { + if ($condition) { + throw new AbortMigration($message); + } + } + + /** @throws SkipMigration */ + public function skipIf(bool $condition, string $message = 'Unknown Reason'): void + { + if ($condition) { + throw new SkipMigration($message); + } + } + + /** @throws MigrationException|DBALException */ + public function preUp(Schema $schema): void + { + } + + /** @throws MigrationException|DBALException */ + public function postUp(Schema $schema): void + { + } + + /** @throws MigrationException|DBALException */ + public function preDown(Schema $schema): void + { + } + + /** @throws MigrationException|DBALException */ + public function postDown(Schema $schema): void + { + } + + /** @throws MigrationException|DBALException */ + abstract public function up(Schema $schema): void; + + /** @throws MigrationException|DBALException */ + public function down(Schema $schema): void + { + $this->abortIf(true, sprintf('No down() migration implemented for "%s"', static::class)); + } + + /** + * @param mixed[] $params + * @param mixed[] $types + */ + protected function addSql( + string $sql, + array $params = [], + array $types = [], + ): void { + if ($this->frozen) { + throw FrozenMigration::new(); + } + + $this->plannedSql[] = new Query($sql, $params, $types); + } + + /** @return Query[] */ + public function getSql(): array + { + return $this->plannedSql; + } + + public function freeze(): void + { + $this->frozen = true; + } + + protected function write(string $message): void + { + $this->logger->notice($message, ['migration' => $this]); + } + + /** @throws IrreversibleMigration */ + protected function throwIrreversibleMigrationException(string|null $message = null): void + { + if ($message === null) { + $message = 'This migration is irreversible and cannot be reverted.'; + } + + throw new IrreversibleMigration($message); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Configuration.php b/backend/vendor/doctrine/migrations/src/Configuration/Configuration.php new file mode 100644 index 0000000..9e1f1ce --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Configuration.php @@ -0,0 +1,212 @@ + */ + private array $migrationsDirectories = []; + + /** @var string[] */ + private array $migrationClasses = []; + + private bool $migrationsAreOrganizedByYear = false; + + private bool $migrationsAreOrganizedByYearAndMonth = false; + + private string|null $customTemplate = null; + + private bool $isDryRun = false; + + private bool $allOrNothing = false; + + private bool $transactional = true; + + private string|null $connectionName = null; + + private string|null $entityManagerName = null; + + private bool $checkDbPlatform = true; + + private MetadataStorageConfiguration|null $metadataStorageConfiguration = null; + + private bool $frozen = false; + + public function freeze(): void + { + $this->frozen = true; + } + + private function assertNotFrozen(): void + { + if ($this->frozen) { + throw FrozenConfiguration::new(); + } + } + + public function setMetadataStorageConfiguration(MetadataStorageConfiguration $metadataStorageConfiguration): void + { + $this->assertNotFrozen(); + $this->metadataStorageConfiguration = $metadataStorageConfiguration; + } + + /** @return string[] */ + public function getMigrationClasses(): array + { + return $this->migrationClasses; + } + + public function addMigrationClass(string $className): void + { + $this->assertNotFrozen(); + $this->migrationClasses[] = $className; + } + + public function getMetadataStorageConfiguration(): MetadataStorageConfiguration|null + { + return $this->metadataStorageConfiguration; + } + + public function addMigrationsDirectory(string $namespace, string $path): void + { + $this->assertNotFrozen(); + $this->migrationsDirectories[$namespace] = $path; + } + + /** @return array */ + public function getMigrationDirectories(): array + { + return $this->migrationsDirectories; + } + + public function getConnectionName(): string|null + { + return $this->connectionName; + } + + public function setConnectionName(string|null $connectionName): void + { + $this->assertNotFrozen(); + $this->connectionName = $connectionName; + } + + public function getEntityManagerName(): string|null + { + return $this->entityManagerName; + } + + public function setEntityManagerName(string|null $entityManagerName): void + { + $this->assertNotFrozen(); + $this->entityManagerName = $entityManagerName; + } + + public function setCustomTemplate(string|null $customTemplate): void + { + $this->assertNotFrozen(); + $this->customTemplate = $customTemplate; + } + + public function getCustomTemplate(): string|null + { + return $this->customTemplate; + } + + public function areMigrationsOrganizedByYear(): bool + { + return $this->migrationsAreOrganizedByYear; + } + + /** @throws MigrationException */ + public function setMigrationsAreOrganizedByYear( + bool $migrationsAreOrganizedByYear = true, + ): void { + $this->assertNotFrozen(); + $this->migrationsAreOrganizedByYear = $migrationsAreOrganizedByYear; + } + + /** @throws MigrationException */ + public function setMigrationsAreOrganizedByYearAndMonth( + bool $migrationsAreOrganizedByYearAndMonth = true, + ): void { + $this->assertNotFrozen(); + $this->migrationsAreOrganizedByYear = $migrationsAreOrganizedByYearAndMonth; + $this->migrationsAreOrganizedByYearAndMonth = $migrationsAreOrganizedByYearAndMonth; + } + + public function areMigrationsOrganizedByYearAndMonth(): bool + { + return $this->migrationsAreOrganizedByYearAndMonth; + } + + public function setIsDryRun(bool $isDryRun): void + { + $this->assertNotFrozen(); + $this->isDryRun = $isDryRun; + } + + public function isDryRun(): bool + { + return $this->isDryRun; + } + + public function setAllOrNothing(bool $allOrNothing): void + { + $this->assertNotFrozen(); + $this->allOrNothing = $allOrNothing; + } + + public function isAllOrNothing(): bool + { + return $this->allOrNothing; + } + + public function setTransactional(bool $transactional): void + { + $this->assertNotFrozen(); + $this->transactional = $transactional; + } + + public function isTransactional(): bool + { + return $this->transactional; + } + + public function setCheckDatabasePlatform(bool $checkDbPlatform): void + { + $this->checkDbPlatform = $checkDbPlatform; + } + + public function isDatabasePlatformChecked(): bool + { + return $this->checkDbPlatform; + } + + public function setMigrationOrganization(string $migrationOrganization): void + { + $this->assertNotFrozen(); + + match (strtolower($migrationOrganization)) { + self::VERSIONS_ORGANIZATION_NONE => $this->setMigrationsAreOrganizedByYearAndMonth(false), + self::VERSIONS_ORGANIZATION_BY_YEAR => $this->setMigrationsAreOrganizedByYear(), + self::VERSIONS_ORGANIZATION_BY_YEAR_AND_MONTH => $this->setMigrationsAreOrganizedByYearAndMonth(), + default => throw UnknownConfigurationValue::new('organize_migrations', $migrationOrganization), + }; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Connection/ConfigurationFile.php b/backend/vendor/doctrine/migrations/src/Configuration/Connection/ConfigurationFile.php new file mode 100644 index 0000000..a160216 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Connection/ConfigurationFile.php @@ -0,0 +1,51 @@ +filename)) { + throw FileNotFound::new($this->filename); + } + + $params = include $this->filename; + + if ($params instanceof Connection) { + return $params; + } + + if ($params instanceof ConnectionLoader) { + return $params->getConnection(); + } + + if (is_array($params)) { + return DriverManager::getConnection($params); + } + + throw InvalidConfiguration::invalidArrayConfiguration(); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Connection/ConnectionLoader.php b/backend/vendor/doctrine/migrations/src/Configuration/Connection/ConnectionLoader.php new file mode 100644 index 0000000..bf9e3f2 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Connection/ConnectionLoader.php @@ -0,0 +1,23 @@ +registry = $registry; + $that->defaultConnectionName = $connectionName; + + return $that; + } + + private function __construct() + { + } + + public function getConnection(string|null $name = null): Connection + { + $connection = $this->registry->getConnection($name ?? $this->defaultConnectionName); + if (! $connection instanceof Connection) { + throw InvalidConfiguration::invalidConnectionType($connection); + } + + return $connection; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Connection/Exception/ConnectionNotSpecified.php b/backend/vendor/doctrine/migrations/src/Configuration/Connection/Exception/ConnectionNotSpecified.php new file mode 100644 index 0000000..e3b9501 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Connection/Exception/ConnectionNotSpecified.php @@ -0,0 +1,17 @@ +connection; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/EntityManager/ConfigurationFile.php b/backend/vendor/doctrine/migrations/src/Configuration/EntityManager/ConfigurationFile.php new file mode 100644 index 0000000..9cf4025 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/EntityManager/ConfigurationFile.php @@ -0,0 +1,51 @@ +filename)) { + throw FileNotFound::new($this->filename); + } + + $params = include $this->filename; + + if ($params instanceof EntityManagerInterface) { + return $params; + } + + if ($params instanceof EntityManagerLoader) { + return $params->getEntityManager(); + } + + throw InvalidConfiguration::invalidArrayConfiguration(); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/EntityManager/EntityManagerLoader.php b/backend/vendor/doctrine/migrations/src/Configuration/EntityManager/EntityManagerLoader.php new file mode 100644 index 0000000..2982c9a --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/EntityManager/EntityManagerLoader.php @@ -0,0 +1,18 @@ +entityManager; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/EntityManager/ManagerRegistryEntityManager.php b/backend/vendor/doctrine/migrations/src/Configuration/EntityManager/ManagerRegistryEntityManager.php new file mode 100644 index 0000000..3807894 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/EntityManager/ManagerRegistryEntityManager.php @@ -0,0 +1,41 @@ +registry = $registry; + $that->defaultManagerName = $managerName; + + return $that; + } + + private function __construct() + { + } + + public function getEntityManager(string|null $name = null): EntityManagerInterface + { + $managerName = $name ?? $this->defaultManagerName; + + $em = $this->registry->getManager($managerName); + if (! $em instanceof EntityManagerInterface) { + throw InvalidConfiguration::invalidManagerType($em); + } + + return $em; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Exception/ConfigurationException.php b/backend/vendor/doctrine/migrations/src/Configuration/Exception/ConfigurationException.php new file mode 100644 index 0000000..8db929c --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Exception/ConfigurationException.php @@ -0,0 +1,11 @@ + $configurations */ + public function __construct(private readonly array $configurations) + { + } + + public function getConfiguration(): Configuration + { + $configMap = [ + 'migrations_paths' => static function ($paths, Configuration $configuration): void { + foreach ($paths as $namespace => $path) { + $configuration->addMigrationsDirectory($namespace, $path); + } + }, + 'migrations' => static function ($migrations, Configuration $configuration): void { + foreach ($migrations as $className) { + $configuration->addMigrationClass($className); + } + }, + + 'connection' => 'setConnectionName', + 'em' => 'setEntityManagerName', + + 'table_storage' => [ + 'table_name' => 'setTableName', + 'version_column_name' => 'setVersionColumnName', + 'version_column_length' => static function ($value, TableMetadataStorageConfiguration $configuration): void { + $configuration->setVersionColumnLength((int) $value); + }, + 'executed_at_column_name' => 'setExecutedAtColumnName', + 'execution_time_column_name' => 'setExecutionTimeColumnName', + ], + + 'organize_migrations' => 'setMigrationOrganization', + 'custom_template' => 'setCustomTemplate', + 'all_or_nothing' => static function ($value, Configuration $configuration): void { + $configuration->setAllOrNothing(is_bool($value) ? $value : BooleanStringFormatter::toBoolean($value, false)); + }, + 'transactional' => static function ($value, Configuration $configuration): void { + $configuration->setTransactional(is_bool($value) ? $value : BooleanStringFormatter::toBoolean($value, true)); + }, + 'check_database_platform' => static function ($value, Configuration $configuration): void { + $configuration->setCheckDatabasePlatform(is_bool($value) ? $value : BooleanStringFormatter::toBoolean($value, false)); + }, + ]; + + $object = new Configuration(); + self::applyConfigs($configMap, $object, $this->configurations); + + if ($object->getMetadataStorageConfiguration() === null) { + $object->setMetadataStorageConfiguration(new TableMetadataStorageConfiguration()); + } + + return $object; + } + + /** + * @param mixed[] $configMap + * @param array $data + */ + private static function applyConfigs(array $configMap, Configuration|TableMetadataStorageConfiguration $object, array $data): void + { + foreach ($data as $configurationKey => $configurationValue) { + if (! isset($configMap[$configurationKey])) { + throw InvalidConfigurationKey::new((string) $configurationKey); + } + + if (is_array($configMap[$configurationKey])) { + if ($configurationKey !== 'table_storage') { + throw InvalidConfigurationKey::new((string) $configurationKey); + } + + $storageConfig = new TableMetadataStorageConfiguration(); + assert($object instanceof Configuration); + $object->setMetadataStorageConfiguration($storageConfig); + self::applyConfigs($configMap[$configurationKey], $storageConfig, $configurationValue); + } else { + $callable = $configMap[$configurationKey] instanceof Closure + ? $configMap[$configurationKey] + : [$object, $configMap[$configurationKey]]; + assert(is_callable($callable)); + call_user_func( + $callable, + $configurationValue, + $object, + $data, + ); + } + } + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Migration/ConfigurationFile.php b/backend/vendor/doctrine/migrations/src/Configuration/Migration/ConfigurationFile.php new file mode 100644 index 0000000..3ed3ad8 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Migration/ConfigurationFile.php @@ -0,0 +1,35 @@ +file = $file; + } + + /** + * @param array $directories + * + * @return array + */ + final protected function getDirectoriesRelativeToFile(array $directories, string $file): array + { + foreach ($directories as $ns => $dir) { + $path = realpath(dirname($file) . '/' . $dir); + + $directories[$ns] = $path !== false ? $path : $dir; + } + + return $directories; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Migration/ConfigurationFileWithFallback.php b/backend/vendor/doctrine/migrations/src/Configuration/Migration/ConfigurationFileWithFallback.php new file mode 100644 index 0000000..62216c1 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Migration/ConfigurationFileWithFallback.php @@ -0,0 +1,61 @@ +file !== null) { + return $this->loadConfiguration($this->file); + } + + /** + * If no config has been provided, look for default config file in the path. + */ + $defaultFiles = [ + 'migrations.xml', + 'migrations.yml', + 'migrations.yaml', + 'migrations.json', + 'migrations.php', + ]; + + foreach ($defaultFiles as $file) { + if ($this->configurationFileExists($file)) { + return $this->loadConfiguration($file); + } + } + + throw MissingConfigurationFile::new(); + } + + private function configurationFileExists(string $config): bool + { + return file_exists($config); + } + + /** @throws FileTypeNotSupported */ + private function loadConfiguration(string $file): Configuration + { + return (new FormattedFile($file))->getConfiguration(); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Migration/ConfigurationLoader.php b/backend/vendor/doctrine/migrations/src/Configuration/Migration/ConfigurationLoader.php new file mode 100644 index 0000000..cd84a43 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Migration/ConfigurationLoader.php @@ -0,0 +1,12 @@ +configurations; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Migration/FormattedFile.php b/backend/vendor/doctrine/migrations/src/Configuration/Migration/FormattedFile.php new file mode 100644 index 0000000..45851e8 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Migration/FormattedFile.php @@ -0,0 +1,45 @@ +loaders = [ + 'json' => static fn ($file): ConfigurationLoader => new JsonFile($file), + 'php' => static fn ($file): ConfigurationLoader => new PhpFile($file), + 'xml' => static fn ($file): ConfigurationLoader => new XmlFile($file), + 'yaml' => static fn ($file): ConfigurationLoader => new YamlFile($file), + 'yml' => static fn ($file): ConfigurationLoader => new YamlFile($file), + ]; + } + + public function getConfiguration(): Configuration + { + if (count($this->loaders) === 0) { + $this->setDefaultLoaders(); + } + + $extension = pathinfo($this->file, PATHINFO_EXTENSION); + if (! isset($this->loaders[$extension])) { + throw InvalidConfigurationFormat::new($this->file); + } + + return $this->loaders[$extension]($this->file)->getConfiguration(); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Migration/JsonFile.php b/backend/vendor/doctrine/migrations/src/Configuration/Migration/JsonFile.php new file mode 100644 index 0000000..13e1ca0 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Migration/JsonFile.php @@ -0,0 +1,46 @@ +file)) { + throw FileNotFound::new($this->file); + } + + $contents = file_get_contents($this->file); + + assert($contents !== false); + + $config = json_decode($contents, true); + + if (json_last_error() !== JSON_ERROR_NONE) { + throw JsonNotValid::new(); + } + + if (isset($config['migrations_paths'])) { + $config['migrations_paths'] = $this->getDirectoriesRelativeToFile( + $config['migrations_paths'], + $this->file, + ); + } + + return (new ConfigurationArray($config))->getConfiguration(); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Migration/PhpFile.php b/backend/vendor/doctrine/migrations/src/Configuration/Migration/PhpFile.php new file mode 100644 index 0000000..d6f2888 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Migration/PhpFile.php @@ -0,0 +1,37 @@ +file)) { + throw FileNotFound::new($this->file); + } + + $config = require $this->file; + if ($config instanceof Configuration) { + return $config; + } + + assert(is_array($config)); + if (isset($config['migrations_paths'])) { + $config['migrations_paths'] = $this->getDirectoriesRelativeToFile( + $config['migrations_paths'], + $this->file, + ); + } + + return (new ConfigurationArray($config))->getConfiguration(); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Migration/XML/configuration.xsd b/backend/vendor/doctrine/migrations/src/Configuration/Migration/XML/configuration.xsd new file mode 100644 index 0000000..c51d478 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Migration/XML/configuration.xsd @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Migration/XmlFile.php b/backend/vendor/doctrine/migrations/src/Configuration/Migration/XmlFile.php new file mode 100644 index 0000000..b2ee835 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Migration/XmlFile.php @@ -0,0 +1,129 @@ +file)) { + throw FileNotFound::new($this->file); + } + + $this->validateXml($this->file); + + $rawXML = file_get_contents($this->file); + assert($rawXML !== false); + + $root = simplexml_load_string($rawXML, SimpleXMLElement::class, LIBXML_NOCDATA); + assert($root !== false); + + $config = $this->extractParameters($root, true); + + if (isset($config['all_or_nothing'])) { + $config['all_or_nothing'] = BooleanStringFormatter::toBoolean( + $config['all_or_nothing'], + false, + ); + } + + if (isset($config['transactional'])) { + $config['transactional'] = BooleanStringFormatter::toBoolean( + $config['transactional'], + true, + ); + } + + if (isset($config['migrations_paths'])) { + $config['migrations_paths'] = $this->getDirectoriesRelativeToFile( + $config['migrations_paths'], + $this->file, + ); + } + + return (new ConfigurationArray($config))->getConfiguration(); + } + + /** @return mixed[] */ + private function extractParameters(SimpleXMLElement $root, bool $loopOverNodes): array + { + $config = []; + + $itemsToCheck = $loopOverNodes ? $root->children() : $root->attributes(); + + if (! ($itemsToCheck instanceof SimpleXMLElement)) { + return $config; + } + + foreach ($itemsToCheck as $node) { + $nodeName = strtr($node->getName(), '-', '_'); + if ($nodeName === 'migrations_paths') { + $config['migrations_paths'] = []; + foreach ($node->path as $pathNode) { + $config['migrations_paths'][(string) $pathNode['namespace']] = (string) $pathNode; + } + } elseif ($nodeName === 'storage' && $node->{'table-storage'} instanceof SimpleXMLElement) { + $config['table_storage'] = $this->extractParameters($node->{'table-storage'}, false); + } elseif ($nodeName === 'migrations') { + $config['migrations'] = $this->extractMigrations($node); + } else { + $config[$nodeName] = (string) $node; + } + } + + return $config; + } + + /** @return list */ + private function extractMigrations(SimpleXMLElement $node): array + { + $migrations = []; + foreach ($node->migration as $pathNode) { + $migrations[] = (string) $pathNode; + } + + return $migrations; + } + + private function validateXml(string $file): void + { + try { + libxml_use_internal_errors(true); + + $xml = new DOMDocument(); + + if ($xml->load($file) === false) { + throw XmlNotValid::malformed(); + } + + $xsdPath = __DIR__ . DIRECTORY_SEPARATOR . 'XML' . DIRECTORY_SEPARATOR . 'configuration.xsd'; + + if ($xml->schemaValidate($xsdPath) === false) { + throw XmlNotValid::failedValidation(); + } + } finally { + libxml_clear_errors(); + libxml_use_internal_errors(false); + } + } +} diff --git a/backend/vendor/doctrine/migrations/src/Configuration/Migration/YamlFile.php b/backend/vendor/doctrine/migrations/src/Configuration/Migration/YamlFile.php new file mode 100644 index 0000000..f502bbe --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Configuration/Migration/YamlFile.php @@ -0,0 +1,55 @@ +file)) { + throw FileNotFound::new($this->file); + } + + $content = file_get_contents($this->file); + + assert($content !== false); + + try { + $config = Yaml::parse($content); + } catch (ParseException) { + throw YamlNotValid::malformed(); + } + + if (! is_array($config)) { + throw YamlNotValid::invalid(); + } + + if (isset($config['migrations_paths'])) { + $config['migrations_paths'] = $this->getDirectoriesRelativeToFile( + $config['migrations_paths'], + $this->file, + ); + } + + return (new ConfigurationArray($config))->getConfiguration(); + } +} diff --git a/backend/vendor/doctrine/migrations/src/DbalMigrator.php b/backend/vendor/doctrine/migrations/src/DbalMigrator.php new file mode 100644 index 0000000..ad8e09a --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/DbalMigrator.php @@ -0,0 +1,140 @@ + */ + private function executeMigrations( + MigrationPlanList $migrationsPlan, + MigratorConfiguration $migratorConfiguration, + ): array { + $allOrNothing = $migratorConfiguration->isAllOrNothing(); + + if ($allOrNothing) { + $this->assertAllMigrationsAreTransactional($migrationsPlan); + $this->connection->beginTransaction(); + } + + try { + $this->dispatcher->dispatchMigrationEvent(Events::onMigrationsMigrating, $migrationsPlan, $migratorConfiguration); + + $sql = $this->executePlan($migrationsPlan, $migratorConfiguration); + + $this->dispatcher->dispatchMigrationEvent(Events::onMigrationsMigrated, $migrationsPlan, $migratorConfiguration); + } catch (Throwable $e) { + if ($allOrNothing) { + TransactionHelper::rollbackIfInTransaction($this->connection); + } + + throw $e; + } + + if ($allOrNothing) { + TransactionHelper::commitIfInTransaction($this->connection); + } + + return $sql; + } + + private function assertAllMigrationsAreTransactional(MigrationPlanList $migrationsPlan): void + { + foreach ($migrationsPlan->getItems() as $plan) { + if (! $plan->getMigration()->isTransactional()) { + throw MigrationConfigurationConflict::migrationIsNotTransactional($plan->getMigration()); + } + } + } + + /** @return array */ + private function executePlan(MigrationPlanList $migrationsPlan, MigratorConfiguration $migratorConfiguration): array + { + $sql = []; + + foreach ($migrationsPlan->getItems() as $plan) { + $versionExecutionResult = $this->executor->execute($plan, $migratorConfiguration); + + // capture the to Schema for the migration so we have the ability to use + // it as the from Schema for the next migration when we are running a dry run + // $toSchema may be null in the case of skipped migrations + if (! $versionExecutionResult->isSkipped()) { + $migratorConfiguration->setFromSchema($versionExecutionResult->getToSchema()); + } + + $sql[(string) $plan->getVersion()] = $versionExecutionResult->getSql(); + } + + return $sql; + } + + /** @param array $sql */ + private function endMigrations( + StopwatchEvent $stopwatchEvent, + MigrationPlanList $migrationsPlan, + array $sql, + ): void { + $stopwatchEvent->stop(); + + $this->logger->notice( + 'finished in {duration}ms, used {memory} memory, {migrations_count} migrations executed, {queries_count} sql queries', + [ + 'duration' => $stopwatchEvent->getDuration(), + 'memory' => BytesFormatter::formatBytes($stopwatchEvent->getMemory()), + 'migrations_count' => count($migrationsPlan), + 'queries_count' => count($sql, COUNT_RECURSIVE) - count($sql), + ], + ); + } + + /** + * {@inheritDoc} + */ + public function migrate(MigrationPlanList $migrationsPlan, MigratorConfiguration $migratorConfiguration): array + { + if (count($migrationsPlan) === 0) { + $this->logger->notice('No migrations to execute.'); + + return []; + } + + $stopwatchEvent = $this->stopwatch->start('migrate'); + + $sql = $this->executeMigrations($migrationsPlan, $migratorConfiguration); + + $this->endMigrations($stopwatchEvent, $migrationsPlan, $sql); + + return $sql; + } +} diff --git a/backend/vendor/doctrine/migrations/src/DependencyFactory.php b/backend/vendor/doctrine/migrations/src/DependencyFactory.php new file mode 100644 index 0000000..fece1f5 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/DependencyFactory.php @@ -0,0 +1,465 @@ + */ + private array $inResolution = []; + + private Configuration|null $configuration = null; + + /** @var object[]|callable[] */ + private array $dependencies = []; + + private Connection|null $connection = null; + private EntityManagerInterface|null $em = null; + private EventManager|null $eventManager = null; + private bool $frozen = false; + private ConfigurationLoader $configurationLoader; + private ConnectionLoader $connectionLoader; + private EntityManagerLoader|null $emLoader = null; + + /** @var callable[] */ + private array $factories = []; + + public static function fromConnection( + ConfigurationLoader $configurationLoader, + ConnectionLoader $connectionLoader, + LoggerInterface|null $logger = null, + ): self { + $dependencyFactory = new self($logger); + $dependencyFactory->configurationLoader = $configurationLoader; + $dependencyFactory->connectionLoader = $connectionLoader; + + return $dependencyFactory; + } + + public static function fromEntityManager( + ConfigurationLoader $configurationLoader, + EntityManagerLoader $emLoader, + LoggerInterface|null $logger = null, + ): self { + $dependencyFactory = new self($logger); + $dependencyFactory->configurationLoader = $configurationLoader; + $dependencyFactory->emLoader = $emLoader; + + return $dependencyFactory; + } + + private function __construct(LoggerInterface|null $logger) + { + if ($logger === null) { + return; + } + + $this->setDefinition(LoggerInterface::class, static fn (): LoggerInterface => $logger); + } + + public function isFrozen(): bool + { + return $this->frozen; + } + + public function freeze(): void + { + $this->frozen = true; + } + + private function assertNotFrozen(): void + { + if ($this->frozen) { + throw FrozenDependencies::new(); + } + } + + public function hasEntityManager(): bool + { + return $this->emLoader !== null; + } + + public function setConfigurationLoader(ConfigurationLoader $configurationLoader): void + { + $this->assertNotFrozen(); + $this->configurationLoader = $configurationLoader; + } + + public function getConfiguration(): Configuration + { + if ($this->configuration === null) { + $this->configuration = $this->configurationLoader->getConfiguration(); + $this->frozen = true; + } + + return $this->configuration; + } + + public function getConnection(): Connection + { + if ($this->connection === null) { + $this->connection = $this->hasEntityManager() + ? $this->getEntityManager()->getConnection() + : $this->connectionLoader->getConnection($this->getConfiguration()->getConnectionName()); + $this->frozen = true; + } + + return $this->connection; + } + + public function getEntityManager(): EntityManagerInterface + { + if ($this->em === null) { + if ($this->emLoader === null) { + throw MissingDependency::noEntityManager(); + } + + $this->em = $this->emLoader->getEntityManager($this->getConfiguration()->getEntityManagerName()); + $this->frozen = true; + } + + return $this->em; + } + + public function getVersionComparator(): Comparator + { + return $this->getDependency(Comparator::class, static fn (): AlphabeticalComparator => new AlphabeticalComparator()); + } + + public function getLogger(): LoggerInterface + { + return $this->getDependency(LoggerInterface::class, static fn (): LoggerInterface => new NullLogger()); + } + + public function getEventDispatcher(): EventDispatcher + { + return $this->getDependency(EventDispatcher::class, fn (): EventDispatcher => new EventDispatcher( + $this->getConnection(), + $this->getEventManager(), + )); + } + + public function getClassNameGenerator(): ClassNameGenerator + { + return $this->getDependency(ClassNameGenerator::class, static fn (): ClassNameGenerator => new ClassNameGenerator()); + } + + public function getSchemaDumper(): SchemaDumper + { + return $this->getDependency(SchemaDumper::class, function (): SchemaDumper { + $excludedTables = []; + + $metadataConfig = $this->getConfiguration()->getMetadataStorageConfiguration(); + if ($metadataConfig instanceof TableMetadataStorageConfiguration) { + $excludedTables[] = sprintf('/^%s$/', preg_quote($metadataConfig->getTableName(), '/')); + } + + return new SchemaDumper( + $this->getConnection()->getDatabasePlatform(), + $this->getConnection()->createSchemaManager(), + $this->getMigrationGenerator(), + $this->getMigrationSqlGenerator(), + $excludedTables, + ); + }); + } + + private function getEmptySchemaProvider(): SchemaProvider + { + return $this->getDependency(EmptySchemaProvider::class, fn (): SchemaProvider => new EmptySchemaProvider($this->getConnection()->createSchemaManager())); + } + + public function hasSchemaProvider(): bool + { + try { + $this->getSchemaProvider(); + } catch (MissingDependency) { + return false; + } + + return true; + } + + public function getSchemaProvider(): SchemaProvider + { + return $this->getDependency(SchemaProvider::class, function (): SchemaProvider { + if ($this->hasEntityManager()) { + return new OrmSchemaProvider($this->getEntityManager()); + } + + throw MissingDependency::noSchemaProvider(); + }); + } + + public function getDiffGenerator(): DiffGenerator + { + return $this->getDependency(DiffGenerator::class, fn (): DiffGenerator => new DiffGenerator( + $this->getConnection()->getConfiguration(), + $this->getConnection()->createSchemaManager(), + $this->getSchemaProvider(), + $this->getConnection()->getDatabasePlatform(), + $this->getMigrationGenerator(), + $this->getMigrationSqlGenerator(), + $this->getEmptySchemaProvider(), + )); + } + + public function getSchemaDiffProvider(): SchemaDiffProvider + { + return $this->getDependency(SchemaDiffProvider::class, fn (): LazySchemaDiffProvider => new LazySchemaDiffProvider( + new DBALSchemaDiffProvider( + $this->getConnection()->createSchemaManager(), + $this->getConnection()->getDatabasePlatform(), + ), + )); + } + + private function getFileBuilder(): FileBuilder + { + return $this->getDependency(FileBuilder::class, static fn (): FileBuilder => new ConcatenationFileBuilder()); + } + + private function getParameterFormatter(): ParameterFormatter + { + return $this->getDependency(ParameterFormatter::class, fn (): ParameterFormatter => new InlineParameterFormatter($this->getConnection())); + } + + public function getMigrationsFinder(): MigrationFinder + { + return $this->getDependency(MigrationFinder::class, function (): MigrationFinder { + $configs = $this->getConfiguration(); + $needsRecursiveFinder = $configs->areMigrationsOrganizedByYear() || $configs->areMigrationsOrganizedByYearAndMonth(); + + return $needsRecursiveFinder ? new RecursiveRegexFinder() : new GlobFinder(); + }); + } + + public function getMigrationRepository(): MigrationsRepository + { + return $this->getDependency(MigrationsRepository::class, fn (): MigrationsRepository => new FilesystemMigrationsRepository( + $this->getConfiguration()->getMigrationClasses(), + $this->getConfiguration()->getMigrationDirectories(), + $this->getMigrationsFinder(), + $this->getMigrationFactory(), + )); + } + + public function getMigrationFactory(): MigrationFactory + { + return $this->getDependency(MigrationFactory::class, fn (): MigrationFactory => new DbalMigrationFactory($this->getConnection(), $this->getLogger())); + } + + public function setService(string $id, object|callable $service): void + { + $this->assertNotFrozen(); + $this->dependencies[$id] = $service; + } + + public function getMetadataStorage(): MetadataStorage + { + return $this->getDependency(MetadataStorage::class, fn (): MetadataStorage => new TableMetadataStorage( + $this->getConnection(), + $this->getVersionComparator(), + $this->getConfiguration()->getMetadataStorageConfiguration(), + $this->getMigrationRepository(), + )); + } + + private function getVersionExecutor(): Executor + { + return $this->getDependency(Executor::class, fn (): Executor => new DbalExecutor( + $this->getMetadataStorage(), + $this->getEventDispatcher(), + $this->getConnection(), + $this->getSchemaDiffProvider(), + $this->getLogger(), + $this->getParameterFormatter(), + $this->getStopwatch(), + )); + } + + public function getQueryWriter(): QueryWriter + { + return $this->getDependency(QueryWriter::class, fn (): QueryWriter => new FileQueryWriter( + $this->getFileBuilder(), + $this->getLogger(), + )); + } + + public function getVersionAliasResolver(): AliasResolver + { + return $this->getDependency(AliasResolver::class, fn (): AliasResolver => new DefaultAliasResolver( + $this->getMigrationPlanCalculator(), + $this->getMetadataStorage(), + $this->getMigrationStatusCalculator(), + )); + } + + public function getMigrationStatusCalculator(): MigrationStatusCalculator + { + return $this->getDependency(MigrationStatusCalculator::class, fn (): MigrationStatusCalculator => new CurrentMigrationStatusCalculator( + $this->getMigrationPlanCalculator(), + $this->getMetadataStorage(), + )); + } + + public function getMigrationPlanCalculator(): MigrationPlanCalculator + { + return $this->getDependency(MigrationPlanCalculator::class, fn (): MigrationPlanCalculator => new SortedMigrationPlanCalculator( + $this->getMigrationRepository(), + $this->getMetadataStorage(), + $this->getVersionComparator(), + )); + } + + public function getMigrationGenerator(): Generator + { + return $this->getDependency(Generator::class, fn (): Generator => new Generator($this->getConfiguration())); + } + + public function getMigrationSqlGenerator(): SqlGenerator + { + return $this->getDependency(SqlGenerator::class, fn (): SqlGenerator => new SqlGenerator( + $this->getConfiguration(), + $this->getConnection()->getDatabasePlatform(), + )); + } + + public function getConsoleInputMigratorConfigurationFactory(): MigratorConfigurationFactory + { + return $this->getDependency(MigratorConfigurationFactory::class, fn (): MigratorConfigurationFactory => new ConsoleInputMigratorConfigurationFactory( + $this->getConfiguration(), + )); + } + + public function getMigrationStatusInfosHelper(): MigrationStatusInfosHelper + { + return $this->getDependency(MigrationStatusInfosHelper::class, fn (): MigrationStatusInfosHelper => new MigrationStatusInfosHelper( + $this->getConfiguration(), + $this->getConnection(), + $this->getVersionAliasResolver(), + $this->getMigrationPlanCalculator(), + $this->getMigrationStatusCalculator(), + $this->getMetadataStorage(), + )); + } + + public function getMigrator(): Migrator + { + return $this->getDependency(Migrator::class, fn (): Migrator => new DbalMigrator( + $this->getConnection(), + $this->getEventDispatcher(), + $this->getVersionExecutor(), + $this->getLogger(), + $this->getStopwatch(), + )); + } + + public function getStopwatch(): Stopwatch + { + return $this->getDependency(Stopwatch::class, static fn (): Stopwatch => new Stopwatch(true)); + } + + public function getRollup(): Rollup + { + return $this->getDependency(Rollup::class, fn (): Rollup => new Rollup( + $this->getMetadataStorage(), + $this->getMigrationRepository(), + )); + } + + private function getDependency(string $id, callable $callback): mixed + { + if (! isset($this->inResolution[$id]) && array_key_exists($id, $this->factories) && ! array_key_exists($id, $this->dependencies)) { + $this->inResolution[$id] = true; + $this->dependencies[$id] = call_user_func($this->factories[$id], $this); + unset($this->inResolution); + } + + if (! array_key_exists($id, $this->dependencies)) { + $this->dependencies[$id] = $callback(); + } + + return $this->dependencies[$id]; + } + + public function setDefinition(string $id, callable $service): void + { + $this->assertNotFrozen(); + $this->factories[$id] = $service; + } + + private function getEventManager(): EventManager + { + if ($this->eventManager !== null) { + return $this->eventManager; + } + + if ($this->hasEntityManager()) { + return $this->eventManager = $this->getEntityManager()->getEventManager(); + } + + if (method_exists(Connection::class, 'getEventManager')) { + // DBAL < 4 + return $this->eventManager = $this->getConnection()->getEventManager(); + } + + return $this->eventManager = new EventManager(); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Event/Listeners/AutoCommitListener.php b/backend/vendor/doctrine/migrations/src/Event/Listeners/AutoCommitListener.php new file mode 100644 index 0000000..a760acf --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Event/Listeners/AutoCommitListener.php @@ -0,0 +1,37 @@ +getConnection(); + $conf = $args->getMigratorConfiguration(); + + if ($conf->isDryRun() || $conn->isAutoCommit()) { + return; + } + + TransactionHelper::commitIfInTransaction($conn); + } + + /** {@inheritDoc} */ + public function getSubscribedEvents() + { + return [Events::onMigrationsMigrated]; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Event/MigrationsEventArgs.php b/backend/vendor/doctrine/migrations/src/Event/MigrationsEventArgs.php new file mode 100644 index 0000000..9ef8dee --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Event/MigrationsEventArgs.php @@ -0,0 +1,38 @@ +connection; + } + + public function getPlan(): MigrationPlanList + { + return $this->plan; + } + + public function getMigratorConfiguration(): MigratorConfiguration + { + return $this->migratorConfiguration; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Event/MigrationsVersionEventArgs.php b/backend/vendor/doctrine/migrations/src/Event/MigrationsVersionEventArgs.php new file mode 100644 index 0000000..f309240 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Event/MigrationsVersionEventArgs.php @@ -0,0 +1,38 @@ +connection; + } + + public function getPlan(): MigrationPlan + { + return $this->plan; + } + + public function getMigratorConfiguration(): MigratorConfiguration + { + return $this->migratorConfiguration; + } +} diff --git a/backend/vendor/doctrine/migrations/src/EventDispatcher.php b/backend/vendor/doctrine/migrations/src/EventDispatcher.php new file mode 100644 index 0000000..a71e0c7 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/EventDispatcher.php @@ -0,0 +1,73 @@ +createMigrationEventArgs($migrationsPlan, $migratorConfiguration); + + $this->dispatchEvent($eventName, $event); + } + + public function dispatchVersionEvent( + string $eventName, + MigrationPlan $plan, + MigratorConfiguration $migratorConfiguration, + ): void { + $event = $this->createMigrationsVersionEventArgs( + $plan, + $migratorConfiguration, + ); + + $this->dispatchEvent($eventName, $event); + } + + private function dispatchEvent(string $eventName, EventArgs|null $args = null): void + { + $this->eventManager->dispatchEvent($eventName, $args); + } + + private function createMigrationEventArgs( + MigrationPlanList $migrationsPlan, + MigratorConfiguration $migratorConfiguration, + ): MigrationsEventArgs { + return new MigrationsEventArgs($this->connection, $migrationsPlan, $migratorConfiguration); + } + + private function createMigrationsVersionEventArgs( + MigrationPlan $plan, + MigratorConfiguration $migratorConfiguration, + ): MigrationsVersionEventArgs { + return new MigrationsVersionEventArgs( + $this->connection, + $plan, + $migratorConfiguration, + ); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Events.php b/backend/vendor/doctrine/migrations/src/Events.php new file mode 100644 index 0000000..0d2feb9 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Events.php @@ -0,0 +1,17 @@ + $queriesByVersion */ + public function write( + string $path, + string $direction, + array $queriesByVersion, + DateTimeInterface|null $now = null, + ): bool { + $now ??= new DateTimeImmutable(); + + $string = $this->migrationFileBuilder + ->buildMigrationFile($queriesByVersion, $direction, $now); + + $path = $this->buildMigrationFilePath($path, $now); + + $this->logger->info('Writing migration file to "{path}"', ['path' => $path]); + + return file_put_contents($path, $string) !== false; + } + + private function buildMigrationFilePath(string $path, DateTimeInterface $now): string + { + if (is_dir($path)) { + $path = realpath($path); + $path .= '/doctrine_migration_' . $now->format('YmdHis') . '.sql'; + } + + return $path; + } +} diff --git a/backend/vendor/doctrine/migrations/src/FilesystemMigrationsRepository.php b/backend/vendor/doctrine/migrations/src/FilesystemMigrationsRepository.php new file mode 100644 index 0000000..1d148fe --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/FilesystemMigrationsRepository.php @@ -0,0 +1,139 @@ + $migrationDirectories + */ + public function __construct( + array $classes, + private readonly array $migrationDirectories, + private readonly MigrationFinder $migrationFinder, + private readonly MigrationFactory $versionFactory, + ) { + $this->registerMigrations($classes); + } + + private function registerMigrationInstance(Version $version, AbstractMigration $migration): AvailableMigration + { + if (isset($this->migrations[(string) $version])) { + throw DuplicateMigrationVersion::new( + (string) $version, + (string) $version, + ); + } + + $this->migrations[(string) $version] = new AvailableMigration($version, $migration); + + return $this->migrations[(string) $version]; + } + + /** @throws MigrationException */ + public function registerMigration(string $migrationClassName): AvailableMigration + { + $this->ensureMigrationClassExists($migrationClassName); + + $version = new Version($migrationClassName); + $migration = $this->versionFactory->createVersion($migrationClassName); + + return $this->registerMigrationInstance($version, $migration); + } + + /** + * @param string[] $migrations + * + * @return AvailableMigration[] + */ + private function registerMigrations(array $migrations): array + { + $versions = []; + + foreach ($migrations as $class) { + $versions[] = $this->registerMigration($class); + } + + return $versions; + } + + public function hasMigration(string $version): bool + { + $this->loadMigrationsFromDirectories(); + + return isset($this->migrations[$version]); + } + + public function getMigration(Version $version): AvailableMigration + { + $this->loadMigrationsFromDirectories(); + + if (! isset($this->migrations[(string) $version])) { + throw MigrationClassNotFound::new((string) $version); + } + + return $this->migrations[(string) $version]; + } + + /** + * Returns a non-sorted set of migrations. + */ + public function getMigrations(): AvailableMigrationsSet + { + $this->loadMigrationsFromDirectories(); + + return new AvailableMigrationsSet($this->migrations); + } + + /** @throws MigrationException */ + private function ensureMigrationClassExists(string $class): void + { + if (! class_exists($class)) { + throw MigrationClassNotFound::new($class); + } + } + + private function loadMigrationsFromDirectories(): void + { + $migrationDirectories = $this->migrationDirectories; + + if ($this->migrationsLoaded) { + return; + } + + $this->migrationsLoaded = true; + + foreach ($migrationDirectories as $namespace => $path) { + $migrations = $this->migrationFinder->findMigrations( + $path, + $namespace, + ); + $this->registerMigrations($migrations); + } + } +} diff --git a/backend/vendor/doctrine/migrations/src/Finder/Exception/FinderException.php b/backend/vendor/doctrine/migrations/src/Finder/Exception/FinderException.php new file mode 100644 index 0000000..15da805 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Finder/Exception/FinderException.php @@ -0,0 +1,9 @@ +loadMigrationClasses($includedFiles, $namespace); + $versions = []; + foreach ($classes as $class) { + $versions[] = $class->getName(); + } + + return $versions; + } + + /** + * Look up all declared classes and find those classes contained + * in the given `$files` array. + * + * @param string[] $files The set of files that were `required` + * @param string|null $namespace If not null only classes in this namespace will be returned + * + * @return ReflectionClass[] the classes in `$files` + */ + protected function loadMigrationClasses(array $files, string|null $namespace = null): array + { + $classes = []; + foreach (get_declared_classes() as $class) { + $reflectionClass = new ReflectionClass($class); + + if (! in_array($reflectionClass->getFileName(), $files, true)) { + continue; + } + + if ($namespace !== null && ! $this->isReflectionClassInNamespace($reflectionClass, $namespace)) { + continue; + } + + $classes[] = $reflectionClass; + } + + return $classes; + } + + /** @param ReflectionClass $reflectionClass */ + private function isReflectionClassInNamespace(ReflectionClass $reflectionClass, string $namespace): bool + { + return strncmp($reflectionClass->getName(), $namespace . '\\', strlen($namespace) + 1) === 0; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Finder/GlobFinder.php b/backend/vendor/doctrine/migrations/src/Finder/GlobFinder.php new file mode 100644 index 0000000..ba9780d --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Finder/GlobFinder.php @@ -0,0 +1,29 @@ +getRealPath($directory); + + $files = glob(rtrim($dir, '/') . '/Version*.php'); + if ($files === false) { + $files = []; + } + + return $this->loadMigrations($files, $namespace); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Finder/MigrationFinder.php b/backend/vendor/doctrine/migrations/src/Finder/MigrationFinder.php new file mode 100644 index 0000000..0d13b39 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Finder/MigrationFinder.php @@ -0,0 +1,19 @@ +pattern = $pattern ?? sprintf( + '#^.+\\%s[^\\%s]+\\.php$#i', + DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR, + ); + } + + /** @return string[] */ + public function findMigrations(string $directory, string|null $namespace = null): array + { + $dir = $this->getRealPath($directory); + + return $this->loadMigrations( + $this->getMatches($this->createIterator($dir)), + $namespace, + ); + } + + /** @return RegexIterator> */ + private function createIterator(string $dir): RegexIterator + { + /** @phpstan-ignore return.type (https://github.com/phpstan/phpstan/issues/13325) */ + return new RegexIterator( + new RecursiveIteratorIterator( + new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS | FilesystemIterator::FOLLOW_SYMLINKS), + RecursiveIteratorIterator::LEAVES_ONLY, + ), + $this->getPattern(), + RegexIterator::GET_MATCH, + ); + } + + private function getPattern(): string + { + return $this->pattern; + } + + /** + * @param RegexIterator> $iteratorFilesMatch + * + * @return string[] + */ + private function getMatches(RegexIterator $iteratorFilesMatch): array + { + $files = []; + foreach ($iteratorFilesMatch as $file) { + $files[] = $file[0]; + } + + return $files; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Generator/ClassNameGenerator.php b/backend/vendor/doctrine/migrations/src/Generator/ClassNameGenerator.php new file mode 100644 index 0000000..22b6f0d --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Generator/ClassNameGenerator.php @@ -0,0 +1,25 @@ +generateVersionNumber(); + } + + private function generateVersionNumber(): string + { + $now = new DateTimeImmutable('now', new DateTimeZone('UTC')); + + return $now->format(self::VERSION_FORMAT); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Generator/ConcatenationFileBuilder.php b/backend/vendor/doctrine/migrations/src/Generator/ConcatenationFileBuilder.php new file mode 100644 index 0000000..10ebc19 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Generator/ConcatenationFileBuilder.php @@ -0,0 +1,39 @@ + $queriesByVersion */ + public function buildMigrationFile( + array $queriesByVersion, + string $direction, + DateTimeInterface|null $now = null, + ): string { + $now ??= new DateTimeImmutable(); + $string = sprintf("-- Doctrine Migration File Generated on %s\n", $now->format('Y-m-d H:i:s')); + + foreach ($queriesByVersion as $version => $queries) { + $string .= "\n-- Version " . $version . "\n"; + + foreach ($queries as $query) { + $string .= $query->getStatement() . ";\n"; + } + } + + return $string; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Generator/DiffGenerator.php b/backend/vendor/doctrine/migrations/src/Generator/DiffGenerator.php new file mode 100644 index 0000000..6e1ac45 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Generator/DiffGenerator.php @@ -0,0 +1,163 @@ + $schemaManager */ + public function __construct( + private readonly DBALConfiguration $dbalConfiguration, + private readonly AbstractSchemaManager $schemaManager, + private readonly SchemaProvider $schemaProvider, + private readonly AbstractPlatform $platform, + private readonly Generator $migrationGenerator, + private readonly SqlGenerator $migrationSqlGenerator, + private readonly SchemaProvider $emptySchemaProvider, + ) { + } + + /** @throws NoChangesDetected */ + public function generate( + string $fqcn, + string|null $filterExpression, + bool $formatted = false, + bool|null $nowdocOutput = null, + int $lineLength = 120, + bool $checkDbPlatform = true, + bool $fromEmptySchema = false, + ): string { + if ($filterExpression !== null) { + $this->dbalConfiguration->setSchemaAssetsFilter( + static function ($assetName) use ($filterExpression) { + if ($assetName instanceof NamedObject || $assetName instanceof OptionallyNamedObject) { + if ($assetName->getObjectName() === null) { + return false; + } + + $assetName = $assetName->getObjectName()->toString(); + } elseif ($assetName instanceof AbstractAsset) { + /** @phpstan-ignore method.deprecated */ + $assetName = $assetName->getName(); + } + + return preg_match($filterExpression, $assetName); + }, + ); + } + + $fromSchema = $fromEmptySchema + ? $this->createEmptySchema() + : $this->createFromSchema(); + + $toSchema = $this->createToSchema(); + + // prior to DBAL 4.0, the schema name was set to the first element in the search path, + // which is not necessarily the default schema name + if ( + ! method_exists($this->schemaManager, 'getSchemaSearchPaths') + && $this->platform->supportsSchemas() + ) { + /** @phpstan-ignore method.deprecated */ + $defaultNamespace = $toSchema->getName(); + if ($defaultNamespace !== '') { + /* @phpstan-ignore method.deprecated */ + $toSchema->createNamespace($defaultNamespace); + } + } + + if (class_exists(ComparatorConfig::class)) { + $comparator = $this->schemaManager->createComparator((new ComparatorConfig())->withReportModifiedIndexes(false)); + } else { + $comparator = $this->schemaManager->createComparator(); + } + + $upSql = $this->platform->getAlterSchemaSQL($comparator->compareSchemas($fromSchema, $toSchema)); + + $up = $this->migrationSqlGenerator->generate( + $upSql, + $formatted, + $nowdocOutput, + $lineLength, + $checkDbPlatform, + ); + + $downSql = $this->platform->getAlterSchemaSQL($comparator->compareSchemas($toSchema, $fromSchema)); + + $down = $this->migrationSqlGenerator->generate( + $downSql, + $formatted, + $nowdocOutput, + $lineLength, + $checkDbPlatform, + ); + + if ($up === '' && $down === '') { + throw NoChangesDetected::new(); + } + + return $this->migrationGenerator->generateMigration( + $fqcn, + $up, + $down, + ); + } + + private function createEmptySchema(): Schema + { + return $this->emptySchemaProvider->createSchema(); + } + + private function createFromSchema(): Schema + { + return $this->schemaManager->introspectSchema(); + } + + private function createToSchema(): Schema + { + $toSchema = $this->schemaProvider->createSchema(); + + $schemaAssetsFilter = $this->dbalConfiguration->getSchemaAssetsFilter(); + + if ($schemaAssetsFilter !== null) { + foreach ($toSchema->getTables() as $table) { + /** @phpstan-ignore instanceof.alwaysTrue */ + if ($table instanceof NamedObject) { + $tableName = $table->getObjectName()->toString(); + } else { + $tableName = $table->getName(); + } + + if ($schemaAssetsFilter($tableName)) { + continue; + } + + $toSchema->dropTable($tableName); + } + } + + return $toSchema; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Generator/Exception/GeneratorException.php b/backend/vendor/doctrine/migrations/src/Generator/Exception/GeneratorException.php new file mode 100644 index 0000000..5e90fbc --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Generator/Exception/GeneratorException.php @@ -0,0 +1,11 @@ + $queriesByVersion */ + public function buildMigrationFile(array $queriesByVersion, string $direction, DateTimeInterface|null $now = null): string; +} diff --git a/backend/vendor/doctrine/migrations/src/Generator/Generator.php b/backend/vendor/doctrine/migrations/src/Generator/Generator.php new file mode 100644 index 0000000..7eb5edc --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Generator/Generator.php @@ -0,0 +1,157 @@ +; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + + } +} + +TEMPLATE; + + private string|null $template = null; + + public function __construct(private readonly Configuration $configuration) + { + } + + public function generateMigration( + string $fqcn, + string|null $up = null, + string|null $down = null, + ): string { + $mch = []; + if (preg_match('~(.*)\\\\([^\\\\]+)~', $fqcn, $mch) !== 1) { + throw new InvalidArgumentException(sprintf('Invalid FQCN')); + } + + [$fqcn, $namespace, $className] = $mch; + + $dirs = $this->configuration->getMigrationDirectories(); + if (! isset($dirs[$namespace])) { + throw new InvalidArgumentException(sprintf('Path not defined for the namespace "%s"', $namespace)); + } + + $dir = $dirs[$namespace]; + + $replacements = [ + '' => $namespace, + '' => $className, + '' => $up !== null ? ' ' . implode("\n ", explode("\n", $up)) : null, + '' => $down !== null ? ' ' . implode("\n ", explode("\n", $down)) : null, + '' => $this->configuration->isTransactional() ? '' : <<<'METHOD' + + + public function isTransactional(): bool + { + return false; + } +METHOD + , + ]; + + $code = strtr($this->getTemplate(), $replacements); + $code = preg_replace('/^ +$/m', '', $code); + + $directoryHelper = new MigrationDirectoryHelper(); + $dir = $directoryHelper->getMigrationDirectory($this->configuration, $dir); + $path = $dir . '/' . $className . '.php'; + + file_put_contents($path, $code); + + return $path; + } + + private function getTemplate(): string + { + if ($this->template === null) { + $this->template = $this->loadCustomTemplate(); + + if ($this->template === null) { + $this->template = self::MIGRATION_TEMPLATE; + } + } + + return $this->template; + } + + /** @throws InvalidTemplateSpecified */ + private function loadCustomTemplate(): string|null + { + $customTemplate = $this->configuration->getCustomTemplate(); + + if ($customTemplate === null) { + return null; + } + + if (! is_file($customTemplate) || ! is_readable($customTemplate)) { + throw InvalidTemplateSpecified::notFoundOrNotReadable($customTemplate); + } + + $content = file_get_contents($customTemplate); + + if ($content === false) { + throw InvalidTemplateSpecified::notReadable($customTemplate); + } + + if (trim($content) === '') { + throw InvalidTemplateSpecified::empty($customTemplate); + } + + return $content; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Generator/SqlGenerator.php b/backend/vendor/doctrine/migrations/src/Generator/SqlGenerator.php new file mode 100644 index 0000000..4fa2ca8 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Generator/SqlGenerator.php @@ -0,0 +1,103 @@ +configuration->getMetadataStorageConfiguration(); + $maxLength = $lineLength - 18 - 8; // max - php code length - indentation + foreach ($sql as $query) { + if ( + $storageConfiguration instanceof TableMetadataStorageConfiguration + && stripos($query, $storageConfiguration->getTableName()) !== false + ) { + continue; + } + + if ($formatted && strlen($query) > $maxLength) { + $query = $this->formatQuery($query); + } + + if ($nowdocOutput === true || ($nowdocOutput !== false && $formatted && strlen($query) > $maxLength )) { + $code[] = sprintf( + "\$this->addSql(<<<'SQL'\n%s\nSQL);", + preg_replace('/^/m', str_repeat(' ', 4), $query), + ); + } else { + $code[] = sprintf('$this->addSql(%s);', var_export($query, true)); + } + } + + if (count($code) !== 0 && $checkDbPlatform && $this->configuration->isDatabasePlatformChecked()) { + $currentPlatform = '\\' . get_class($this->platform); + + array_unshift( + $code, + sprintf( + <<<'PHP' +$this->abortIf( + !$this->connection->getDatabasePlatform() instanceof %s, + "Migration can only be executed safely on '%s'." +); +PHP + , + $currentPlatform, + $currentPlatform, + ), + '', + ); + } + + return implode("\n", $code); + } + + private function formatQuery(string $query): string + { + $this->formatter ??= new SqlFormatter(new NullHighlighter()); + + return $this->formatter->format($query); + } +} diff --git a/backend/vendor/doctrine/migrations/src/InlineParameterFormatter.php b/backend/vendor/doctrine/migrations/src/InlineParameterFormatter.php new file mode 100644 index 0000000..741a5ca --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/InlineParameterFormatter.php @@ -0,0 +1,83 @@ + $value) { + $type = $types[$key] ?? 'string'; + + $formattedParameter = '[' . $this->formatParameter($value, $type) . ']'; + + $formattedParameters[] = is_string($key) + ? sprintf(':%s => %s', $key, $formattedParameter) + : $formattedParameter; + } + + return sprintf('with parameters (%s)', implode(', ', $formattedParameters)); + } + + private function formatParameter(mixed $value, mixed $type): string|int|bool|float|null + { + if (is_string($type) && Type::hasType($type)) { + return Type::getType($type)->convertToDatabaseValue( + $value, + $this->connection->getDatabasePlatform(), + ); + } + + return $this->parameterToString($value); + } + + /** @param int[]|bool[]|string[]|float[]|array|int|string|float|bool $value */ + private function parameterToString(array|int|string|float|bool $value): string + { + if (is_array($value)) { + return implode(', ', array_map($this->parameterToString(...), $value)); + } + + if (is_int($value) || is_string($value) || is_float($value)) { + return (string) $value; + } + + if (is_bool($value)) { + return $value === true ? 'true' : 'false'; + } + } +} diff --git a/backend/vendor/doctrine/migrations/src/Metadata/AvailableMigration.php b/backend/vendor/doctrine/migrations/src/Metadata/AvailableMigration.php new file mode 100644 index 0000000..6e1dffa --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Metadata/AvailableMigration.php @@ -0,0 +1,31 @@ +version; + } + + public function getMigration(): AbstractMigration + { + return $this->migration; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Metadata/AvailableMigrationsList.php b/backend/vendor/doctrine/migrations/src/Metadata/AvailableMigrationsList.php new file mode 100644 index 0000000..94e5625 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Metadata/AvailableMigrationsList.php @@ -0,0 +1,86 @@ +items = array_values($items); + } + + /** @return AvailableMigration[] */ + public function getItems(): array + { + return $this->items; + } + + public function getFirst(int $offset = 0): AvailableMigration + { + if (! isset($this->items[$offset])) { + throw NoMigrationsFoundWithCriteria::new('first' . ($offset > 0 ? '+' . $offset : '')); + } + + return $this->items[$offset]; + } + + public function getLast(int $offset = 0): AvailableMigration + { + $offset = count($this->items) - 1 - (-1 * $offset); + if (! isset($this->items[$offset])) { + throw NoMigrationsFoundWithCriteria::new('last' . ($offset > 0 ? '+' . $offset : '')); + } + + return $this->items[$offset]; + } + + public function count(): int + { + return count($this->items); + } + + public function hasMigration(Version $version): bool + { + foreach ($this->items as $migration) { + if ($migration->getVersion()->equals($version)) { + return true; + } + } + + return false; + } + + public function getMigration(Version $version): AvailableMigration + { + foreach ($this->items as $migration) { + if ($migration->getVersion()->equals($version)) { + return $migration; + } + } + + throw MigrationNotAvailable::forVersion($version); + } + + public function newSubset(ExecutedMigrationsList $executedMigrations): self + { + return new self(array_filter($this->getItems(), static fn (AvailableMigration $migration): bool => ! $executedMigrations->hasMigration($migration->getVersion()))); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Metadata/AvailableMigrationsSet.php b/backend/vendor/doctrine/migrations/src/Metadata/AvailableMigrationsSet.php new file mode 100644 index 0000000..a166e1e --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Metadata/AvailableMigrationsSet.php @@ -0,0 +1,60 @@ +items = array_values($items); + } + + /** @return AvailableMigration[] */ + public function getItems(): array + { + return $this->items; + } + + public function count(): int + { + return count($this->items); + } + + public function hasMigration(Version $version): bool + { + foreach ($this->items as $migration) { + if ($migration->getVersion()->equals($version)) { + return true; + } + } + + return false; + } + + public function getMigration(Version $version): AvailableMigration + { + foreach ($this->items as $migration) { + if ($migration->getVersion()->equals($version)) { + return $migration; + } + } + + throw MigrationNotAvailable::forVersion($version); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Metadata/ExecutedMigration.php b/backend/vendor/doctrine/migrations/src/Metadata/ExecutedMigration.php new file mode 100644 index 0000000..418a1b4 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Metadata/ExecutedMigration.php @@ -0,0 +1,37 @@ +executionTime; + } + + public function getExecutedAt(): DateTimeImmutable|null + { + return $this->executedAt; + } + + public function getVersion(): Version + { + return $this->version; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Metadata/ExecutedMigrationsList.php b/backend/vendor/doctrine/migrations/src/Metadata/ExecutedMigrationsList.php new file mode 100644 index 0000000..bfc32c6 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Metadata/ExecutedMigrationsList.php @@ -0,0 +1,87 @@ +items = array_values($items); + } + + /** @return ExecutedMigration[] */ + public function getItems(): array + { + return $this->items; + } + + public function getFirst(int $offset = 0): ExecutedMigration + { + if (! isset($this->items[$offset])) { + throw NoMigrationsFoundWithCriteria::new('first' . ($offset > 0 ? '+' . $offset : '')); + } + + return $this->items[$offset]; + } + + public function getLast(int $offset = 0): ExecutedMigration + { + $offset = count($this->items) - 1 - (-1 * $offset); + if (! isset($this->items[$offset])) { + throw NoMigrationsFoundWithCriteria::new('last' . ($offset > 0 ? '+' . $offset : '')); + } + + return $this->items[$offset]; + } + + public function count(): int + { + return count($this->items); + } + + public function hasMigration(Version $version): bool + { + foreach ($this->items as $migration) { + if ($migration->getVersion()->equals($version)) { + return true; + } + } + + return false; + } + + public function getMigration(Version $version): ExecutedMigration + { + foreach ($this->items as $migration) { + if ($migration->getVersion()->equals($version)) { + return $migration; + } + } + + throw MigrationNotExecuted::new((string) $version); + } + + public function unavailableSubset(AvailableMigrationsList $availableMigrations): self + { + return new self(array_filter($this->getItems(), static fn (ExecutedMigration $migration): bool => ! $availableMigrations->hasMigration($migration->getVersion()))); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Metadata/MigrationPlan.php b/backend/vendor/doctrine/migrations/src/Metadata/MigrationPlan.php new file mode 100644 index 0000000..75eb31e --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Metadata/MigrationPlan.php @@ -0,0 +1,54 @@ +version; + } + + public function getResult(): ExecutionResult|null + { + return $this->result; + } + + public function markAsExecuted(ExecutionResult $result): void + { + if ($this->result !== null) { + throw PlanAlreadyExecuted::new(); + } + + $this->result = $result; + } + + public function getMigration(): AbstractMigration + { + return $this->migration; + } + + public function getDirection(): string + { + return $this->direction; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Metadata/MigrationPlanList.php b/backend/vendor/doctrine/migrations/src/Metadata/MigrationPlanList.php new file mode 100644 index 0000000..e515eb1 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Metadata/MigrationPlanList.php @@ -0,0 +1,59 @@ +items); + } + + /** @return MigrationPlan[] */ + public function getItems(): array + { + return $this->items; + } + + public function getDirection(): string + { + return $this->direction; + } + + public function getFirst(): MigrationPlan + { + if (count($this->items) === 0) { + throw NoMigrationsFoundWithCriteria::new('first'); + } + + return reset($this->items); + } + + public function getLast(): MigrationPlan + { + if (count($this->items) === 0) { + throw NoMigrationsFoundWithCriteria::new('last'); + } + + return end($this->items); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Metadata/Storage/MetadataStorage.php b/backend/vendor/doctrine/migrations/src/Metadata/Storage/MetadataStorage.php new file mode 100644 index 0000000..79b1821 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Metadata/Storage/MetadataStorage.php @@ -0,0 +1,21 @@ + getSql(ExecutionResult $result); */ +interface MetadataStorage +{ + public function ensureInitialized(): void; + + public function getExecutedMigrations(): ExecutedMigrationsList; + + public function complete(ExecutionResult $result): void; + + public function reset(): void; +} diff --git a/backend/vendor/doctrine/migrations/src/Metadata/Storage/MetadataStorageConfiguration.php b/backend/vendor/doctrine/migrations/src/Metadata/Storage/MetadataStorageConfiguration.php new file mode 100644 index 0000000..ffbf5e0 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Metadata/Storage/MetadataStorageConfiguration.php @@ -0,0 +1,9 @@ + */ + private readonly AbstractSchemaManager $schemaManager; + + private readonly AbstractPlatform $platform; + private readonly TableMetadataStorageConfiguration $configuration; + + public function __construct( + private readonly Connection $connection, + private readonly MigrationsComparator $comparator, + MetadataStorageConfiguration|null $configuration = null, + private readonly MigrationsRepository|null $migrationRepository = null, + ) { + $this->schemaManager = $connection->createSchemaManager(); + $this->platform = $connection->getDatabasePlatform(); + + if ($configuration !== null && ! ($configuration instanceof TableMetadataStorageConfiguration)) { + throw new InvalidArgumentException(sprintf( + '%s accepts only %s as configuration', + self::class, + TableMetadataStorageConfiguration::class, + )); + } + + $this->configuration = $configuration ?? new TableMetadataStorageConfiguration(); + } + + public function getExecutedMigrations(): ExecutedMigrationsList + { + if (! $this->isInitialized()) { + return new ExecutedMigrationsList([]); + } + + $this->checkInitialization(); + $rows = $this->connection->fetchAllAssociative(sprintf('SELECT * FROM %s', $this->configuration->getTableName())); + + $migrations = []; + foreach ($rows as $row) { + $row = array_change_key_case($row, CASE_LOWER); + + $version = new Version($row[strtolower($this->configuration->getVersionColumnName())]); + + $executedAt = $row[strtolower($this->configuration->getExecutedAtColumnName())] ?? ''; + $executedAt = $executedAt !== '' + ? DateTimeImmutable::createFromFormat($this->platform->getDateTimeFormatString(), $executedAt) + : null; + + $executionTime = isset($row[strtolower($this->configuration->getExecutionTimeColumnName())]) + ? floatval($row[strtolower($this->configuration->getExecutionTimeColumnName())] / 1000) + : null; + + $migration = new ExecutedMigration( + $version, + $executedAt instanceof DateTimeImmutable ? $executedAt : null, + $executionTime, + ); + + $migrations[(string) $version] = $migration; + } + + uasort($migrations, fn (ExecutedMigration $a, ExecutedMigration $b): int => $this->comparator->compare($a->getVersion(), $b->getVersion())); + + return new ExecutedMigrationsList($migrations); + } + + public function reset(): void + { + $this->checkInitialization(); + + $this->connection->executeStatement( + sprintf( + 'DELETE FROM %s WHERE 1 = 1', + $this->configuration->getTableName(), + ), + ); + } + + public function complete(ExecutionResult $result): void + { + $this->checkInitialization(); + + if ($result->getDirection() === Direction::DOWN) { + $this->connection->delete($this->configuration->getTableName(), [ + $this->configuration->getVersionColumnName() => (string) $result->getVersion(), + ]); + } else { + $this->connection->insert($this->configuration->getTableName(), [ + $this->configuration->getVersionColumnName() => (string) $result->getVersion(), + $this->configuration->getExecutedAtColumnName() => $result->getExecutedAt(), + $this->configuration->getExecutionTimeColumnName() => $result->getTime() === null ? null : (int) round($result->getTime() * 1000), + ], [ + Types::STRING, + Types::DATETIME_IMMUTABLE, + Types::INTEGER, + ]); + } + } + + /** @return iterable */ + public function getSql(ExecutionResult $result): iterable + { + yield new Query('-- Version ' . (string) $result->getVersion() . ' update table metadata'); + + if ($result->getDirection() === Direction::DOWN) { + yield new Query(sprintf( + 'DELETE FROM %s WHERE %s = %s', + $this->configuration->getTableName(), + $this->configuration->getVersionColumnName(), + $this->connection->quote((string) $result->getVersion()), + )); + + return; + } + + yield new Query(sprintf( + 'INSERT INTO %s (%s, %s, %s) VALUES (%s, %s, 0)', + $this->configuration->getTableName(), + $this->configuration->getVersionColumnName(), + $this->configuration->getExecutedAtColumnName(), + $this->configuration->getExecutionTimeColumnName(), + $this->connection->quote((string) $result->getVersion()), + $this->connection->quote(($result->getExecutedAt() ?? new DateTimeImmutable())->format('Y-m-d H:i:s')), + )); + } + + public function ensureInitialized(): void + { + if (! $this->isInitialized()) { + $expectedSchemaChangelog = $this->getExpectedTable(); + $this->schemaManager->createTable($expectedSchemaChangelog); + $this->schemaUpToDate = true; + $this->isInitialized = true; + + return; + } + + $this->isInitialized = true; + $expectedSchemaChangelog = $this->getExpectedTable(); + $diff = $this->needsUpdate($expectedSchemaChangelog); + if ($diff === null) { + $this->schemaUpToDate = true; + + return; + } + + $this->schemaUpToDate = true; + $this->schemaManager->alterTable($diff); + $this->updateMigratedVersionsFromV1orV2toV3(); + } + + private function needsUpdate(Table $expectedTable): TableDiff|null + { + if ($this->schemaUpToDate) { + return null; + } + + if (class_exists(ComparatorConfig::class)) { + $comparator = $this->schemaManager->createComparator((new ComparatorConfig())->withReportModifiedIndexes(false)); + } else { + $comparator = $this->schemaManager->createComparator(); + } + + /** @phpstan-ignore function.alreadyNarrowedType */ + if (method_exists($this->schemaManager, 'introspectTableByUnquotedName')) { + $currentTable = $this->schemaManager->introspectTableByUnquotedName($this->configuration->getTableName()); + } else { + /** @phpstan-ignore method.deprecated */ + $currentTable = $this->schemaManager->introspectTable($this->configuration->getTableName()); + } + + $diff = $comparator->compareTables($currentTable, $expectedTable); + + return $diff->isEmpty() ? null : $diff; + } + + private function isInitialized(): bool + { + if ($this->isInitialized) { + return $this->isInitialized; + } + + if ($this->connection instanceof PrimaryReadReplicaConnection) { + $this->connection->ensureConnectedToPrimary(); + } + + return $this->schemaManager->tablesExist([$this->configuration->getTableName()]); + } + + private function checkInitialization(): void + { + if (! $this->isInitialized()) { + throw MetadataStorageError::notInitialized(); + } + + $expectedTable = $this->getExpectedTable(); + + if ($this->needsUpdate($expectedTable) !== null) { + throw MetadataStorageError::notUpToDate(); + } + } + + private function getExpectedTable(): Table + { + $schemaChangelog = new Table($this->configuration->getTableName()); + + $schemaChangelog->addColumn( + $this->configuration->getVersionColumnName(), + 'string', + ['notnull' => true, 'length' => $this->configuration->getVersionColumnLength()], + ); + $schemaChangelog->addColumn($this->configuration->getExecutedAtColumnName(), 'datetime', ['notnull' => false]); + $schemaChangelog->addColumn($this->configuration->getExecutionTimeColumnName(), 'integer', ['notnull' => false]); + + if (class_exists(PrimaryKeyConstraint::class)) { + $constraint = PrimaryKeyConstraint::editor() + ->setColumnNames(UnqualifiedName::unquoted($this->configuration->getVersionColumnName())) + ->create(); + + $schemaChangelog->addPrimaryKeyConstraint($constraint); + } else { + $schemaChangelog->setPrimaryKey([$this->configuration->getVersionColumnName()]); + } + + return $schemaChangelog; + } + + private function updateMigratedVersionsFromV1orV2toV3(): void + { + if ($this->migrationRepository === null) { + return; + } + + $availableMigrations = $this->migrationRepository->getMigrations()->getItems(); + $executedMigrations = $this->getExecutedMigrations()->getItems(); + + foreach ($availableMigrations as $availableMigration) { + foreach ($executedMigrations as $k => $executedMigration) { + if ($this->isAlreadyV3Format($availableMigration, $executedMigration)) { + continue; + } + + $this->connection->update( + $this->configuration->getTableName(), + [ + $this->configuration->getVersionColumnName() => (string) $availableMigration->getVersion(), + ], + [ + $this->configuration->getVersionColumnName() => (string) $executedMigration->getVersion(), + ], + ); + unset($executedMigrations[$k]); + } + } + } + + private function isAlreadyV3Format(AvailableMigration $availableMigration, ExecutedMigration $executedMigration): bool + { + return (string) $availableMigration->getVersion() === (string) $executedMigration->getVersion() + || strpos( + (string) $availableMigration->getVersion(), + (string) $executedMigration->getVersion(), + ) !== strlen((string) $availableMigration->getVersion()) - + strlen((string) $executedMigration->getVersion()); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Metadata/Storage/TableMetadataStorageConfiguration.php b/backend/vendor/doctrine/migrations/src/Metadata/Storage/TableMetadataStorageConfiguration.php new file mode 100644 index 0000000..6e80cb5 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Metadata/Storage/TableMetadataStorageConfiguration.php @@ -0,0 +1,74 @@ +tableName; + } + + /** @param non-empty-string $tableName */ + public function setTableName(string $tableName): void + { + $this->tableName = $tableName; + } + + /** @return non-empty-string */ + public function getVersionColumnName(): string + { + return $this->versionColumnName; + } + + /** @param non-empty-string $versionColumnName */ + public function setVersionColumnName(string $versionColumnName): void + { + $this->versionColumnName = $versionColumnName; + } + + public function getVersionColumnLength(): int + { + return $this->versionColumnLength; + } + + public function setVersionColumnLength(int $versionColumnLength): void + { + $this->versionColumnLength = $versionColumnLength; + } + + public function getExecutedAtColumnName(): string + { + return $this->executedAtColumnName; + } + + public function setExecutedAtColumnName(string $executedAtColumnName): void + { + $this->executedAtColumnName = $executedAtColumnName; + } + + public function getExecutionTimeColumnName(): string + { + return $this->executionTimeColumnName; + } + + public function setExecutionTimeColumnName(string $executionTimeColumnName): void + { + $this->executionTimeColumnName = $executionTimeColumnName; + } +} diff --git a/backend/vendor/doctrine/migrations/src/MigrationsRepository.php b/backend/vendor/doctrine/migrations/src/MigrationsRepository.php new file mode 100644 index 0000000..56663ae --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/MigrationsRepository.php @@ -0,0 +1,18 @@ + A list of SQL statements executed, grouped by migration version */ + public function migrate(MigrationPlanList $migrationsPlan, MigratorConfiguration $migratorConfiguration): array; +} diff --git a/backend/vendor/doctrine/migrations/src/MigratorConfiguration.php b/backend/vendor/doctrine/migrations/src/MigratorConfiguration.php new file mode 100644 index 0000000..01e7ee1 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/MigratorConfiguration.php @@ -0,0 +1,88 @@ +dryRun; + } + + public function setDryRun(bool $dryRun): self + { + $this->dryRun = $dryRun; + + return $this; + } + + public function getTimeAllQueries(): bool + { + return $this->timeAllQueries; + } + + public function setTimeAllQueries(bool $timeAllQueries): self + { + $this->timeAllQueries = $timeAllQueries; + + return $this; + } + + public function getNoMigrationException(): bool + { + return $this->noMigrationException; + } + + public function setNoMigrationException(bool $noMigrationException = false): self + { + $this->noMigrationException = $noMigrationException; + + return $this; + } + + public function isAllOrNothing(): bool + { + return $this->allOrNothing; + } + + public function setAllOrNothing(bool $allOrNothing): self + { + $this->allOrNothing = $allOrNothing; + + return $this; + } + + public function getFromSchema(): Schema|null + { + return $this->fromSchema; + } + + public function setFromSchema(Schema $fromSchema): self + { + $this->fromSchema = $fromSchema; + + return $this; + } +} diff --git a/backend/vendor/doctrine/migrations/src/ParameterFormatter.php b/backend/vendor/doctrine/migrations/src/ParameterFormatter.php new file mode 100644 index 0000000..c6a152a --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/ParameterFormatter.php @@ -0,0 +1,22 @@ + $schemaManager- */ + public function __construct( + private readonly AbstractSchemaManager $schemaManager, + private readonly AbstractPlatform $platform, + ) { + } + + public function createFromSchema(): Schema + { + return $this->schemaManager->introspectSchema(); + } + + public function createToSchema(Schema $fromSchema): Schema + { + return clone $fromSchema; + } + + /** @return string[] */ + public function getSqlDiffToMigrate(Schema $fromSchema, Schema $toSchema): array + { + if (class_exists(ComparatorConfig::class)) { + $comparator = $this->schemaManager->createComparator((new ComparatorConfig())->withReportModifiedIndexes(false)); + } else { + $comparator = $this->schemaManager->createComparator(); + } + + return $this->platform->getAlterSchemaSQL( + $comparator->compareSchemas($fromSchema, $toSchema), + ); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Provider/EmptySchemaProvider.php b/backend/vendor/doctrine/migrations/src/Provider/EmptySchemaProvider.php new file mode 100644 index 0000000..3439124 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Provider/EmptySchemaProvider.php @@ -0,0 +1,28 @@ + $schemaManager */ + public function __construct(private readonly AbstractSchemaManager $schemaManager) + { + } + + public function createSchema(): Schema + { + return new Schema([], [], $this->schemaManager->createSchemaConfig()); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Provider/Exception/NoMappingFound.php b/backend/vendor/doctrine/migrations/src/Provider/Exception/NoMappingFound.php new file mode 100644 index 0000000..fd5fc51 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Provider/Exception/NoMappingFound.php @@ -0,0 +1,15 @@ +originalSchemaManipulator; + + if (PHP_VERSION_ID < 80400) { + /** @phpstan-ignore staticMethod.notFound */ + return LazySchema::createLazyProxy(static fn () => $originalSchemaManipulator->createFromSchema()); + } + + $reflector = new ReflectionClass(Schema::class); + + return $reflector->newLazyProxy( + static fn () => $originalSchemaManipulator->createFromSchema(), + ); + } + + public function createToSchema(Schema $fromSchema): Schema + { + $originalSchemaManipulator = $this->originalSchemaManipulator; + + /** @phpstan-ignore method.notFound */ + if ($fromSchema instanceof LazySchema && ! $fromSchema->isLazyObjectInitialized()) { + /** @phpstan-ignore staticMethod.notFound */ + return LazySchema::createLazyProxy(static fn () => $originalSchemaManipulator->createToSchema($fromSchema)); + } + + if (PHP_VERSION_ID >= 80400) { + $reflector = new ReflectionClass(Schema::class); + + if ($reflector->isUninitializedLazyObject($fromSchema)) { + return $reflector->newLazyProxy( + static function () use ($originalSchemaManipulator, $fromSchema, $reflector) { + /* $this->originalSchemaManipulator may return a lazy + * object, for instance DBALSchemaDiffProvider just clones $fromSchema, + * which we know is lazy at this point of execution */ + return $reflector->initializeLazyObject( + $originalSchemaManipulator->createToSchema($fromSchema), + ); + }, + ); + } + } + + return $this->originalSchemaManipulator->createToSchema($fromSchema); + } + + /** @return string[] */ + public function getSqlDiffToMigrate(Schema $fromSchema, Schema $toSchema): array + { + if ( + $toSchema instanceof LazySchema + /** @phpstan-ignore method.notFound */ + && ! $toSchema->isLazyObjectInitialized() + ) { + return []; + } + + if (PHP_VERSION_ID >= 80400) { + $reflector = new ReflectionClass(Schema::class); + + if ($reflector->isUninitializedLazyObject($toSchema)) { + return []; + } + } + + return $this->originalSchemaManipulator->getSqlDiffToMigrate($fromSchema, $toSchema); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Provider/OrmSchemaProvider.php b/backend/vendor/doctrine/migrations/src/Provider/OrmSchemaProvider.php new file mode 100644 index 0000000..750589e --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Provider/OrmSchemaProvider.php @@ -0,0 +1,41 @@ +entityManager = $em; + } + + public function createSchema(): Schema + { + /** @var array> $metadata */ + $metadata = $this->entityManager->getMetadataFactory()->getAllMetadata(); + + usort($metadata, static fn (ClassMetadata $a, ClassMetadata $b): int => $a->getTableName() <=> $b->getTableName()); + + $tool = new SchemaTool($this->entityManager); + + return $tool->getSchemaFromMetadata($metadata); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Provider/SchemaDiffProvider.php b/backend/vendor/doctrine/migrations/src/Provider/SchemaDiffProvider.php new file mode 100644 index 0000000..3343719 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Provider/SchemaDiffProvider.php @@ -0,0 +1,23 @@ +toSchema = $schema; + } + + public function createSchema(): Schema + { + return $this->toSchema; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Query/Exception/InvalidArguments.php b/backend/vendor/doctrine/migrations/src/Query/Exception/InvalidArguments.php new file mode 100644 index 0000000..df73ab6 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Query/Exception/InvalidArguments.php @@ -0,0 +1,23 @@ + count($parameters)) { + throw InvalidArguments::wrongTypesArgumentCount($statement, count($parameters), count($types)); + } + } + + public function __toString(): string + { + return $this->statement; + } + + public function getStatement(): string + { + return $this->statement; + } + + /** @return mixed[] */ + public function getParameters(): array + { + return $this->parameters; + } + + /** @return mixed[] */ + public function getTypes(): array + { + return $this->types; + } +} diff --git a/backend/vendor/doctrine/migrations/src/QueryWriter.php b/backend/vendor/doctrine/migrations/src/QueryWriter.php new file mode 100644 index 0000000..9868d7a --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/QueryWriter.php @@ -0,0 +1,22 @@ + $queriesByVersion */ + public function write( + string $path, + string $direction, + array $queriesByVersion, + ): bool; +} diff --git a/backend/vendor/doctrine/migrations/src/Rollup.php b/backend/vendor/doctrine/migrations/src/Rollup.php new file mode 100644 index 0000000..662faaa --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Rollup.php @@ -0,0 +1,48 @@ +migrationRepository->getMigrations(); + + if (count($versions) === 0) { + throw RollupFailed::noMigrationsFound(); + } + + if (count($versions) > 1) { + throw RollupFailed::tooManyMigrations(); + } + + $this->metadataStorage->reset(); + + $result = new ExecutionResult($versions->getItems()[0]->getVersion()); + $this->metadataStorage->complete($result); + + return $result->getVersion(); + } +} diff --git a/backend/vendor/doctrine/migrations/src/SchemaDumper.php b/backend/vendor/doctrine/migrations/src/SchemaDumper.php new file mode 100644 index 0000000..0e6ed69 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/SchemaDumper.php @@ -0,0 +1,178 @@ + $schemaManager + * @param string[] $excludedTablesRegexes + */ + public function __construct( + private readonly AbstractPlatform $platform, + private readonly AbstractSchemaManager $schemaManager, + private readonly Generator $migrationGenerator, + private readonly SqlGenerator $migrationSqlGenerator, + private readonly array $excludedTablesRegexes = [], + ) { + } + + /** + * @param string[] $excludedTablesRegexes + * + * @throws NoTablesFound + */ + public function dump( + string $fqcn, + array $excludedTablesRegexes = [], + bool $formatted = false, + bool|null $nowdocOutput = null, + int $lineLength = 120, + ): string { + $schema = $this->schemaManager->introspectSchema(); + + $up = []; + $down = []; + + foreach ($schema->getTables() as $table) { + if ($this->shouldSkipTable($table, $excludedTablesRegexes)) { + continue; + } + + $upSql = $this->platform->getCreateTableSQL($table); + + $upCode = $this->migrationSqlGenerator->generate( + $upSql, + $formatted, + $nowdocOutput, + $lineLength, + ); + + if ($upCode !== '') { + $up[] = $upCode; + } + + /** @phpstan-ignore instanceof.alwaysTrue */ + if ($table instanceof NamedObject) { + $tableName = $table->getObjectName()->toSQL($this->platform); + } else { + $tableName = $table->getName(); + } + + $downSql = [$this->platform->getDropTableSQL($tableName)]; + $downCode = $this->migrationSqlGenerator->generate( + $downSql, + $formatted, + $nowdocOutput, + $lineLength, + ); + + if ($downCode === '') { + continue; + } + + $down[] = $downCode; + } + + if (count($up) === 0) { + throw NoTablesFound::new(); + } + + $up = implode("\n", $up); + $down = implode("\n", $down); + + return $this->migrationGenerator->generateMigration( + $fqcn, + $up, + $down, + ); + } + + /** @param string[] $excludedTablesRegexes */ + private function shouldSkipTable(Table $table, array $excludedTablesRegexes): bool + { + foreach (array_merge($excludedTablesRegexes, $this->excludedTablesRegexes) as $regex) { + if ( + self::pregMatch( + $regex, + /** @phpstan-ignore instanceof.alwaysTrue */ + $table instanceof NamedObject ? + $table->getObjectName()->toString() : + $table->getName(), + ) !== 0 + ) { + return true; + } + } + + return false; + } + + /** + * A local wrapper for "preg_match" which will throw a InvalidArgumentException if there + * is an internal error in the PCRE engine. + * Copied from https://github.com/symfony/symfony/blob/62216ea67762b18982ca3db73c391b0748a49d49/src/Symfony/Component/Yaml/Parser.php#L1072-L1090 + * + * @internal + * + * @param mixed[] $matches + * @param int-mask-of $flags + * + * @phpstan-ignore parameterByRef.unusedType + */ + private static function pregMatch(string $pattern, string $subject, array|null &$matches = null, int $flags = 0, int $offset = 0): int + { + $errorMessages = []; + set_error_handler(static function (int $severity, string $message) use (&$errorMessages): bool { + $errorMessages[] = $message; + + return true; + }); + + try { + $ret = preg_match($pattern, $subject, $matches, $flags, $offset); + } finally { + restore_error_handler(); + } + + if ($ret === false) { + throw new InvalidArgumentException(match (preg_last_error()) { + PREG_INTERNAL_ERROR => sprintf('Internal PCRE error, please check your Regex. Reported errors: %s.', implode(', ', $errorMessages)), + default => preg_last_error_msg(), + }); + } + + return $ret; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/BooleanStringFormatter.php b/backend/vendor/doctrine/migrations/src/Tools/BooleanStringFormatter.php new file mode 100644 index 0000000..187e903 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/BooleanStringFormatter.php @@ -0,0 +1,27 @@ + true, + 'false', '0' => false, + default => $default, + }; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/BytesFormatter.php b/backend/vendor/doctrine/migrations/src/Tools/BytesFormatter.php new file mode 100644 index 0000000..d63062e --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/BytesFormatter.php @@ -0,0 +1,27 @@ +setAliases(['current']) + ->setDescription('Outputs the current version'); + + parent::configure(); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $aliasResolver = $this->getDependencyFactory()->getVersionAliasResolver(); + + $version = $aliasResolver->resolveVersionAlias('current'); + if ((string) $version === '0') { + $description = '(No migration executed yet)'; + } else { + try { + $availableMigration = $this->getDependencyFactory()->getMigrationRepository()->getMigration($version); + $description = $availableMigration->getMigration()->getDescription(); + } catch (MigrationClassNotFound) { + $description = '(Migration info not available)'; + } + } + + $this->io->text(sprintf( + "%s%s\n", + (string) $version, + $description !== '' ? ' - ' . $description : '', + )); + + return 0; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/DiffCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/DiffCommand.php new file mode 100644 index 0000000..751a142 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/DiffCommand.php @@ -0,0 +1,204 @@ +setAliases(['diff']) + ->setDescription('Generate a migration by comparing your current database to your mapping information.') + ->setHelp(<<<'EOT' +The %command.name% command generates a migration by comparing your current database to your mapping information: + + %command.full_name% + +EOT) + ->addOption( + 'namespace', + null, + InputOption::VALUE_REQUIRED, + 'The namespace to use for the migration (must be in the list of configured namespaces)', + ) + ->addOption( + 'filter-expression', + null, + InputOption::VALUE_REQUIRED, + 'Tables which are filtered by Regular Expression.', + ) + ->addOption( + 'formatted', + null, + InputOption::VALUE_NONE, + 'Format the generated SQL.', + ) + ->addOption( + 'nowdoc', + null, + InputOption::VALUE_NEGATABLE, + 'Output the generated SQL as a nowdoc string (enabled by default for formatted queries).', + ) + ->addOption( + 'line-length', + null, + InputOption::VALUE_REQUIRED, + 'Max line length of unformatted lines.', + '120', + ) + ->addOption( + 'check-database-platform', + null, + InputOption::VALUE_OPTIONAL, + 'Check Database Platform to the generated code.', + false, + ) + ->addOption( + 'allow-empty-diff', + null, + InputOption::VALUE_NONE, + 'Do not throw an exception when no changes are detected.', + ) + ->addOption( + 'from-empty-schema', + null, + InputOption::VALUE_NONE, + 'Generate a full migration as if the current database was empty.', + ); + } + + /** @throws InvalidOptionUsage */ + protected function execute( + InputInterface $input, + OutputInterface $output, + ): int { + $filterExpression = (string) $input->getOption('filter-expression'); + if ($filterExpression === '') { + $filterExpression = null; + } + + $formatted = filter_var($input->getOption('formatted'), FILTER_VALIDATE_BOOLEAN); + $nowdocOutput = $input->getOption('nowdoc'); + $nowdocOutput = $nowdocOutput === null ? null : filter_var($input->getOption('nowdoc'), FILTER_VALIDATE_BOOLEAN); + $lineLength = (int) $input->getOption('line-length'); + $allowEmptyDiff = $input->getOption('allow-empty-diff'); + $checkDbPlatform = filter_var($input->getOption('check-database-platform'), FILTER_VALIDATE_BOOLEAN); + $fromEmptySchema = $input->getOption('from-empty-schema'); + + if ($formatted) { + if (! class_exists(SqlFormatter::class)) { + throw InvalidOptionUsage::new( + 'The "--formatted" option can only be used if the sql formatter is installed. Please run "composer require doctrine/sql-formatter".', + ); + } + } + + $namespace = $this->getNamespace($input, $output); + + $statusCalculator = $this->getDependencyFactory()->getMigrationStatusCalculator(); + $executedUnavailableMigrations = $statusCalculator->getExecutedUnavailableMigrations(); + $newMigrations = $statusCalculator->getNewMigrations(); + + if (! $this->checkNewMigrationsOrExecutedUnavailable($newMigrations, $executedUnavailableMigrations, $input)) { + $this->io->error('Migration cancelled!'); + + return 3; + } + + $fqcn = $this->getDependencyFactory()->getClassNameGenerator()->generateClassName($namespace); + $diffGenerator = $this->getDependencyFactory()->getDiffGenerator(); + + try { + $path = $diffGenerator->generate( + $fqcn, + $filterExpression, + $formatted, + $nowdocOutput, + $lineLength, + $checkDbPlatform, + $fromEmptySchema, + ); + } catch (NoChangesDetected $exception) { + if ($allowEmptyDiff) { + $this->io->error($exception->getMessage()); + + return 0; + } + + throw $exception; + } + + $this->io->text([ + sprintf('Generated new migration class to "%s"', $path), + '', + sprintf( + 'To run just this migration for testing purposes, you can use migrations:execute --up "%s"', + addslashes($fqcn), + ), + '', + sprintf( + 'To revert the migration you can use migrations:execute --down "%s"', + addslashes($fqcn), + ), + '', + ]); + + return 0; + } + + private function checkNewMigrationsOrExecutedUnavailable( + AvailableMigrationsList $newMigrations, + ExecutedMigrationsList $executedUnavailableMigrations, + InputInterface $input, + ): bool { + if (count($newMigrations) === 0 && count($executedUnavailableMigrations) === 0) { + return true; + } + + if (count($newMigrations) !== 0) { + $this->io->warning(sprintf( + 'You have %d available migrations to execute.', + count($newMigrations), + )); + } + + if (count($executedUnavailableMigrations) !== 0) { + $this->io->warning(sprintf( + 'You have %d previously executed migrations in the database that are not registered migrations.', + count($executedUnavailableMigrations), + )); + } + + return $this->canExecute('Are you sure you wish to continue?', $input); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/DoctrineCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/DoctrineCommand.php new file mode 100644 index 0000000..c1003bc --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/DoctrineCommand.php @@ -0,0 +1,189 @@ +addOption( + 'configuration', + null, + InputOption::VALUE_REQUIRED, + 'The path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]', + ); + + $this->addOption( + 'em', + null, + InputOption::VALUE_REQUIRED, + 'The name of the entity manager to use.', + ); + + $this->addOption( + 'conn', + null, + InputOption::VALUE_REQUIRED, + 'The name of the connection to use.', + ); + + if ($this->dependencyFactory !== null) { + return; + } + + $this->addOption( + 'db-configuration', + null, + InputOption::VALUE_REQUIRED, + 'The path to a database connection configuration file.', + 'migrations-db.php', + ); + } + + protected function initialize(InputInterface $input, OutputInterface $output): void + { + $this->io = new SymfonyStyle($input, $output); + + $configurationParameter = $input->getOption('configuration'); + if ($this->dependencyFactory === null) { + $configurationLoader = new ConfigurationFileWithFallback( + is_string($configurationParameter) + ? $configurationParameter + : null, + ); + $connectionLoader = new ConfigurationFile($input->getOption('db-configuration')); + $this->dependencyFactory = DependencyFactory::fromConnection($configurationLoader, $connectionLoader); + } elseif (is_string($configurationParameter)) { + $configurationLoader = new ConfigurationFileWithFallback($configurationParameter); + $this->dependencyFactory->setConfigurationLoader($configurationLoader); + } + + $dependencyFactory = $this->dependencyFactory; + + $this->setNamedEmOrConnection($input); + + if ($dependencyFactory->isFrozen()) { + return; + } + + $logger = new ConsoleLogger($output, [ + LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, + LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, + LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, + LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL, + LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL, + LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL, + LogLevel::INFO => OutputInterface::VERBOSITY_VERBOSE, + LogLevel::DEBUG => OutputInterface::VERBOSITY_VERY_VERBOSE, + ]); + $dependencyFactory->setService(LoggerInterface::class, $logger); + $dependencyFactory->freeze(); + } + + protected function getDependencyFactory(): DependencyFactory + { + if ($this->dependencyFactory === null) { + throw DependenciesNotSatisfied::new(); + } + + return $this->dependencyFactory; + } + + protected function canExecute(string $question, InputInterface $input): bool + { + return ! $input->isInteractive() || $this->io->confirm($question); + } + + private function setNamedEmOrConnection(InputInterface $input): void + { + assert($this->dependencyFactory !== null); + $emName = $input->getOption('em'); + $connName = $input->getOption('conn'); + if ($emName !== null && $connName !== null) { + throw new InvalidOptionUsage('You can specify only one of the --em and --conn options.'); + } + + if ($this->dependencyFactory->hasEntityManager() && $emName !== null) { + $this->dependencyFactory->getConfiguration()->setEntityManagerName($emName); + + return; + } + + if ($connName !== null) { + $this->dependencyFactory->getConfiguration()->setConnectionName($connName); + + return; + } + } + + final protected function getNamespace(InputInterface $input, OutputInterface $output): string + { + $configuration = $this->getDependencyFactory()->getConfiguration(); + + $namespace = $input->getOption('namespace'); + if ($namespace === '') { + $namespace = null; + } + + $dirs = $configuration->getMigrationDirectories(); + if ($namespace === null && count($dirs) === 1) { + $namespace = key($dirs); + } elseif ($namespace === null && count($dirs) > 1) { + $helper = $this->getHelper('question'); + $question = new ChoiceQuestion( + 'Please choose a namespace (defaults to the first one)', + array_keys($dirs), + 0, + ); + $namespace = $helper->ask($input, $output, $question); + $this->io->text(sprintf('You have selected the "%s" namespace', $namespace)); + } + + if (! isset($dirs[$namespace])) { + throw new Exception(sprintf('Path not defined for the namespace "%s"', $namespace)); + } + + assert(is_string($namespace)); + + return $namespace; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/DumpSchemaCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/DumpSchemaCommand.php new file mode 100644 index 0000000..86a37e4 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/DumpSchemaCommand.php @@ -0,0 +1,145 @@ +setAliases(['dump-schema']) + ->setDescription('Dump the schema for your database to a migration.') + ->setHelp(<<<'EOT' +The %command.name% command dumps the schema for your database to a migration: + + %command.full_name% + +After dumping your schema to a migration, you can rollup your migrations using the migrations:rollup command. +EOT) + ->addOption( + 'formatted', + null, + InputOption::VALUE_NONE, + 'Format the generated SQL.', + ) + ->addOption( + 'nowdoc', + null, + InputOption::VALUE_NEGATABLE, + 'Output the generated SQL as a nowdoc string (enabled by default for formatted queries).', + ) + ->addOption( + 'namespace', + null, + InputOption::VALUE_REQUIRED, + 'Namespace to use for the generated migrations (defaults to the first namespace definition).', + ) + ->addOption( + 'filter-tables', + null, + InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, + 'Filter the tables to dump via Regex.', + ) + ->addOption( + 'line-length', + null, + InputOption::VALUE_REQUIRED, + 'Max line length of unformatted lines.', + '120', + ); + } + + /** @throws SchemaDumpRequiresNoMigrations */ + public function execute( + InputInterface $input, + OutputInterface $output, + ): int { + $formatted = filter_var($input->getOption('formatted'), FILTER_VALIDATE_BOOLEAN); + $nowdocOutput = $input->getOption('nowdoc'); + $nowdocOutput = $nowdocOutput === null ? null : filter_var($input->getOption('nowdoc'), FILTER_VALIDATE_BOOLEAN); + $lineLength = (int) $input->getOption('line-length'); + + $schemaDumper = $this->getDependencyFactory()->getSchemaDumper(); + + if ($formatted) { + if (! class_exists(SqlFormatter::class)) { + throw InvalidOptionUsage::new( + 'The "--formatted" option can only be used if the sql formatter is installed. Please run "composer require doctrine/sql-formatter".', + ); + } + } + + $namespace = $this->getNamespace($input, $output); + + $this->checkNoPreviousDumpExistsForNamespace($namespace); + + $fqcn = $this->getDependencyFactory()->getClassNameGenerator()->generateClassName($namespace); + + $path = $schemaDumper->dump( + $fqcn, + $input->getOption('filter-tables'), + $formatted, + $nowdocOutput, + $lineLength, + ); + + $this->io->text([ + sprintf('Dumped your schema to a new migration class at "%s"', $path), + '', + sprintf( + 'To run just this migration for testing purposes, you can use migrations:execute --up "%s"', + addslashes($fqcn), + ), + '', + sprintf( + 'To revert the migration you can use migrations:execute --down "%s"', + addslashes($fqcn), + ), + '', + 'To use this as a rollup migration you can use the migrations:rollup command.', + '', + ]); + + return 0; + } + + private function checkNoPreviousDumpExistsForNamespace(string $namespace): void + { + $migrations = $this->getDependencyFactory()->getMigrationRepository()->getMigrations(); + foreach ($migrations->getItems() as $migration) { + if (str_contains((string) $migration->getVersion(), $namespace)) { + throw SchemaDumpRequiresNoMigrations::new($namespace); + } + } + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/ExecuteCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/ExecuteCommand.php new file mode 100644 index 0000000..92d4101 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/ExecuteCommand.php @@ -0,0 +1,178 @@ +setAliases(['execute']) + ->setDescription( + 'Execute one or more migration versions up or down manually.', + ) + ->addArgument( + 'versions', + InputArgument::REQUIRED | InputArgument::IS_ARRAY, + 'The versions to execute.', + null, + ) + ->addOption( + 'write-sql', + null, + InputOption::VALUE_OPTIONAL, + 'The path to output the migration SQL file. Defaults to current working directory.', + false, + ) + ->addOption( + 'dry-run', + null, + InputOption::VALUE_NONE, + 'Execute the migration as a dry run.', + ) + ->addOption( + 'up', + null, + InputOption::VALUE_NONE, + 'Execute the migration up.', + ) + ->addOption( + 'down', + null, + InputOption::VALUE_NONE, + 'Execute the migration down.', + ) + ->addOption( + 'query-time', + null, + InputOption::VALUE_NONE, + 'Time all the queries individually.', + ) + ->setHelp(<<<'EOT' +The %command.name% command executes migration versions up or down manually: + + %command.full_name% FQCN + +You can show more information about the process by increasing the verbosity level. To see the +executed queries, set the level to debug with -vv: + + %command.full_name% FQCN -vv + +If no --up or --down option is specified it defaults to up: + + %command.full_name% FQCN --down + +You can also execute the migration as a --dry-run: + + %command.full_name% FQCN --dry-run + +You can output the prepared SQL statements to a file with --write-sql: + + %command.full_name% FQCN --write-sql + +Or you can also execute the migration without a warning message which you need to interact with: + + %command.full_name% FQCN --no-interaction + +All the previous commands accept multiple migration versions, allowing you run execute more than +one migration at once: + + %command.full_name% FQCN-1 FQCN-2 ...FQCN-n + +EOT); + + parent::configure(); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $migratorConfigurationFactory = $this->getDependencyFactory()->getConsoleInputMigratorConfigurationFactory(); + $migratorConfiguration = $migratorConfigurationFactory->getMigratorConfiguration($input); + + $databaseName = (string) $this->getDependencyFactory()->getConnection()->getDatabase(); + $question = sprintf( + 'WARNING! You are about to execute a migration in database "%s" that could result in schema changes and data loss. Are you sure you wish to continue?', + $databaseName === '' ? '' : $databaseName, + ); + if (! $migratorConfiguration->isDryRun() && ! $this->canExecute($question, $input)) { + $this->io->error('Migration cancelled!'); + + return 1; + } + + $this->getDependencyFactory()->getMetadataStorage()->ensureInitialized(); + + $versions = $input->getArgument('versions'); + $direction = $input->getOption('down') !== false + ? Direction::DOWN + : Direction::UP; + + $path = $input->getOption('write-sql') ?? getcwd(); + + if (is_string($path) && ! $this->isPathWritable($path)) { + $this->io->error(sprintf('The path "%s" not writeable!', $path)); + + return 1; + } + + $planCalculator = $this->getDependencyFactory()->getMigrationPlanCalculator(); + $plan = $planCalculator->getPlanForVersions(array_map(static fn (string $version): Version => new Version($version), $versions), $direction); + + $this->getDependencyFactory()->getLogger()->notice( + 'Executing' . ($migratorConfiguration->isDryRun() ? ' (dry-run)' : '') . ' {versions} {direction}', + [ + 'direction' => $plan->getDirection(), + 'versions' => implode(', ', $versions), + ], + ); + + $migrator = $this->getDependencyFactory()->getMigrator(); + $sql = $migrator->migrate($plan, $migratorConfiguration); + + if (is_string($path)) { + $writer = $this->getDependencyFactory()->getQueryWriter(); + $writer->write($path, $direction, $sql); + } + + $this->io->success(sprintf( + 'Successfully migrated version(s): %s: [%s]', + implode(', ', $versions), + strtoupper($plan->getDirection()), + )); + $this->io->newLine(); + + return 0; + } + + private function isPathWritable(string $path): bool + { + return is_writable($path) || is_dir($path) || is_writable(dirname($path)); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/GenerateCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/GenerateCommand.php new file mode 100644 index 0000000..043d648 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/GenerateCommand.php @@ -0,0 +1,71 @@ +setAliases(['generate']) + ->setDescription('Generate a blank migration class.') + ->addOption( + 'namespace', + null, + InputOption::VALUE_REQUIRED, + 'The namespace to use for the migration (must be in the list of configured namespaces)', + ) + ->setHelp(<<<'EOT' +The %command.name% command generates a blank migration class: + + %command.full_name% + +EOT); + + parent::configure(); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $migrationGenerator = $this->getDependencyFactory()->getMigrationGenerator(); + + $namespace = $this->getNamespace($input, $output); + + $fqcn = $this->getDependencyFactory()->getClassNameGenerator()->generateClassName($namespace); + + $path = $migrationGenerator->generateMigration($fqcn); + + $this->io->text([ + sprintf('Generated new migration class to "%s"', $path), + '', + sprintf( + 'To run just this migration for testing purposes, you can use migrations:execute --up \'%s\'', + $fqcn, + ), + '', + sprintf( + 'To revert the migration you can use migrations:execute --down \'%s\'', + $fqcn, + ), + '', + ]); + + return 0; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/LatestCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/LatestCommand.php new file mode 100644 index 0000000..5ce6af0 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/LatestCommand.php @@ -0,0 +1,53 @@ +setAliases(['latest']) + ->setDescription('Outputs the latest version'); + + parent::configure(); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $aliasResolver = $this->getDependencyFactory()->getVersionAliasResolver(); + + try { + $version = $aliasResolver->resolveVersionAlias('latest'); + $availableMigration = $this->getDependencyFactory()->getMigrationRepository()->getMigration($version); + $description = $availableMigration->getMigration()->getDescription(); + } catch (NoMigrationsToExecute) { + $version = '0'; + $description = ''; + } + + $this->io->text(sprintf( + "%s%s\n", + $version, + $description !== '' ? ' - ' . $description : '', + )); + + return 0; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/ListCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/ListCommand.php new file mode 100644 index 0000000..86aa661 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/ListCommand.php @@ -0,0 +1,70 @@ +setAliases(['list-migrations']) + ->setDescription('Display a list of all available migrations and their status.') + ->setHelp(<<<'EOT' +The %command.name% command outputs a list of all available migrations and their status: + + %command.full_name% +EOT); + + parent::configure(); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $versions = $this->getSortedVersions( + $this->getDependencyFactory()->getMigrationPlanCalculator()->getMigrations(), // available migrations + $this->getDependencyFactory()->getMetadataStorage()->getExecutedMigrations(), // executed migrations + ); + + $this->getDependencyFactory()->getMigrationStatusInfosHelper()->listVersions($versions, $output); + + return 0; + } + + /** @return Version[] */ + private function getSortedVersions(AvailableMigrationsList $availableMigrations, ExecutedMigrationsList $executedMigrations): array + { + $availableVersions = array_map(static fn (AvailableMigration $availableMigration): Version => $availableMigration->getVersion(), $availableMigrations->getItems()); + + $executedVersions = array_map(static fn (ExecutedMigration $executedMigration): Version => $executedMigration->getVersion(), $executedMigrations->getItems()); + + $versions = array_unique(array_merge($availableVersions, $executedVersions)); + + $comparator = $this->getDependencyFactory()->getVersionComparator(); + uasort($versions, $comparator->compare(...)); + + return $versions; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/MigrateCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/MigrateCommand.php new file mode 100644 index 0000000..956a2fb --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/MigrateCommand.php @@ -0,0 +1,308 @@ +setAliases(['migrate']) + ->setDescription( + 'Execute a migration to a specified version or the latest available version.', + ) + ->addArgument( + 'version', + InputArgument::OPTIONAL, + 'The version FQCN or alias (first, prev, next, latest) to migrate to.', + 'latest', + ) + ->addOption( + 'write-sql', + null, + InputOption::VALUE_OPTIONAL, + 'The path to output the migration SQL file. Defaults to current working directory.', + false, + ) + ->addOption( + 'dry-run', + null, + InputOption::VALUE_NONE, + 'Execute the migration as a dry run.', + ) + ->addOption( + 'query-time', + null, + InputOption::VALUE_NONE, + 'Time all the queries individually.', + ) + ->addOption( + 'allow-no-migration', + null, + InputOption::VALUE_NONE, + 'Do not throw an exception if no migration is available.', + ) + ->addOption( + 'all-or-nothing', + null, + InputOption::VALUE_OPTIONAL, + 'Wrap the entire migration in a transaction.', + ConsoleInputMigratorConfigurationFactory::ABSENT_CONFIG_VALUE, + ) + ->addOption( + 'no-all-or-nothing', + null, + InputOption::VALUE_NONE, + 'Disable wrapping the entire migration in a transaction.', + ) + ->setHelp(<<<'EOT' +The %command.name% command executes a migration to a specified version or the latest available version: + + %command.full_name% + +You can show more information about the process by increasing the verbosity level. To see the +executed queries, set the level to debug with -vv: + + %command.full_name% -vv + +You can optionally manually specify the version you wish to migrate to: + + %command.full_name% FQCN + +You can specify the version you wish to migrate to using an alias: + + %command.full_name% prev + These alias are defined: first, latest, prev, current and next + +You can specify the version you wish to migrate to using a number against the current version: + + %command.full_name% current+3 + +You can also execute the migration as a --dry-run: + + %command.full_name% FQCN --dry-run + +You can output the prepared SQL statements to a file with --write-sql: + + %command.full_name% FQCN --write-sql + +Or you can also execute the migration without a warning message which you need to interact with --no-interaction: + + %command.full_name% --no-interaction + +You can also time all the different queries if you want to know which one is taking so long with --query-time: + + %command.full_name% --query-time + +You can skip throwing an exception if no migration is available with --allow-no-migration: + + %command.full_name% --allow-no-migration + +You can wrap the entire migration in a transaction with --all-or-nothing: + + %command.full_name% --all-or-nothing + +EOT); + + parent::configure(); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $migratorConfigurationFactory = $this->getDependencyFactory()->getConsoleInputMigratorConfigurationFactory(); + $migratorConfiguration = $migratorConfigurationFactory->getMigratorConfiguration($input); + + $databaseName = (string) $this->getDependencyFactory()->getConnection()->getDatabase(); + $question = sprintf( + 'WARNING! You are about to execute a migration in database "%s" that could result in schema changes and data loss. Are you sure you wish to continue?', + $databaseName === '' ? '' : $databaseName, + ); + if (! $migratorConfiguration->isDryRun() && ! $this->canExecute($question, $input)) { + $this->io->error('Migration cancelled!'); + + return 3; + } + + $this->getDependencyFactory()->getMetadataStorage()->ensureInitialized(); + + $allowNoMigration = $input->getOption('allow-no-migration'); + $versionAlias = $input->getArgument('version'); + + $path = $input->getOption('write-sql') ?? getcwd(); + + if (is_string($path) && ! $this->isPathWritable($path)) { + $this->io->error(sprintf('The path "%s" not writeable!', $path)); + + return 1; + } + + $migrationRepository = $this->getDependencyFactory()->getMigrationRepository(); + if (count($migrationRepository->getMigrations()) === 0) { + $message = sprintf( + 'The version "%s" couldn\'t be reached, there are no registered migrations.', + $versionAlias, + ); + + if ($allowNoMigration) { + $this->io->warning($message); + + return 0; + } + + $this->io->error($message); + + return 1; + } + + try { + $version = $this->getDependencyFactory()->getVersionAliasResolver()->resolveVersionAlias($versionAlias); + } catch (UnknownMigrationVersion) { + $this->io->error(sprintf( + 'Unknown version: %s', + OutputFormatter::escape($versionAlias), + )); + + return 1; + } catch (NoMigrationsToExecute | NoMigrationsFoundWithCriteria) { + return $this->exitForAlias($versionAlias); + } + + $planCalculator = $this->getDependencyFactory()->getMigrationPlanCalculator(); + $statusCalculator = $this->getDependencyFactory()->getMigrationStatusCalculator(); + $executedUnavailableMigrations = $statusCalculator->getExecutedUnavailableMigrations(); + + if ($this->checkExecutedUnavailableMigrations($executedUnavailableMigrations, $input) === false) { + return 3; + } + + $plan = $planCalculator->getPlanUntilVersion($version); + + if (count($plan) === 0) { + return $this->exitForAlias($versionAlias); + } + + $this->getDependencyFactory()->getLogger()->notice( + 'Migrating' . ($migratorConfiguration->isDryRun() ? ' (dry-run)' : '') . ' {direction} to {to}', + [ + 'direction' => $plan->getDirection(), + 'to' => (string) $version, + ], + ); + + $migrator = $this->getDependencyFactory()->getMigrator(); + $sql = $migrator->migrate($plan, $migratorConfiguration); + + if (is_string($path)) { + $writer = $this->getDependencyFactory()->getQueryWriter(); + $writer->write($path, $plan->getDirection(), $sql); + } + + $this->io->success(sprintf( + 'Successfully migrated to version: %s', + $version, + )); + $this->io->newLine(); + + return 0; + } + + private function checkExecutedUnavailableMigrations( + ExecutedMigrationsList $executedUnavailableMigrations, + InputInterface $input, + ): bool { + if (count($executedUnavailableMigrations) !== 0) { + $this->io->warning(sprintf( + 'You have %s previously executed migrations in the database that are not registered migrations.', + count($executedUnavailableMigrations), + )); + + foreach ($executedUnavailableMigrations->getItems() as $executedUnavailableMigration) { + $this->io->text(sprintf( + '>> %s (%s)', + $executedUnavailableMigration->getExecutedAt()?->format('Y-m-d H:i:s'), + $executedUnavailableMigration->getVersion(), + )); + } + + $question = 'Are you sure you wish to continue?'; + + if (! $this->canExecute($question, $input)) { + $this->io->error('Migration cancelled!'); + + return false; + } + } + + return true; + } + + private function exitForAlias(string $versionAlias): int + { + $version = $this->getDependencyFactory()->getVersionAliasResolver()->resolveVersionAlias('current'); + + // Allow meaningful message when latest version already reached. + if (in_array($versionAlias, ['current', 'latest', 'first'], true)) { + $message = sprintf( + 'Already at the %s version ("%s")', + $versionAlias, + (string) $version, + ); + + $this->io->success($message); + } elseif (in_array($versionAlias, ['next', 'prev'], true) || str_starts_with($versionAlias, 'current')) { + $message = sprintf( + 'The version "%s" couldn\'t be reached, you are at version "%s"', + $versionAlias, + (string) $version, + ); + + $this->io->error($message); + } else { + $message = sprintf( + 'You are already at version "%s"', + (string) $version, + ); + + $this->io->success($message); + } + + return 0; + } + + private function isPathWritable(string $path): bool + { + return is_writable($path) || is_dir($path) || is_writable(dirname($path)); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/RollupCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/RollupCommand.php new file mode 100644 index 0000000..1c97985 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/RollupCommand.php @@ -0,0 +1,63 @@ +setAliases(['rollup']) + ->setDescription('Rollup migrations by deleting all tracked versions and insert the one version that exists.') + ->setHelp(<<<'EOT' +The %command.name% command rolls up migrations by deleting all tracked versions and +inserts the one version that exists that was created with the migrations:dump-schema command. + + %command.full_name% + +To dump your schema to a migration version you can use the migrations:dump-schema command. +EOT); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $question = sprintf( + 'WARNING! You are about to execute a migration in database "%s" that could result in schema changes and data loss. Are you sure you wish to continue?', + $this->getDependencyFactory()->getConnection()->getDatabase() ?? '', + ); + + if (! $this->canExecute($question, $input)) { + $this->io->error('Migration cancelled!'); + + return 3; + } + + $this->getDependencyFactory()->getMetadataStorage()->ensureInitialized(); + $version = $this->getDependencyFactory()->getRollup()->rollup(); + + $this->io->success(sprintf( + 'Rolled up migrations to version %s', + (string) $version, + )); + + return 0; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/StatusCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/StatusCommand.php new file mode 100644 index 0000000..ce710dc --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/StatusCommand.php @@ -0,0 +1,42 @@ +setAliases(['status']) + ->setDescription('View the status of a set of migrations.') + ->setHelp(<<<'EOT' +The %command.name% command outputs the status of a set of migrations: + + %command.full_name% +EOT); + + parent::configure(); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $infosHelper = $this->getDependencyFactory()->getMigrationStatusInfosHelper(); + $infosHelper->showMigrationsInfo($output); + + return 0; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/SyncMetadataCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/SyncMetadataCommand.php new file mode 100644 index 0000000..3bb68ed --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/SyncMetadataCommand.php @@ -0,0 +1,44 @@ +setAliases(['sync-metadata-storage']) + ->setDescription('Ensures that the metadata storage is at the latest version.') + ->setHelp(<<<'EOT' +The way metadata is stored in the database can change between releases. +The %command.name% command updates metadata storage to the latest version, +ensuring it is ready to receive migrations generated by the current version of Doctrine Migrations. + + + %command.full_name% +EOT); + } + + public function execute( + InputInterface $input, + OutputInterface $output, + ): int { + $this->getDependencyFactory()->getMetadataStorage()->ensureInitialized(); + + $this->io->success('Metadata storage synchronized'); + + return 0; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/UpToDateCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/UpToDateCommand.php new file mode 100644 index 0000000..dfcf078 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/UpToDateCommand.php @@ -0,0 +1,111 @@ +setAliases(['up-to-date']) + ->setDescription('Tells you if your schema is up-to-date.') + ->addOption('fail-on-unregistered', 'u', InputOption::VALUE_NONE, 'Whether to fail when there are unregistered extra migrations found') + ->addOption('list-migrations', 'l', InputOption::VALUE_NONE, 'Show a list of missing or not migrated versions.') + ->setHelp(<<<'EOT' +The %command.name% command tells you if your schema is up-to-date: + + %command.full_name% +EOT); + + parent::configure(); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $statusCalculator = $this->getDependencyFactory()->getMigrationStatusCalculator(); + + $executedUnavailableMigrations = $statusCalculator->getExecutedUnavailableMigrations(); + $newMigrations = $statusCalculator->getNewMigrations(); + $newMigrationsCount = count($newMigrations); + $executedUnavailableMigrationsCount = count($executedUnavailableMigrations); + + if ($newMigrationsCount === 0 && $executedUnavailableMigrationsCount === 0) { + $this->io->success('Up-to-date! No migrations to execute.'); + + return 0; + } + + $exitCode = 0; + if ($newMigrationsCount > 0) { + $this->io->error(sprintf( + 'Out-of-date! %u migration%s available to execute.', + $newMigrationsCount, + $newMigrationsCount > 1 ? 's are' : ' is', + )); + $exitCode = 1; + } + + if ($executedUnavailableMigrationsCount > 0) { + $this->io->error(sprintf( + 'You have %1$u previously executed migration%3$s in the database that %2$s registered migration%3$s.', + $executedUnavailableMigrationsCount, + $executedUnavailableMigrationsCount > 1 ? 'are not' : 'is not a', + $executedUnavailableMigrationsCount > 1 ? 's' : '', + )); + if ($input->getOption('fail-on-unregistered')) { + $exitCode = 2; + } + } + + if ($input->getOption('list-migrations')) { + $versions = $this->getSortedVersions($newMigrations, $executedUnavailableMigrations); + $this->getDependencyFactory()->getMigrationStatusInfosHelper()->listVersions($versions, $output); + + $this->io->newLine(); + } + + return $exitCode; + } + + /** @return Version[] */ + private function getSortedVersions(AvailableMigrationsList $newMigrations, ExecutedMigrationsList $executedUnavailableMigrations): array + { + $executedUnavailableVersion = array_map(static fn (ExecutedMigration $executedMigration): Version => $executedMigration->getVersion(), $executedUnavailableMigrations->getItems()); + + $newVersions = array_map(static fn (AvailableMigration $availableMigration): Version => $availableMigration->getVersion(), $newMigrations->getItems()); + + $versions = array_unique(array_merge($executedUnavailableVersion, $newVersions)); + + $comparator = $this->getDependencyFactory()->getVersionComparator(); + uasort($versions, $comparator->compare(...)); + + return $versions; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Command/VersionCommand.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/VersionCommand.php new file mode 100644 index 0000000..63bfea8 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Command/VersionCommand.php @@ -0,0 +1,260 @@ +setAliases(['version']) + ->setDescription('Manually add and delete migration versions from the version table.') + ->addArgument( + 'version', + InputArgument::OPTIONAL, + 'The version to add or delete.', + null, + ) + ->addOption( + 'add', + null, + InputOption::VALUE_NONE, + 'Add the specified version.', + ) + ->addOption( + 'delete', + null, + InputOption::VALUE_NONE, + 'Delete the specified version.', + ) + ->addOption( + 'all', + null, + InputOption::VALUE_NONE, + 'Apply to all the versions.', + ) + ->addOption( + 'range-from', + null, + InputOption::VALUE_REQUIRED, + 'Apply from specified version.', + ) + ->addOption( + 'range-to', + null, + InputOption::VALUE_REQUIRED, + 'Apply to specified version.', + ) + ->setHelp(<<<'EOT' +The %command.name% command allows you to manually add, delete or synchronize migration versions from the version table: + + %command.full_name% MIGRATION-FQCN --add + +If you want to delete a version you can use the --delete option: + + %command.full_name% MIGRATION-FQCN --delete + +If you want to synchronize by adding or deleting all migration versions available in the version table you can use the --all option: + + %command.full_name% --add --all + %command.full_name% --delete --all + +If you want to synchronize by adding or deleting some range of migration versions available in the version table you can use the --range-from/--range-to option: + + %command.full_name% --add --range-from=MIGRATION-FQCN --range-to=MIGRATION-FQCN + %command.full_name% --delete --range-from=MIGRATION-FQCN --range-to=MIGRATION-FQCN + +You can also execute this command without a warning message which you need to interact with: + + %command.full_name% --no-interaction +EOT); + + parent::configure(); + } + + /** @throws InvalidOptionUsage */ + protected function execute(InputInterface $input, OutputInterface $output): int + { + if ($input->getOption('add') === false && $input->getOption('delete') === false) { + throw InvalidOptionUsage::new('You must specify whether you want to --add or --delete the specified version.'); + } + + $this->markMigrated = $input->getOption('add'); + + if ($input->isInteractive()) { + $question = 'WARNING! You are about to add, delete or synchronize migration versions from the version table that could result in data lost. Are you sure you wish to continue?'; + + $confirmation = $this->io->confirm($question); + + if ($confirmation) { + $this->markVersions($input); + } else { + $this->io->error('Migration cancelled!'); + } + } else { + $this->markVersions($input); + } + + return 0; + } + + /** @throws InvalidOptionUsage */ + private function markVersions(InputInterface $input): void + { + $affectedVersion = $input->getArgument('version'); + $allOption = $input->getOption('all'); + $rangeFromOption = $input->getOption('range-from'); + $rangeToOption = $input->getOption('range-to'); + + if ($allOption === true && ($rangeFromOption !== null || $rangeToOption !== null)) { + throw InvalidOptionUsage::new( + 'Options --all and --range-to/--range-from both used. You should use only one of them.', + ); + } + + if ($rangeFromOption !== null xor $rangeToOption !== null) { + throw InvalidOptionUsage::new( + 'Options --range-to and --range-from should be used together.', + ); + } + + $executedMigrations = $this->getDependencyFactory()->getMetadataStorage()->getExecutedMigrations(); + $availableVersions = $this->getDependencyFactory()->getMigrationPlanCalculator()->getMigrations(); + if ($allOption === true) { + if ($input->getOption('delete') === true) { + foreach ($executedMigrations->getItems() as $availableMigration) { + $this->mark($input, $availableMigration->getVersion(), false, $executedMigrations); + } + } + + foreach ($availableVersions->getItems() as $availableMigration) { + $this->mark($input, $availableMigration->getVersion(), true, $executedMigrations); + } + } elseif ($affectedVersion !== null) { + $this->mark($input, new Version($affectedVersion), false, $executedMigrations); + } elseif ($rangeFromOption !== null && $rangeToOption !== null) { + $migrate = false; + foreach ($availableVersions->getItems() as $availableMigration) { + if ((string) $availableMigration->getVersion() === $rangeFromOption) { + $migrate = true; + } + + if ($migrate) { + $this->mark($input, $availableMigration->getVersion(), true, $executedMigrations); + } + + if ((string) $availableMigration->getVersion() === $rangeToOption) { + break; + } + } + } else { + throw InvalidOptionUsage::new('You must specify the version or use the --all argument.'); + } + } + + /** + * @throws VersionAlreadyExists + * @throws VersionDoesNotExist + * @throws UnknownMigrationVersion + */ + private function mark(InputInterface $input, Version $version, bool $all, ExecutedMigrationsList $executedMigrations): void + { + try { + $availableMigration = $this->getDependencyFactory()->getMigrationRepository()->getMigration($version); + } catch (MigrationClassNotFound) { + $availableMigration = null; + } + + $storage = $this->getDependencyFactory()->getMetadataStorage(); + if ($availableMigration === null) { + if ($input->getOption('delete') === false) { + throw UnknownMigrationVersion::new((string) $version); + } + + $question = + 'WARNING! You are about to delete a migration version from the version table that has no corresponding migration file.' . + 'Do you want to delete this migration from the migrations table?'; + + $confirmation = $this->io->confirm($question); + + if ($confirmation) { + $migrationResult = new ExecutionResult($version, Direction::DOWN); + $storage->complete($migrationResult); + $this->io->text(sprintf( + "%s deleted from the version table.\n", + (string) $version, + )); + + return; + } + } + + $marked = false; + + if ($this->markMigrated && $executedMigrations->hasMigration($version)) { + if (! $all) { + throw VersionAlreadyExists::new($version); + } + + $marked = true; + } + + if (! $this->markMigrated && ! $executedMigrations->hasMigration($version)) { + if (! $all) { + throw VersionDoesNotExist::new($version); + } + + $marked = true; + } + + if ($marked === true) { + return; + } + + if ($this->markMigrated) { + $migrationResult = new ExecutionResult($version, Direction::UP); + $storage->complete($migrationResult); + + $this->io->text(sprintf( + "%s added to the version table.\n", + (string) $version, + )); + } else { + $migrationResult = new ExecutionResult($version, Direction::DOWN); + $storage->complete($migrationResult); + + $this->io->text(sprintf( + "%s deleted from the version table.\n", + (string) $version, + )); + } + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/ConsoleInputMigratorConfigurationFactory.php b/backend/vendor/doctrine/migrations/src/Tools/Console/ConsoleInputMigratorConfigurationFactory.php new file mode 100644 index 0000000..a9be446 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/ConsoleInputMigratorConfigurationFactory.php @@ -0,0 +1,85 @@ +hasOption('query-time') ? (bool) $input->getOption('query-time') : false; + $dryRun = $input->hasOption('dry-run') ? (bool) $input->getOption('dry-run') : false; + $allOrNothing = $this->determineAllOrNothingValueFrom($input) ?? $this->configuration->isAllOrNothing(); + + return (new MigratorConfiguration()) + ->setDryRun($dryRun) + ->setTimeAllQueries($timeAllQueries) + ->setAllOrNothing($allOrNothing); + } + + private function determineAllOrNothingValueFrom(InputInterface $input): bool|null + { + $enableAllOrNothingOption = self::ABSENT_CONFIG_VALUE; + $disableAllOrNothingOption = null; + + if ($input->hasOption('no-all-or-nothing')) { + $disableAllOrNothingOption = $input->getOption('no-all-or-nothing'); + } + + $wasOptionExplicitlyPassed = $input->hasOption('all-or-nothing'); + + if ($wasOptionExplicitlyPassed) { + /** + * Due to this option being able to receive optional values, its behavior is tricky: + * - when `--all-or-nothing` option is not provided, the default is set to self::ABSENT_CONFIG_VALUE + * - when `--all-or-nothing` option is provided without values, this will be `null` + * - when `--all-or-nothing` option is provided with a value, we get the provided value + */ + $enableAllOrNothingOption = $input->getOption('all-or-nothing'); + } + + $enableAllOrNothingDeprecation = match ($enableAllOrNothingOption) { + self::ABSENT_CONFIG_VALUE, null => false, + default => true, + }; + + if ($enableAllOrNothingOption !== self::ABSENT_CONFIG_VALUE && $disableAllOrNothingOption === true) { + throw InvalidAllOrNothingConfiguration::new(); + } + + if ($disableAllOrNothingOption === true) { + return false; + } + + if ($enableAllOrNothingDeprecation) { + Deprecation::trigger( + 'doctrine/migrations', + 'https://github.com/doctrine/migrations/issues/1304', + <<<'DEPRECATION' + Context: Passing values to option `--all-or-nothing` + Problem: Passing values is deprecated + Solution: If you need to disable the behavior, use --no-all-or-nothing, + otherwise, pass the option without a value + DEPRECATION, + ); + } + + return match ($enableAllOrNothingOption) { + self::ABSENT_CONFIG_VALUE => null, + null => true, + default => (bool) $enableAllOrNothingOption, + }; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/ConsoleRunner.php b/backend/vendor/doctrine/migrations/src/Tools/Console/ConsoleRunner.php new file mode 100644 index 0000000..5225647 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/ConsoleRunner.php @@ -0,0 +1,161 @@ +run(); + } + + /** @param DoctrineCommand[] $commands */ + public static function createApplication(array $commands = [], DependencyFactory|null $dependencyFactory = null): Application + { + $version = InstalledVersions::getVersion('doctrine/migrations'); + assert($version !== null); + $cli = new Application('Doctrine Migrations', $version); + $cli->setCatchExceptions(true); + self::addCommands($cli, $dependencyFactory); + $cli->addCommands($commands); + + return $cli; + } + + public static function addCommands(Application $cli, DependencyFactory|null $dependencyFactory = null): void + { + $cli->addCommands([ + new CurrentCommand($dependencyFactory), + new DumpSchemaCommand($dependencyFactory), + new ExecuteCommand($dependencyFactory), + new GenerateCommand($dependencyFactory), + new LatestCommand($dependencyFactory), + new MigrateCommand($dependencyFactory), + new RollupCommand($dependencyFactory), + new StatusCommand($dependencyFactory), + new VersionCommand($dependencyFactory), + new UpToDateCommand($dependencyFactory), + new SyncMetadataCommand($dependencyFactory), + new ListCommand($dependencyFactory), + ]); + + if ($dependencyFactory === null || ! $dependencyFactory->hasSchemaProvider()) { + return; + } + + /** @phpstan-ignore function.alreadyNarrowedType */ + if (method_exists(Application::class, 'addCommand')) { + $cli->addCommand(new DiffCommand($dependencyFactory)); + } else { + /** @phpstan-ignore method.notFound */ + $cli->add(new DiffCommand($dependencyFactory)); + } + } + + private static function checkLegacyConfiguration(mixed $dependencyFactory, string $configurationFile): mixed + { + if (! ($dependencyFactory instanceof HelperSet)) { + return $dependencyFactory; + } + + $configurations = new ConfigurationFileWithFallback(); + if ($dependencyFactory->has('em') && $dependencyFactory->get('em') instanceof EntityManagerHelper) { + return DependencyFactory::fromEntityManager( + $configurations, + new ExistingEntityManager($dependencyFactory->get('em')->getEntityManager()), + ); + } + + throw new RuntimeException(sprintf( + 'Configuration HelperSet returned by "%s" does not have a valid "em" or the "db" helper.', + $configurationFile, + )); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Exception/ConsoleException.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Exception/ConsoleException.php new file mode 100644 index 0000000..9ee7a93 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Exception/ConsoleException.php @@ -0,0 +1,11 @@ +areMigrationsOrganizedByYear()) { + $dir .= $this->appendDir(date('Y')); + } + + if ($configuration->areMigrationsOrganizedByYearAndMonth()) { + $dir .= $this->appendDir(date('m')); + } + + $this->createDirIfNotExists($dir); + + return $dir; + } + + private function appendDir(string $dir): string + { + return DIRECTORY_SEPARATOR . $dir; + } + + private function createDirIfNotExists(string $dir): void + { + if (file_exists($dir)) { + return; + } + + mkdir($dir, 0755, true); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/Helper/MigrationStatusInfosHelper.php b/backend/vendor/doctrine/migrations/src/Tools/Console/Helper/MigrationStatusInfosHelper.php new file mode 100644 index 0000000..d07224d --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/Helper/MigrationStatusInfosHelper.php @@ -0,0 +1,205 @@ +setHeaders( + [ + [new TableCell('Migration Versions', ['colspan' => 4])], + ['Migration', 'Status', 'Migrated At', 'Execution Time', 'Description'], + ], + ); + $executedMigrations = $this->metadataStorage->getExecutedMigrations(); + $availableMigrations = $this->migrationPlanCalculator->getMigrations(); + + foreach ($versions as $version) { + $description = null; + $executedAt = null; + $executionTime = null; + + if ($executedMigrations->hasMigration($version)) { + $executedMigration = $executedMigrations->getMigration($version); + $executionTime = $executedMigration->getExecutionTime(); + $executedAt = $executedMigration->getExecutedAt() instanceof DateTimeInterface + ? $executedMigration->getExecutedAt()->format('Y-m-d H:i:s') + : null; + } + + if ($availableMigrations->hasMigration($version)) { + $description = $availableMigrations->getMigration($version)->getMigration()->getDescription(); + } + + if ($executedMigrations->hasMigration($version) && $availableMigrations->hasMigration($version)) { + $status = 'migrated'; + } elseif ($executedMigrations->hasMigration($version)) { + $status = 'migrated, not available'; + } else { + $status = 'not migrated'; + } + + $table->addRow([ + (string) $version, + $status, + (string) $executedAt, + $executionTime !== null ? $executionTime . 's' : '', + $description, + ]); + } + + $table->render(); + } + + public function showMigrationsInfo(OutputInterface $output): void + { + $executedMigrations = $this->metadataStorage->getExecutedMigrations(); + $availableMigrations = $this->migrationPlanCalculator->getMigrations(); + + $newMigrations = $this->statusCalculator->getNewMigrations(); + $executedUnavailableMigrations = $this->statusCalculator->getExecutedUnavailableMigrations(); + + $storage = $this->configuration->getMetadataStorageConfiguration(); + + $table = new Table($output); + $table->setHeaders( + [ + [new TableCell('Configuration', ['colspan' => 3])], + ], + ); + + $dataGroup = [ + 'Storage' => [ + 'Type' => $storage !== null ? $storage::class : null, + ], + 'Database' => [ + 'Driver' => get_class($this->connection->getDriver()), + 'Name' => $this->connection->getDatabase(), + ], + 'Versions' => [ + 'Previous' => $this->getFormattedVersionAlias('prev', $executedMigrations), + 'Current' => $this->getFormattedVersionAlias('current', $executedMigrations), + 'Next' => $this->getFormattedVersionAlias('next', $executedMigrations), + 'Latest' => $this->getFormattedVersionAlias('latest', $executedMigrations), + ], + + 'Migrations' => [ + 'Executed' => count($executedMigrations), + 'Executed Unavailable' => count($executedUnavailableMigrations) > 0 ? ('' . count($executedUnavailableMigrations) . '') : '0', + 'Available' => count($availableMigrations), + 'New' => count($newMigrations) > 0 ? ('' . count($newMigrations) . '') : '0', + ], + 'Migration Namespaces' => $this->configuration->getMigrationDirectories(), + + ]; + if ($storage instanceof TableMetadataStorageConfiguration) { + $dataGroup['Storage'] += [ + 'Table Name' => $storage->getTableName(), + 'Column Name' => $storage->getVersionColumnName(), + ]; + } + + $first = true; + foreach ($dataGroup as $group => $dataValues) { + $nsRows = []; + foreach ($dataValues as $k => $v) { + $nsRows[] = [ + $k, + $v, + ]; + } + + if (count($nsRows) <= 0) { + continue; + } + + if (! $first) { + $table->addRow([new TableSeparator(['colspan' => 3])]); + } + + $first = false; + array_unshift( + $nsRows[0], + new TableCell('' . $group . '', ['rowspan' => count($dataValues)]), + ); + $table->addRows($nsRows); + } + + $table->render(); + } + + private function getFormattedVersionAlias(string $alias, ExecutedMigrationsList $executedMigrations): string + { + try { + $version = $this->aliasResolver->resolveVersionAlias($alias); + } catch (Throwable) { + $version = null; + } + + // No version found + if ($version === null) { + if ($alias === 'next') { + return 'Already at latest version'; + } + + if ($alias === 'prev') { + return 'Already at first version'; + } + } + + // Before first version "virtual" version number + if ((string) $version === '0') { + return '0'; + } + + // Show normal version number + return sprintf( + '%s ', + (string) $version, + ); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Tools/Console/InvalidAllOrNothingConfiguration.php b/backend/vendor/doctrine/migrations/src/Tools/Console/InvalidAllOrNothingConfiguration.php new file mode 100644 index 0000000..742b6e4 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Tools/Console/InvalidAllOrNothingConfiguration.php @@ -0,0 +1,16 @@ +commit(); + } + + public static function rollbackIfInTransaction(Connection $connection): void + { + if (! self::inTransaction($connection)) { + Deprecation::trigger( + 'doctrine/migrations', + 'https://github.com/doctrine/migrations/issues/1169', + <<<'DEPRECATION' +Context: trying to rollback a transaction +Problem: the transaction is already rolled back, relying on silencing is deprecated. +Solution: override `AbstractMigration::isTransactional()` so that it returns false. +Automate that by setting `transactional` to false in the configuration. +More details at https://www.doctrine-project.org/projects/doctrine-migrations/en/stable/explanation/implicit-commits.html +DEPRECATION, + ); + + return; + } + + $connection->rollBack(); + } + + private static function inTransaction(Connection $connection): bool + { + $innermostConnection = self::getInnerConnection($connection); + + /* Attempt to commit or rollback while no transaction is running + results in an exception since PHP 8 + pdo_mysql combination */ + return ! $innermostConnection instanceof PDO || $innermostConnection->inTransaction(); + } + + /** @return object|resource|null */ + private static function getInnerConnection(Connection $connection) + { + try { + return $connection->getNativeConnection(); + } catch (LogicException) { + } + + $innermostConnection = $connection; + while (method_exists($innermostConnection, 'getWrappedConnection')) { + $innermostConnection = $innermostConnection->getWrappedConnection(); + } + + return $innermostConnection; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Version/AliasResolver.php b/backend/vendor/doctrine/migrations/src/Version/AliasResolver.php new file mode 100644 index 0000000..7905803 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Version/AliasResolver.php @@ -0,0 +1,28 @@ +metadataStorage->getExecutedMigrations(); + $availableMigration = $this->migrationPlanCalculator->getMigrations(); + + return $executedMigrations->unavailableSubset($availableMigration); + } + + public function getNewMigrations(): AvailableMigrationsList + { + $executedMigrations = $this->metadataStorage->getExecutedMigrations(); + $availableMigration = $this->migrationPlanCalculator->getMigrations(); + + return $availableMigration->newSubset($executedMigrations); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Version/DbalExecutor.php b/backend/vendor/doctrine/migrations/src/Version/DbalExecutor.php new file mode 100644 index 0000000..57712e4 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Version/DbalExecutor.php @@ -0,0 +1,324 @@ +sql; + } + + public function addSql(Query $sqlQuery): void + { + $this->sql[] = $sqlQuery; + } + + public function execute( + MigrationPlan $plan, + MigratorConfiguration $configuration, + ): ExecutionResult { + $result = new ExecutionResult($plan->getVersion(), $plan->getDirection(), new DateTimeImmutable()); + + $this->startMigration($plan, $configuration); + + try { + $this->executeMigration( + $plan, + $result, + $configuration, + ); + + $result->setSql($this->sql); + } catch (SkipMigration $e) { + $result->setSkipped(true); + + $this->migrationEnd($e, $plan, $result, $configuration); + } catch (Throwable $e) { + $result->setError(true, $e); + + $this->migrationEnd($e, $plan, $result, $configuration); + + throw $e; + } + + return $result; + } + + private function startMigration( + MigrationPlan $plan, + MigratorConfiguration $configuration, + ): void { + $this->sql = []; + + $this->dispatcher->dispatchVersionEvent( + Events::onMigrationsVersionExecuting, + $plan, + $configuration, + ); + + if (! $plan->getMigration()->isTransactional()) { + return; + } + + // only start transaction if in transactional mode + $this->connection->beginTransaction(); + } + + private function executeMigration( + MigrationPlan $plan, + ExecutionResult $result, + MigratorConfiguration $configuration, + ): ExecutionResult { + $stopwatchEvent = $this->stopwatch->start('execute'); + + $migration = $plan->getMigration(); + $direction = $plan->getDirection(); + + $result->setState(State::PRE); + + $fromSchema = $this->getFromSchema($configuration); + + $migration->{'pre' . ucfirst($direction)}($fromSchema); + + $this->logger->info(...$this->getMigrationHeader($plan, $migration, $direction)); + + $result->setState(State::EXEC); + + $toSchema = $this->schemaProvider->createToSchema($fromSchema); + + $result->setToSchema($toSchema); + + $migration->$direction($toSchema); + + foreach ($migration->getSql() as $sqlQuery) { + $this->addSql($sqlQuery); + } + + foreach ($this->schemaProvider->getSqlDiffToMigrate($fromSchema, $toSchema) as $sql) { + $this->addSql(new Query($sql)); + } + + $migration->freeze(); + + if (count($this->sql) !== 0) { + if (! $configuration->isDryRun()) { + $this->executeResult($configuration); + } else { + foreach ($this->sql as $query) { + $this->outputSqlQuery($query, $configuration); + } + } + } else { + $this->logger->warning('Migration {version} was executed but did not result in any SQL statements.', [ + 'version' => (string) $plan->getVersion(), + ]); + } + + $result->setState(State::POST); + + $migration->{'post' . ucfirst($direction)}($toSchema); + + $stopwatchEvent->stop(); + $periods = $stopwatchEvent->getPeriods(); + $lastPeriod = $periods[count($periods) - 1]; + + $result->setTime((float) $lastPeriod->getDuration() / 1000); + $result->setMemory($lastPeriod->getMemory()); + + $params = [ + 'version' => (string) $plan->getVersion(), + 'time' => $lastPeriod->getDuration(), + 'memory' => BytesFormatter::formatBytes($lastPeriod->getMemory()), + 'direction' => $direction === Direction::UP ? 'migrated' : 'reverted', + ]; + + $this->logger->info('Migration {version} {direction} (took {time}ms, used {memory} memory)', $params); + + if (! $configuration->isDryRun()) { + $this->metadataStorage->complete($result); + } elseif (method_exists($this->metadataStorage, 'getSql')) { + foreach ($this->metadataStorage->getSql($result) as $sqlQuery) { + $this->addSql($sqlQuery); + } + } + + if ($migration->isTransactional()) { + TransactionHelper::commitIfInTransaction($this->connection); + } + + $plan->markAsExecuted($result); + $result->setState(State::NONE); + + $this->dispatcher->dispatchVersionEvent( + Events::onMigrationsVersionExecuted, + $plan, + $configuration, + ); + + return $result; + } + + /** @return mixed[] */ + private function getMigrationHeader(MigrationPlan $planItem, AbstractMigration $migration, string $direction): array + { + $versionInfo = (string) $planItem->getVersion(); + $description = $migration->getDescription(); + + if ($description !== '') { + $versionInfo .= ' (' . $description . ')'; + } + + $params = ['version_name' => $versionInfo]; + + if ($direction === Direction::UP) { + return ['++ migrating {version_name}', $params]; + } + + return ['++ reverting {version_name}', $params]; + } + + private function migrationEnd(Throwable $e, MigrationPlan $plan, ExecutionResult $result, MigratorConfiguration $configuration): void + { + $migration = $plan->getMigration(); + if ($migration->isTransactional()) { + //only rollback transaction if in transactional mode + TransactionHelper::rollbackIfInTransaction($this->connection); + } + + $plan->markAsExecuted($result); + $this->logResult($e, $result, $plan); + + $this->dispatcher->dispatchVersionEvent( + Events::onMigrationsVersionSkipped, + $plan, + $configuration, + ); + } + + private function logResult(Throwable $e, ExecutionResult $result, MigrationPlan $plan): void + { + if ($result->isSkipped()) { + $this->logger->notice( + 'Migration {version} skipped during {state}. Reason: "{reason}"', + [ + 'version' => (string) $plan->getVersion(), + 'reason' => $e->getMessage(), + 'state' => $this->getExecutionStateAsString($result->getState()), + ], + ); + } elseif ($result->hasError()) { + $this->logger->error( + 'Migration {version} failed during {state}. Error: "{error}"', + [ + 'version' => (string) $plan->getVersion(), + 'error' => $e->getMessage(), + 'state' => $this->getExecutionStateAsString($result->getState()), + ], + ); + } + } + + private function executeResult(MigratorConfiguration $configuration): void + { + foreach ($this->sql as $key => $query) { + $this->outputSqlQuery($query, $configuration); + + $stopwatchEvent = $this->stopwatch->start('query'); + // executeQuery() must be used here because $query might return a result set, for instance REPAIR does + $this->connection->executeQuery($query->getStatement(), $query->getParameters(), $query->getTypes()); + $stopwatchEvent->stop(); + + if (! $configuration->getTimeAllQueries()) { + continue; + } + + $this->logger->notice('Query took {duration}ms', [ + 'duration' => $stopwatchEvent->getDuration(), + ]); + } + } + + private function outputSqlQuery(Query $query, MigratorConfiguration $configuration): void + { + $params = $this->parameterFormatter->formatParameters( + $query->getParameters(), + $query->getTypes(), + ); + + $this->logger->log( + $configuration->getTimeAllQueries() ? LogLevel::NOTICE : LogLevel::DEBUG, + '{query} {params}', + [ + 'query' => $query->getStatement(), + 'params' => $params, + ], + ); + } + + private function getFromSchema(MigratorConfiguration $configuration): Schema + { + // if we're in a dry run, use the from Schema instead of reading the schema from the database + if ($configuration->isDryRun() && $configuration->getFromSchema() !== null) { + return $configuration->getFromSchema(); + } + + return $this->schemaProvider->createFromSchema(); + } + + private function getExecutionStateAsString(int $state): string + { + return match ($state) { + State::PRE => 'Pre-Checks', + State::POST => 'Post-Checks', + State::EXEC => 'Execution', + default => 'No State', + }; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Version/DbalMigrationFactory.php b/backend/vendor/doctrine/migrations/src/Version/DbalMigrationFactory.php new file mode 100644 index 0000000..b1d1851 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Version/DbalMigrationFactory.php @@ -0,0 +1,31 @@ +connection, + $this->logger, + ); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Version/DefaultAliasResolver.php b/backend/vendor/doctrine/migrations/src/Version/DefaultAliasResolver.php new file mode 100644 index 0000000..427227e --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Version/DefaultAliasResolver.php @@ -0,0 +1,115 @@ +migrationPlanCalculator->getMigrations(); + $executedMigrations = $this->metadataStorage->getExecutedMigrations(); + + switch ($alias) { + case self::ALIAS_FIRST: + case '0': + return new Version('0'); + + case self::ALIAS_CURRENT: + try { + return $executedMigrations->getLast()->getVersion(); + } catch (NoMigrationsFoundWithCriteria) { + return new Version('0'); + } + + // no break because of return + case self::ALIAS_PREV: + try { + return $executedMigrations->getLast(-1)->getVersion(); + } catch (NoMigrationsFoundWithCriteria) { + return new Version('0'); + } + + // no break because of return + case self::ALIAS_NEXT: + $newMigrations = $this->migrationStatusCalculator->getNewMigrations(); + + try { + return $newMigrations->getFirst()->getVersion(); + } catch (NoMigrationsFoundWithCriteria $e) { + throw NoMigrationsToExecute::new($e); + } + + // no break because of return + case self::ALIAS_LATEST: + try { + return $availableMigrations->getLast()->getVersion(); + } catch (NoMigrationsFoundWithCriteria) { + return $this->resolveVersionAlias(self::ALIAS_CURRENT); + } + + // no break because of return + default: + if ($availableMigrations->hasMigration(new Version($alias))) { + return $availableMigrations->getMigration(new Version($alias))->getVersion(); + } + + if (substr($alias, 0, 7) === self::ALIAS_CURRENT) { + $val = (int) substr($alias, 7); + $targetMigration = null; + if ($val > 0) { + $newMigrations = $this->migrationStatusCalculator->getNewMigrations(); + + return $newMigrations->getFirst($val - 1)->getVersion(); + } + + return $executedMigrations->getLast($val)->getVersion(); + } + } + + throw UnknownMigrationVersion::new($alias); + } +} diff --git a/backend/vendor/doctrine/migrations/src/Version/Direction.php b/backend/vendor/doctrine/migrations/src/Version/Direction.php new file mode 100644 index 0000000..6fd2dbd --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Version/Direction.php @@ -0,0 +1,23 @@ +direction; + } + + public function getExecutedAt(): DateTimeImmutable|null + { + return $this->executedAt; + } + + public function setExecutedAt(DateTimeImmutable $executedAt): void + { + $this->executedAt = $executedAt; + } + + public function getVersion(): Version + { + return $this->version; + } + + public function hasSql(): bool + { + return count($this->sql) !== 0; + } + + /** @return Query[] */ + public function getSql(): array + { + return $this->sql; + } + + /** @param Query[] $sql */ + public function setSql(array $sql): void + { + $this->sql = $sql; + } + + public function getTime(): float|null + { + return $this->time; + } + + public function setTime(float $time): void + { + $this->time = $time; + } + + public function getMemory(): float|null + { + return $this->memory; + } + + public function setMemory(float $memory): void + { + $this->memory = $memory; + } + + public function setSkipped(bool $skipped): void + { + $this->skipped = $skipped; + } + + public function isSkipped(): bool + { + return $this->skipped; + } + + public function setError(bool $error, Throwable|null $exception = null): void + { + $this->error = $error; + $this->exception = $exception; + } + + public function hasError(): bool + { + return $this->error; + } + + public function getException(): Throwable|null + { + return $this->exception; + } + + public function setToSchema(Schema $toSchema): void + { + $this->toSchema = $toSchema; + } + + public function getToSchema(): Schema + { + if ($this->toSchema === null) { + throw new RuntimeException('Cannot call getToSchema() when toSchema is null.'); + } + + return $this->toSchema; + } + + public function getState(): int + { + return $this->state; + } + + public function setState(int $state): void + { + $this->state = $state; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Version/Executor.php b/backend/vendor/doctrine/migrations/src/Version/Executor.php new file mode 100644 index 0000000..646eef1 --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Version/Executor.php @@ -0,0 +1,21 @@ +arrangeMigrationsForDirection($direction, $this->getMigrations()); + $availableMigrations = array_filter( + $migrationsToCheck, + // in_array third parameter is intentionally false to force object to string casting + static fn (AvailableMigration $availableMigration): bool => in_array($availableMigration->getVersion(), $versions, false), + ); + + $planItems = array_map(static fn (AvailableMigration $availableMigration): MigrationPlan => new MigrationPlan($availableMigration->getVersion(), $availableMigration->getMigration(), $direction), $availableMigrations); + + if (count($planItems) !== count($versions)) { + $plannedVersions = array_map(static fn (MigrationPlan $migrationPlan): Version => $migrationPlan->getVersion(), $planItems); + $diff = array_diff($versions, $plannedVersions); + + throw MigrationClassNotFound::new((string) reset($diff)); + } + + return new MigrationPlanList($planItems, $direction); + } + + public function getPlanUntilVersion(Version $to): MigrationPlanList + { + if ((string) $to !== '0' && ! $this->migrationRepository->hasMigration((string) $to)) { + throw MigrationClassNotFound::new((string) $to); + } + + $availableMigrations = $this->getMigrations(); // migrations are sorted at this point + $executedMigrations = $this->metadataStorage->getExecutedMigrations(); + + $direction = $this->findDirection($to, $executedMigrations, $availableMigrations); + + $migrationsToCheck = $this->arrangeMigrationsForDirection($direction, $availableMigrations); + + $toExecute = $this->findMigrationsToExecute($to, $migrationsToCheck, $direction, $executedMigrations); + + return new MigrationPlanList(array_map(static fn (AvailableMigration $migration): MigrationPlan => new MigrationPlan($migration->getVersion(), $migration->getMigration(), $direction), $toExecute), $direction); + } + + public function getMigrations(): AvailableMigrationsList + { + $availableMigrations = $this->migrationRepository->getMigrations()->getItems(); + uasort($availableMigrations, fn (AvailableMigration $a, AvailableMigration $b): int => $this->sorter->compare($a->getVersion(), $b->getVersion())); + + return new AvailableMigrationsList($availableMigrations); + } + + private function findDirection(Version $to, ExecutedMigrationsList $executedMigrations, AvailableMigrationsList $availableMigrations): string + { + if ((string) $to === '0') { + return Direction::DOWN; + } + + foreach ($availableMigrations->getItems() as $availableMigration) { + if ($availableMigration->getVersion()->equals($to)) { + break; + } + + if (! $executedMigrations->hasMigration($availableMigration->getVersion())) { + return Direction::UP; + } + } + + if ($executedMigrations->hasMigration($to) && ! $executedMigrations->getLast()->getVersion()->equals($to)) { + return Direction::DOWN; + } + + return Direction::UP; + } + + /** @return AvailableMigration[] */ + private function arrangeMigrationsForDirection(string $direction, Metadata\AvailableMigrationsList $availableMigrations): array + { + return $direction === Direction::UP ? $availableMigrations->getItems() : array_reverse($availableMigrations->getItems()); + } + + /** + * @param AvailableMigration[] $migrationsToCheck + * + * @return AvailableMigration[] + */ + private function findMigrationsToExecute(Version $to, array $migrationsToCheck, string $direction, ExecutedMigrationsList $executedMigrations): array + { + $toExecute = []; + foreach ($migrationsToCheck as $availableMigration) { + if ($direction === Direction::DOWN && $availableMigration->getVersion()->equals($to)) { + break; + } + + if ($direction === Direction::UP && ! $executedMigrations->hasMigration($availableMigration->getVersion())) { + $toExecute[] = $availableMigration; + } elseif ($direction === Direction::DOWN && $executedMigrations->hasMigration($availableMigration->getVersion())) { + $toExecute[] = $availableMigration; + } + + if ($direction === Direction::UP && $availableMigration->getVersion()->equals($to)) { + break; + } + } + + return $toExecute; + } +} diff --git a/backend/vendor/doctrine/migrations/src/Version/State.php b/backend/vendor/doctrine/migrations/src/Version/State.php new file mode 100644 index 0000000..4adfa0d --- /dev/null +++ b/backend/vendor/doctrine/migrations/src/Version/State.php @@ -0,0 +1,35 @@ +version; + } + + public function equals(mixed $object): bool + { + return $object instanceof self && $object->version === $this->version; + } +} diff --git a/backend/vendor/doctrine/orm/LICENSE b/backend/vendor/doctrine/orm/LICENSE new file mode 100644 index 0000000..f988839 --- /dev/null +++ b/backend/vendor/doctrine/orm/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/backend/vendor/doctrine/orm/README.md b/backend/vendor/doctrine/orm/README.md new file mode 100644 index 0000000..63e198e --- /dev/null +++ b/backend/vendor/doctrine/orm/README.md @@ -0,0 +1,43 @@ +| [4.0.x][4.0] | [3.7.x][3.7] | [3.6.x][3.6] | [2.21.x][2.21] | [2.20.x][2.20] | +|:------------------------------------------------------:|:------------------------------------------------------:|:------------------------------------------------------:|:--------------------------------------------------------:|:--------------------------------------------------------:| +| [![Build status][4.0 image]][4.0 workflow] | [![Build status][3.7 image]][3.7 workflow] | [![Build status][3.6 image]][3.6 workflow] | [![Build status][2.21 image]][2.21 workflow] | [![Build status][2.20 image]][2.20 workflow] | +| [![Coverage Status][4.0 coverage image]][4.0 coverage] | [![Coverage Status][3.7 coverage image]][3.7 coverage] | [![Coverage Status][3.6 coverage image]][3.6 coverage] | [![Coverage Status][2.21 coverage image]][2.21 coverage] | [![Coverage Status][2.20 coverage image]][2.20 coverage] | + +Doctrine ORM is an object-relational mapper for PHP 8.1+ that provides transparent persistence +for PHP objects. It sits on top of a powerful database abstraction layer (DBAL). One of its key features +is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), +inspired by Hibernate's HQL. This provides developers with a powerful alternative to SQL that maintains flexibility +without requiring unnecessary code duplication. + + +## More resources: + +* [Website](http://www.doctrine-project.org) +* [Documentation](https://www.doctrine-project.org/projects/doctrine-orm/en/stable/index.html) + + + [4.0 image]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml/badge.svg?branch=4.0.x + [4.0]: https://github.com/doctrine/orm/tree/4.0.x + [4.0 workflow]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml?query=branch%3A4.0.x + [4.0 coverage image]: https://codecov.io/gh/doctrine/orm/branch/4.0.x/graph/badge.svg + [4.0 coverage]: https://codecov.io/gh/doctrine/orm/branch/4.0.x + [3.7 image]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml/badge.svg?branch=3.7.x + [3.7]: https://github.com/doctrine/orm/tree/3.7.x + [3.7 workflow]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml?query=branch%3A3.7.x + [3.7 coverage image]: https://codecov.io/gh/doctrine/orm/branch/3.7.x/graph/badge.svg + [3.7 coverage]: https://codecov.io/gh/doctrine/orm/branch/3.7.x + [3.6 image]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml/badge.svg?branch=3.6.x + [3.6]: https://github.com/doctrine/orm/tree/3.6.x + [3.6 workflow]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml?query=branch%3A3.6.x + [3.6 coverage image]: https://codecov.io/gh/doctrine/orm/branch/3.6.x/graph/badge.svg + [3.6 coverage]: https://codecov.io/gh/doctrine/orm/branch/3.6.x + [2.21 image]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml/badge.svg?branch=2.21.x + [2.21]: https://github.com/doctrine/orm/tree/2.21.x + [2.21 workflow]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml?query=branch%3A2.21.x + [2.21 coverage image]: https://codecov.io/gh/doctrine/orm/branch/2.21.x/graph/badge.svg + [2.21 coverage]: https://codecov.io/gh/doctrine/orm/branch/2.21.x + [2.20 image]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml/badge.svg?branch=2.20.x + [2.20]: https://github.com/doctrine/orm/tree/2.20.x + [2.20 workflow]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml?query=branch%3A2.20.x + [2.20 coverage image]: https://codecov.io/gh/doctrine/orm/branch/2.20.x/graph/badge.svg + [2.20 coverage]: https://codecov.io/gh/doctrine/orm/branch/2.20.x diff --git a/backend/vendor/doctrine/orm/SECURITY.md b/backend/vendor/doctrine/orm/SECURITY.md new file mode 100644 index 0000000..b0e7293 --- /dev/null +++ b/backend/vendor/doctrine/orm/SECURITY.md @@ -0,0 +1,17 @@ +Security +======== + +The Doctrine library is operating very close to your database and as such needs +to handle and make assumptions about SQL injection vulnerabilities. + +It is vital that you understand how Doctrine approaches security, because +we cannot protect you from SQL injection. + +Please read the documentation chapter on Security in Doctrine DBAL and ORM to +understand the assumptions we make. + +- [DBAL Security Page](https://www.doctrine-project.org/projects/doctrine-dbal/en/stable/reference/security.html) +- [ORM Security Page](https://www.doctrine-project.org/projects/doctrine-orm/en/stable/reference/security.html) + +If you find a Security bug in Doctrine, please follow our +[Security reporting guidelines](https://www.doctrine-project.org/policies/security.html#reporting). diff --git a/backend/vendor/doctrine/orm/UPGRADE.md b/backend/vendor/doctrine/orm/UPGRADE.md new file mode 100644 index 0000000..411e5e6 --- /dev/null +++ b/backend/vendor/doctrine/orm/UPGRADE.md @@ -0,0 +1,2667 @@ +Note about upgrading: Doctrine uses static and runtime mechanisms to raise +awareness about deprecated code. + +- Use of `@deprecated` docblock that is detected by IDEs (like PHPStorm) or + Static Analysis tools (like Psalm, phpstan) +- Use of our low-overhead runtime deprecation API, details: + https://github.com/doctrine/deprecations/ + +# Upgrade to 3.x General Notes + +We recommend you upgrade to DBAL 3 first before upgrading to ORM 3. See +the DBAL upgrade docs: https://github.com/doctrine/dbal/blob/3.10.x/UPGRADE.md + +Rather than doing several major upgrades at once, we recommend you do the following: + +- upgrade to DBAL 3 +- deploy and monitor +- upgrade to ORM 3 +- deploy and monitor +- upgrade to DBAL 4 +- deploy and monitor + +If you are using Symfony, the recommended minimal Doctrine Bundle version is 2.15 +to run with ORM 3. + +At this point, we recommend upgrading to PHP 8.4 first and then directly from +ORM 2.19 to 3.5 and up so that you can skip the lazy ghost proxy generation +and directly start using native lazy objects. + +# Upgrade to 3.6 + +## Deprecate using string expression for default values in mappings + +Using a string expression for default values in field mappings is deprecated. +Use `Doctrine\DBAL\Schema\DefaultExpression` instances instead. + +Here is how to address this deprecation when mapping entities using PHP attributes: + +```diff + use DateTime; ++use Doctrine\DBAL\Schema\DefaultExpression\CurrentDate; ++use Doctrine\DBAL\Schema\DefaultExpression\CurrentTime; ++use Doctrine\DBAL\Schema\DefaultExpression\CurrentTimestamp; + use Doctrine\ORM\Mapping as ORM; + + #[ORM\Entity] + final class TimeEntity + { + #[ORM\Id] + #[ORM\Column] + public int $id; + +- #[ORM\Column(options: ['default' => 'CURRENT_TIMESTAMP'], insertable: false, updatable: false)] ++ #[ORM\Column(options: ['default' => new CurrentTimestamp()], insertable: false, updatable: false)] + public DateTime $createdAt; + +- #[ORM\Column(options: ['default' => 'CURRENT_TIME'], insertable: false, updatable: false)] ++ #[ORM\Column(options: ['default' => new CurrentTime()], insertable: false, updatable: false)] + public DateTime $createdTime; + +- #[ORM\Column(options: ['default' => 'CURRENT_DATE'], insertable: false, updatable: false)] ++ #[ORM\Column(options: ['default' => new CurrentDate()], insertable: false, updatable: false)] + public DateTime $createdDate; + } +``` + +Here is how to do the same when mapping entities using XML: + +```diff + + + + + + + + + + + +- ++