mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°8771 - Add Symfony form component to iTop core (#760)
- Add Symfony Form Component - Add Symfony CSRF security component - Add iTop default form template - Add Twig debug extension to Twig Environment - Add iTop abstract controller facility to get form builder - Add Twig filter to make trans an alias of dict_s filter
This commit is contained in:
@@ -24,11 +24,13 @@
|
||||
"soundasleep/html2text": "~2.1",
|
||||
"symfony/console": "~6.4.0",
|
||||
"symfony/dotenv": "~6.4.0",
|
||||
"symfony/form": "^6.4",
|
||||
"symfony/framework-bundle": "~6.4.0",
|
||||
"symfony/http-foundation": "~6.4.0",
|
||||
"symfony/http-kernel": "~6.4.0",
|
||||
"symfony/mailer": "^6.4",
|
||||
"symfony/runtime": "~6.4.0",
|
||||
"symfony/security-csrf": "^6.4",
|
||||
"symfony/twig-bundle": "~6.4.0",
|
||||
"symfony/var-dumper": "~6.4.0",
|
||||
"symfony/yaml": "~6.4.0",
|
||||
|
||||
671
composer.lock
generated
671
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "e297f28f87219c0cc7ffb4f4a7ee5449",
|
||||
"content-hash": "a7cd994da3f14c87f47faf5d985b86fa",
|
||||
"packages": [
|
||||
{
|
||||
"name": "apereo/phpcas",
|
||||
@@ -2748,6 +2748,107 @@
|
||||
],
|
||||
"time": "2025-07-15T12:02:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/form",
|
||||
"version": "v6.4.26",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/form.git",
|
||||
"reference": "b40cdbe70be9274ea807ef61da7d0f8d1c70dc51"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/form/zipball/b40cdbe70be9274ea807ef61da7d0f8d1c70dc51",
|
||||
"reference": "b40cdbe70be9274ea807ef61da7d0f8d1c70dc51",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/deprecation-contracts": "^2.5|^3",
|
||||
"symfony/event-dispatcher": "^5.4|^6.0|^7.0",
|
||||
"symfony/options-resolver": "^5.4|^6.0|^7.0",
|
||||
"symfony/polyfill-ctype": "~1.8",
|
||||
"symfony/polyfill-intl-icu": "^1.21",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/property-access": "^5.4|^6.0|^7.0",
|
||||
"symfony/service-contracts": "^2.5|^3"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/console": "<5.4",
|
||||
"symfony/dependency-injection": "<5.4",
|
||||
"symfony/doctrine-bridge": "<5.4.21|>=6,<6.2.7",
|
||||
"symfony/error-handler": "<5.4",
|
||||
"symfony/framework-bundle": "<5.4",
|
||||
"symfony/http-kernel": "<5.4",
|
||||
"symfony/translation": "<5.4.35|>=6.0,<6.3.12|>=6.4,<6.4.3|>=7.0,<7.0.3",
|
||||
"symfony/translation-contracts": "<2.5",
|
||||
"symfony/twig-bridge": "<6.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/collections": "^1.0|^2.0",
|
||||
"symfony/config": "^5.4|^6.0|^7.0",
|
||||
"symfony/console": "^5.4|^6.0|^7.0",
|
||||
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
|
||||
"symfony/expression-language": "^5.4|^6.0|^7.0",
|
||||
"symfony/html-sanitizer": "^6.1|^7.0",
|
||||
"symfony/http-foundation": "^5.4|^6.0|^7.0",
|
||||
"symfony/http-kernel": "^5.4|^6.0|^7.0",
|
||||
"symfony/intl": "^5.4|^6.0|^7.0",
|
||||
"symfony/security-core": "^6.2|^7.0",
|
||||
"symfony/security-csrf": "^5.4|^6.0|^7.0",
|
||||
"symfony/translation": "^5.4.35|~6.3.12|^6.4.3|^7.0.3",
|
||||
"symfony/uid": "^5.4|^6.0|^7.0",
|
||||
"symfony/validator": "^5.4|^6.0|^7.0",
|
||||
"symfony/var-dumper": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Form\\": ""
|
||||
},
|
||||
"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 to easily create, process and reuse HTML forms",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/form/tree/v6.4.26"
|
||||
},
|
||||
"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-20T07:40:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/framework-bundle",
|
||||
"version": "v6.4.25",
|
||||
@@ -3273,6 +3374,153 @@
|
||||
],
|
||||
"time": "2025-07-15T12:02:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/options-resolver",
|
||||
"version": "v6.4.25",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/options-resolver.git",
|
||||
"reference": "d28e7e2db8a73e9511df892d36445f61314bbebe"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/d28e7e2db8a73e9511df892d36445f61314bbebe",
|
||||
"reference": "d28e7e2db8a73e9511df892d36445f61314bbebe",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/deprecation-contracts": "^2.5|^3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\OptionsResolver\\": ""
|
||||
},
|
||||
"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 an improved replacement for the array_replace PHP function",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"config",
|
||||
"configuration",
|
||||
"options"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/options-resolver/tree/v6.4.25"
|
||||
},
|
||||
"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-04T17:06:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/password-hasher",
|
||||
"version": "v6.4.24",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/password-hasher.git",
|
||||
"reference": "dcab5ac87450aaed26483ba49c2ce86808da7557"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/password-hasher/zipball/dcab5ac87450aaed26483ba49c2ce86808da7557",
|
||||
"reference": "dcab5ac87450aaed26483ba49c2ce86808da7557",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/security-core": "<5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/console": "^5.4|^6.0|^7.0",
|
||||
"symfony/security-core": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\PasswordHasher\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Robin Chalas",
|
||||
"email": "robin.chalas@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Provides password hashing utilities",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"hashing",
|
||||
"password"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/password-hasher/tree/v6.4.24"
|
||||
},
|
||||
"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-10T08:14:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.33.0",
|
||||
@@ -3438,6 +3686,94 @@
|
||||
],
|
||||
"time": "2025-06-27T09:58:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-icu",
|
||||
"version": "v1.33.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-icu.git",
|
||||
"reference": "bfc8fa13dbaf21d69114b0efcd72ab700fb04d0c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/bfc8fa13dbaf21d69114b0efcd72ab700fb04d0c",
|
||||
"reference": "bfc8fa13dbaf21d69114b0efcd72ab700fb04d0c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance and support of other locales than \"en\""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"url": "https://github.com/symfony/polyfill",
|
||||
"name": "symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Intl\\Icu\\": ""
|
||||
},
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
],
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for intl's ICU-related data and classes",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"icu",
|
||||
"intl",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-icu/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-20T22:24:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.33.0",
|
||||
@@ -3775,6 +4111,177 @@
|
||||
],
|
||||
"time": "2025-07-08T02:45:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/property-access",
|
||||
"version": "v6.4.25",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/property-access.git",
|
||||
"reference": "fedc771326d4978a7d3167fa009a509b06a2e168"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/property-access/zipball/fedc771326d4978a7d3167fa009a509b06a2e168",
|
||||
"reference": "fedc771326d4978a7d3167fa009a509b06a2e168",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/deprecation-contracts": "^2.5|^3",
|
||||
"symfony/property-info": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/cache": "^5.4|^6.0|^7.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/v6.4.25"
|
||||
},
|
||||
"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-12T15:42:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/property-info",
|
||||
"version": "v6.4.24",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/property-info.git",
|
||||
"reference": "1056ae3621eeddd78d7c5ec074f1c1784324eec6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/property-info/zipball/1056ae3621eeddd78d7c5ec074f1c1784324eec6",
|
||||
"reference": "1056ae3621eeddd78d7c5ec074f1c1784324eec6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/string": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/annotations": "<1.12",
|
||||
"phpdocumentor/reflection-docblock": "<5.2",
|
||||
"phpdocumentor/type-resolver": "<1.5.1",
|
||||
"symfony/cache": "<5.4",
|
||||
"symfony/dependency-injection": "<5.4|>=6.0,<6.4",
|
||||
"symfony/serializer": "<5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/annotations": "^1.12|^2",
|
||||
"phpdocumentor/reflection-docblock": "^5.2",
|
||||
"phpstan/phpdoc-parser": "^1.0|^2.0",
|
||||
"symfony/cache": "^5.4|^6.0|^7.0",
|
||||
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
|
||||
"symfony/serializer": "^5.4|^6.4|^7.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/v6.4.24"
|
||||
},
|
||||
"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-14T16:38:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
"version": "v6.4.24",
|
||||
@@ -3945,6 +4452,168 @@
|
||||
],
|
||||
"time": "2025-07-10T08:14:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/security-core",
|
||||
"version": "v6.4.26",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/security-core.git",
|
||||
"reference": "8b7c95bf04d82fcd0c06a918b2d849bfb2ab9cc0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/security-core/zipball/8b7c95bf04d82fcd0c06a918b2d849bfb2ab9cc0",
|
||||
"reference": "8b7c95bf04d82fcd0c06a918b2d849bfb2ab9cc0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/deprecation-contracts": "^2.5|^3",
|
||||
"symfony/event-dispatcher-contracts": "^2.5|^3",
|
||||
"symfony/password-hasher": "^5.4|^6.0|^7.0",
|
||||
"symfony/service-contracts": "^2.5|^3"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/event-dispatcher": "<5.4",
|
||||
"symfony/http-foundation": "<5.4",
|
||||
"symfony/ldap": "<5.4",
|
||||
"symfony/security-guard": "<5.4",
|
||||
"symfony/translation": "<5.4.35|>=6.0,<6.3.12|>=6.4,<6.4.3|>=7.0,<7.0.3",
|
||||
"symfony/validator": "<5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/cache": "^1.0|^2.0|^3.0",
|
||||
"psr/container": "^1.1|^2.0",
|
||||
"psr/log": "^1|^2|^3",
|
||||
"symfony/cache": "^5.4|^6.0|^7.0",
|
||||
"symfony/event-dispatcher": "^5.4|^6.0|^7.0",
|
||||
"symfony/expression-language": "^5.4|^6.0|^7.0",
|
||||
"symfony/http-foundation": "^5.4|^6.0|^7.0",
|
||||
"symfony/ldap": "^5.4|^6.0|^7.0",
|
||||
"symfony/string": "^5.4|^6.0|^7.0",
|
||||
"symfony/translation": "^5.4.35|~6.3.12|^6.4.3|^7.0.3",
|
||||
"symfony/validator": "^6.4|^7.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Security\\Core\\": ""
|
||||
},
|
||||
"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": "Symfony Security Component - Core Library",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/security-core/tree/v6.4.26"
|
||||
},
|
||||
"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-02T19:15:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/security-csrf",
|
||||
"version": "v6.4.24",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/security-csrf.git",
|
||||
"reference": "9a1efc8c10b86bcedc9233affd10c716b54ca1b7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/security-csrf/zipball/9a1efc8c10b86bcedc9233affd10c716b54ca1b7",
|
||||
"reference": "9a1efc8c10b86bcedc9233affd10c716b54ca1b7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/security-core": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/http-foundation": "<5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/http-foundation": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Security\\Csrf\\": ""
|
||||
},
|
||||
"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": "Symfony Security Component - CSRF Library",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/security-csrf/tree/v6.4.24"
|
||||
},
|
||||
"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-10T08:14:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
"version": "v3.6.0",
|
||||
|
||||
@@ -128,6 +128,7 @@ return array(
|
||||
'CharConcatWSExpression' => $baseDir . '/core/oql/expression.class.inc.php',
|
||||
'CheckStopWatchThresholds' => $baseDir . '/core/ormstopwatch.class.inc.php',
|
||||
'CheckableExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php',
|
||||
'Collator' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/Collator.php',
|
||||
'Combodo\\iTop\\Application\\Branding' => $baseDir . '/sources/Application/Branding.php',
|
||||
'Combodo\\iTop\\Application\\EventRegister\\ApplicationEvents' => $baseDir . '/sources/Application/EventRegister/ApplicationEvents.php',
|
||||
'Combodo\\iTop\\Application\\Helper\\CKEditorHelper' => $baseDir . '/sources/Application/Helper/CKEditorHelper.php',
|
||||
@@ -470,6 +471,7 @@ return array(
|
||||
'Combodo\\iTop\\Form\\Validator\\MultipleChoicesValidator' => $baseDir . '/sources/Form/Validator/MultipleChoicesValidator.php',
|
||||
'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => $baseDir . '/sources/Form/Validator/NotEmptyExtKeyValidator.php',
|
||||
'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => $baseDir . '/sources/Form/Validator/SelectObjectValidator.php',
|
||||
'Combodo\\iTop\\Forms\\Twig\\Extension\\FormCompatibilityExtension' => $baseDir . '/sources/Forms/Twig/Extension/FormCompatibilityExtension.php',
|
||||
'Combodo\\iTop\\Kernel' => $baseDir . '/sources/Kernel.php',
|
||||
'Combodo\\iTop\\PhpParser\\Evaluation\\PhpExpressionEvaluator' => $baseDir . '/sources/PhpParser/Evaluation/PhpExpressionEvaluator.php',
|
||||
'Combodo\\iTop\\Renderer\\BlockRenderer' => $baseDir . '/sources/Renderer/BlockRenderer.php',
|
||||
@@ -840,6 +842,7 @@ return array(
|
||||
'InputOutputTask' => $baseDir . '/application/iotask.class.inc.php',
|
||||
'IntervalExpression' => $baseDir . '/core/oql/expression.class.inc.php',
|
||||
'IntervalOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php',
|
||||
'IntlDateFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php',
|
||||
'Introspection' => $baseDir . '/core/introspection.class.inc.php',
|
||||
'InvalidConfigParamException' => $baseDir . '/application/exceptions/InvalidConfigParamException.php',
|
||||
'InvalidExternalKeyValueException' => $baseDir . '/application/exceptions/InvalidExternalKeyValueException.php',
|
||||
@@ -881,6 +884,7 @@ return array(
|
||||
'League\\OAuth2\\Client\\Tool\\RequiredParameterTrait' => $vendorDir . '/league/oauth2-client/src/Tool/RequiredParameterTrait.php',
|
||||
'ListExpression' => $baseDir . '/core/oql/expression.class.inc.php',
|
||||
'ListOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php',
|
||||
'Locale' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/Locale.php',
|
||||
'LogAPI' => $baseDir . '/core/log.class.inc.php',
|
||||
'LogChannels' => $baseDir . '/core/log.class.inc.php',
|
||||
'LogFileNameBuilderFactory' => $baseDir . '/core/log.class.inc.php',
|
||||
@@ -914,6 +918,7 @@ return array(
|
||||
'NewsroomProviderBase' => $baseDir . '/application/newsroomprovider.class.inc.php',
|
||||
'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
|
||||
'NotYetEvaluatedExpression' => $baseDir . '/core/oql/expression.class.inc.php',
|
||||
'NumberFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php',
|
||||
'OQLActualClassTreeResolver' => $baseDir . '/core/oqlactualclasstreeresolver.class.inc.php',
|
||||
'OQLClassNode' => $baseDir . '/core/oqlclassnode.class.inc.php',
|
||||
'OQLClassTreeBuilder' => $baseDir . '/core/oqlclasstreebuilder.class.inc.php',
|
||||
@@ -2192,6 +2197,234 @@ return array(
|
||||
'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => $vendorDir . '/symfony/finder/Iterator/SortableIterator.php',
|
||||
'Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => $vendorDir . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php',
|
||||
'Symfony\\Component\\Finder\\SplFileInfo' => $vendorDir . '/symfony/finder/SplFileInfo.php',
|
||||
'Symfony\\Component\\Form\\AbstractExtension' => $vendorDir . '/symfony/form/AbstractExtension.php',
|
||||
'Symfony\\Component\\Form\\AbstractRendererEngine' => $vendorDir . '/symfony/form/AbstractRendererEngine.php',
|
||||
'Symfony\\Component\\Form\\AbstractType' => $vendorDir . '/symfony/form/AbstractType.php',
|
||||
'Symfony\\Component\\Form\\AbstractTypeExtension' => $vendorDir . '/symfony/form/AbstractTypeExtension.php',
|
||||
'Symfony\\Component\\Form\\Button' => $vendorDir . '/symfony/form/Button.php',
|
||||
'Symfony\\Component\\Form\\ButtonBuilder' => $vendorDir . '/symfony/form/ButtonBuilder.php',
|
||||
'Symfony\\Component\\Form\\ButtonTypeInterface' => $vendorDir . '/symfony/form/ButtonTypeInterface.php',
|
||||
'Symfony\\Component\\Form\\CallbackTransformer' => $vendorDir . '/symfony/form/CallbackTransformer.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\ArrayChoiceList' => $vendorDir . '/symfony/form/ChoiceList/ArrayChoiceList.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\ChoiceList' => $vendorDir . '/symfony/form/ChoiceList/ChoiceList.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\ChoiceListInterface' => $vendorDir . '/symfony/form/ChoiceList/ChoiceListInterface.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\AbstractStaticOption' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceAttr' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFieldName' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFilter' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLabel' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceTranslationParameters' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceValue' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\GroupBy' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/GroupBy.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\PreferredChoice' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\CachingFactoryDecorator' => $vendorDir . '/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\ChoiceListFactoryInterface' => $vendorDir . '/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\DefaultChoiceListFactory' => $vendorDir . '/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\PropertyAccessDecorator' => $vendorDir . '/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\LazyChoiceList' => $vendorDir . '/symfony/form/ChoiceList/LazyChoiceList.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Loader\\AbstractChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Loader\\ChoiceLoaderInterface' => $vendorDir . '/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Loader\\FilterChoiceLoaderDecorator' => $vendorDir . '/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Loader\\IntlCallbackChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceGroupView' => $vendorDir . '/symfony/form/ChoiceList/View/ChoiceGroupView.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceListView' => $vendorDir . '/symfony/form/ChoiceList/View/ChoiceListView.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceView' => $vendorDir . '/symfony/form/ChoiceList/View/ChoiceView.php',
|
||||
'Symfony\\Component\\Form\\ClearableErrorsInterface' => $vendorDir . '/symfony/form/ClearableErrorsInterface.php',
|
||||
'Symfony\\Component\\Form\\ClickableInterface' => $vendorDir . '/symfony/form/ClickableInterface.php',
|
||||
'Symfony\\Component\\Form\\Command\\DebugCommand' => $vendorDir . '/symfony/form/Command/DebugCommand.php',
|
||||
'Symfony\\Component\\Form\\Console\\Descriptor\\Descriptor' => $vendorDir . '/symfony/form/Console/Descriptor/Descriptor.php',
|
||||
'Symfony\\Component\\Form\\Console\\Descriptor\\JsonDescriptor' => $vendorDir . '/symfony/form/Console/Descriptor/JsonDescriptor.php',
|
||||
'Symfony\\Component\\Form\\Console\\Descriptor\\TextDescriptor' => $vendorDir . '/symfony/form/Console/Descriptor/TextDescriptor.php',
|
||||
'Symfony\\Component\\Form\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/form/Console/Helper/DescriptorHelper.php',
|
||||
'Symfony\\Component\\Form\\DataAccessorInterface' => $vendorDir . '/symfony/form/DataAccessorInterface.php',
|
||||
'Symfony\\Component\\Form\\DataMapperInterface' => $vendorDir . '/symfony/form/DataMapperInterface.php',
|
||||
'Symfony\\Component\\Form\\DataTransformerInterface' => $vendorDir . '/symfony/form/DataTransformerInterface.php',
|
||||
'Symfony\\Component\\Form\\DependencyInjection\\FormPass' => $vendorDir . '/symfony/form/DependencyInjection/FormPass.php',
|
||||
'Symfony\\Component\\Form\\Event\\PostSetDataEvent' => $vendorDir . '/symfony/form/Event/PostSetDataEvent.php',
|
||||
'Symfony\\Component\\Form\\Event\\PostSubmitEvent' => $vendorDir . '/symfony/form/Event/PostSubmitEvent.php',
|
||||
'Symfony\\Component\\Form\\Event\\PreSetDataEvent' => $vendorDir . '/symfony/form/Event/PreSetDataEvent.php',
|
||||
'Symfony\\Component\\Form\\Event\\PreSubmitEvent' => $vendorDir . '/symfony/form/Event/PreSubmitEvent.php',
|
||||
'Symfony\\Component\\Form\\Event\\SubmitEvent' => $vendorDir . '/symfony/form/Event/SubmitEvent.php',
|
||||
'Symfony\\Component\\Form\\Exception\\AccessException' => $vendorDir . '/symfony/form/Exception/AccessException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\AlreadySubmittedException' => $vendorDir . '/symfony/form/Exception/AlreadySubmittedException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\BadMethodCallException' => $vendorDir . '/symfony/form/Exception/BadMethodCallException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\ErrorMappingException' => $vendorDir . '/symfony/form/Exception/ErrorMappingException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/form/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\Form\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/form/Exception/InvalidArgumentException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\InvalidConfigurationException' => $vendorDir . '/symfony/form/Exception/InvalidConfigurationException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\LogicException' => $vendorDir . '/symfony/form/Exception/LogicException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\OutOfBoundsException' => $vendorDir . '/symfony/form/Exception/OutOfBoundsException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\RuntimeException' => $vendorDir . '/symfony/form/Exception/RuntimeException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\StringCastException' => $vendorDir . '/symfony/form/Exception/StringCastException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\TransformationFailedException' => $vendorDir . '/symfony/form/Exception/TransformationFailedException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/form/Exception/UnexpectedTypeException.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\CoreExtension' => $vendorDir . '/symfony/form/Extension/Core/CoreExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\CallbackAccessor' => $vendorDir . '/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\ChainAccessor' => $vendorDir . '/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\PropertyPathAccessor' => $vendorDir . '/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\CheckboxListMapper' => $vendorDir . '/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\DataMapper' => $vendorDir . '/symfony/form/Extension/Core/DataMapper/DataMapper.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\RadioListMapper' => $vendorDir . '/symfony/form/Extension/Core/DataMapper/RadioListMapper.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ArrayToPartsTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BaseDateTimeTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BooleanToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoiceToValueTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoicesToValuesTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DataTransformerChain' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToArrayTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeImmutableToDateTimeTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToArrayTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToHtml5LocalDateTimeTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToRfc3339Transformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToTimestampTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeZoneToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntegerToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntlTimeZoneToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\MoneyToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\PercentToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\StringToFloatTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UlidToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UuidToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ValueToDuplicatesTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\WeekToArrayTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\FixUrlProtocolListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\MergeCollectionListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\ResizeFormListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/ResizeFormListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TransformationFailureListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TrimListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/TrimListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType' => $vendorDir . '/symfony/form/Extension/Core/Type/BaseType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType' => $vendorDir . '/symfony/form/Extension/Core/Type/BirthdayType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType' => $vendorDir . '/symfony/form/Extension/Core/Type/ButtonType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\CheckboxType' => $vendorDir . '/symfony/form/Extension/Core/Type/CheckboxType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\ChoiceType' => $vendorDir . '/symfony/form/Extension/Core/Type/ChoiceType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\CollectionType' => $vendorDir . '/symfony/form/Extension/Core/Type/CollectionType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\ColorType' => $vendorDir . '/symfony/form/Extension/Core/Type/ColorType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType' => $vendorDir . '/symfony/form/Extension/Core/Type/CountryType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\CurrencyType' => $vendorDir . '/symfony/form/Extension/Core/Type/CurrencyType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateIntervalType' => $vendorDir . '/symfony/form/Extension/Core/Type/DateIntervalType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateTimeType' => $vendorDir . '/symfony/form/Extension/Core/Type/DateTimeType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateType' => $vendorDir . '/symfony/form/Extension/Core/Type/DateType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\EmailType' => $vendorDir . '/symfony/form/Extension/Core/Type/EmailType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\EnumType' => $vendorDir . '/symfony/form/Extension/Core/Type/EnumType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\FileType' => $vendorDir . '/symfony/form/Extension/Core/Type/FileType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType' => $vendorDir . '/symfony/form/Extension/Core/Type/FormType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType' => $vendorDir . '/symfony/form/Extension/Core/Type/HiddenType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\IntegerType' => $vendorDir . '/symfony/form/Extension/Core/Type/IntegerType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType' => $vendorDir . '/symfony/form/Extension/Core/Type/LanguageType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType' => $vendorDir . '/symfony/form/Extension/Core/Type/LocaleType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\MoneyType' => $vendorDir . '/symfony/form/Extension/Core/Type/MoneyType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\NumberType' => $vendorDir . '/symfony/form/Extension/Core/Type/NumberType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\PasswordType' => $vendorDir . '/symfony/form/Extension/Core/Type/PasswordType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\PercentType' => $vendorDir . '/symfony/form/Extension/Core/Type/PercentType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\RadioType' => $vendorDir . '/symfony/form/Extension/Core/Type/RadioType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\RangeType' => $vendorDir . '/symfony/form/Extension/Core/Type/RangeType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\RepeatedType' => $vendorDir . '/symfony/form/Extension/Core/Type/RepeatedType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\ResetType' => $vendorDir . '/symfony/form/Extension/Core/Type/ResetType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\SearchType' => $vendorDir . '/symfony/form/Extension/Core/Type/SearchType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType' => $vendorDir . '/symfony/form/Extension/Core/Type/SubmitType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TelType' => $vendorDir . '/symfony/form/Extension/Core/Type/TelType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType' => $vendorDir . '/symfony/form/Extension/Core/Type/TextType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextareaType' => $vendorDir . '/symfony/form/Extension/Core/Type/TextareaType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimeType' => $vendorDir . '/symfony/form/Extension/Core/Type/TimeType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimezoneType' => $vendorDir . '/symfony/form/Extension/Core/Type/TimezoneType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TransformationFailureExtension' => $vendorDir . '/symfony/form/Extension/Core/Type/TransformationFailureExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\UlidType' => $vendorDir . '/symfony/form/Extension/Core/Type/UlidType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\UrlType' => $vendorDir . '/symfony/form/Extension/Core/Type/UrlType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\UuidType' => $vendorDir . '/symfony/form/Extension/Core/Type/UuidType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\WeekType' => $vendorDir . '/symfony/form/Extension/Core/Type/WeekType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Csrf\\CsrfExtension' => $vendorDir . '/symfony/form/Extension/Csrf/CsrfExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Csrf\\EventListener\\CsrfValidationListener' => $vendorDir . '/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Csrf\\Type\\FormTypeCsrfExtension' => $vendorDir . '/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\DataCollectorExtension' => $vendorDir . '/symfony/form/Extension/DataCollector/DataCollectorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener' => $vendorDir . '/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollector' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataCollector.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollectorInterface' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractor' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataExtractor.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractorInterface' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeDataCollectorProxy' => $vendorDir . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeFactoryDataCollectorProxy' => $vendorDir . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\Type\\DataCollectorTypeExtension' => $vendorDir . '/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DependencyInjection\\DependencyInjectionExtension' => $vendorDir . '/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\HtmlSanitizer\\HtmlSanitizerExtension' => $vendorDir . '/symfony/form/Extension/HtmlSanitizer/HtmlSanitizerExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\HtmlSanitizer\\Type\\TextTypeHtmlSanitizerExtension' => $vendorDir . '/symfony/form/Extension/HtmlSanitizer/Type/TextTypeHtmlSanitizerExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationExtension' => $vendorDir . '/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationRequestHandler' => $vendorDir . '/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php',
|
||||
'Symfony\\Component\\Form\\Extension\\HttpFoundation\\Type\\FormTypeHttpFoundationExtension' => $vendorDir . '/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\PasswordHasher\\EventListener\\PasswordHasherListener' => $vendorDir . '/symfony/form/Extension/PasswordHasher/EventListener/PasswordHasherListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\PasswordHasher\\PasswordHasherExtension' => $vendorDir . '/symfony/form/Extension/PasswordHasher/PasswordHasherExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\PasswordHasher\\Type\\FormTypePasswordHasherExtension' => $vendorDir . '/symfony/form/Extension/PasswordHasher/Type/FormTypePasswordHasherExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\PasswordHasher\\Type\\PasswordTypePasswordHasherExtension' => $vendorDir . '/symfony/form/Extension/PasswordHasher/Type/PasswordTypePasswordHasherExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\Form' => $vendorDir . '/symfony/form/Extension/Validator/Constraints/Form.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\FormValidator' => $vendorDir . '/symfony/form/Extension/Validator/Constraints/FormValidator.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\EventListener\\ValidationListener' => $vendorDir . '/symfony/form/Extension/Validator/EventListener/ValidationListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Type\\BaseValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Type\\FormTypeValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Type\\RepeatedTypeValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Type\\SubmitTypeValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Type\\UploadValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/ValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser' => $vendorDir . '/symfony/form/Extension/Validator/ValidatorTypeGuesser.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\MappingRule' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\RelativePath' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapper' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapperInterface' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPath' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPathIterator' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php',
|
||||
'Symfony\\Component\\Form\\FileUploadError' => $vendorDir . '/symfony/form/FileUploadError.php',
|
||||
'Symfony\\Component\\Form\\Form' => $vendorDir . '/symfony/form/Form.php',
|
||||
'Symfony\\Component\\Form\\FormBuilder' => $vendorDir . '/symfony/form/FormBuilder.php',
|
||||
'Symfony\\Component\\Form\\FormBuilderInterface' => $vendorDir . '/symfony/form/FormBuilderInterface.php',
|
||||
'Symfony\\Component\\Form\\FormConfigBuilder' => $vendorDir . '/symfony/form/FormConfigBuilder.php',
|
||||
'Symfony\\Component\\Form\\FormConfigBuilderInterface' => $vendorDir . '/symfony/form/FormConfigBuilderInterface.php',
|
||||
'Symfony\\Component\\Form\\FormConfigInterface' => $vendorDir . '/symfony/form/FormConfigInterface.php',
|
||||
'Symfony\\Component\\Form\\FormError' => $vendorDir . '/symfony/form/FormError.php',
|
||||
'Symfony\\Component\\Form\\FormErrorIterator' => $vendorDir . '/symfony/form/FormErrorIterator.php',
|
||||
'Symfony\\Component\\Form\\FormEvent' => $vendorDir . '/symfony/form/FormEvent.php',
|
||||
'Symfony\\Component\\Form\\FormEvents' => $vendorDir . '/symfony/form/FormEvents.php',
|
||||
'Symfony\\Component\\Form\\FormExtensionInterface' => $vendorDir . '/symfony/form/FormExtensionInterface.php',
|
||||
'Symfony\\Component\\Form\\FormFactory' => $vendorDir . '/symfony/form/FormFactory.php',
|
||||
'Symfony\\Component\\Form\\FormFactoryBuilder' => $vendorDir . '/symfony/form/FormFactoryBuilder.php',
|
||||
'Symfony\\Component\\Form\\FormFactoryBuilderInterface' => $vendorDir . '/symfony/form/FormFactoryBuilderInterface.php',
|
||||
'Symfony\\Component\\Form\\FormFactoryInterface' => $vendorDir . '/symfony/form/FormFactoryInterface.php',
|
||||
'Symfony\\Component\\Form\\FormInterface' => $vendorDir . '/symfony/form/FormInterface.php',
|
||||
'Symfony\\Component\\Form\\FormRegistry' => $vendorDir . '/symfony/form/FormRegistry.php',
|
||||
'Symfony\\Component\\Form\\FormRegistryInterface' => $vendorDir . '/symfony/form/FormRegistryInterface.php',
|
||||
'Symfony\\Component\\Form\\FormRenderer' => $vendorDir . '/symfony/form/FormRenderer.php',
|
||||
'Symfony\\Component\\Form\\FormRendererEngineInterface' => $vendorDir . '/symfony/form/FormRendererEngineInterface.php',
|
||||
'Symfony\\Component\\Form\\FormRendererInterface' => $vendorDir . '/symfony/form/FormRendererInterface.php',
|
||||
'Symfony\\Component\\Form\\FormTypeExtensionInterface' => $vendorDir . '/symfony/form/FormTypeExtensionInterface.php',
|
||||
'Symfony\\Component\\Form\\FormTypeGuesserChain' => $vendorDir . '/symfony/form/FormTypeGuesserChain.php',
|
||||
'Symfony\\Component\\Form\\FormTypeGuesserInterface' => $vendorDir . '/symfony/form/FormTypeGuesserInterface.php',
|
||||
'Symfony\\Component\\Form\\FormTypeInterface' => $vendorDir . '/symfony/form/FormTypeInterface.php',
|
||||
'Symfony\\Component\\Form\\FormView' => $vendorDir . '/symfony/form/FormView.php',
|
||||
'Symfony\\Component\\Form\\Forms' => $vendorDir . '/symfony/form/Forms.php',
|
||||
'Symfony\\Component\\Form\\Guess\\Guess' => $vendorDir . '/symfony/form/Guess/Guess.php',
|
||||
'Symfony\\Component\\Form\\Guess\\TypeGuess' => $vendorDir . '/symfony/form/Guess/TypeGuess.php',
|
||||
'Symfony\\Component\\Form\\Guess\\ValueGuess' => $vendorDir . '/symfony/form/Guess/ValueGuess.php',
|
||||
'Symfony\\Component\\Form\\NativeRequestHandler' => $vendorDir . '/symfony/form/NativeRequestHandler.php',
|
||||
'Symfony\\Component\\Form\\PreloadedExtension' => $vendorDir . '/symfony/form/PreloadedExtension.php',
|
||||
'Symfony\\Component\\Form\\RequestHandlerInterface' => $vendorDir . '/symfony/form/RequestHandlerInterface.php',
|
||||
'Symfony\\Component\\Form\\ResolvedFormType' => $vendorDir . '/symfony/form/ResolvedFormType.php',
|
||||
'Symfony\\Component\\Form\\ResolvedFormTypeFactory' => $vendorDir . '/symfony/form/ResolvedFormTypeFactory.php',
|
||||
'Symfony\\Component\\Form\\ResolvedFormTypeFactoryInterface' => $vendorDir . '/symfony/form/ResolvedFormTypeFactoryInterface.php',
|
||||
'Symfony\\Component\\Form\\ResolvedFormTypeInterface' => $vendorDir . '/symfony/form/ResolvedFormTypeInterface.php',
|
||||
'Symfony\\Component\\Form\\ReversedTransformer' => $vendorDir . '/symfony/form/ReversedTransformer.php',
|
||||
'Symfony\\Component\\Form\\SubmitButton' => $vendorDir . '/symfony/form/SubmitButton.php',
|
||||
'Symfony\\Component\\Form\\SubmitButtonBuilder' => $vendorDir . '/symfony/form/SubmitButtonBuilder.php',
|
||||
'Symfony\\Component\\Form\\SubmitButtonTypeInterface' => $vendorDir . '/symfony/form/SubmitButtonTypeInterface.php',
|
||||
'Symfony\\Component\\Form\\Util\\FormUtil' => $vendorDir . '/symfony/form/Util/FormUtil.php',
|
||||
'Symfony\\Component\\Form\\Util\\InheritDataAwareIterator' => $vendorDir . '/symfony/form/Util/InheritDataAwareIterator.php',
|
||||
'Symfony\\Component\\Form\\Util\\OptionsResolverWrapper' => $vendorDir . '/symfony/form/Util/OptionsResolverWrapper.php',
|
||||
'Symfony\\Component\\Form\\Util\\OrderedHashMap' => $vendorDir . '/symfony/form/Util/OrderedHashMap.php',
|
||||
'Symfony\\Component\\Form\\Util\\OrderedHashMapIterator' => $vendorDir . '/symfony/form/Util/OrderedHashMapIterator.php',
|
||||
'Symfony\\Component\\Form\\Util\\ServerParams' => $vendorDir . '/symfony/form/Util/ServerParams.php',
|
||||
'Symfony\\Component\\Form\\Util\\StringUtil' => $vendorDir . '/symfony/form/Util/StringUtil.php',
|
||||
'Symfony\\Component\\HttpFoundation\\AcceptHeader' => $vendorDir . '/symfony/http-foundation/AcceptHeader.php',
|
||||
'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => $vendorDir . '/symfony/http-foundation/AcceptHeaderItem.php',
|
||||
'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => $vendorDir . '/symfony/http-foundation/BinaryFileResponse.php',
|
||||
@@ -2572,6 +2805,81 @@ return array(
|
||||
'Symfony\\Component\\Mime\\Part\\SMimePart' => $vendorDir . '/symfony/mime/Part/SMimePart.php',
|
||||
'Symfony\\Component\\Mime\\Part\\TextPart' => $vendorDir . '/symfony/mime/Part/TextPart.php',
|
||||
'Symfony\\Component\\Mime\\RawMessage' => $vendorDir . '/symfony/mime/RawMessage.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => $vendorDir . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => $vendorDir . '/symfony/options-resolver/Exception/AccessException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/options-resolver/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidArgumentException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidOptionsException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/MissingOptionsException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => $vendorDir . '/symfony/options-resolver/Exception/NoConfigurationException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => $vendorDir . '/symfony/options-resolver/Exception/NoSuchOptionException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => $vendorDir . '/symfony/options-resolver/Exception/OptionDefinitionException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/UndefinedOptionsException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\OptionConfigurator' => $vendorDir . '/symfony/options-resolver/OptionConfigurator.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Options' => $vendorDir . '/symfony/options-resolver/Options.php',
|
||||
'Symfony\\Component\\OptionsResolver\\OptionsResolver' => $vendorDir . '/symfony/options-resolver/OptionsResolver.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Command\\UserPasswordHashCommand' => $vendorDir . '/symfony/password-hasher/Command/UserPasswordHashCommand.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/password-hasher/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Exception\\InvalidPasswordException' => $vendorDir . '/symfony/password-hasher/Exception/InvalidPasswordException.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Exception\\LogicException' => $vendorDir . '/symfony/password-hasher/Exception/LogicException.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\CheckPasswordLengthTrait' => $vendorDir . '/symfony/password-hasher/Hasher/CheckPasswordLengthTrait.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\MessageDigestPasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/MessageDigestPasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\MigratingPasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/MigratingPasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\NativePasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/NativePasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherAwareInterface' => $vendorDir . '/symfony/password-hasher/Hasher/PasswordHasherAwareInterface.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherFactory' => $vendorDir . '/symfony/password-hasher/Hasher/PasswordHasherFactory.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherFactoryInterface' => $vendorDir . '/symfony/password-hasher/Hasher/PasswordHasherFactoryInterface.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\Pbkdf2PasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/Pbkdf2PasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\PlaintextPasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/PlaintextPasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\SodiumPasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/SodiumPasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/UserPasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasherInterface' => $vendorDir . '/symfony/password-hasher/Hasher/UserPasswordHasherInterface.php',
|
||||
'Symfony\\Component\\PasswordHasher\\LegacyPasswordHasherInterface' => $vendorDir . '/symfony/password-hasher/LegacyPasswordHasherInterface.php',
|
||||
'Symfony\\Component\\PasswordHasher\\PasswordHasherInterface' => $vendorDir . '/symfony/password-hasher/PasswordHasherInterface.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\AccessException' => $vendorDir . '/symfony/property-access/Exception/AccessException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/property-access/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/property-access/Exception/InvalidArgumentException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\InvalidPropertyPathException' => $vendorDir . '/symfony/property-access/Exception/InvalidPropertyPathException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchIndexException' => $vendorDir . '/symfony/property-access/Exception/NoSuchIndexException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchPropertyException' => $vendorDir . '/symfony/property-access/Exception/NoSuchPropertyException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\OutOfBoundsException' => $vendorDir . '/symfony/property-access/Exception/OutOfBoundsException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\RuntimeException' => $vendorDir . '/symfony/property-access/Exception/RuntimeException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/property-access/Exception/UnexpectedTypeException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\UninitializedPropertyException' => $vendorDir . '/symfony/property-access/Exception/UninitializedPropertyException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyAccess' => $vendorDir . '/symfony/property-access/PropertyAccess.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyAccessor' => $vendorDir . '/symfony/property-access/PropertyAccessor.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyAccessorBuilder' => $vendorDir . '/symfony/property-access/PropertyAccessorBuilder.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyAccessorInterface' => $vendorDir . '/symfony/property-access/PropertyAccessorInterface.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyPath' => $vendorDir . '/symfony/property-access/PropertyPath.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyPathBuilder' => $vendorDir . '/symfony/property-access/PropertyPathBuilder.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyPathInterface' => $vendorDir . '/symfony/property-access/PropertyPathInterface.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyPathIterator' => $vendorDir . '/symfony/property-access/PropertyPathIterator.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyPathIteratorInterface' => $vendorDir . '/symfony/property-access/PropertyPathIteratorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoConstructorPass' => $vendorDir . '/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php',
|
||||
'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoPass' => $vendorDir . '/symfony/property-info/DependencyInjection/PropertyInfoPass.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorArgumentTypeExtractorInterface' => $vendorDir . '/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorExtractor' => $vendorDir . '/symfony/property-info/Extractor/ConstructorExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\PhpDocExtractor' => $vendorDir . '/symfony/property-info/Extractor/PhpDocExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\PhpStanExtractor' => $vendorDir . '/symfony/property-info/Extractor/PhpStanExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\ReflectionExtractor' => $vendorDir . '/symfony/property-info/Extractor/ReflectionExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\SerializerExtractor' => $vendorDir . '/symfony/property-info/Extractor/SerializerExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScope' => $vendorDir . '/symfony/property-info/PhpStan/NameScope.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScopeFactory' => $vendorDir . '/symfony/property-info/PhpStan/NameScopeFactory.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyAccessExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyDescriptionExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyInfoCacheExtractor' => $vendorDir . '/symfony/property-info/PropertyInfoCacheExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor' => $vendorDir . '/symfony/property-info/PropertyInfoExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyInfoExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyInitializableExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyInitializableExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyListExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyReadInfo' => $vendorDir . '/symfony/property-info/PropertyReadInfo.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyReadInfoExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyReadInfoExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyTypeExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyTypeExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyWriteInfo' => $vendorDir . '/symfony/property-info/PropertyWriteInfo.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyWriteInfoExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyWriteInfoExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Type' => $vendorDir . '/symfony/property-info/Type.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Util\\PhpDocTypeHelper' => $vendorDir . '/symfony/property-info/Util/PhpDocTypeHelper.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Util\\PhpStanTypeHelper' => $vendorDir . '/symfony/property-info/Util/PhpStanTypeHelper.php',
|
||||
'Symfony\\Component\\Routing\\Alias' => $vendorDir . '/symfony/routing/Alias.php',
|
||||
'Symfony\\Component\\Routing\\Annotation\\Route' => $vendorDir . '/symfony/routing/Annotation/Route.php',
|
||||
'Symfony\\Component\\Routing\\Attribute\\Route' => $vendorDir . '/symfony/routing/Attribute/Route.php',
|
||||
@@ -2658,6 +2966,113 @@ return array(
|
||||
'Symfony\\Component\\Runtime\\Runner\\Symfony\\ResponseRunner' => $vendorDir . '/symfony/runtime/Runner/Symfony/ResponseRunner.php',
|
||||
'Symfony\\Component\\Runtime\\RuntimeInterface' => $vendorDir . '/symfony/runtime/RuntimeInterface.php',
|
||||
'Symfony\\Component\\Runtime\\SymfonyRuntime' => $vendorDir . '/symfony/runtime/SymfonyRuntime.php',
|
||||
'Symfony\\Component\\Security\\Core\\AuthenticationEvents' => $vendorDir . '/symfony/security-core/AuthenticationEvents.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolver' => $vendorDir . '/symfony/security-core/Authentication/AuthenticationTrustResolver.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolverInterface' => $vendorDir . '/symfony/security-core/Authentication/AuthenticationTrustResolverInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\CacheTokenVerifier' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/CacheTokenVerifier.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\InMemoryTokenProvider' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/InMemoryTokenProvider.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\PersistentToken' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/PersistentToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\PersistentTokenInterface' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/PersistentTokenInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\TokenProviderInterface' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/TokenProviderInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\TokenVerifierInterface' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/TokenVerifierInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AbstractToken' => $vendorDir . '/symfony/security-core/Authentication/Token/AbstractToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\NullToken' => $vendorDir . '/symfony/security-core/Authentication/Token/NullToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\PreAuthenticatedToken' => $vendorDir . '/symfony/security-core/Authentication/Token/PreAuthenticatedToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken' => $vendorDir . '/symfony/security-core/Authentication/Token/RememberMeToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorage' => $vendorDir . '/symfony/security-core/Authentication/Token/Storage/TokenStorage.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorageInterface' => $vendorDir . '/symfony/security-core/Authentication/Token/Storage/TokenStorageInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\UsageTrackingTokenStorage' => $vendorDir . '/symfony/security-core/Authentication/Token/Storage/UsageTrackingTokenStorage.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\SwitchUserToken' => $vendorDir . '/symfony/security-core/Authentication/Token/SwitchUserToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface' => $vendorDir . '/symfony/security-core/Authentication/Token/TokenInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken' => $vendorDir . '/symfony/security-core/Authentication/Token/UsernamePasswordToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\AccessDecisionManager' => $vendorDir . '/symfony/security-core/Authorization/AccessDecisionManager.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\AccessDecisionManagerInterface' => $vendorDir . '/symfony/security-core/Authorization/AccessDecisionManagerInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationChecker' => $vendorDir . '/symfony/security-core/Authorization/AuthorizationChecker.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationCheckerInterface' => $vendorDir . '/symfony/security-core/Authorization/AuthorizationCheckerInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\ExpressionLanguage' => $vendorDir . '/symfony/security-core/Authorization/ExpressionLanguage.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\ExpressionLanguageProvider' => $vendorDir . '/symfony/security-core/Authorization/ExpressionLanguageProvider.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\AccessDecisionStrategyInterface' => $vendorDir . '/symfony/security-core/Authorization/Strategy/AccessDecisionStrategyInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\AffirmativeStrategy' => $vendorDir . '/symfony/security-core/Authorization/Strategy/AffirmativeStrategy.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\ConsensusStrategy' => $vendorDir . '/symfony/security-core/Authorization/Strategy/ConsensusStrategy.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\PriorityStrategy' => $vendorDir . '/symfony/security-core/Authorization/Strategy/PriorityStrategy.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\UnanimousStrategy' => $vendorDir . '/symfony/security-core/Authorization/Strategy/UnanimousStrategy.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\TraceableAccessDecisionManager' => $vendorDir . '/symfony/security-core/Authorization/TraceableAccessDecisionManager.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\AuthenticatedVoter' => $vendorDir . '/symfony/security-core/Authorization/Voter/AuthenticatedVoter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\CacheableVoterInterface' => $vendorDir . '/symfony/security-core/Authorization/Voter/CacheableVoterInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\ExpressionVoter' => $vendorDir . '/symfony/security-core/Authorization/Voter/ExpressionVoter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\RoleHierarchyVoter' => $vendorDir . '/symfony/security-core/Authorization/Voter/RoleHierarchyVoter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\RoleVoter' => $vendorDir . '/symfony/security-core/Authorization/Voter/RoleVoter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\TraceableVoter' => $vendorDir . '/symfony/security-core/Authorization/Voter/TraceableVoter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\Voter' => $vendorDir . '/symfony/security-core/Authorization/Voter/Voter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface' => $vendorDir . '/symfony/security-core/Authorization/Voter/VoterInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Event\\AuthenticationEvent' => $vendorDir . '/symfony/security-core/Event/AuthenticationEvent.php',
|
||||
'Symfony\\Component\\Security\\Core\\Event\\AuthenticationSuccessEvent' => $vendorDir . '/symfony/security-core/Event/AuthenticationSuccessEvent.php',
|
||||
'Symfony\\Component\\Security\\Core\\Event\\VoteEvent' => $vendorDir . '/symfony/security-core/Event/VoteEvent.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/security-core/Exception/AccessDeniedException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AccountExpiredException' => $vendorDir . '/symfony/security-core/Exception/AccountExpiredException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AccountStatusException' => $vendorDir . '/symfony/security-core/Exception/AccountStatusException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationCredentialsNotFoundException' => $vendorDir . '/symfony/security-core/Exception/AuthenticationCredentialsNotFoundException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationException' => $vendorDir . '/symfony/security-core/Exception/AuthenticationException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationExpiredException' => $vendorDir . '/symfony/security-core/Exception/AuthenticationExpiredException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationServiceException' => $vendorDir . '/symfony/security-core/Exception/AuthenticationServiceException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\BadCredentialsException' => $vendorDir . '/symfony/security-core/Exception/BadCredentialsException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\CookieTheftException' => $vendorDir . '/symfony/security-core/Exception/CookieTheftException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\CredentialsExpiredException' => $vendorDir . '/symfony/security-core/Exception/CredentialsExpiredException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\CustomUserMessageAccountStatusException' => $vendorDir . '/symfony/security-core/Exception/CustomUserMessageAccountStatusException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\CustomUserMessageAuthenticationException' => $vendorDir . '/symfony/security-core/Exception/CustomUserMessageAuthenticationException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\DisabledException' => $vendorDir . '/symfony/security-core/Exception/DisabledException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/security-core/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\InsufficientAuthenticationException' => $vendorDir . '/symfony/security-core/Exception/InsufficientAuthenticationException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/security-core/Exception/InvalidArgumentException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\InvalidCsrfTokenException' => $vendorDir . '/symfony/security-core/Exception/InvalidCsrfTokenException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\LazyResponseException' => $vendorDir . '/symfony/security-core/Exception/LazyResponseException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\LockedException' => $vendorDir . '/symfony/security-core/Exception/LockedException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\LogicException' => $vendorDir . '/symfony/security-core/Exception/LogicException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\LogoutException' => $vendorDir . '/symfony/security-core/Exception/LogoutException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\ProviderNotFoundException' => $vendorDir . '/symfony/security-core/Exception/ProviderNotFoundException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\RuntimeException' => $vendorDir . '/symfony/security-core/Exception/RuntimeException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\SessionUnavailableException' => $vendorDir . '/symfony/security-core/Exception/SessionUnavailableException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\TokenNotFoundException' => $vendorDir . '/symfony/security-core/Exception/TokenNotFoundException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\TooManyLoginAttemptsAuthenticationException' => $vendorDir . '/symfony/security-core/Exception/TooManyLoginAttemptsAuthenticationException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\UnsupportedUserException' => $vendorDir . '/symfony/security-core/Exception/UnsupportedUserException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\UserNotFoundException' => $vendorDir . '/symfony/security-core/Exception/UserNotFoundException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Role\\Role' => $vendorDir . '/symfony/security-core/Role/Role.php',
|
||||
'Symfony\\Component\\Security\\Core\\Role\\RoleHierarchy' => $vendorDir . '/symfony/security-core/Role/RoleHierarchy.php',
|
||||
'Symfony\\Component\\Security\\Core\\Role\\RoleHierarchyInterface' => $vendorDir . '/symfony/security-core/Role/RoleHierarchyInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Role\\SwitchUserRole' => $vendorDir . '/symfony/security-core/Role/SwitchUserRole.php',
|
||||
'Symfony\\Component\\Security\\Core\\Security' => $vendorDir . '/symfony/security-core/Security.php',
|
||||
'Symfony\\Component\\Security\\Core\\Signature\\Exception\\ExpiredSignatureException' => $vendorDir . '/symfony/security-core/Signature/Exception/ExpiredSignatureException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Signature\\Exception\\InvalidSignatureException' => $vendorDir . '/symfony/security-core/Signature/Exception/InvalidSignatureException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Signature\\ExpiredSignatureStorage' => $vendorDir . '/symfony/security-core/Signature/ExpiredSignatureStorage.php',
|
||||
'Symfony\\Component\\Security\\Core\\Signature\\SignatureHasher' => $vendorDir . '/symfony/security-core/Signature/SignatureHasher.php',
|
||||
'Symfony\\Component\\Security\\Core\\Test\\AccessDecisionStrategyTestCase' => $vendorDir . '/symfony/security-core/Test/AccessDecisionStrategyTestCase.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\AttributesBasedUserProviderInterface' => $vendorDir . '/symfony/security-core/User/AttributesBasedUserProviderInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\ChainUserChecker' => $vendorDir . '/symfony/security-core/User/ChainUserChecker.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\ChainUserProvider' => $vendorDir . '/symfony/security-core/User/ChainUserProvider.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\EquatableInterface' => $vendorDir . '/symfony/security-core/User/EquatableInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\InMemoryUser' => $vendorDir . '/symfony/security-core/User/InMemoryUser.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\InMemoryUserChecker' => $vendorDir . '/symfony/security-core/User/InMemoryUserChecker.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\InMemoryUserProvider' => $vendorDir . '/symfony/security-core/User/InMemoryUserProvider.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\LegacyPasswordAuthenticatedUserInterface' => $vendorDir . '/symfony/security-core/User/LegacyPasswordAuthenticatedUserInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\MissingUserProvider' => $vendorDir . '/symfony/security-core/User/MissingUserProvider.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\OidcUser' => $vendorDir . '/symfony/security-core/User/OidcUser.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\PasswordAuthenticatedUserInterface' => $vendorDir . '/symfony/security-core/User/PasswordAuthenticatedUserInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\PasswordUpgraderInterface' => $vendorDir . '/symfony/security-core/User/PasswordUpgraderInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface' => $vendorDir . '/symfony/security-core/User/UserCheckerInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\UserInterface' => $vendorDir . '/symfony/security-core/User/UserInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\UserProviderInterface' => $vendorDir . '/symfony/security-core/User/UserProviderInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPassword' => $vendorDir . '/symfony/security-core/Validator/Constraints/UserPassword.php',
|
||||
'Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPasswordValidator' => $vendorDir . '/symfony/security-core/Validator/Constraints/UserPasswordValidator.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\CsrfToken' => $vendorDir . '/symfony/security-csrf/CsrfToken.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\CsrfTokenManager' => $vendorDir . '/symfony/security-csrf/CsrfTokenManager.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface' => $vendorDir . '/symfony/security-csrf/CsrfTokenManagerInterface.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\Exception\\TokenNotFoundException' => $vendorDir . '/symfony/security-csrf/Exception/TokenNotFoundException.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenGenerator\\TokenGeneratorInterface' => $vendorDir . '/symfony/security-csrf/TokenGenerator/TokenGeneratorInterface.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenGenerator\\UriSafeTokenGenerator' => $vendorDir . '/symfony/security-csrf/TokenGenerator/UriSafeTokenGenerator.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenStorage\\ClearableTokenStorageInterface' => $vendorDir . '/symfony/security-csrf/TokenStorage/ClearableTokenStorageInterface.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenStorage\\NativeSessionTokenStorage' => $vendorDir . '/symfony/security-csrf/TokenStorage/NativeSessionTokenStorage.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenStorage\\SessionTokenStorage' => $vendorDir . '/symfony/security-csrf/TokenStorage/SessionTokenStorage.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenStorage\\TokenStorageInterface' => $vendorDir . '/symfony/security-csrf/TokenStorage/TokenStorageInterface.php',
|
||||
'Symfony\\Component\\Stopwatch\\Section' => $vendorDir . '/symfony/stopwatch/Section.php',
|
||||
'Symfony\\Component\\Stopwatch\\Stopwatch' => $vendorDir . '/symfony/stopwatch/Stopwatch.php',
|
||||
'Symfony\\Component\\Stopwatch\\StopwatchEvent' => $vendorDir . '/symfony/stopwatch/StopwatchEvent.php',
|
||||
@@ -2796,6 +3211,35 @@ return array(
|
||||
'Symfony\\Contracts\\Translation\\TranslatorTrait' => $vendorDir . '/symfony/translation-contracts/TranslatorTrait.php',
|
||||
'Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php',
|
||||
'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => $vendorDir . '/symfony/polyfill-intl-grapheme/Grapheme.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Collator' => $vendorDir . '/symfony/polyfill-intl-icu/Collator.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Currencies' => $vendorDir . '/symfony/polyfill-intl-icu/Currencies.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\AmPmTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfWeekTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfYearTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\FullTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1200Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1201Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2400Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2401Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\HourTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MinuteTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MonthTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\QuarterTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\SecondTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\TimezoneTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Transformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\YearTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentNotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentValueNotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodNotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\NotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/NotImplementedException.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\RuntimeException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/RuntimeException.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Icu' => $vendorDir . '/symfony/polyfill-intl-icu/Icu.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/IntlDateFormatter.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Locale' => $vendorDir . '/symfony/polyfill-intl-icu/Locale.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\NumberFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/NumberFormatter.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => $vendorDir . '/symfony/polyfill-intl-idn/Idn.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Info' => $vendorDir . '/symfony/polyfill-intl-idn/Info.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => $vendorDir . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',
|
||||
|
||||
@@ -17,10 +17,11 @@ return array(
|
||||
'c7baa00073ee9c61edf148c51917cfb4' => $vendorDir . '/twig/twig/src/Resources/escaper.php',
|
||||
'f844ccf1d25df8663951193c3fc307c8' => $vendorDir . '/twig/twig/src/Resources/string_loader.php',
|
||||
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
|
||||
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'6a47392539ca2329373e0d33e1dba053' => $vendorDir . '/symfony/polyfill-intl-icu/bootstrap.php',
|
||||
'344f11dc3484aaed5cbde58e23513be4' => $vendorDir . '/apereo/phpcas/source/CAS.php',
|
||||
'6997bc0ca52a383ea79e2a4a84bb1f3e' => $baseDir . '/sources/alias.php',
|
||||
);
|
||||
|
||||
@@ -13,6 +13,7 @@ return array(
|
||||
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\' => array($vendorDir . '/symfony/polyfill-intl-icu'),
|
||||
'Symfony\\Polyfill\\Intl\\Grapheme\\' => array($vendorDir . '/symfony/polyfill-intl-grapheme'),
|
||||
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
|
||||
'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'),
|
||||
@@ -24,12 +25,19 @@ return array(
|
||||
'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'),
|
||||
'Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'),
|
||||
'Symfony\\Component\\Stopwatch\\' => array($vendorDir . '/symfony/stopwatch'),
|
||||
'Symfony\\Component\\Security\\Csrf\\' => array($vendorDir . '/symfony/security-csrf'),
|
||||
'Symfony\\Component\\Security\\Core\\' => array($vendorDir . '/symfony/security-core'),
|
||||
'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\\PasswordHasher\\' => array($vendorDir . '/symfony/password-hasher'),
|
||||
'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'),
|
||||
'Symfony\\Component\\Mime\\' => array($vendorDir . '/symfony/mime'),
|
||||
'Symfony\\Component\\Mailer\\' => array($vendorDir . '/symfony/mailer'),
|
||||
'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'),
|
||||
'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'),
|
||||
'Symfony\\Component\\Form\\' => array($vendorDir . '/symfony/form'),
|
||||
'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
|
||||
'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'),
|
||||
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
|
||||
|
||||
@@ -18,10 +18,11 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'c7baa00073ee9c61edf148c51917cfb4' => __DIR__ . '/..' . '/twig/twig/src/Resources/escaper.php',
|
||||
'f844ccf1d25df8663951193c3fc307c8' => __DIR__ . '/..' . '/twig/twig/src/Resources/string_loader.php',
|
||||
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
|
||||
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'6a47392539ca2329373e0d33e1dba053' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/bootstrap.php',
|
||||
'344f11dc3484aaed5cbde58e23513be4' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS.php',
|
||||
'6997bc0ca52a383ea79e2a4a84bb1f3e' => __DIR__ . '/../..' . '/sources/alias.php',
|
||||
);
|
||||
@@ -39,6 +40,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'Symfony\\Polyfill\\Mbstring\\' => 26,
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\' => 26,
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\' => 26,
|
||||
'Symfony\\Polyfill\\Intl\\Grapheme\\' => 31,
|
||||
'Symfony\\Polyfill\\Ctype\\' => 23,
|
||||
'Symfony\\Contracts\\Translation\\' => 30,
|
||||
@@ -50,12 +52,19 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'Symfony\\Component\\VarDumper\\' => 28,
|
||||
'Symfony\\Component\\String\\' => 25,
|
||||
'Symfony\\Component\\Stopwatch\\' => 28,
|
||||
'Symfony\\Component\\Security\\Csrf\\' => 32,
|
||||
'Symfony\\Component\\Security\\Core\\' => 32,
|
||||
'Symfony\\Component\\Runtime\\' => 26,
|
||||
'Symfony\\Component\\Routing\\' => 26,
|
||||
'Symfony\\Component\\PropertyInfo\\' => 31,
|
||||
'Symfony\\Component\\PropertyAccess\\' => 33,
|
||||
'Symfony\\Component\\PasswordHasher\\' => 33,
|
||||
'Symfony\\Component\\OptionsResolver\\' => 34,
|
||||
'Symfony\\Component\\Mime\\' => 23,
|
||||
'Symfony\\Component\\Mailer\\' => 25,
|
||||
'Symfony\\Component\\HttpKernel\\' => 29,
|
||||
'Symfony\\Component\\HttpFoundation\\' => 33,
|
||||
'Symfony\\Component\\Form\\' => 23,
|
||||
'Symfony\\Component\\Finder\\' => 25,
|
||||
'Symfony\\Component\\Filesystem\\' => 29,
|
||||
'Symfony\\Component\\EventDispatcher\\' => 34,
|
||||
@@ -139,6 +148,10 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn',
|
||||
),
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-icu',
|
||||
),
|
||||
'Symfony\\Polyfill\\Intl\\Grapheme\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme',
|
||||
@@ -183,6 +196,14 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/stopwatch',
|
||||
),
|
||||
'Symfony\\Component\\Security\\Csrf\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/security-csrf',
|
||||
),
|
||||
'Symfony\\Component\\Security\\Core\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/security-core',
|
||||
),
|
||||
'Symfony\\Component\\Runtime\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/runtime',
|
||||
@@ -191,6 +212,22 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
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\\PasswordHasher\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/password-hasher',
|
||||
),
|
||||
'Symfony\\Component\\OptionsResolver\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/options-resolver',
|
||||
),
|
||||
'Symfony\\Component\\Mime\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/mime',
|
||||
@@ -207,6 +244,10 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/http-foundation',
|
||||
),
|
||||
'Symfony\\Component\\Form\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/form',
|
||||
),
|
||||
'Symfony\\Component\\Finder\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/finder',
|
||||
@@ -483,6 +524,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'CharConcatWSExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php',
|
||||
'CheckStopWatchThresholds' => __DIR__ . '/../..' . '/core/ormstopwatch.class.inc.php',
|
||||
'CheckableExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php',
|
||||
'Collator' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/Collator.php',
|
||||
'Combodo\\iTop\\Application\\Branding' => __DIR__ . '/../..' . '/sources/Application/Branding.php',
|
||||
'Combodo\\iTop\\Application\\EventRegister\\ApplicationEvents' => __DIR__ . '/../..' . '/sources/Application/EventRegister/ApplicationEvents.php',
|
||||
'Combodo\\iTop\\Application\\Helper\\CKEditorHelper' => __DIR__ . '/../..' . '/sources/Application/Helper/CKEditorHelper.php',
|
||||
@@ -825,6 +867,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'Combodo\\iTop\\Form\\Validator\\MultipleChoicesValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/MultipleChoicesValidator.php',
|
||||
'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/NotEmptyExtKeyValidator.php',
|
||||
'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/SelectObjectValidator.php',
|
||||
'Combodo\\iTop\\Forms\\Twig\\Extension\\FormCompatibilityExtension' => __DIR__ . '/../..' . '/sources/Forms/Twig/Extension/FormCompatibilityExtension.php',
|
||||
'Combodo\\iTop\\Kernel' => __DIR__ . '/../..' . '/sources/Kernel.php',
|
||||
'Combodo\\iTop\\PhpParser\\Evaluation\\PhpExpressionEvaluator' => __DIR__ . '/../..' . '/sources/PhpParser/Evaluation/PhpExpressionEvaluator.php',
|
||||
'Combodo\\iTop\\Renderer\\BlockRenderer' => __DIR__ . '/../..' . '/sources/Renderer/BlockRenderer.php',
|
||||
@@ -1195,6 +1238,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'InputOutputTask' => __DIR__ . '/../..' . '/application/iotask.class.inc.php',
|
||||
'IntervalExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php',
|
||||
'IntervalOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php',
|
||||
'IntlDateFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php',
|
||||
'Introspection' => __DIR__ . '/../..' . '/core/introspection.class.inc.php',
|
||||
'InvalidConfigParamException' => __DIR__ . '/../..' . '/application/exceptions/InvalidConfigParamException.php',
|
||||
'InvalidExternalKeyValueException' => __DIR__ . '/../..' . '/application/exceptions/InvalidExternalKeyValueException.php',
|
||||
@@ -1236,6 +1280,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'League\\OAuth2\\Client\\Tool\\RequiredParameterTrait' => __DIR__ . '/..' . '/league/oauth2-client/src/Tool/RequiredParameterTrait.php',
|
||||
'ListExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php',
|
||||
'ListOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php',
|
||||
'Locale' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/Locale.php',
|
||||
'LogAPI' => __DIR__ . '/../..' . '/core/log.class.inc.php',
|
||||
'LogChannels' => __DIR__ . '/../..' . '/core/log.class.inc.php',
|
||||
'LogFileNameBuilderFactory' => __DIR__ . '/../..' . '/core/log.class.inc.php',
|
||||
@@ -1269,6 +1314,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'NewsroomProviderBase' => __DIR__ . '/../..' . '/application/newsroomprovider.class.inc.php',
|
||||
'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
|
||||
'NotYetEvaluatedExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php',
|
||||
'NumberFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php',
|
||||
'OQLActualClassTreeResolver' => __DIR__ . '/../..' . '/core/oqlactualclasstreeresolver.class.inc.php',
|
||||
'OQLClassNode' => __DIR__ . '/../..' . '/core/oqlclassnode.class.inc.php',
|
||||
'OQLClassTreeBuilder' => __DIR__ . '/../..' . '/core/oqlclasstreebuilder.class.inc.php',
|
||||
@@ -2547,6 +2593,234 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SortableIterator.php',
|
||||
'Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php',
|
||||
'Symfony\\Component\\Finder\\SplFileInfo' => __DIR__ . '/..' . '/symfony/finder/SplFileInfo.php',
|
||||
'Symfony\\Component\\Form\\AbstractExtension' => __DIR__ . '/..' . '/symfony/form/AbstractExtension.php',
|
||||
'Symfony\\Component\\Form\\AbstractRendererEngine' => __DIR__ . '/..' . '/symfony/form/AbstractRendererEngine.php',
|
||||
'Symfony\\Component\\Form\\AbstractType' => __DIR__ . '/..' . '/symfony/form/AbstractType.php',
|
||||
'Symfony\\Component\\Form\\AbstractTypeExtension' => __DIR__ . '/..' . '/symfony/form/AbstractTypeExtension.php',
|
||||
'Symfony\\Component\\Form\\Button' => __DIR__ . '/..' . '/symfony/form/Button.php',
|
||||
'Symfony\\Component\\Form\\ButtonBuilder' => __DIR__ . '/..' . '/symfony/form/ButtonBuilder.php',
|
||||
'Symfony\\Component\\Form\\ButtonTypeInterface' => __DIR__ . '/..' . '/symfony/form/ButtonTypeInterface.php',
|
||||
'Symfony\\Component\\Form\\CallbackTransformer' => __DIR__ . '/..' . '/symfony/form/CallbackTransformer.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\ArrayChoiceList' => __DIR__ . '/..' . '/symfony/form/ChoiceList/ArrayChoiceList.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\ChoiceList' => __DIR__ . '/..' . '/symfony/form/ChoiceList/ChoiceList.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\ChoiceListInterface' => __DIR__ . '/..' . '/symfony/form/ChoiceList/ChoiceListInterface.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\AbstractStaticOption' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceAttr' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFieldName' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFilter' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLabel' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceTranslationParameters' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceValue' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\GroupBy' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/GroupBy.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\PreferredChoice' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\CachingFactoryDecorator' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\ChoiceListFactoryInterface' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\DefaultChoiceListFactory' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Factory\\PropertyAccessDecorator' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\LazyChoiceList' => __DIR__ . '/..' . '/symfony/form/ChoiceList/LazyChoiceList.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Loader\\AbstractChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Loader\\ChoiceLoaderInterface' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Loader\\FilterChoiceLoaderDecorator' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\Loader\\IntlCallbackChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceGroupView' => __DIR__ . '/..' . '/symfony/form/ChoiceList/View/ChoiceGroupView.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceListView' => __DIR__ . '/..' . '/symfony/form/ChoiceList/View/ChoiceListView.php',
|
||||
'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceView' => __DIR__ . '/..' . '/symfony/form/ChoiceList/View/ChoiceView.php',
|
||||
'Symfony\\Component\\Form\\ClearableErrorsInterface' => __DIR__ . '/..' . '/symfony/form/ClearableErrorsInterface.php',
|
||||
'Symfony\\Component\\Form\\ClickableInterface' => __DIR__ . '/..' . '/symfony/form/ClickableInterface.php',
|
||||
'Symfony\\Component\\Form\\Command\\DebugCommand' => __DIR__ . '/..' . '/symfony/form/Command/DebugCommand.php',
|
||||
'Symfony\\Component\\Form\\Console\\Descriptor\\Descriptor' => __DIR__ . '/..' . '/symfony/form/Console/Descriptor/Descriptor.php',
|
||||
'Symfony\\Component\\Form\\Console\\Descriptor\\JsonDescriptor' => __DIR__ . '/..' . '/symfony/form/Console/Descriptor/JsonDescriptor.php',
|
||||
'Symfony\\Component\\Form\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/..' . '/symfony/form/Console/Descriptor/TextDescriptor.php',
|
||||
'Symfony\\Component\\Form\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/form/Console/Helper/DescriptorHelper.php',
|
||||
'Symfony\\Component\\Form\\DataAccessorInterface' => __DIR__ . '/..' . '/symfony/form/DataAccessorInterface.php',
|
||||
'Symfony\\Component\\Form\\DataMapperInterface' => __DIR__ . '/..' . '/symfony/form/DataMapperInterface.php',
|
||||
'Symfony\\Component\\Form\\DataTransformerInterface' => __DIR__ . '/..' . '/symfony/form/DataTransformerInterface.php',
|
||||
'Symfony\\Component\\Form\\DependencyInjection\\FormPass' => __DIR__ . '/..' . '/symfony/form/DependencyInjection/FormPass.php',
|
||||
'Symfony\\Component\\Form\\Event\\PostSetDataEvent' => __DIR__ . '/..' . '/symfony/form/Event/PostSetDataEvent.php',
|
||||
'Symfony\\Component\\Form\\Event\\PostSubmitEvent' => __DIR__ . '/..' . '/symfony/form/Event/PostSubmitEvent.php',
|
||||
'Symfony\\Component\\Form\\Event\\PreSetDataEvent' => __DIR__ . '/..' . '/symfony/form/Event/PreSetDataEvent.php',
|
||||
'Symfony\\Component\\Form\\Event\\PreSubmitEvent' => __DIR__ . '/..' . '/symfony/form/Event/PreSubmitEvent.php',
|
||||
'Symfony\\Component\\Form\\Event\\SubmitEvent' => __DIR__ . '/..' . '/symfony/form/Event/SubmitEvent.php',
|
||||
'Symfony\\Component\\Form\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/form/Exception/AccessException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\AlreadySubmittedException' => __DIR__ . '/..' . '/symfony/form/Exception/AlreadySubmittedException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/symfony/form/Exception/BadMethodCallException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\ErrorMappingException' => __DIR__ . '/..' . '/symfony/form/Exception/ErrorMappingException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/form/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\Form\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/form/Exception/InvalidArgumentException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\InvalidConfigurationException' => __DIR__ . '/..' . '/symfony/form/Exception/InvalidConfigurationException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/form/Exception/LogicException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/symfony/form/Exception/OutOfBoundsException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/form/Exception/RuntimeException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\StringCastException' => __DIR__ . '/..' . '/symfony/form/Exception/StringCastException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\TransformationFailedException' => __DIR__ . '/..' . '/symfony/form/Exception/TransformationFailedException.php',
|
||||
'Symfony\\Component\\Form\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/form/Exception/UnexpectedTypeException.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\CoreExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Core/CoreExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\CallbackAccessor' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\ChainAccessor' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\PropertyPathAccessor' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\CheckboxListMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\DataMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataMapper/DataMapper.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\RadioListMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataMapper/RadioListMapper.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ArrayToPartsTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BaseDateTimeTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BooleanToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoiceToValueTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoicesToValuesTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DataTransformerChain' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToArrayTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeImmutableToDateTimeTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToArrayTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToHtml5LocalDateTimeTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToRfc3339Transformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToTimestampTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeZoneToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntegerToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntlTimeZoneToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\MoneyToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\PercentToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\StringToFloatTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UlidToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UuidToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ValueToDuplicatesTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\WeekToArrayTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\FixUrlProtocolListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\MergeCollectionListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\ResizeFormListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/ResizeFormListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TransformationFailureListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TrimListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/TrimListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/BaseType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/BirthdayType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ButtonType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\CheckboxType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CheckboxType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\ChoiceType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ChoiceType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\CollectionType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CollectionType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\ColorType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ColorType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CountryType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\CurrencyType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CurrencyType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateIntervalType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/DateIntervalType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateTimeType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/DateTimeType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/DateType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\EmailType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/EmailType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\EnumType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/EnumType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\FileType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/FileType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/FormType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/HiddenType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\IntegerType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/IntegerType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/LanguageType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/LocaleType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\MoneyType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/MoneyType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\NumberType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/NumberType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\PasswordType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/PasswordType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\PercentType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/PercentType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\RadioType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/RadioType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\RangeType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/RangeType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\RepeatedType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/RepeatedType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\ResetType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ResetType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\SearchType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/SearchType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/SubmitType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TelType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TelType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TextType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextareaType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TextareaType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimeType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TimeType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimezoneType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TimezoneType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\TransformationFailureExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TransformationFailureExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\UlidType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/UlidType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\UrlType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/UrlType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\UuidType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/UuidType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Core\\Type\\WeekType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/WeekType.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Csrf\\CsrfExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Csrf/CsrfExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Csrf\\EventListener\\CsrfValidationListener' => __DIR__ . '/..' . '/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Csrf\\Type\\FormTypeCsrfExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\DataCollectorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/DataCollectorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollector' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataCollector.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollectorInterface' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractor' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataExtractor.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractorInterface' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeDataCollectorProxy' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeFactoryDataCollectorProxy' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DataCollector\\Type\\DataCollectorTypeExtension' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\DependencyInjection\\DependencyInjectionExtension' => __DIR__ . '/..' . '/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\HtmlSanitizer\\HtmlSanitizerExtension' => __DIR__ . '/..' . '/symfony/form/Extension/HtmlSanitizer/HtmlSanitizerExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\HtmlSanitizer\\Type\\TextTypeHtmlSanitizerExtension' => __DIR__ . '/..' . '/symfony/form/Extension/HtmlSanitizer/Type/TextTypeHtmlSanitizerExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationExtension' => __DIR__ . '/..' . '/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationRequestHandler' => __DIR__ . '/..' . '/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php',
|
||||
'Symfony\\Component\\Form\\Extension\\HttpFoundation\\Type\\FormTypeHttpFoundationExtension' => __DIR__ . '/..' . '/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\PasswordHasher\\EventListener\\PasswordHasherListener' => __DIR__ . '/..' . '/symfony/form/Extension/PasswordHasher/EventListener/PasswordHasherListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\PasswordHasher\\PasswordHasherExtension' => __DIR__ . '/..' . '/symfony/form/Extension/PasswordHasher/PasswordHasherExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\PasswordHasher\\Type\\FormTypePasswordHasherExtension' => __DIR__ . '/..' . '/symfony/form/Extension/PasswordHasher/Type/FormTypePasswordHasherExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\PasswordHasher\\Type\\PasswordTypePasswordHasherExtension' => __DIR__ . '/..' . '/symfony/form/Extension/PasswordHasher/Type/PasswordTypePasswordHasherExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\Form' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Constraints/Form.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\FormValidator' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Constraints/FormValidator.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\EventListener\\ValidationListener' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/EventListener/ValidationListener.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Type\\BaseValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Type\\FormTypeValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Type\\RepeatedTypeValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Type\\SubmitTypeValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\Type\\UploadValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ValidatorExtension.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ValidatorTypeGuesser.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\MappingRule' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\RelativePath' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapperInterface' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPath' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php',
|
||||
'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPathIterator' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php',
|
||||
'Symfony\\Component\\Form\\FileUploadError' => __DIR__ . '/..' . '/symfony/form/FileUploadError.php',
|
||||
'Symfony\\Component\\Form\\Form' => __DIR__ . '/..' . '/symfony/form/Form.php',
|
||||
'Symfony\\Component\\Form\\FormBuilder' => __DIR__ . '/..' . '/symfony/form/FormBuilder.php',
|
||||
'Symfony\\Component\\Form\\FormBuilderInterface' => __DIR__ . '/..' . '/symfony/form/FormBuilderInterface.php',
|
||||
'Symfony\\Component\\Form\\FormConfigBuilder' => __DIR__ . '/..' . '/symfony/form/FormConfigBuilder.php',
|
||||
'Symfony\\Component\\Form\\FormConfigBuilderInterface' => __DIR__ . '/..' . '/symfony/form/FormConfigBuilderInterface.php',
|
||||
'Symfony\\Component\\Form\\FormConfigInterface' => __DIR__ . '/..' . '/symfony/form/FormConfigInterface.php',
|
||||
'Symfony\\Component\\Form\\FormError' => __DIR__ . '/..' . '/symfony/form/FormError.php',
|
||||
'Symfony\\Component\\Form\\FormErrorIterator' => __DIR__ . '/..' . '/symfony/form/FormErrorIterator.php',
|
||||
'Symfony\\Component\\Form\\FormEvent' => __DIR__ . '/..' . '/symfony/form/FormEvent.php',
|
||||
'Symfony\\Component\\Form\\FormEvents' => __DIR__ . '/..' . '/symfony/form/FormEvents.php',
|
||||
'Symfony\\Component\\Form\\FormExtensionInterface' => __DIR__ . '/..' . '/symfony/form/FormExtensionInterface.php',
|
||||
'Symfony\\Component\\Form\\FormFactory' => __DIR__ . '/..' . '/symfony/form/FormFactory.php',
|
||||
'Symfony\\Component\\Form\\FormFactoryBuilder' => __DIR__ . '/..' . '/symfony/form/FormFactoryBuilder.php',
|
||||
'Symfony\\Component\\Form\\FormFactoryBuilderInterface' => __DIR__ . '/..' . '/symfony/form/FormFactoryBuilderInterface.php',
|
||||
'Symfony\\Component\\Form\\FormFactoryInterface' => __DIR__ . '/..' . '/symfony/form/FormFactoryInterface.php',
|
||||
'Symfony\\Component\\Form\\FormInterface' => __DIR__ . '/..' . '/symfony/form/FormInterface.php',
|
||||
'Symfony\\Component\\Form\\FormRegistry' => __DIR__ . '/..' . '/symfony/form/FormRegistry.php',
|
||||
'Symfony\\Component\\Form\\FormRegistryInterface' => __DIR__ . '/..' . '/symfony/form/FormRegistryInterface.php',
|
||||
'Symfony\\Component\\Form\\FormRenderer' => __DIR__ . '/..' . '/symfony/form/FormRenderer.php',
|
||||
'Symfony\\Component\\Form\\FormRendererEngineInterface' => __DIR__ . '/..' . '/symfony/form/FormRendererEngineInterface.php',
|
||||
'Symfony\\Component\\Form\\FormRendererInterface' => __DIR__ . '/..' . '/symfony/form/FormRendererInterface.php',
|
||||
'Symfony\\Component\\Form\\FormTypeExtensionInterface' => __DIR__ . '/..' . '/symfony/form/FormTypeExtensionInterface.php',
|
||||
'Symfony\\Component\\Form\\FormTypeGuesserChain' => __DIR__ . '/..' . '/symfony/form/FormTypeGuesserChain.php',
|
||||
'Symfony\\Component\\Form\\FormTypeGuesserInterface' => __DIR__ . '/..' . '/symfony/form/FormTypeGuesserInterface.php',
|
||||
'Symfony\\Component\\Form\\FormTypeInterface' => __DIR__ . '/..' . '/symfony/form/FormTypeInterface.php',
|
||||
'Symfony\\Component\\Form\\FormView' => __DIR__ . '/..' . '/symfony/form/FormView.php',
|
||||
'Symfony\\Component\\Form\\Forms' => __DIR__ . '/..' . '/symfony/form/Forms.php',
|
||||
'Symfony\\Component\\Form\\Guess\\Guess' => __DIR__ . '/..' . '/symfony/form/Guess/Guess.php',
|
||||
'Symfony\\Component\\Form\\Guess\\TypeGuess' => __DIR__ . '/..' . '/symfony/form/Guess/TypeGuess.php',
|
||||
'Symfony\\Component\\Form\\Guess\\ValueGuess' => __DIR__ . '/..' . '/symfony/form/Guess/ValueGuess.php',
|
||||
'Symfony\\Component\\Form\\NativeRequestHandler' => __DIR__ . '/..' . '/symfony/form/NativeRequestHandler.php',
|
||||
'Symfony\\Component\\Form\\PreloadedExtension' => __DIR__ . '/..' . '/symfony/form/PreloadedExtension.php',
|
||||
'Symfony\\Component\\Form\\RequestHandlerInterface' => __DIR__ . '/..' . '/symfony/form/RequestHandlerInterface.php',
|
||||
'Symfony\\Component\\Form\\ResolvedFormType' => __DIR__ . '/..' . '/symfony/form/ResolvedFormType.php',
|
||||
'Symfony\\Component\\Form\\ResolvedFormTypeFactory' => __DIR__ . '/..' . '/symfony/form/ResolvedFormTypeFactory.php',
|
||||
'Symfony\\Component\\Form\\ResolvedFormTypeFactoryInterface' => __DIR__ . '/..' . '/symfony/form/ResolvedFormTypeFactoryInterface.php',
|
||||
'Symfony\\Component\\Form\\ResolvedFormTypeInterface' => __DIR__ . '/..' . '/symfony/form/ResolvedFormTypeInterface.php',
|
||||
'Symfony\\Component\\Form\\ReversedTransformer' => __DIR__ . '/..' . '/symfony/form/ReversedTransformer.php',
|
||||
'Symfony\\Component\\Form\\SubmitButton' => __DIR__ . '/..' . '/symfony/form/SubmitButton.php',
|
||||
'Symfony\\Component\\Form\\SubmitButtonBuilder' => __DIR__ . '/..' . '/symfony/form/SubmitButtonBuilder.php',
|
||||
'Symfony\\Component\\Form\\SubmitButtonTypeInterface' => __DIR__ . '/..' . '/symfony/form/SubmitButtonTypeInterface.php',
|
||||
'Symfony\\Component\\Form\\Util\\FormUtil' => __DIR__ . '/..' . '/symfony/form/Util/FormUtil.php',
|
||||
'Symfony\\Component\\Form\\Util\\InheritDataAwareIterator' => __DIR__ . '/..' . '/symfony/form/Util/InheritDataAwareIterator.php',
|
||||
'Symfony\\Component\\Form\\Util\\OptionsResolverWrapper' => __DIR__ . '/..' . '/symfony/form/Util/OptionsResolverWrapper.php',
|
||||
'Symfony\\Component\\Form\\Util\\OrderedHashMap' => __DIR__ . '/..' . '/symfony/form/Util/OrderedHashMap.php',
|
||||
'Symfony\\Component\\Form\\Util\\OrderedHashMapIterator' => __DIR__ . '/..' . '/symfony/form/Util/OrderedHashMapIterator.php',
|
||||
'Symfony\\Component\\Form\\Util\\ServerParams' => __DIR__ . '/..' . '/symfony/form/Util/ServerParams.php',
|
||||
'Symfony\\Component\\Form\\Util\\StringUtil' => __DIR__ . '/..' . '/symfony/form/Util/StringUtil.php',
|
||||
'Symfony\\Component\\HttpFoundation\\AcceptHeader' => __DIR__ . '/..' . '/symfony/http-foundation/AcceptHeader.php',
|
||||
'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => __DIR__ . '/..' . '/symfony/http-foundation/AcceptHeaderItem.php',
|
||||
'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => __DIR__ . '/..' . '/symfony/http-foundation/BinaryFileResponse.php',
|
||||
@@ -2927,6 +3201,81 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'Symfony\\Component\\Mime\\Part\\SMimePart' => __DIR__ . '/..' . '/symfony/mime/Part/SMimePart.php',
|
||||
'Symfony\\Component\\Mime\\Part\\TextPart' => __DIR__ . '/..' . '/symfony/mime/Part/TextPart.php',
|
||||
'Symfony\\Component\\Mime\\RawMessage' => __DIR__ . '/..' . '/symfony/mime/RawMessage.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => __DIR__ . '/..' . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/AccessException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidArgumentException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidOptionsException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/MissingOptionsException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoConfigurationException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoSuchOptionException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/OptionDefinitionException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/UndefinedOptionsException.php',
|
||||
'Symfony\\Component\\OptionsResolver\\OptionConfigurator' => __DIR__ . '/..' . '/symfony/options-resolver/OptionConfigurator.php',
|
||||
'Symfony\\Component\\OptionsResolver\\Options' => __DIR__ . '/..' . '/symfony/options-resolver/Options.php',
|
||||
'Symfony\\Component\\OptionsResolver\\OptionsResolver' => __DIR__ . '/..' . '/symfony/options-resolver/OptionsResolver.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Command\\UserPasswordHashCommand' => __DIR__ . '/..' . '/symfony/password-hasher/Command/UserPasswordHashCommand.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/password-hasher/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Exception\\InvalidPasswordException' => __DIR__ . '/..' . '/symfony/password-hasher/Exception/InvalidPasswordException.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/password-hasher/Exception/LogicException.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\CheckPasswordLengthTrait' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/CheckPasswordLengthTrait.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\MessageDigestPasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/MessageDigestPasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\MigratingPasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/MigratingPasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\NativePasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/NativePasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherAwareInterface' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/PasswordHasherAwareInterface.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherFactory' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/PasswordHasherFactory.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherFactoryInterface' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/PasswordHasherFactoryInterface.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\Pbkdf2PasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/Pbkdf2PasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\PlaintextPasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/PlaintextPasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\SodiumPasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/SodiumPasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/UserPasswordHasher.php',
|
||||
'Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasherInterface' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/UserPasswordHasherInterface.php',
|
||||
'Symfony\\Component\\PasswordHasher\\LegacyPasswordHasherInterface' => __DIR__ . '/..' . '/symfony/password-hasher/LegacyPasswordHasherInterface.php',
|
||||
'Symfony\\Component\\PasswordHasher\\PasswordHasherInterface' => __DIR__ . '/..' . '/symfony/password-hasher/PasswordHasherInterface.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/property-access/Exception/AccessException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/property-access/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/property-access/Exception/InvalidArgumentException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\InvalidPropertyPathException' => __DIR__ . '/..' . '/symfony/property-access/Exception/InvalidPropertyPathException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchIndexException' => __DIR__ . '/..' . '/symfony/property-access/Exception/NoSuchIndexException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchPropertyException' => __DIR__ . '/..' . '/symfony/property-access/Exception/NoSuchPropertyException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/symfony/property-access/Exception/OutOfBoundsException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/property-access/Exception/RuntimeException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/property-access/Exception/UnexpectedTypeException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\Exception\\UninitializedPropertyException' => __DIR__ . '/..' . '/symfony/property-access/Exception/UninitializedPropertyException.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyAccess' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccess.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyAccessor' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccessor.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyAccessorBuilder' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccessorBuilder.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyAccessorInterface' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccessorInterface.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyPath' => __DIR__ . '/..' . '/symfony/property-access/PropertyPath.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyPathBuilder' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathBuilder.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyPathInterface' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathInterface.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyPathIterator' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathIterator.php',
|
||||
'Symfony\\Component\\PropertyAccess\\PropertyPathIteratorInterface' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathIteratorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoConstructorPass' => __DIR__ . '/..' . '/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php',
|
||||
'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoPass' => __DIR__ . '/..' . '/symfony/property-info/DependencyInjection/PropertyInfoPass.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorArgumentTypeExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/ConstructorExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\PhpDocExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/PhpDocExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\PhpStanExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/PhpStanExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\ReflectionExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/ReflectionExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Extractor\\SerializerExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/SerializerExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScope' => __DIR__ . '/..' . '/symfony/property-info/PhpStan/NameScope.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScopeFactory' => __DIR__ . '/..' . '/symfony/property-info/PhpStan/NameScopeFactory.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyAccessExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyDescriptionExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyInfoCacheExtractor' => __DIR__ . '/..' . '/symfony/property-info/PropertyInfoCacheExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor' => __DIR__ . '/..' . '/symfony/property-info/PropertyInfoExtractor.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyInfoExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyInitializableExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyInitializableExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyListExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyReadInfo' => __DIR__ . '/..' . '/symfony/property-info/PropertyReadInfo.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyReadInfoExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyReadInfoExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyTypeExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyTypeExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyWriteInfo' => __DIR__ . '/..' . '/symfony/property-info/PropertyWriteInfo.php',
|
||||
'Symfony\\Component\\PropertyInfo\\PropertyWriteInfoExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyWriteInfoExtractorInterface.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Type' => __DIR__ . '/..' . '/symfony/property-info/Type.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Util\\PhpDocTypeHelper' => __DIR__ . '/..' . '/symfony/property-info/Util/PhpDocTypeHelper.php',
|
||||
'Symfony\\Component\\PropertyInfo\\Util\\PhpStanTypeHelper' => __DIR__ . '/..' . '/symfony/property-info/Util/PhpStanTypeHelper.php',
|
||||
'Symfony\\Component\\Routing\\Alias' => __DIR__ . '/..' . '/symfony/routing/Alias.php',
|
||||
'Symfony\\Component\\Routing\\Annotation\\Route' => __DIR__ . '/..' . '/symfony/routing/Annotation/Route.php',
|
||||
'Symfony\\Component\\Routing\\Attribute\\Route' => __DIR__ . '/..' . '/symfony/routing/Attribute/Route.php',
|
||||
@@ -3013,6 +3362,113 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'Symfony\\Component\\Runtime\\Runner\\Symfony\\ResponseRunner' => __DIR__ . '/..' . '/symfony/runtime/Runner/Symfony/ResponseRunner.php',
|
||||
'Symfony\\Component\\Runtime\\RuntimeInterface' => __DIR__ . '/..' . '/symfony/runtime/RuntimeInterface.php',
|
||||
'Symfony\\Component\\Runtime\\SymfonyRuntime' => __DIR__ . '/..' . '/symfony/runtime/SymfonyRuntime.php',
|
||||
'Symfony\\Component\\Security\\Core\\AuthenticationEvents' => __DIR__ . '/..' . '/symfony/security-core/AuthenticationEvents.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolver' => __DIR__ . '/..' . '/symfony/security-core/Authentication/AuthenticationTrustResolver.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolverInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/AuthenticationTrustResolverInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\CacheTokenVerifier' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/CacheTokenVerifier.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\InMemoryTokenProvider' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/InMemoryTokenProvider.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\PersistentToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/PersistentToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\PersistentTokenInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/PersistentTokenInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\TokenProviderInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/TokenProviderInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\TokenVerifierInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/TokenVerifierInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AbstractToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/AbstractToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\NullToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/NullToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\PreAuthenticatedToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/PreAuthenticatedToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/RememberMeToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorage' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/Storage/TokenStorage.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorageInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/Storage/TokenStorageInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\UsageTrackingTokenStorage' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/Storage/UsageTrackingTokenStorage.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\SwitchUserToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/SwitchUserToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/TokenInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/UsernamePasswordToken.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\AccessDecisionManager' => __DIR__ . '/..' . '/symfony/security-core/Authorization/AccessDecisionManager.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\AccessDecisionManagerInterface' => __DIR__ . '/..' . '/symfony/security-core/Authorization/AccessDecisionManagerInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationChecker' => __DIR__ . '/..' . '/symfony/security-core/Authorization/AuthorizationChecker.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationCheckerInterface' => __DIR__ . '/..' . '/symfony/security-core/Authorization/AuthorizationCheckerInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\ExpressionLanguage' => __DIR__ . '/..' . '/symfony/security-core/Authorization/ExpressionLanguage.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\ExpressionLanguageProvider' => __DIR__ . '/..' . '/symfony/security-core/Authorization/ExpressionLanguageProvider.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\AccessDecisionStrategyInterface' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Strategy/AccessDecisionStrategyInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\AffirmativeStrategy' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Strategy/AffirmativeStrategy.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\ConsensusStrategy' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Strategy/ConsensusStrategy.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\PriorityStrategy' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Strategy/PriorityStrategy.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\UnanimousStrategy' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Strategy/UnanimousStrategy.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\TraceableAccessDecisionManager' => __DIR__ . '/..' . '/symfony/security-core/Authorization/TraceableAccessDecisionManager.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\AuthenticatedVoter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/AuthenticatedVoter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\CacheableVoterInterface' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/CacheableVoterInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\ExpressionVoter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/ExpressionVoter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\RoleHierarchyVoter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/RoleHierarchyVoter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\RoleVoter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/RoleVoter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\TraceableVoter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/TraceableVoter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\Voter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/Voter.php',
|
||||
'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/VoterInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Event\\AuthenticationEvent' => __DIR__ . '/..' . '/symfony/security-core/Event/AuthenticationEvent.php',
|
||||
'Symfony\\Component\\Security\\Core\\Event\\AuthenticationSuccessEvent' => __DIR__ . '/..' . '/symfony/security-core/Event/AuthenticationSuccessEvent.php',
|
||||
'Symfony\\Component\\Security\\Core\\Event\\VoteEvent' => __DIR__ . '/..' . '/symfony/security-core/Event/VoteEvent.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AccessDeniedException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AccountExpiredException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AccountExpiredException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AccountStatusException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AccountStatusException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationCredentialsNotFoundException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AuthenticationCredentialsNotFoundException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AuthenticationException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationExpiredException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AuthenticationExpiredException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationServiceException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AuthenticationServiceException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\BadCredentialsException' => __DIR__ . '/..' . '/symfony/security-core/Exception/BadCredentialsException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\CookieTheftException' => __DIR__ . '/..' . '/symfony/security-core/Exception/CookieTheftException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\CredentialsExpiredException' => __DIR__ . '/..' . '/symfony/security-core/Exception/CredentialsExpiredException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\CustomUserMessageAccountStatusException' => __DIR__ . '/..' . '/symfony/security-core/Exception/CustomUserMessageAccountStatusException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\CustomUserMessageAuthenticationException' => __DIR__ . '/..' . '/symfony/security-core/Exception/CustomUserMessageAuthenticationException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\DisabledException' => __DIR__ . '/..' . '/symfony/security-core/Exception/DisabledException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/security-core/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\InsufficientAuthenticationException' => __DIR__ . '/..' . '/symfony/security-core/Exception/InsufficientAuthenticationException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/security-core/Exception/InvalidArgumentException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\InvalidCsrfTokenException' => __DIR__ . '/..' . '/symfony/security-core/Exception/InvalidCsrfTokenException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\LazyResponseException' => __DIR__ . '/..' . '/symfony/security-core/Exception/LazyResponseException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\LockedException' => __DIR__ . '/..' . '/symfony/security-core/Exception/LockedException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/security-core/Exception/LogicException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\LogoutException' => __DIR__ . '/..' . '/symfony/security-core/Exception/LogoutException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\ProviderNotFoundException' => __DIR__ . '/..' . '/symfony/security-core/Exception/ProviderNotFoundException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/security-core/Exception/RuntimeException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\SessionUnavailableException' => __DIR__ . '/..' . '/symfony/security-core/Exception/SessionUnavailableException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\TokenNotFoundException' => __DIR__ . '/..' . '/symfony/security-core/Exception/TokenNotFoundException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\TooManyLoginAttemptsAuthenticationException' => __DIR__ . '/..' . '/symfony/security-core/Exception/TooManyLoginAttemptsAuthenticationException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\UnsupportedUserException' => __DIR__ . '/..' . '/symfony/security-core/Exception/UnsupportedUserException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Exception\\UserNotFoundException' => __DIR__ . '/..' . '/symfony/security-core/Exception/UserNotFoundException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Role\\Role' => __DIR__ . '/..' . '/symfony/security-core/Role/Role.php',
|
||||
'Symfony\\Component\\Security\\Core\\Role\\RoleHierarchy' => __DIR__ . '/..' . '/symfony/security-core/Role/RoleHierarchy.php',
|
||||
'Symfony\\Component\\Security\\Core\\Role\\RoleHierarchyInterface' => __DIR__ . '/..' . '/symfony/security-core/Role/RoleHierarchyInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Role\\SwitchUserRole' => __DIR__ . '/..' . '/symfony/security-core/Role/SwitchUserRole.php',
|
||||
'Symfony\\Component\\Security\\Core\\Security' => __DIR__ . '/..' . '/symfony/security-core/Security.php',
|
||||
'Symfony\\Component\\Security\\Core\\Signature\\Exception\\ExpiredSignatureException' => __DIR__ . '/..' . '/symfony/security-core/Signature/Exception/ExpiredSignatureException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Signature\\Exception\\InvalidSignatureException' => __DIR__ . '/..' . '/symfony/security-core/Signature/Exception/InvalidSignatureException.php',
|
||||
'Symfony\\Component\\Security\\Core\\Signature\\ExpiredSignatureStorage' => __DIR__ . '/..' . '/symfony/security-core/Signature/ExpiredSignatureStorage.php',
|
||||
'Symfony\\Component\\Security\\Core\\Signature\\SignatureHasher' => __DIR__ . '/..' . '/symfony/security-core/Signature/SignatureHasher.php',
|
||||
'Symfony\\Component\\Security\\Core\\Test\\AccessDecisionStrategyTestCase' => __DIR__ . '/..' . '/symfony/security-core/Test/AccessDecisionStrategyTestCase.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\AttributesBasedUserProviderInterface' => __DIR__ . '/..' . '/symfony/security-core/User/AttributesBasedUserProviderInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\ChainUserChecker' => __DIR__ . '/..' . '/symfony/security-core/User/ChainUserChecker.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\ChainUserProvider' => __DIR__ . '/..' . '/symfony/security-core/User/ChainUserProvider.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\EquatableInterface' => __DIR__ . '/..' . '/symfony/security-core/User/EquatableInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\InMemoryUser' => __DIR__ . '/..' . '/symfony/security-core/User/InMemoryUser.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\InMemoryUserChecker' => __DIR__ . '/..' . '/symfony/security-core/User/InMemoryUserChecker.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\InMemoryUserProvider' => __DIR__ . '/..' . '/symfony/security-core/User/InMemoryUserProvider.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\LegacyPasswordAuthenticatedUserInterface' => __DIR__ . '/..' . '/symfony/security-core/User/LegacyPasswordAuthenticatedUserInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\MissingUserProvider' => __DIR__ . '/..' . '/symfony/security-core/User/MissingUserProvider.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\OidcUser' => __DIR__ . '/..' . '/symfony/security-core/User/OidcUser.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\PasswordAuthenticatedUserInterface' => __DIR__ . '/..' . '/symfony/security-core/User/PasswordAuthenticatedUserInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\PasswordUpgraderInterface' => __DIR__ . '/..' . '/symfony/security-core/User/PasswordUpgraderInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface' => __DIR__ . '/..' . '/symfony/security-core/User/UserCheckerInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\UserInterface' => __DIR__ . '/..' . '/symfony/security-core/User/UserInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\User\\UserProviderInterface' => __DIR__ . '/..' . '/symfony/security-core/User/UserProviderInterface.php',
|
||||
'Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPassword' => __DIR__ . '/..' . '/symfony/security-core/Validator/Constraints/UserPassword.php',
|
||||
'Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPasswordValidator' => __DIR__ . '/..' . '/symfony/security-core/Validator/Constraints/UserPasswordValidator.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\CsrfToken' => __DIR__ . '/..' . '/symfony/security-csrf/CsrfToken.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\CsrfTokenManager' => __DIR__ . '/..' . '/symfony/security-csrf/CsrfTokenManager.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface' => __DIR__ . '/..' . '/symfony/security-csrf/CsrfTokenManagerInterface.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\Exception\\TokenNotFoundException' => __DIR__ . '/..' . '/symfony/security-csrf/Exception/TokenNotFoundException.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenGenerator\\TokenGeneratorInterface' => __DIR__ . '/..' . '/symfony/security-csrf/TokenGenerator/TokenGeneratorInterface.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenGenerator\\UriSafeTokenGenerator' => __DIR__ . '/..' . '/symfony/security-csrf/TokenGenerator/UriSafeTokenGenerator.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenStorage\\ClearableTokenStorageInterface' => __DIR__ . '/..' . '/symfony/security-csrf/TokenStorage/ClearableTokenStorageInterface.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenStorage\\NativeSessionTokenStorage' => __DIR__ . '/..' . '/symfony/security-csrf/TokenStorage/NativeSessionTokenStorage.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenStorage\\SessionTokenStorage' => __DIR__ . '/..' . '/symfony/security-csrf/TokenStorage/SessionTokenStorage.php',
|
||||
'Symfony\\Component\\Security\\Csrf\\TokenStorage\\TokenStorageInterface' => __DIR__ . '/..' . '/symfony/security-csrf/TokenStorage/TokenStorageInterface.php',
|
||||
'Symfony\\Component\\Stopwatch\\Section' => __DIR__ . '/..' . '/symfony/stopwatch/Section.php',
|
||||
'Symfony\\Component\\Stopwatch\\Stopwatch' => __DIR__ . '/..' . '/symfony/stopwatch/Stopwatch.php',
|
||||
'Symfony\\Component\\Stopwatch\\StopwatchEvent' => __DIR__ . '/..' . '/symfony/stopwatch/StopwatchEvent.php',
|
||||
@@ -3151,6 +3607,35 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
|
||||
'Symfony\\Contracts\\Translation\\TranslatorTrait' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorTrait.php',
|
||||
'Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php',
|
||||
'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/Grapheme.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Collator' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Collator.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Currencies' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Currencies.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\AmPmTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfWeekTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfYearTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\FullTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1200Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1201Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2400Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2401Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\HourTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MinuteTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MonthTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\QuarterTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\SecondTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\TimezoneTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Transformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\YearTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentNotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentValueNotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodNotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\NotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/NotImplementedException.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/RuntimeException.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Icu' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Icu.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/IntlDateFormatter.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\Locale' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Locale.php',
|
||||
'Symfony\\Polyfill\\Intl\\Icu\\NumberFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/NumberFormatter.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Idn.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Info' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Info.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',
|
||||
|
||||
@@ -2936,6 +2936,110 @@
|
||||
],
|
||||
"install-path": "../symfony/finder"
|
||||
},
|
||||
{
|
||||
"name": "symfony/form",
|
||||
"version": "v6.4.26",
|
||||
"version_normalized": "6.4.26.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/form.git",
|
||||
"reference": "b40cdbe70be9274ea807ef61da7d0f8d1c70dc51"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/form/zipball/b40cdbe70be9274ea807ef61da7d0f8d1c70dc51",
|
||||
"reference": "b40cdbe70be9274ea807ef61da7d0f8d1c70dc51",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/deprecation-contracts": "^2.5|^3",
|
||||
"symfony/event-dispatcher": "^5.4|^6.0|^7.0",
|
||||
"symfony/options-resolver": "^5.4|^6.0|^7.0",
|
||||
"symfony/polyfill-ctype": "~1.8",
|
||||
"symfony/polyfill-intl-icu": "^1.21",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/property-access": "^5.4|^6.0|^7.0",
|
||||
"symfony/service-contracts": "^2.5|^3"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/console": "<5.4",
|
||||
"symfony/dependency-injection": "<5.4",
|
||||
"symfony/doctrine-bridge": "<5.4.21|>=6,<6.2.7",
|
||||
"symfony/error-handler": "<5.4",
|
||||
"symfony/framework-bundle": "<5.4",
|
||||
"symfony/http-kernel": "<5.4",
|
||||
"symfony/translation": "<5.4.35|>=6.0,<6.3.12|>=6.4,<6.4.3|>=7.0,<7.0.3",
|
||||
"symfony/translation-contracts": "<2.5",
|
||||
"symfony/twig-bridge": "<6.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/collections": "^1.0|^2.0",
|
||||
"symfony/config": "^5.4|^6.0|^7.0",
|
||||
"symfony/console": "^5.4|^6.0|^7.0",
|
||||
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
|
||||
"symfony/expression-language": "^5.4|^6.0|^7.0",
|
||||
"symfony/html-sanitizer": "^6.1|^7.0",
|
||||
"symfony/http-foundation": "^5.4|^6.0|^7.0",
|
||||
"symfony/http-kernel": "^5.4|^6.0|^7.0",
|
||||
"symfony/intl": "^5.4|^6.0|^7.0",
|
||||
"symfony/security-core": "^6.2|^7.0",
|
||||
"symfony/security-csrf": "^5.4|^6.0|^7.0",
|
||||
"symfony/translation": "^5.4.35|~6.3.12|^6.4.3|^7.0.3",
|
||||
"symfony/uid": "^5.4|^6.0|^7.0",
|
||||
"symfony/validator": "^5.4|^6.0|^7.0",
|
||||
"symfony/var-dumper": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"time": "2025-09-20T07:40:41+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Form\\": ""
|
||||
},
|
||||
"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 to easily create, process and reuse HTML forms",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/form/tree/v6.4.26"
|
||||
},
|
||||
"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/form"
|
||||
},
|
||||
{
|
||||
"name": "symfony/framework-bundle",
|
||||
"version": "v6.4.25",
|
||||
@@ -3476,6 +3580,159 @@
|
||||
],
|
||||
"install-path": "../symfony/mime"
|
||||
},
|
||||
{
|
||||
"name": "symfony/options-resolver",
|
||||
"version": "v6.4.25",
|
||||
"version_normalized": "6.4.25.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/options-resolver.git",
|
||||
"reference": "d28e7e2db8a73e9511df892d36445f61314bbebe"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/d28e7e2db8a73e9511df892d36445f61314bbebe",
|
||||
"reference": "d28e7e2db8a73e9511df892d36445f61314bbebe",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/deprecation-contracts": "^2.5|^3"
|
||||
},
|
||||
"time": "2025-08-04T17:06:28+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\OptionsResolver\\": ""
|
||||
},
|
||||
"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 an improved replacement for the array_replace PHP function",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"config",
|
||||
"configuration",
|
||||
"options"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/options-resolver/tree/v6.4.25"
|
||||
},
|
||||
"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/options-resolver"
|
||||
},
|
||||
{
|
||||
"name": "symfony/password-hasher",
|
||||
"version": "v6.4.24",
|
||||
"version_normalized": "6.4.24.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/password-hasher.git",
|
||||
"reference": "dcab5ac87450aaed26483ba49c2ce86808da7557"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/password-hasher/zipball/dcab5ac87450aaed26483ba49c2ce86808da7557",
|
||||
"reference": "dcab5ac87450aaed26483ba49c2ce86808da7557",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/security-core": "<5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/console": "^5.4|^6.0|^7.0",
|
||||
"symfony/security-core": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"time": "2025-07-10T08:14:14+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\PasswordHasher\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Robin Chalas",
|
||||
"email": "robin.chalas@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Provides password hashing utilities",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"hashing",
|
||||
"password"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/password-hasher/tree/v6.4.24"
|
||||
},
|
||||
"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/password-hasher"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.33.0",
|
||||
@@ -3647,6 +3904,97 @@
|
||||
],
|
||||
"install-path": "../symfony/polyfill-intl-grapheme"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-icu",
|
||||
"version": "v1.33.0",
|
||||
"version_normalized": "1.33.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-icu.git",
|
||||
"reference": "bfc8fa13dbaf21d69114b0efcd72ab700fb04d0c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/bfc8fa13dbaf21d69114b0efcd72ab700fb04d0c",
|
||||
"reference": "bfc8fa13dbaf21d69114b0efcd72ab700fb04d0c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance and support of other locales than \"en\""
|
||||
},
|
||||
"time": "2025-06-20T22:24:30+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\\Icu\\": ""
|
||||
},
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
],
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for intl's ICU-related data and classes",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"icu",
|
||||
"intl",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-icu/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-icu"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.33.0",
|
||||
@@ -3996,6 +4344,183 @@
|
||||
],
|
||||
"install-path": "../symfony/polyfill-php83"
|
||||
},
|
||||
{
|
||||
"name": "symfony/property-access",
|
||||
"version": "v6.4.25",
|
||||
"version_normalized": "6.4.25.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/property-access.git",
|
||||
"reference": "fedc771326d4978a7d3167fa009a509b06a2e168"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/property-access/zipball/fedc771326d4978a7d3167fa009a509b06a2e168",
|
||||
"reference": "fedc771326d4978a7d3167fa009a509b06a2e168",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/deprecation-contracts": "^2.5|^3",
|
||||
"symfony/property-info": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/cache": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"time": "2025-08-12T15:42:57+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/v6.4.25"
|
||||
},
|
||||
"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": "v6.4.24",
|
||||
"version_normalized": "6.4.24.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/property-info.git",
|
||||
"reference": "1056ae3621eeddd78d7c5ec074f1c1784324eec6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/property-info/zipball/1056ae3621eeddd78d7c5ec074f1c1784324eec6",
|
||||
"reference": "1056ae3621eeddd78d7c5ec074f1c1784324eec6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/string": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/annotations": "<1.12",
|
||||
"phpdocumentor/reflection-docblock": "<5.2",
|
||||
"phpdocumentor/type-resolver": "<1.5.1",
|
||||
"symfony/cache": "<5.4",
|
||||
"symfony/dependency-injection": "<5.4|>=6.0,<6.4",
|
||||
"symfony/serializer": "<5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/annotations": "^1.12|^2",
|
||||
"phpdocumentor/reflection-docblock": "^5.2",
|
||||
"phpstan/phpdoc-parser": "^1.0|^2.0",
|
||||
"symfony/cache": "^5.4|^6.0|^7.0",
|
||||
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
|
||||
"symfony/serializer": "^5.4|^6.4|^7.0"
|
||||
},
|
||||
"time": "2025-07-14T16:38:25+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/v6.4.24"
|
||||
},
|
||||
"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": "v6.4.24",
|
||||
@@ -4172,6 +4697,174 @@
|
||||
],
|
||||
"install-path": "../symfony/runtime"
|
||||
},
|
||||
{
|
||||
"name": "symfony/security-core",
|
||||
"version": "v6.4.26",
|
||||
"version_normalized": "6.4.26.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/security-core.git",
|
||||
"reference": "8b7c95bf04d82fcd0c06a918b2d849bfb2ab9cc0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/security-core/zipball/8b7c95bf04d82fcd0c06a918b2d849bfb2ab9cc0",
|
||||
"reference": "8b7c95bf04d82fcd0c06a918b2d849bfb2ab9cc0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/deprecation-contracts": "^2.5|^3",
|
||||
"symfony/event-dispatcher-contracts": "^2.5|^3",
|
||||
"symfony/password-hasher": "^5.4|^6.0|^7.0",
|
||||
"symfony/service-contracts": "^2.5|^3"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/event-dispatcher": "<5.4",
|
||||
"symfony/http-foundation": "<5.4",
|
||||
"symfony/ldap": "<5.4",
|
||||
"symfony/security-guard": "<5.4",
|
||||
"symfony/translation": "<5.4.35|>=6.0,<6.3.12|>=6.4,<6.4.3|>=7.0,<7.0.3",
|
||||
"symfony/validator": "<5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/cache": "^1.0|^2.0|^3.0",
|
||||
"psr/container": "^1.1|^2.0",
|
||||
"psr/log": "^1|^2|^3",
|
||||
"symfony/cache": "^5.4|^6.0|^7.0",
|
||||
"symfony/event-dispatcher": "^5.4|^6.0|^7.0",
|
||||
"symfony/expression-language": "^5.4|^6.0|^7.0",
|
||||
"symfony/http-foundation": "^5.4|^6.0|^7.0",
|
||||
"symfony/ldap": "^5.4|^6.0|^7.0",
|
||||
"symfony/string": "^5.4|^6.0|^7.0",
|
||||
"symfony/translation": "^5.4.35|~6.3.12|^6.4.3|^7.0.3",
|
||||
"symfony/validator": "^6.4|^7.0"
|
||||
},
|
||||
"time": "2025-09-02T19:15:26+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Security\\Core\\": ""
|
||||
},
|
||||
"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": "Symfony Security Component - Core Library",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/security-core/tree/v6.4.26"
|
||||
},
|
||||
"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/security-core"
|
||||
},
|
||||
{
|
||||
"name": "symfony/security-csrf",
|
||||
"version": "v6.4.24",
|
||||
"version_normalized": "6.4.24.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/security-csrf.git",
|
||||
"reference": "9a1efc8c10b86bcedc9233affd10c716b54ca1b7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/security-csrf/zipball/9a1efc8c10b86bcedc9233affd10c716b54ca1b7",
|
||||
"reference": "9a1efc8c10b86bcedc9233affd10c716b54ca1b7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/security-core": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/http-foundation": "<5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/http-foundation": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"time": "2025-07-10T08:14:14+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Security\\Csrf\\": ""
|
||||
},
|
||||
"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": "Symfony Security Component - CSRF Library",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/security-csrf/tree/v6.4.24"
|
||||
},
|
||||
"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/security-csrf"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
"version": "v3.6.0",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
'name' => 'combodo/itop',
|
||||
'pretty_version' => 'dev-develop',
|
||||
'version' => 'dev-develop',
|
||||
'reference' => '7e515e7216f019f4c69e3699ad9bc6221988ff1e',
|
||||
'reference' => '6183a9d3f3accabe858d865d1050861c1b0d57ef',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -22,7 +22,7 @@
|
||||
'combodo/itop' => array(
|
||||
'pretty_version' => 'dev-develop',
|
||||
'version' => 'dev-develop',
|
||||
'reference' => '7e515e7216f019f4c69e3699ad9bc6221988ff1e',
|
||||
'reference' => '6183a9d3f3accabe858d865d1050861c1b0d57ef',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -447,6 +447,15 @@
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/form' => array(
|
||||
'pretty_version' => 'v6.4.26',
|
||||
'version' => '6.4.26.0',
|
||||
'reference' => 'b40cdbe70be9274ea807ef61da7d0f8d1c70dc51',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/form',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/framework-bundle' => array(
|
||||
'pretty_version' => 'v6.4.25',
|
||||
'version' => '6.4.25.0',
|
||||
@@ -492,6 +501,24 @@
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/options-resolver' => array(
|
||||
'pretty_version' => 'v6.4.25',
|
||||
'version' => '6.4.25.0',
|
||||
'reference' => 'd28e7e2db8a73e9511df892d36445f61314bbebe',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/options-resolver',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/password-hasher' => array(
|
||||
'pretty_version' => 'v6.4.24',
|
||||
'version' => '6.4.24.0',
|
||||
'reference' => 'dcab5ac87450aaed26483ba49c2ce86808da7557',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/password-hasher',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-ctype' => array(
|
||||
'pretty_version' => 'v1.33.0',
|
||||
'version' => '1.33.0.0',
|
||||
@@ -510,6 +537,15 @@
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-icu' => array(
|
||||
'pretty_version' => 'v1.33.0',
|
||||
'version' => '1.33.0.0',
|
||||
'reference' => 'bfc8fa13dbaf21d69114b0efcd72ab700fb04d0c',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-intl-icu',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-idn' => array(
|
||||
'pretty_version' => 'v1.33.0',
|
||||
'version' => '1.33.0.0',
|
||||
@@ -546,6 +582,24 @@
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/property-access' => array(
|
||||
'pretty_version' => 'v6.4.25',
|
||||
'version' => '6.4.25.0',
|
||||
'reference' => 'fedc771326d4978a7d3167fa009a509b06a2e168',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/property-access',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/property-info' => array(
|
||||
'pretty_version' => 'v6.4.24',
|
||||
'version' => '6.4.24.0',
|
||||
'reference' => '1056ae3621eeddd78d7c5ec074f1c1784324eec6',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/property-info',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/routing' => array(
|
||||
'pretty_version' => 'v6.4.24',
|
||||
'version' => '6.4.24.0',
|
||||
@@ -564,6 +618,24 @@
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/security-core' => array(
|
||||
'pretty_version' => 'v6.4.26',
|
||||
'version' => '6.4.26.0',
|
||||
'reference' => '8b7c95bf04d82fcd0c06a918b2d849bfb2ab9cc0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/security-core',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/security-csrf' => array(
|
||||
'pretty_version' => 'v6.4.24',
|
||||
'version' => '6.4.24.0',
|
||||
'reference' => '9a1efc8c10b86bcedc9233affd10c716b54ca1b7',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/security-csrf',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/service-contracts' => array(
|
||||
'pretty_version' => 'v3.6.0',
|
||||
'version' => '3.6.0.0',
|
||||
|
||||
179
lib/symfony/form/AbstractExtension.php
Normal file
179
lib/symfony/form/AbstractExtension.php
Normal file
@@ -0,0 +1,179 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
use Symfony\Component\Form\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
|
||||
/**
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
abstract class AbstractExtension implements FormExtensionInterface
|
||||
{
|
||||
/**
|
||||
* The types provided by this extension.
|
||||
*
|
||||
* @var FormTypeInterface[]
|
||||
*/
|
||||
private array $types;
|
||||
|
||||
/**
|
||||
* The type extensions provided by this extension.
|
||||
*
|
||||
* @var FormTypeExtensionInterface[][]
|
||||
*/
|
||||
private array $typeExtensions;
|
||||
|
||||
/**
|
||||
* The type guesser provided by this extension.
|
||||
*/
|
||||
private ?FormTypeGuesserInterface $typeGuesser = null;
|
||||
|
||||
/**
|
||||
* Whether the type guesser has been loaded.
|
||||
*/
|
||||
private bool $typeGuesserLoaded = false;
|
||||
|
||||
public function getType(string $name): FormTypeInterface
|
||||
{
|
||||
if (!isset($this->types)) {
|
||||
$this->initTypes();
|
||||
}
|
||||
|
||||
if (!isset($this->types[$name])) {
|
||||
throw new InvalidArgumentException(\sprintf('The type "%s" cannot be loaded by this extension.', $name));
|
||||
}
|
||||
|
||||
return $this->types[$name];
|
||||
}
|
||||
|
||||
public function hasType(string $name): bool
|
||||
{
|
||||
if (!isset($this->types)) {
|
||||
$this->initTypes();
|
||||
}
|
||||
|
||||
return isset($this->types[$name]);
|
||||
}
|
||||
|
||||
public function getTypeExtensions(string $name): array
|
||||
{
|
||||
if (!isset($this->typeExtensions)) {
|
||||
$this->initTypeExtensions();
|
||||
}
|
||||
|
||||
return $this->typeExtensions[$name]
|
||||
?? [];
|
||||
}
|
||||
|
||||
public function hasTypeExtensions(string $name): bool
|
||||
{
|
||||
if (!isset($this->typeExtensions)) {
|
||||
$this->initTypeExtensions();
|
||||
}
|
||||
|
||||
return isset($this->typeExtensions[$name]) && \count($this->typeExtensions[$name]) > 0;
|
||||
}
|
||||
|
||||
public function getTypeGuesser(): ?FormTypeGuesserInterface
|
||||
{
|
||||
if (!$this->typeGuesserLoaded) {
|
||||
$this->initTypeGuesser();
|
||||
}
|
||||
|
||||
return $this->typeGuesser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the types.
|
||||
*
|
||||
* @return FormTypeInterface[]
|
||||
*/
|
||||
protected function loadTypes()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the type extensions.
|
||||
*
|
||||
* @return FormTypeExtensionInterface[]
|
||||
*/
|
||||
protected function loadTypeExtensions(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the type guesser.
|
||||
*
|
||||
* @return FormTypeGuesserInterface|null
|
||||
*/
|
||||
protected function loadTypeGuesser()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the types.
|
||||
*
|
||||
* @throws UnexpectedTypeException if any registered type is not an instance of FormTypeInterface
|
||||
*/
|
||||
private function initTypes(): void
|
||||
{
|
||||
$this->types = [];
|
||||
|
||||
foreach ($this->loadTypes() as $type) {
|
||||
if (!$type instanceof FormTypeInterface) {
|
||||
throw new UnexpectedTypeException($type, FormTypeInterface::class);
|
||||
}
|
||||
|
||||
$this->types[$type::class] = $type;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the type extensions.
|
||||
*
|
||||
* @throws UnexpectedTypeException if any registered type extension is not
|
||||
* an instance of FormTypeExtensionInterface
|
||||
*/
|
||||
private function initTypeExtensions(): void
|
||||
{
|
||||
$this->typeExtensions = [];
|
||||
|
||||
foreach ($this->loadTypeExtensions() as $extension) {
|
||||
if (!$extension instanceof FormTypeExtensionInterface) {
|
||||
throw new UnexpectedTypeException($extension, FormTypeExtensionInterface::class);
|
||||
}
|
||||
|
||||
foreach ($extension::getExtendedTypes() as $extendedType) {
|
||||
$this->typeExtensions[$extendedType][] = $extension;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the type guesser.
|
||||
*
|
||||
* @throws UnexpectedTypeException if the type guesser is not an instance of FormTypeGuesserInterface
|
||||
*/
|
||||
private function initTypeGuesser(): void
|
||||
{
|
||||
$this->typeGuesserLoaded = true;
|
||||
|
||||
$this->typeGuesser = $this->loadTypeGuesser();
|
||||
if (null !== $this->typeGuesser && !$this->typeGuesser instanceof FormTypeGuesserInterface) {
|
||||
throw new UnexpectedTypeException($this->typeGuesser, FormTypeGuesserInterface::class);
|
||||
}
|
||||
}
|
||||
}
|
||||
197
lib/symfony/form/AbstractRendererEngine.php
Normal file
197
lib/symfony/form/AbstractRendererEngine.php
Normal file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
use Symfony\Contracts\Service\ResetInterface;
|
||||
|
||||
/**
|
||||
* Default implementation of {@link FormRendererEngineInterface}.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
abstract class AbstractRendererEngine implements FormRendererEngineInterface, ResetInterface
|
||||
{
|
||||
/**
|
||||
* The variable in {@link FormView} used as cache key.
|
||||
*/
|
||||
public const CACHE_KEY_VAR = 'cache_key';
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultThemes;
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
*/
|
||||
protected $themes = [];
|
||||
|
||||
/**
|
||||
* @var bool[]
|
||||
*/
|
||||
protected $useDefaultThemes = [];
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
*/
|
||||
protected $resources = [];
|
||||
|
||||
/**
|
||||
* @var array<array<int|false>>
|
||||
*/
|
||||
private array $resourceHierarchyLevels = [];
|
||||
|
||||
/**
|
||||
* Creates a new renderer engine.
|
||||
*
|
||||
* @param array $defaultThemes The default themes. The type of these
|
||||
* themes is open to the implementation.
|
||||
*/
|
||||
public function __construct(array $defaultThemes = [])
|
||||
{
|
||||
$this->defaultThemes = $defaultThemes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true)
|
||||
{
|
||||
$cacheKey = $view->vars[self::CACHE_KEY_VAR];
|
||||
|
||||
// Do not cast, as casting turns objects into arrays of properties
|
||||
$this->themes[$cacheKey] = \is_array($themes) ? $themes : [$themes];
|
||||
$this->useDefaultThemes[$cacheKey] = $useDefaultThemes;
|
||||
|
||||
// Unset instead of resetting to an empty array, in order to allow
|
||||
// implementations (like TwigRendererEngine) to check whether $cacheKey
|
||||
// is set at all.
|
||||
unset($this->resources[$cacheKey], $this->resourceHierarchyLevels[$cacheKey]);
|
||||
}
|
||||
|
||||
public function getResourceForBlockName(FormView $view, string $blockName): mixed
|
||||
{
|
||||
$cacheKey = $view->vars[self::CACHE_KEY_VAR];
|
||||
|
||||
if (!isset($this->resources[$cacheKey][$blockName])) {
|
||||
$this->loadResourceForBlockName($cacheKey, $view, $blockName);
|
||||
}
|
||||
|
||||
return $this->resources[$cacheKey][$blockName];
|
||||
}
|
||||
|
||||
public function getResourceForBlockNameHierarchy(FormView $view, array $blockNameHierarchy, int $hierarchyLevel): mixed
|
||||
{
|
||||
$cacheKey = $view->vars[self::CACHE_KEY_VAR];
|
||||
$blockName = $blockNameHierarchy[$hierarchyLevel];
|
||||
|
||||
if (!isset($this->resources[$cacheKey][$blockName])) {
|
||||
$this->loadResourceForBlockNameHierarchy($cacheKey, $view, $blockNameHierarchy, $hierarchyLevel);
|
||||
}
|
||||
|
||||
return $this->resources[$cacheKey][$blockName];
|
||||
}
|
||||
|
||||
public function getResourceHierarchyLevel(FormView $view, array $blockNameHierarchy, int $hierarchyLevel): int|false
|
||||
{
|
||||
$cacheKey = $view->vars[self::CACHE_KEY_VAR];
|
||||
$blockName = $blockNameHierarchy[$hierarchyLevel];
|
||||
|
||||
if (!isset($this->resources[$cacheKey][$blockName])) {
|
||||
$this->loadResourceForBlockNameHierarchy($cacheKey, $view, $blockNameHierarchy, $hierarchyLevel);
|
||||
}
|
||||
|
||||
// If $block was previously rendered loaded with loadTemplateForBlock(), the template
|
||||
// is cached but the hierarchy level is not. In this case, we know that the block
|
||||
// exists at this very hierarchy level, so we can just set it.
|
||||
if (!isset($this->resourceHierarchyLevels[$cacheKey][$blockName])) {
|
||||
$this->resourceHierarchyLevels[$cacheKey][$blockName] = $hierarchyLevel;
|
||||
}
|
||||
|
||||
return $this->resourceHierarchyLevels[$cacheKey][$blockName];
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the cache with the resource for a given block name.
|
||||
*
|
||||
* @see getResourceForBlock()
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
abstract protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName);
|
||||
|
||||
/**
|
||||
* Loads the cache with the resource for a specific level of a block hierarchy.
|
||||
*
|
||||
* @see getResourceForBlockHierarchy()
|
||||
*/
|
||||
private function loadResourceForBlockNameHierarchy(string $cacheKey, FormView $view, array $blockNameHierarchy, int $hierarchyLevel): bool
|
||||
{
|
||||
$blockName = $blockNameHierarchy[$hierarchyLevel];
|
||||
|
||||
// Try to find a template for that block
|
||||
if ($this->loadResourceForBlockName($cacheKey, $view, $blockName)) {
|
||||
// If loadTemplateForBlock() returns true, it was able to populate the
|
||||
// cache. The only missing thing is to set the hierarchy level at which
|
||||
// the template was found.
|
||||
$this->resourceHierarchyLevels[$cacheKey][$blockName] = $hierarchyLevel;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($hierarchyLevel > 0) {
|
||||
$parentLevel = $hierarchyLevel - 1;
|
||||
$parentBlockName = $blockNameHierarchy[$parentLevel];
|
||||
|
||||
// The next two if statements contain slightly duplicated code. This is by intention
|
||||
// and tries to avoid execution of unnecessary checks in order to increase performance.
|
||||
|
||||
if (isset($this->resources[$cacheKey][$parentBlockName])) {
|
||||
// It may happen that the parent block is already loaded, but its level is not.
|
||||
// In this case, the parent block must have been loaded by loadResourceForBlock(),
|
||||
// which does not check the hierarchy of the block. Subsequently the block must have
|
||||
// been found directly on the parent level.
|
||||
if (!isset($this->resourceHierarchyLevels[$cacheKey][$parentBlockName])) {
|
||||
$this->resourceHierarchyLevels[$cacheKey][$parentBlockName] = $parentLevel;
|
||||
}
|
||||
|
||||
// Cache the shortcuts for further accesses
|
||||
$this->resources[$cacheKey][$blockName] = $this->resources[$cacheKey][$parentBlockName];
|
||||
$this->resourceHierarchyLevels[$cacheKey][$blockName] = $this->resourceHierarchyLevels[$cacheKey][$parentBlockName];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($this->loadResourceForBlockNameHierarchy($cacheKey, $view, $blockNameHierarchy, $parentLevel)) {
|
||||
// Cache the shortcuts for further accesses
|
||||
$this->resources[$cacheKey][$blockName] = $this->resources[$cacheKey][$parentBlockName];
|
||||
$this->resourceHierarchyLevels[$cacheKey][$blockName] = $this->resourceHierarchyLevels[$cacheKey][$parentBlockName];
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Cache the result for further accesses
|
||||
$this->resources[$cacheKey][$blockName] = false;
|
||||
$this->resourceHierarchyLevels[$cacheKey][$blockName] = false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function reset(): void
|
||||
{
|
||||
$this->themes = [];
|
||||
$this->useDefaultThemes = [];
|
||||
$this->resources = [];
|
||||
$this->resourceHierarchyLevels = [];
|
||||
}
|
||||
}
|
||||
66
lib/symfony/form/AbstractType.php
Normal file
66
lib/symfony/form/AbstractType.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
use Symfony\Component\Form\Util\StringUtil;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
abstract class AbstractType implements FormTypeInterface
|
||||
{
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getParent()
|
||||
{
|
||||
return FormType::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function buildView(FormView $view, FormInterface $form, array $options)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function finishView(FormView $view, FormInterface $form, array $options)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return StringUtil::fqcnToBlockPrefix(static::class) ?: '';
|
||||
}
|
||||
}
|
||||
48
lib/symfony/form/AbstractTypeExtension.php
Normal file
48
lib/symfony/form/AbstractTypeExtension.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
abstract class AbstractTypeExtension implements FormTypeExtensionInterface
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function buildView(FormView $view, FormInterface $form, array $options)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function finishView(FormView $view, FormInterface $form, array $options)
|
||||
{
|
||||
}
|
||||
}
|
||||
373
lib/symfony/form/Button.php
Normal file
373
lib/symfony/form/Button.php
Normal file
@@ -0,0 +1,373 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
use Symfony\Component\Form\Exception\AlreadySubmittedException;
|
||||
use Symfony\Component\Form\Exception\BadMethodCallException;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
use Symfony\Component\PropertyAccess\PropertyPathInterface;
|
||||
|
||||
/**
|
||||
* A form button.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @implements \IteratorAggregate<string, FormInterface>
|
||||
*/
|
||||
class Button implements \IteratorAggregate, FormInterface
|
||||
{
|
||||
private ?FormInterface $parent = null;
|
||||
private FormConfigInterface $config;
|
||||
private bool $submitted = false;
|
||||
|
||||
/**
|
||||
* Creates a new button from a form configuration.
|
||||
*/
|
||||
public function __construct(FormConfigInterface $config)
|
||||
{
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* This method should not be invoked.
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function offsetGet(mixed $offset): FormInterface
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot have children.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* This method should not be invoked.
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot have children.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* This method should not be invoked.
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot have children.');
|
||||
}
|
||||
|
||||
public function setParent(?FormInterface $parent = null): static
|
||||
{
|
||||
if (1 > \func_num_args()) {
|
||||
trigger_deprecation('symfony/form', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
|
||||
}
|
||||
if ($this->submitted) {
|
||||
throw new AlreadySubmittedException('You cannot set the parent of a submitted button.');
|
||||
}
|
||||
|
||||
$this->parent = $parent;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getParent(): ?FormInterface
|
||||
{
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* This method should not be invoked.
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function add(string|FormInterface $child, ?string $type = null, array $options = []): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot have children.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* This method should not be invoked.
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function get(string $name): FormInterface
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot have children.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function has(string $name): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* This method should not be invoked.
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function remove(string $name): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot have children.');
|
||||
}
|
||||
|
||||
public function all(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getErrors(bool $deep = false, bool $flatten = true): FormErrorIterator
|
||||
{
|
||||
return new FormErrorIterator($this, []);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* This method should not be invoked.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setData(mixed $modelData): static
|
||||
{
|
||||
// no-op, called during initialization of the form tree
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getData(): mixed
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getNormData(): mixed
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getViewData(): mixed
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getExtraData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the button's configuration.
|
||||
*/
|
||||
public function getConfig(): FormConfigInterface
|
||||
{
|
||||
return $this->config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the button is submitted.
|
||||
*/
|
||||
public function isSubmitted(): bool
|
||||
{
|
||||
return $this->submitted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name by which the button is identified in forms.
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->config->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getPropertyPath(): ?PropertyPathInterface
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function addError(FormError $error): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot have errors.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function isValid(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function isRequired(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isDisabled(): bool
|
||||
{
|
||||
if ($this->parent?->isDisabled()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->config->getDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function isEmpty(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function isSynchronized(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getTransformationFailure(): ?TransformationFailedException
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function initialize(): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot be initialized. Call initialize() on the root form instead.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function handleRequest(mixed $request = null): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot handle requests. Call handleRequest() on the root form instead.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Submits data to the button.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws AlreadySubmittedException if the button has already been submitted
|
||||
*/
|
||||
public function submit(array|string|null $submittedData, bool $clearMissing = true): static
|
||||
{
|
||||
if ($this->submitted) {
|
||||
throw new AlreadySubmittedException('A form can only be submitted once.');
|
||||
}
|
||||
|
||||
$this->submitted = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRoot(): FormInterface
|
||||
{
|
||||
return $this->parent ? $this->parent->getRoot() : $this;
|
||||
}
|
||||
|
||||
public function isRoot(): bool
|
||||
{
|
||||
return null === $this->parent;
|
||||
}
|
||||
|
||||
public function createView(?FormView $parent = null): FormView
|
||||
{
|
||||
if (null === $parent && $this->parent) {
|
||||
$parent = $this->parent->createView();
|
||||
}
|
||||
|
||||
$type = $this->config->getType();
|
||||
$options = $this->config->getOptions();
|
||||
|
||||
$view = $type->createView($this, $parent);
|
||||
|
||||
$type->buildView($view, $this, $options);
|
||||
$type->finishView($view, $this, $options);
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getIterator(): \EmptyIterator
|
||||
{
|
||||
return new \EmptyIterator();
|
||||
}
|
||||
}
|
||||
738
lib/symfony/form/ButtonBuilder.php
Normal file
738
lib/symfony/form/ButtonBuilder.php
Normal file
@@ -0,0 +1,738 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Form\Exception\BadMethodCallException;
|
||||
use Symfony\Component\Form\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\PropertyAccess\PropertyPathInterface;
|
||||
|
||||
/**
|
||||
* A builder for {@link Button} instances.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @implements \IteratorAggregate<string, FormBuilderInterface>
|
||||
*/
|
||||
class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
|
||||
{
|
||||
protected $locked = false;
|
||||
|
||||
private bool $disabled = false;
|
||||
private ResolvedFormTypeInterface $type;
|
||||
private string $name;
|
||||
private array $attributes = [];
|
||||
private array $options;
|
||||
|
||||
/**
|
||||
* @throws InvalidArgumentException if the name is empty
|
||||
*/
|
||||
public function __construct(?string $name, array $options = [])
|
||||
{
|
||||
if ('' === $name || null === $name) {
|
||||
throw new InvalidArgumentException('Buttons cannot have empty names.');
|
||||
}
|
||||
|
||||
$this->name = $name;
|
||||
$this->options = $options;
|
||||
|
||||
FormConfigBuilder::validateName($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function add(string|FormBuilderInterface $child, ?string $type = null, array $options = []): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot have children.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function create(string $name, ?string $type = null, array $options = []): FormBuilderInterface
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot have children.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function get(string $name): FormBuilderInterface
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot have children.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function remove(string $name): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot have children.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function has(string $name): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the children.
|
||||
*/
|
||||
public function all(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the button.
|
||||
*/
|
||||
public function getForm(): Button
|
||||
{
|
||||
return new Button($this->getFormConfig());
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function addEventListener(string $eventName, callable $listener, int $priority = 0): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support event listeners.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function addEventSubscriber(EventSubscriberInterface $subscriber): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support event subscribers.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function addViewTransformer(DataTransformerInterface $viewTransformer, bool $forcePrepend = false): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support data transformers.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function resetViewTransformers(): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support data transformers.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function addModelTransformer(DataTransformerInterface $modelTransformer, bool $forceAppend = false): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support data transformers.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function resetModelTransformers(): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support data transformers.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function setAttribute(string $name, mixed $value): static
|
||||
{
|
||||
$this->attributes[$name] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function setAttributes(array $attributes): static
|
||||
{
|
||||
$this->attributes = $attributes;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setDataMapper(?DataMapperInterface $dataMapper = null): static
|
||||
{
|
||||
if (1 > \func_num_args()) {
|
||||
trigger_deprecation('symfony/form', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
|
||||
}
|
||||
|
||||
throw new BadMethodCallException('Buttons do not support data mappers.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether the button is disabled.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDisabled(bool $disabled): static
|
||||
{
|
||||
$this->disabled = $disabled;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setEmptyData(mixed $emptyData): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support empty data.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setErrorBubbling(bool $errorBubbling): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support error bubbling.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setRequired(bool $required): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot be required.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setPropertyPath(string|PropertyPathInterface|null $propertyPath): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support property paths.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setMapped(bool $mapped): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support data mapping.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setByReference(bool $byReference): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support data mapping.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setCompound(bool $compound): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons cannot be compound.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the type of the button.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType(ResolvedFormTypeInterface $type): static
|
||||
{
|
||||
$this->type = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setData(mixed $data): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support data.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setDataLocked(bool $locked): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support data locking.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setFormFactory(FormFactoryInterface $formFactory)
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support form factories.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setAction(string $action): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support actions.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setMethod(string $method): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support methods.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setRequestHandler(RequestHandlerInterface $requestHandler): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support request handlers.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setAutoInitialize(bool $initialize): static
|
||||
{
|
||||
if (true === $initialize) {
|
||||
throw new BadMethodCallException('Buttons do not support automatic initialization.');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setInheritData(bool $inheritData): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support data inheritance.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds and returns the button configuration.
|
||||
*/
|
||||
public function getFormConfig(): FormConfigInterface
|
||||
{
|
||||
// This method should be idempotent, so clone the builder
|
||||
$config = clone $this;
|
||||
$config->locked = true;
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function setIsEmptyCallback(?callable $isEmptyCallback): static
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support "is empty" callback.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function getEventDispatcher(): EventDispatcherInterface
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support event dispatching.');
|
||||
}
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getPropertyPath(): ?PropertyPathInterface
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getMapped(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getByReference(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getCompound(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the form type used to construct the button.
|
||||
*/
|
||||
public function getType(): ResolvedFormTypeInterface
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getViewTransformers(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getModelTransformers(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getDataMapper(): ?DataMapperInterface
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getRequired(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the button is disabled.
|
||||
*/
|
||||
public function getDisabled(): bool
|
||||
{
|
||||
return $this->disabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getErrorBubbling(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getEmptyData(): mixed
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns additional attributes of the button.
|
||||
*/
|
||||
public function getAttributes(): array
|
||||
{
|
||||
return $this->attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the attribute with the given name exists.
|
||||
*/
|
||||
public function hasAttribute(string $name): bool
|
||||
{
|
||||
return \array_key_exists($name, $this->attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the given attribute.
|
||||
*/
|
||||
public function getAttribute(string $name, mixed $default = null): mixed
|
||||
{
|
||||
return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getData(): mixed
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getDataClass(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getDataLocked(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*/
|
||||
public function getFormFactory(): FormFactoryInterface
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support adding children.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function getAction(): string
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support actions.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function getMethod(): string
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support methods.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function getRequestHandler(): RequestHandlerInterface
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support request handlers.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getAutoInitialize(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getInheritData(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all options passed during the construction of the button.
|
||||
*/
|
||||
public function getOptions(): array
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether a specific option exists.
|
||||
*/
|
||||
public function hasOption(string $name): bool
|
||||
{
|
||||
return \array_key_exists($name, $this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of a specific option.
|
||||
*/
|
||||
public function getOption(string $name, mixed $default = null): mixed
|
||||
{
|
||||
return \array_key_exists($name, $this->options) ? $this->options[$name] : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function getIsEmptyCallback(): ?callable
|
||||
{
|
||||
throw new BadMethodCallException('Buttons do not support "is empty" callback.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*/
|
||||
public function getIterator(): \EmptyIterator
|
||||
{
|
||||
return new \EmptyIterator();
|
||||
}
|
||||
}
|
||||
21
lib/symfony/form/ButtonTypeInterface.php
Normal file
21
lib/symfony/form/ButtonTypeInterface.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
/**
|
||||
* A type that should be converted into a {@link Button} instance.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
interface ButtonTypeInterface extends FormTypeInterface
|
||||
{
|
||||
}
|
||||
616
lib/symfony/form/CHANGELOG.md
Normal file
616
lib/symfony/form/CHANGELOG.md
Normal file
@@ -0,0 +1,616 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
6.4
|
||||
---
|
||||
|
||||
* Deprecate using `DateTime` or `DateTimeImmutable` model data with a different timezone than configured with the
|
||||
`model_timezone` option in `DateType`, `DateTimeType`, and `TimeType`
|
||||
* Deprecate `PostSetDataEvent::setData()`, use `PreSetDataEvent::setData()` instead
|
||||
* Deprecate `PostSubmitEvent::setData()`, use `PreSubmitDataEvent::setData()` or `SubmitDataEvent::setData()` instead
|
||||
* Add `duplicate_preferred_choices` option in `ChoiceType`
|
||||
* Add `$duplicatePreferredChoices` parameter to `ChoiceListFactoryInterface::createView()`
|
||||
|
||||
6.3
|
||||
---
|
||||
|
||||
* Don't render seconds for HTML5 date pickers unless "with_seconds" is explicitly set
|
||||
* Add a `placeholder_attr` option to `ChoiceType`
|
||||
* Deprecate not configuring the "widget" option of date/time form types, it will default to "single_text" in v7
|
||||
|
||||
6.2
|
||||
---
|
||||
|
||||
* Allow passing `TranslatableInterface` objects to the `ChoiceView` label
|
||||
* Allow passing `TranslatableInterface` objects to the `help` option
|
||||
* Deprecate calling `Button/Form::setParent()`, `ButtonBuilder/FormConfigBuilder::setDataMapper()`, `TransformationFailedException::setInvalidMessage()` without arguments
|
||||
* Change the signature of `FormConfigBuilderInterface::setDataMapper()` to `setDataMapper(?DataMapperInterface)`
|
||||
* Change the signature of `FormInterface::setParent()` to `setParent(?self)`
|
||||
* Add `PasswordHasherExtension` with support for `hash_property_path` option in `PasswordType`
|
||||
|
||||
6.1
|
||||
---
|
||||
|
||||
* Add a `prototype_options` option to `CollectionType`
|
||||
|
||||
6.0
|
||||
---
|
||||
|
||||
* Remove `PropertyPathMaper`
|
||||
* Remove `Symfony\Component\Form\Extension\Validator\Util\ServerParams`
|
||||
* Remove `FormPass` configuration
|
||||
* Remove the `NumberToLocalizedStringTransformer::ROUND_*` constants, use `\NumberFormatter::ROUND_*` instead
|
||||
* The `rounding_mode` option of the `PercentType` defaults to `\NumberFormatter::ROUND_HALFUP`
|
||||
* The rounding mode argument of the constructor of `PercentToLocalizedStringTransformer` defaults to `\NumberFormatter::ROUND_HALFUP`
|
||||
* Add `FormConfigInterface::getIsEmptyCallback()` and `FormConfigBuilderInterface::setIsEmptyCallback()`
|
||||
* Change `$forms` parameter type of the `DataMapper::mapDataToForms()` method from `iterable` to `\Traversable`
|
||||
* Change `$forms` parameter type of the `DataMapper::mapFormsToData()` method from `iterable` to `\Traversable`
|
||||
* Change `$checkboxes` parameter type of the `CheckboxListMapper::mapDataToForms()` method from `iterable` to `\Traversable`
|
||||
* Change `$checkboxes` parameter type of the `CheckboxListMapper::mapFormsToData()` method from `iterable` to `\Traversable`
|
||||
* Change `$radios` parameter type of the `RadioListMapper::mapDataToForms()` method from `iterable` to `\Traversable`
|
||||
* Change `$radios` parameter type of the `RadioListMapper::mapFormsToData()` method from `iterable` to `\Traversable`
|
||||
|
||||
5.4
|
||||
---
|
||||
|
||||
* Deprecate calling `FormErrorIterator::children()` if the current element is not iterable.
|
||||
* Allow to pass `TranslatableMessage` objects to the `help` option
|
||||
* Add the `EnumType`
|
||||
|
||||
5.3
|
||||
---
|
||||
|
||||
* Changed `$forms` parameter type of the `DataMapperInterface::mapDataToForms()` method from `iterable` to `\Traversable`.
|
||||
* Changed `$forms` parameter type of the `DataMapperInterface::mapFormsToData()` method from `iterable` to `\Traversable`.
|
||||
* Deprecated passing an array as the second argument of the `DataMapper::mapDataToForms()` method, pass `\Traversable` instead.
|
||||
* Deprecated passing an array as the first argument of the `DataMapper::mapFormsToData()` method, pass `\Traversable` instead.
|
||||
* Deprecated passing an array as the second argument of the `CheckboxListMapper::mapDataToForms()` method, pass `\Traversable` instead.
|
||||
* Deprecated passing an array as the first argument of the `CheckboxListMapper::mapFormsToData()` method, pass `\Traversable` instead.
|
||||
* Deprecated passing an array as the second argument of the `RadioListMapper::mapDataToForms()` method, pass `\Traversable` instead.
|
||||
* Deprecated passing an array as the first argument of the `RadioListMapper::mapFormsToData()` method, pass `\Traversable` instead.
|
||||
* Added a `choice_translation_parameters` option to `ChoiceType`
|
||||
* Add `UuidType` and `UlidType`
|
||||
* Dependency on `symfony/intl` was removed. Install `symfony/intl` if you are using `LocaleType`, `CountryType`, `CurrencyType`, `LanguageType` or `TimezoneType`.
|
||||
* Add `priority` option to `BaseType` and sorting view fields
|
||||
|
||||
5.2.0
|
||||
-----
|
||||
|
||||
* Added support for using the `{{ label }}` placeholder in constraint messages, which is replaced in the `ViolationMapper` by the corresponding field form label.
|
||||
* Added `DataMapper`, `ChainAccessor`, `PropertyPathAccessor` and `CallbackAccessor` with new callable `getter` and `setter` options for each form type
|
||||
* Deprecated `PropertyPathMapper` in favor of `DataMapper` and `PropertyPathAccessor`
|
||||
* Added an `html5` option to `MoneyType` and `PercentType`, to use `<input type="number" />`
|
||||
|
||||
5.1.0
|
||||
-----
|
||||
|
||||
* Deprecated not configuring the `rounding_mode` option of the `PercentType`. It will default to `\NumberFormatter::ROUND_HALFUP` in Symfony 6.
|
||||
* Deprecated not passing a rounding mode to the constructor of `PercentToLocalizedStringTransformer`. It will default to `\NumberFormatter::ROUND_HALFUP` in Symfony 6.
|
||||
* Added `collection_entry` block prefix to `CollectionType` entries
|
||||
* Added a `choice_filter` option to `ChoiceType`
|
||||
* Added argument `callable|null $filter` to `ChoiceListFactoryInterface::createListFromChoices()` and `createListFromLoader()` - not defining them is deprecated.
|
||||
* Added a `ChoiceList` facade to leverage explicit choice list caching based on options
|
||||
* Added an `AbstractChoiceLoader` to simplify implementations and handle global optimizations
|
||||
* The `view_timezone` option defaults to the `model_timezone` if no `reference_date` is configured.
|
||||
* Implementing the `FormConfigInterface` without implementing the `getIsEmptyCallback()` method
|
||||
is deprecated. The method will be added to the interface in 6.0.
|
||||
* Implementing the `FormConfigBuilderInterface` without implementing the `setIsEmptyCallback()` method
|
||||
is deprecated. The method will be added to the interface in 6.0.
|
||||
* Added a `rounding_mode` option for the PercentType and correctly round the value when submitted
|
||||
* Deprecated `Symfony\Component\Form\Extension\Validator\Util\ServerParams` in favor of its parent class `Symfony\Component\Form\Util\ServerParams`
|
||||
* Added the `html5` option to the `ColorType` to validate the input
|
||||
* Deprecated `NumberToLocalizedStringTransformer::ROUND_*` constants, use `\NumberFormatter::ROUND_*` instead
|
||||
|
||||
5.0.0
|
||||
-----
|
||||
|
||||
* Removed support for using different values for the "model_timezone" and "view_timezone" options of the `TimeType`
|
||||
without configuring a reference date.
|
||||
* Removed the `scale` option of the `IntegerType`.
|
||||
* Using the `date_format`, `date_widget`, and `time_widget` options of the `DateTimeType` when the `widget` option is
|
||||
set to `single_text` is not supported anymore.
|
||||
* The `format` option of `DateType` and `DateTimeType` cannot be used when the `html5` option is enabled.
|
||||
* Using names for buttons that do not start with a letter, a digit, or an underscore throw an exception
|
||||
* Using names for buttons that do not contain only letters, digits, underscores, hyphens, and colons throw an exception.
|
||||
* removed the `ChoiceLoaderInterface` implementation in `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType`
|
||||
* removed `getExtendedType()` method of the `FormTypeExtensionInterface`
|
||||
* added static `getExtendedTypes()` method to the `FormTypeExtensionInterface`
|
||||
* calling to `FormRenderer::searchAndRenderBlock()` method for fields which were already rendered throw a `BadMethodCallException`
|
||||
* removed the `regions` option of the `TimezoneType`
|
||||
* removed the `$scale` argument of the `IntegerToLocalizedStringTransformer`
|
||||
* removed `TemplatingExtension` and `TemplatingRendererEngine` classes, use Twig instead
|
||||
* passing a null message when instantiating a `Symfony\Component\Form\FormError` is not allowed
|
||||
* removed support for using `int` or `float` as data for the `NumberType` when the `input` option is set to `string`
|
||||
|
||||
4.4.0
|
||||
-----
|
||||
|
||||
* add new `WeekType`
|
||||
* using different values for the "model_timezone" and "view_timezone" options of the `TimeType` without configuring a
|
||||
reference date is deprecated
|
||||
* preferred choices are repeated in the list of all choices
|
||||
* deprecated using `int` or `float` as data for the `NumberType` when the `input` option is set to `string`
|
||||
* The type guesser guesses the HTML accept attribute when a mime type is configured in the File or Image constraint.
|
||||
* Overriding the methods `FormIntegrationTestCase::setUp()`, `TypeTestCase::setUp()` and `TypeTestCase::tearDown()` without the `void` return-type is deprecated.
|
||||
* marked all dispatched event classes as `@final`
|
||||
* Added the `validate` option to `SubmitType` to toggle the browser built-in form validation.
|
||||
* Added the `alpha3` option to `LanguageType` and `CountryType` to use alpha3 instead of alpha2 codes
|
||||
|
||||
4.3.0
|
||||
-----
|
||||
|
||||
* added a `symbol` option to the `PercentType` that allows to disable or customize the output of the percent character
|
||||
* Using the `format` option of `DateType` and `DateTimeType` when the `html5` option is enabled is deprecated.
|
||||
* Using names for buttons that do not start with a letter, a digit, or an underscore is deprecated and will lead to an
|
||||
exception in 5.0.
|
||||
* Using names for buttons that do not contain only letters, digits, underscores, hyphens, and colons is deprecated and
|
||||
will lead to an exception in 5.0.
|
||||
* added `html5` option to `NumberType` that allows to render `type="number"` input fields
|
||||
* deprecated using the `date_format`, `date_widget`, and `time_widget` options of the `DateTimeType` when the `widget`
|
||||
option is set to `single_text`
|
||||
* added `block_prefix` option to `BaseType`.
|
||||
* added `help_html` option to display the `help` text as HTML.
|
||||
* `FormError` doesn't implement `Serializable` anymore
|
||||
* `FormDataCollector` has been marked as `final`
|
||||
* added `label_translation_parameters`, `attr_translation_parameters`, `help_translation_parameters` options
|
||||
to `FormType` to pass translation parameters to form labels, attributes (`placeholder` and `title`) and help text respectively.
|
||||
The passed parameters will replace placeholders in translation messages.
|
||||
|
||||
```php
|
||||
class OrderType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder->add('comment', TextType::class, [
|
||||
'label' => 'Comment to the order to %company%',
|
||||
'label_translation_parameters' => [
|
||||
'%company%' => 'Acme',
|
||||
],
|
||||
'help' => 'The address of the %company% is %address%',
|
||||
'help_translation_parameters' => [
|
||||
'%company%' => 'Acme Ltd.',
|
||||
'%address%' => '4 Form street, Symfonyville',
|
||||
],
|
||||
])
|
||||
}
|
||||
}
|
||||
```
|
||||
* added the `input_format` option to `DateType`, `DateTimeType`, and `TimeType` to specify the input format when setting
|
||||
the `input` option to `string`
|
||||
* dispatch `PreSubmitEvent` on `form.pre_submit`
|
||||
* dispatch `SubmitEvent` on `form.submit`
|
||||
* dispatch `PostSubmitEvent` on `form.post_submit`
|
||||
* dispatch `PreSetDataEvent` on `form.pre_set_data`
|
||||
* dispatch `PostSetDataEvent` on `form.post_set_data`
|
||||
* added an `input` option to `NumberType`
|
||||
* removed default option grouping in `TimezoneType`, use `group_by` instead
|
||||
|
||||
4.2.0
|
||||
-----
|
||||
|
||||
* The `getExtendedType()` method of the `FormTypeExtensionInterface` is deprecated and will be removed in 5.0. Type
|
||||
extensions must implement the static `getExtendedTypes()` method instead and return an iterable of extended types.
|
||||
|
||||
Before:
|
||||
|
||||
```php
|
||||
class FooTypeExtension extends AbstractTypeExtension
|
||||
{
|
||||
public function getExtendedType()
|
||||
{
|
||||
return FormType::class;
|
||||
}
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```php
|
||||
class FooTypeExtension extends AbstractTypeExtension
|
||||
{
|
||||
public static function getExtendedTypes(): iterable
|
||||
{
|
||||
return [FormType::class];
|
||||
}
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
* deprecated the `$scale` argument of the `IntegerToLocalizedStringTransformer`
|
||||
* added `Symfony\Component\Form\ClearableErrorsInterface`
|
||||
* deprecated calling `FormRenderer::searchAndRenderBlock` for fields which were already rendered
|
||||
* added a cause when a CSRF error has occurred
|
||||
* deprecated the `scale` option of the `IntegerType`
|
||||
* removed restriction on allowed HTTP methods
|
||||
* deprecated the `regions` option of the `TimezoneType`
|
||||
|
||||
4.1.0
|
||||
-----
|
||||
|
||||
* added `input=datetime_immutable` to `DateType`, `TimeType`, `DateTimeType`
|
||||
* added `rounding_mode` option to `MoneyType`
|
||||
* added `choice_translation_locale` option to `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType`
|
||||
* deprecated the `ChoiceLoaderInterface` implementation in `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType`
|
||||
* added `input=datetime_immutable` to DateType, TimeType, DateTimeType
|
||||
* added `rounding_mode` option to MoneyType
|
||||
|
||||
4.0.0
|
||||
-----
|
||||
|
||||
* using the `choices` option in `CountryType`, `CurrencyType`, `LanguageType`,
|
||||
`LocaleType`, and `TimezoneType` when the `choice_loader` option is not `null`
|
||||
is not supported anymore and the configured choices will be ignored
|
||||
* callable strings that are passed to the options of the `ChoiceType` are
|
||||
treated as property paths
|
||||
* the `choices_as_values` option of the `ChoiceType` has been removed
|
||||
* removed the support for caching loaded choice lists in `LazyChoiceList`,
|
||||
cache the choice list in the used `ChoiceLoaderInterface` implementation
|
||||
instead
|
||||
* removed the support for objects implementing both `\Traversable` and `\ArrayAccess` in `ResizeFormListener::preSubmit()`
|
||||
* removed the ability to use `FormDataCollector` without the `symfony/var-dumper` component
|
||||
* removed passing a `ValueExporter` instance to the `FormDataExtractor::__construct()` method
|
||||
* removed passing guesser services ids as the fourth argument of `DependencyInjectionExtension::__construct()`
|
||||
* removed the ability to validate an unsubmitted form.
|
||||
* removed `ChoiceLoaderInterface` implementation in `TimezoneType`
|
||||
* added the `false_values` option to the `CheckboxType` which allows to configure custom values which will be treated as `false` during submission
|
||||
|
||||
3.4.0
|
||||
-----
|
||||
|
||||
* added `DebugCommand`
|
||||
* deprecated `ChoiceLoaderInterface` implementation in `TimezoneType`
|
||||
* added options "input" and "regions" to `TimezoneType`
|
||||
* added an option to ``Symfony\Component\Form\FormRendererEngineInterface::setTheme()`` and
|
||||
``Symfony\Component\Form\FormRendererInterface::setTheme()`` to disable usage of default themes when rendering a form
|
||||
|
||||
3.3.0
|
||||
-----
|
||||
|
||||
* deprecated using "choices" option in ``CountryType``, ``CurrencyType``, ``LanguageType``, ``LocaleType``, and
|
||||
``TimezoneType`` when "choice_loader" is not ``null``
|
||||
* added `Symfony\Component\Form\FormErrorIterator::findByCodes()`
|
||||
* added `getTypedExtensions`, `getTypes`, and `getTypeGuessers` to `Symfony\Component\Form\Test\FormIntegrationTestCase`
|
||||
* added `FormPass`
|
||||
|
||||
3.2.0
|
||||
-----
|
||||
|
||||
* added `CallbackChoiceLoader`
|
||||
* implemented `ChoiceLoaderInterface` in children of `ChoiceType`
|
||||
|
||||
3.1.0
|
||||
-----
|
||||
|
||||
* deprecated the "choices_as_values" option of ChoiceType
|
||||
* deprecated support for data objects that implements both `Traversable` and
|
||||
`ArrayAccess` in `ResizeFormListener::preSubmit` method
|
||||
* Using callable strings as choice options in `ChoiceType` has been deprecated
|
||||
and will be used as `PropertyPath` instead of callable in Symfony 4.0.
|
||||
* implemented `DataTransformerInterface` in `TextType`
|
||||
* deprecated caching loaded choice list in `LazyChoiceList::$loadedList`
|
||||
|
||||
3.0.0
|
||||
-----
|
||||
|
||||
* removed `FormTypeInterface::setDefaultOptions()` method
|
||||
* removed `AbstractType::setDefaultOptions()` method
|
||||
* removed `FormTypeExtensionInterface::setDefaultOptions()` method
|
||||
* removed `AbstractTypeExtension::setDefaultOptions()` method
|
||||
* added `FormTypeInterface::configureOptions()` method
|
||||
* added `FormTypeExtensionInterface::configureOptions()` method
|
||||
|
||||
2.8.0
|
||||
-----
|
||||
|
||||
* added option "choice_translation_domain" to DateType, TimeType and DateTimeType.
|
||||
* deprecated option "read_only" in favor of "attr['readonly']"
|
||||
* added the html5 "range" FormType
|
||||
* deprecated the "cascade_validation" option in favor of setting "constraints"
|
||||
with the Valid constraint
|
||||
* moved data trimming logic of TrimListener into StringUtil
|
||||
* [BC BREAK] When registering a type extension through the DI extension, the tag alias has to match the actual extended type.
|
||||
|
||||
2.7.38
|
||||
------
|
||||
|
||||
* [BC BREAK] the `isFileUpload()` method was added to the `RequestHandlerInterface`
|
||||
|
||||
2.7.0
|
||||
-----
|
||||
|
||||
* added option "choice_translation_domain" to ChoiceType.
|
||||
* deprecated option "precision" in favor of "scale"
|
||||
* deprecated the overwriting of AbstractType::setDefaultOptions() in favor of overwriting AbstractType::configureOptions().
|
||||
* deprecated the overwriting of AbstractTypeExtension::setDefaultOptions() in favor of overwriting AbstractTypeExtension::configureOptions().
|
||||
* added new ChoiceList interface and implementations in the Symfony\Component\Form\ChoiceList namespace
|
||||
* added new ChoiceView in the Symfony\Component\Form\ChoiceList\View namespace
|
||||
* choice groups are now represented by ChoiceGroupView objects in the view
|
||||
* deprecated the old ChoiceList interface and implementations
|
||||
* deprecated the old ChoiceView class
|
||||
* added CheckboxListMapper and RadioListMapper
|
||||
* deprecated ChoiceToBooleanArrayTransformer and ChoicesToBooleanArrayTransformer
|
||||
* deprecated FixCheckboxInputListener and FixRadioInputListener
|
||||
* deprecated the "choice_list" option of ChoiceType
|
||||
* added new options to ChoiceType:
|
||||
* "choices_as_values"
|
||||
* "choice_loader"
|
||||
* "choice_label"
|
||||
* "choice_name"
|
||||
* "choice_value"
|
||||
* "choice_attr"
|
||||
* "group_by"
|
||||
|
||||
2.6.2
|
||||
-----
|
||||
|
||||
* Added back the `model_timezone` and `view_timezone` options for `TimeType`, `DateType`
|
||||
and `BirthdayType`
|
||||
|
||||
2.6.0
|
||||
-----
|
||||
|
||||
* added "html5" option to Date, Time and DateTimeFormType to be able to
|
||||
enable/disable HTML5 input date when widget option is "single_text"
|
||||
* added "label_format" option with possible placeholders "%name%" and "%id%"
|
||||
* [BC BREAK] drop support for model_timezone and view_timezone options in TimeType, DateType and BirthdayType,
|
||||
update to 2.6.2 to get back support for these options
|
||||
|
||||
2.5.0
|
||||
------
|
||||
|
||||
* deprecated options "max_length" and "pattern" in favor of putting these values in "attr" option
|
||||
* added an option for multiple files upload
|
||||
* form errors now reference their cause (constraint violation, exception, ...)
|
||||
* form errors now remember which form they were originally added to
|
||||
* [BC BREAK] added two optional parameters to FormInterface::getErrors() and
|
||||
changed the method to return a Symfony\Component\Form\FormErrorIterator
|
||||
instance instead of an array
|
||||
* errors mapped to unsubmitted forms are discarded now
|
||||
* ObjectChoiceList now compares choices by their value, if a value path is
|
||||
given
|
||||
* you can now pass interface names in the "data_class" option
|
||||
* [BC BREAK] added `FormInterface::getTransformationFailure()`
|
||||
|
||||
2.4.0
|
||||
-----
|
||||
|
||||
* moved CSRF implementation to the new Security CSRF sub-component
|
||||
* deprecated CsrfProviderInterface and its implementations
|
||||
* deprecated options "csrf_provider" and "intention" in favor of the new options "csrf_token_manager" and "csrf_token_id"
|
||||
|
||||
2.3.0
|
||||
-----
|
||||
|
||||
* deprecated FormPerformanceTestCase and FormIntegrationTestCase in the Symfony\Component\Form\Tests namespace and moved them to the Symfony\Component\Form\Test namespace
|
||||
* deprecated TypeTestCase in the Symfony\Component\Form\Tests\Extension\Core\Type namespace and moved it to the Symfony\Component\Form\Test namespace
|
||||
* changed FormRenderer::humanize() to humanize also camel cased field name
|
||||
* added RequestHandlerInterface and FormInterface::handleRequest()
|
||||
* deprecated passing a Request instance to FormInterface::bind()
|
||||
* added options "method" and "action" to FormType
|
||||
* deprecated option "virtual" in favor "inherit_data"
|
||||
* deprecated VirtualFormAwareIterator in favor of InheritDataAwareIterator
|
||||
* [BC BREAK] removed the "array" type hint from DataMapperInterface
|
||||
* improved forms inheriting their parent data to actually return that data from getData(), getNormData() and getViewData()
|
||||
* added component-level exceptions for various SPL exceptions
|
||||
changed all uses of the deprecated Exception class to use more specialized exceptions instead
|
||||
removed NotInitializedException, NotValidException, TypeDefinitionException, TypeLoaderException, CreationException
|
||||
* added events PRE_SUBMIT, SUBMIT and POST_SUBMIT
|
||||
* deprecated events PRE_BIND, BIND and POST_BIND
|
||||
* [BC BREAK] renamed bind() and isBound() in FormInterface to submit() and isSubmitted()
|
||||
* added methods submit() and isSubmitted() to Form
|
||||
* deprecated bind() and isBound() in Form
|
||||
* deprecated AlreadyBoundException in favor of AlreadySubmittedException
|
||||
* added support for PATCH requests
|
||||
* [BC BREAK] added initialize() to FormInterface
|
||||
* [BC BREAK] added getAutoInitialize() to FormConfigInterface
|
||||
* [BC BREAK] added setAutoInitialize() to FormConfigBuilderInterface
|
||||
* [BC BREAK] initialization for Form instances added to a form tree must be manually disabled
|
||||
* PRE_SET_DATA is now guaranteed to be called after children were added by the form builder,
|
||||
unless FormInterface::setData() is called manually
|
||||
* fixed CSRF error message to be translated
|
||||
* custom CSRF error messages can now be set through the "csrf_message" option
|
||||
* fixed: expanded single-choice fields now show a radio button for the empty value
|
||||
|
||||
2.2.0
|
||||
-----
|
||||
|
||||
* TrimListener now removes unicode whitespaces
|
||||
* deprecated getParent(), setParent() and hasParent() in FormBuilderInterface
|
||||
* FormInterface::add() now accepts a FormInterface instance OR a field's name, type and options
|
||||
* removed special characters between the choice or text fields of DateType unless
|
||||
the option "format" is set to a custom value
|
||||
* deprecated FormException and introduced ExceptionInterface instead
|
||||
* [BC BREAK] FormException is now an interface
|
||||
* protected FormBuilder methods from being called when it is turned into a FormConfigInterface with getFormConfig()
|
||||
* [BC BREAK] inserted argument `$message` in the constructor of `FormError`
|
||||
* the PropertyPath class and related classes were moved to a dedicated
|
||||
PropertyAccess component. During the move, InvalidPropertyException was
|
||||
renamed to NoSuchPropertyException. FormUtil was split: FormUtil::singularify()
|
||||
can now be found in Symfony\Component\PropertyAccess\StringUtil. The methods
|
||||
getValue() and setValue() from PropertyPath were extracted into a new class
|
||||
PropertyAccessor.
|
||||
* added an optional PropertyAccessorInterface parameter to FormType,
|
||||
ObjectChoiceList and PropertyPathMapper
|
||||
* [BC BREAK] PropertyPathMapper and FormType now have a constructor
|
||||
* [BC BREAK] setting the option "validation_groups" to ``false`` now disables validation
|
||||
instead of assuming group "Default"
|
||||
|
||||
2.1.0
|
||||
-----
|
||||
|
||||
* [BC BREAK] ``read_only`` field attribute now renders as ``readonly="readonly"``, use ``disabled`` instead
|
||||
* [BC BREAK] child forms now aren't validated anymore by default
|
||||
* made validation of form children configurable (new option: cascade_validation)
|
||||
* added support for validation groups as callbacks
|
||||
* made the translation catalogue configurable via the "translation_domain" option
|
||||
* added Form::getErrorsAsString() to help debugging forms
|
||||
* allowed setting different options for RepeatedType fields (like the label)
|
||||
* added support for empty form name at root level, this enables rendering forms
|
||||
without form name prefix in field names
|
||||
* [BC BREAK] form and field names must start with a letter, digit or underscore
|
||||
and only contain letters, digits, underscores, hyphens and colons
|
||||
* [BC BREAK] changed default name of the prototype in the "collection" type
|
||||
from "$$name$$" to "\__name\__". No dollars are appended/prepended to custom
|
||||
names anymore.
|
||||
* [BC BREAK] improved ChoiceListInterface
|
||||
* [BC BREAK] added SimpleChoiceList and LazyChoiceList as replacement of
|
||||
ArrayChoiceList
|
||||
* added ChoiceList and ObjectChoiceList to use objects as choices
|
||||
* [BC BREAK] removed EntitiesToArrayTransformer and EntityToIdTransformer.
|
||||
The former has been replaced by CollectionToArrayTransformer in combination
|
||||
with EntityChoiceList, the latter is not required in the core anymore.
|
||||
* [BC BREAK] renamed
|
||||
* ArrayToBooleanChoicesTransformer to ChoicesToBooleanArrayTransformer
|
||||
* ScalarToBooleanChoicesTransformer to ChoiceToBooleanArrayTransformer
|
||||
* ArrayToChoicesTransformer to ChoicesToValuesTransformer
|
||||
* ScalarToChoiceTransformer to ChoiceToValueTransformer
|
||||
to be consistent with the naming in ChoiceListInterface.
|
||||
They were merged into ChoiceList and have no public equivalent anymore.
|
||||
* choice fields now throw a FormException if neither the "choices" nor the
|
||||
"choice_list" option is set
|
||||
* the radio type is now a child of the checkbox type
|
||||
* the collection, choice (with multiple selection) and entity (with multiple
|
||||
selection) types now make use of addXxx() and removeXxx() methods in your
|
||||
model if you set "by_reference" to false. For a custom, non-recognized
|
||||
singular form, set the "property_path" option like this: "plural|singular"
|
||||
* forms now don't create an empty object anymore if they are completely
|
||||
empty and not required. The empty value for such forms is null.
|
||||
* added constant Guess::VERY_HIGH_CONFIDENCE
|
||||
* [BC BREAK] The methods `add`, `remove`, `setParent`, `bind` and `setData`
|
||||
in class Form now throw an exception if the form is already bound
|
||||
* fields of constrained classes without a NotBlank or NotNull constraint are
|
||||
set to not required now, as stated in the docs
|
||||
* fixed TimeType and DateTimeType to not display seconds when "widget" is
|
||||
"single_text" unless "with_seconds" is set to true
|
||||
* checkboxes of in an expanded multiple-choice field don't include the choice
|
||||
in their name anymore. Their names terminate with "[]" now.
|
||||
* deprecated FormValidatorInterface and substituted its implementations
|
||||
by event subscribers
|
||||
* simplified CSRF protection and removed the csrf type
|
||||
* deprecated FieldType and merged it into FormType
|
||||
* added new option "compound" that lets you switch between field and form behavior
|
||||
* [BC BREAK] renamed theme blocks
|
||||
* "field_*" to "form_*"
|
||||
* "field_widget" to "form_widget_simple"
|
||||
* "widget_choice_options" to "choice_widget_options"
|
||||
* "generic_label" to "form_label"
|
||||
* added theme blocks "form_widget_compound", "choice_widget_expanded" and
|
||||
"choice_widget_collapsed" to make theming more modular
|
||||
* ValidatorTypeGuesser now guesses "collection" for array type constraint
|
||||
* added method `guessPattern` to FormTypeGuesserInterface to guess which pattern to use in the HTML5 attribute "pattern"
|
||||
* deprecated method `guessMinLength` in favor of `guessPattern`
|
||||
* labels don't display field attributes anymore. Label attributes can be
|
||||
passed in the "label_attr" option/variable
|
||||
* added option "mapped" which should be used instead of setting "property_path" to false
|
||||
* [BC BREAK] "data_class" now *must* be set if a form maps to an object and should be left empty otherwise
|
||||
* improved error mapping on forms
|
||||
* dot (".") rules are now allowed to map errors assigned to a form to
|
||||
one of its children
|
||||
* errors are not mapped to unsynchronized forms anymore
|
||||
* [BC BREAK] changed Form constructor to accept a single `FormConfigInterface` object
|
||||
* [BC BREAK] changed argument order in the FormBuilder constructor
|
||||
* added Form method `getViewData`
|
||||
* deprecated Form methods
|
||||
* `getTypes`
|
||||
* `getErrorBubbling`
|
||||
* `getNormTransformers`
|
||||
* `getClientTransformers`
|
||||
* `getAttribute`
|
||||
* `hasAttribute`
|
||||
* `getClientData`
|
||||
* added FormBuilder methods
|
||||
* `getTypes`
|
||||
* `addViewTransformer`
|
||||
* `getViewTransformers`
|
||||
* `resetViewTransformers`
|
||||
* `addModelTransformer`
|
||||
* `getModelTransformers`
|
||||
* `resetModelTransformers`
|
||||
* deprecated FormBuilder methods
|
||||
* `prependClientTransformer`
|
||||
* `appendClientTransformer`
|
||||
* `getClientTransformers`
|
||||
* `resetClientTransformers`
|
||||
* `prependNormTransformer`
|
||||
* `appendNormTransformer`
|
||||
* `getNormTransformers`
|
||||
* `resetNormTransformers`
|
||||
* deprecated the option "validation_constraint" in favor of the new
|
||||
option "constraints"
|
||||
* removed superfluous methods from DataMapperInterface
|
||||
* `mapFormToData`
|
||||
* `mapDataToForm`
|
||||
* added `setDefaultOptions` to FormTypeInterface and FormTypeExtensionInterface
|
||||
which accepts an OptionsResolverInterface instance
|
||||
* deprecated the methods `getDefaultOptions` and `getAllowedOptionValues`
|
||||
in FormTypeInterface and FormTypeExtensionInterface
|
||||
* options passed during construction can now be accessed from FormConfigInterface
|
||||
* added FormBuilderInterface and FormConfigEditorInterface
|
||||
* [BC BREAK] the method `buildForm` in FormTypeInterface and FormTypeExtensionInterface
|
||||
now receives a FormBuilderInterface instead of a FormBuilder instance
|
||||
* [BC BREAK] the method `buildViewBottomUp` was renamed to `finishView` in
|
||||
FormTypeInterface and FormTypeExtensionInterface
|
||||
* [BC BREAK] the options array is now passed as last argument of the
|
||||
methods
|
||||
* `buildView`
|
||||
* `finishView`
|
||||
in FormTypeInterface and FormTypeExtensionInterface
|
||||
* [BC BREAK] no options are passed to `getParent` of FormTypeInterface anymore
|
||||
* deprecated DataEvent and FilterDataEvent in favor of the new FormEvent which is
|
||||
now passed to all events thrown by the component
|
||||
* FormEvents::BIND now replaces FormEvents::BIND_NORM_DATA
|
||||
* FormEvents::PRE_SET_DATA now replaces FormEvents::SET_DATA
|
||||
* FormEvents::PRE_BIND now replaces FormEvents::BIND_CLIENT_DATA
|
||||
* deprecated FormEvents::SET_DATA, FormEvents::BIND_CLIENT_DATA and
|
||||
FormEvents::BIND_NORM_DATA
|
||||
* [BC BREAK] reversed the order of the first two arguments to `createNamed`
|
||||
and `createNamedBuilder` in `FormFactoryInterface`
|
||||
* deprecated `getChildren` in Form and FormBuilder in favor of `all`
|
||||
* deprecated `hasChildren` in Form and FormBuilder in favor of `count`
|
||||
* FormBuilder now implements \IteratorAggregate
|
||||
* [BC BREAK] compound forms now always need a data mapper
|
||||
* FormBuilder now maintains the order when explicitly adding form builders as children
|
||||
* ChoiceType now doesn't add the empty value anymore if the choices already contain an empty element
|
||||
* DateType, TimeType and DateTimeType now show empty values again if not required
|
||||
* [BC BREAK] fixed rendering of errors for DateType, BirthdayType and similar ones
|
||||
* [BC BREAK] fixed: form constraints are only validated if they belong to the validated group
|
||||
* deprecated `bindRequest` in `Form` and replaced it by a listener to FormEvents::PRE_BIND
|
||||
* fixed: the "data" option supersedes default values from the model
|
||||
* changed DateType to refer to the "format" option for calculating the year and day choices instead
|
||||
of padding them automatically
|
||||
* [BC BREAK] DateType defaults to the format "yyyy-MM-dd" now if the widget is
|
||||
"single_text", in order to support the HTML 5 date field out of the box
|
||||
* added the option "format" to DateTimeType
|
||||
* [BC BREAK] DateTimeType now outputs RFC 3339 dates by default, as generated and
|
||||
consumed by HTML5 browsers, if the widget is "single_text"
|
||||
* deprecated the options "data_timezone" and "user_timezone" in DateType, DateTimeType and TimeType
|
||||
and renamed them to "model_timezone" and "view_timezone"
|
||||
* fixed: TransformationFailedExceptions thrown in the model transformer are now caught by the form
|
||||
* added FormRegistryInterface, ResolvedFormTypeInterface and ResolvedFormTypeFactoryInterface
|
||||
* deprecated FormFactory methods
|
||||
* `addType`
|
||||
* `hasType`
|
||||
* `getType`
|
||||
* [BC BREAK] FormFactory now expects a FormRegistryInterface and a ResolvedFormTypeFactoryInterface as constructor argument
|
||||
* [BC BREAK] The method `createBuilder` in FormTypeInterface is not supported anymore for performance reasons
|
||||
* [BC BREAK] Removed `setTypes` from FormBuilder
|
||||
* deprecated AbstractType methods
|
||||
* `getExtensions`
|
||||
* `setExtensions`
|
||||
* ChoiceType now caches its created choice lists to improve performance
|
||||
* [BC BREAK] Rows of a collection field cannot be themed individually anymore. All rows in the collection
|
||||
field now have the same block names, which contains "entry" where it previously contained the row index.
|
||||
* [BC BREAK] When registering a type through the DI extension, the tag alias has to match the actual type name.
|
||||
* added FormRendererInterface, FormRendererEngineInterface and implementations of these interfaces
|
||||
* [BC BREAK] removed the following methods from FormUtil:
|
||||
* `toArrayKey`
|
||||
* `toArrayKeys`
|
||||
* `isChoiceGroup`
|
||||
* `isChoiceSelected`
|
||||
* [BC BREAK] renamed method `renderBlock` in FormHelper to `block` and changed its signature
|
||||
* made FormView properties public and deprecated their accessor methods
|
||||
* made the normalized data of a form accessible in the template through the variable "form.vars.data"
|
||||
* made the original data of a choice accessible in the template through the property "choice.data"
|
||||
* added convenience class Forms and FormFactoryBuilderInterface
|
||||
34
lib/symfony/form/CallbackTransformer.php
Normal file
34
lib/symfony/form/CallbackTransformer.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
class CallbackTransformer implements DataTransformerInterface
|
||||
{
|
||||
private \Closure $transform;
|
||||
private \Closure $reverseTransform;
|
||||
|
||||
public function __construct(callable $transform, callable $reverseTransform)
|
||||
{
|
||||
$this->transform = $transform(...);
|
||||
$this->reverseTransform = $reverseTransform(...);
|
||||
}
|
||||
|
||||
public function transform(mixed $data): mixed
|
||||
{
|
||||
return ($this->transform)($data);
|
||||
}
|
||||
|
||||
public function reverseTransform(mixed $data): mixed
|
||||
{
|
||||
return ($this->reverseTransform)($data);
|
||||
}
|
||||
}
|
||||
219
lib/symfony/form/ChoiceList/ArrayChoiceList.php
Normal file
219
lib/symfony/form/ChoiceList/ArrayChoiceList.php
Normal file
@@ -0,0 +1,219 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList;
|
||||
|
||||
/**
|
||||
* A list of choices with arbitrary data types.
|
||||
*
|
||||
* The user of this class is responsible for assigning string values to the
|
||||
* choices and for their uniqueness.
|
||||
* Both the choices and their values are passed to the constructor.
|
||||
* Each choice must have a corresponding value (with the same key) in
|
||||
* the values array.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class ArrayChoiceList implements ChoiceListInterface
|
||||
{
|
||||
/**
|
||||
* The choices in the list.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $choices;
|
||||
|
||||
/**
|
||||
* The values indexed by the original keys.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $structuredValues;
|
||||
|
||||
/**
|
||||
* The original keys of the choices array.
|
||||
*
|
||||
* @var int[]|string[]
|
||||
*/
|
||||
protected $originalKeys;
|
||||
protected $valueCallback;
|
||||
|
||||
/**
|
||||
* Creates a list with the given choices and values.
|
||||
*
|
||||
* The given choice array must have the same array keys as the value array.
|
||||
*
|
||||
* @param iterable $choices The selectable choices
|
||||
* @param callable|null $value The callable for creating the value
|
||||
* for a choice. If `null` is passed,
|
||||
* incrementing integers are used as
|
||||
* values
|
||||
*/
|
||||
public function __construct(iterable $choices, ?callable $value = null)
|
||||
{
|
||||
if ($choices instanceof \Traversable) {
|
||||
$choices = iterator_to_array($choices);
|
||||
}
|
||||
|
||||
if (null === $value && $this->castableToString($choices)) {
|
||||
$value = static fn ($choice) => false === $choice ? '0' : (string) $choice;
|
||||
}
|
||||
|
||||
if (null !== $value) {
|
||||
// If a deterministic value generator was passed, use it later
|
||||
$this->valueCallback = $value(...);
|
||||
} else {
|
||||
// Otherwise generate incrementing integers as values
|
||||
$value = static function () {
|
||||
static $i = 0;
|
||||
|
||||
return $i++;
|
||||
};
|
||||
}
|
||||
|
||||
// If the choices are given as recursive array (i.e. with explicit
|
||||
// choice groups), flatten the array. The grouping information is needed
|
||||
// in the view only.
|
||||
$this->flatten($choices, $value, $choicesByValues, $keysByValues, $structuredValues);
|
||||
|
||||
$this->choices = $choicesByValues;
|
||||
$this->originalKeys = $keysByValues;
|
||||
$this->structuredValues = $structuredValues;
|
||||
}
|
||||
|
||||
public function getChoices(): array
|
||||
{
|
||||
return $this->choices;
|
||||
}
|
||||
|
||||
public function getValues(): array
|
||||
{
|
||||
return array_map('strval', array_keys($this->choices));
|
||||
}
|
||||
|
||||
public function getStructuredValues(): array
|
||||
{
|
||||
return $this->structuredValues;
|
||||
}
|
||||
|
||||
public function getOriginalKeys(): array
|
||||
{
|
||||
return $this->originalKeys;
|
||||
}
|
||||
|
||||
public function getChoicesForValues(array $values): array
|
||||
{
|
||||
$choices = [];
|
||||
|
||||
foreach ($values as $i => $givenValue) {
|
||||
if (\array_key_exists($givenValue ?? '', $this->choices)) {
|
||||
$choices[$i] = $this->choices[$givenValue];
|
||||
}
|
||||
}
|
||||
|
||||
return $choices;
|
||||
}
|
||||
|
||||
public function getValuesForChoices(array $choices): array
|
||||
{
|
||||
$values = [];
|
||||
|
||||
// Use the value callback to compare choices by their values, if present
|
||||
if ($this->valueCallback) {
|
||||
$givenValues = [];
|
||||
|
||||
foreach ($choices as $i => $givenChoice) {
|
||||
$givenValues[$i] = (string) ($this->valueCallback)($givenChoice);
|
||||
}
|
||||
|
||||
return array_intersect($givenValues, array_keys($this->choices));
|
||||
}
|
||||
|
||||
// Otherwise compare choices by identity
|
||||
foreach ($choices as $i => $givenChoice) {
|
||||
foreach ($this->choices as $value => $choice) {
|
||||
if ($choice === $givenChoice) {
|
||||
$values[$i] = (string) $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flattens an array into the given output variables.
|
||||
*
|
||||
* @param array $choices The array to flatten
|
||||
* @param callable $value The callable for generating choice values
|
||||
* @param array|null $choicesByValues The flattened choices indexed by the
|
||||
* corresponding values
|
||||
* @param array|null $keysByValues The original keys indexed by the
|
||||
* corresponding values
|
||||
* @param array|null $structuredValues The values indexed by the original keys
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
protected function flatten(array $choices, callable $value, ?array &$choicesByValues, ?array &$keysByValues, ?array &$structuredValues): void
|
||||
{
|
||||
if (null === $choicesByValues) {
|
||||
$choicesByValues = [];
|
||||
$keysByValues = [];
|
||||
$structuredValues = [];
|
||||
}
|
||||
|
||||
foreach ($choices as $key => $choice) {
|
||||
if (\is_array($choice)) {
|
||||
$this->flatten($choice, $value, $choicesByValues, $keysByValues, $structuredValues[$key]);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$choiceValue = (string) $value($choice);
|
||||
$choicesByValues[$choiceValue] = $choice;
|
||||
$keysByValues[$choiceValue] = $key;
|
||||
$structuredValues[$key] = $choiceValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given choices can be cast to strings without
|
||||
* generating duplicates.
|
||||
* This method is responsible for preventing conflict between scalar values
|
||||
* and the empty value.
|
||||
*/
|
||||
private function castableToString(array $choices, array &$cache = []): bool
|
||||
{
|
||||
foreach ($choices as $choice) {
|
||||
if (\is_array($choice)) {
|
||||
if (!$this->castableToString($choice, $cache)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
continue;
|
||||
} elseif (!\is_scalar($choice)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// prevent having false casted to the empty string by isset()
|
||||
$choice = false === $choice ? '0' : (string) $choice;
|
||||
|
||||
if (isset($cache[$choice])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$cache[$choice] = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
149
lib/symfony/form/ChoiceList/ChoiceList.php
Normal file
149
lib/symfony/form/ChoiceList/ChoiceList.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceAttr;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceFieldName;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceFilter;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceLabel;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceLoader;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceTranslationParameters;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceValue;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\Cache\GroupBy;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\Cache\PreferredChoice;
|
||||
use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader;
|
||||
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
|
||||
use Symfony\Component\Form\FormTypeExtensionInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
|
||||
/**
|
||||
* A set of convenient static methods to create cacheable choice list options.
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
final class ChoiceList
|
||||
{
|
||||
/**
|
||||
* Creates a cacheable loader from any callable providing iterable choices.
|
||||
*
|
||||
* @param callable $choices A callable that must return iterable choices or grouped choices
|
||||
* @param mixed $vary Dynamic data used to compute a unique hash when caching the loader
|
||||
*/
|
||||
public static function lazy(FormTypeInterface|FormTypeExtensionInterface $formType, callable $choices, mixed $vary = null): ChoiceLoader
|
||||
{
|
||||
return self::loader($formType, new CallbackChoiceLoader($choices), $vary);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorates a loader to make it cacheable.
|
||||
*
|
||||
* @param ChoiceLoaderInterface $loader A loader responsible for creating loading choices or grouped choices
|
||||
* @param mixed $vary Dynamic data used to compute a unique hash when caching the loader
|
||||
*/
|
||||
public static function loader(FormTypeInterface|FormTypeExtensionInterface $formType, ChoiceLoaderInterface $loader, mixed $vary = null): ChoiceLoader
|
||||
{
|
||||
return new ChoiceLoader($formType, $loader, $vary);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorates a "choice_value" callback to make it cacheable.
|
||||
*
|
||||
* @param callable|array $value Any pseudo callable to create a unique string value from a choice
|
||||
* @param mixed $vary Dynamic data used to compute a unique hash when caching the callback
|
||||
*/
|
||||
public static function value(FormTypeInterface|FormTypeExtensionInterface $formType, callable|array $value, mixed $vary = null): ChoiceValue
|
||||
{
|
||||
return new ChoiceValue($formType, $value, $vary);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param callable|array $filter Any pseudo callable to filter a choice list
|
||||
* @param mixed $vary Dynamic data used to compute a unique hash when caching the callback
|
||||
*/
|
||||
public static function filter(FormTypeInterface|FormTypeExtensionInterface $formType, callable|array $filter, mixed $vary = null): ChoiceFilter
|
||||
{
|
||||
return new ChoiceFilter($formType, $filter, $vary);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorates a "choice_label" option to make it cacheable.
|
||||
*
|
||||
* @param callable|false $label Any pseudo callable to create a label from a choice or false to discard it
|
||||
* @param mixed $vary Dynamic data used to compute a unique hash when caching the option
|
||||
*/
|
||||
public static function label(FormTypeInterface|FormTypeExtensionInterface $formType, callable|false $label, mixed $vary = null): ChoiceLabel
|
||||
{
|
||||
return new ChoiceLabel($formType, $label, $vary);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorates a "choice_name" callback to make it cacheable.
|
||||
*
|
||||
* @param callable|array $fieldName Any pseudo callable to create a field name from a choice
|
||||
* @param mixed $vary Dynamic data used to compute a unique hash when caching the callback
|
||||
*/
|
||||
public static function fieldName(FormTypeInterface|FormTypeExtensionInterface $formType, callable|array $fieldName, mixed $vary = null): ChoiceFieldName
|
||||
{
|
||||
return new ChoiceFieldName($formType, $fieldName, $vary);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorates a "choice_attr" option to make it cacheable.
|
||||
*
|
||||
* @param callable|array $attr Any pseudo callable or array to create html attributes from a choice
|
||||
* @param mixed $vary Dynamic data used to compute a unique hash when caching the option
|
||||
*/
|
||||
public static function attr(FormTypeInterface|FormTypeExtensionInterface $formType, callable|array $attr, mixed $vary = null): ChoiceAttr
|
||||
{
|
||||
return new ChoiceAttr($formType, $attr, $vary);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorates a "choice_translation_parameters" option to make it cacheable.
|
||||
*
|
||||
* @param callable|array $translationParameters Any pseudo callable or array to create translation parameters from a choice
|
||||
* @param mixed $vary Dynamic data used to compute a unique hash when caching the option
|
||||
*/
|
||||
public static function translationParameters(FormTypeInterface|FormTypeExtensionInterface $formType, callable|array $translationParameters, mixed $vary = null): ChoiceTranslationParameters
|
||||
{
|
||||
return new ChoiceTranslationParameters($formType, $translationParameters, $vary);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorates a "group_by" callback to make it cacheable.
|
||||
*
|
||||
* @param callable|array $groupBy Any pseudo callable to return a group name from a choice
|
||||
* @param mixed $vary Dynamic data used to compute a unique hash when caching the callback
|
||||
*/
|
||||
public static function groupBy(FormTypeInterface|FormTypeExtensionInterface $formType, callable|array $groupBy, mixed $vary = null): GroupBy
|
||||
{
|
||||
return new GroupBy($formType, $groupBy, $vary);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorates a "preferred_choices" option to make it cacheable.
|
||||
*
|
||||
* @param callable|array $preferred Any pseudo callable or array to return a group name from a choice
|
||||
* @param mixed $vary Dynamic data used to compute a unique hash when caching the option
|
||||
*/
|
||||
public static function preferred(FormTypeInterface|FormTypeExtensionInterface $formType, callable|array $preferred, mixed $vary = null): PreferredChoice
|
||||
{
|
||||
return new PreferredChoice($formType, $preferred, $vary);
|
||||
}
|
||||
|
||||
/**
|
||||
* Should not be instantiated.
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
}
|
||||
138
lib/symfony/form/ChoiceList/ChoiceListInterface.php
Normal file
138
lib/symfony/form/ChoiceList/ChoiceListInterface.php
Normal file
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList;
|
||||
|
||||
/**
|
||||
* A list of choices that can be selected in a choice field.
|
||||
*
|
||||
* A choice list assigns unique string values to each of a list of choices.
|
||||
* These string values are displayed in the "value" attributes in HTML and
|
||||
* submitted back to the server.
|
||||
*
|
||||
* The acceptable data types for the choices depend on the implementation.
|
||||
* Values must always be strings and (within the list) free of duplicates.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
interface ChoiceListInterface
|
||||
{
|
||||
/**
|
||||
* Returns all selectable choices.
|
||||
*
|
||||
* @return array The selectable choices indexed by the corresponding values
|
||||
*/
|
||||
public function getChoices(): array;
|
||||
|
||||
/**
|
||||
* Returns the values for the choices.
|
||||
*
|
||||
* The values are strings that do not contain duplicates:
|
||||
*
|
||||
* $form->add('field', 'choice', [
|
||||
* 'choices' => [
|
||||
* 'Decided' => ['Yes' => true, 'No' => false],
|
||||
* 'Undecided' => ['Maybe' => null],
|
||||
* ],
|
||||
* ]);
|
||||
*
|
||||
* In this example, the result of this method is:
|
||||
*
|
||||
* [
|
||||
* 'Yes' => '0',
|
||||
* 'No' => '1',
|
||||
* 'Maybe' => '2',
|
||||
* ]
|
||||
*
|
||||
* Null and false MUST NOT conflict when being casted to string.
|
||||
* For this some default incremented values SHOULD be computed.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getValues(): array;
|
||||
|
||||
/**
|
||||
* Returns the values in the structure originally passed to the list.
|
||||
*
|
||||
* Contrary to {@link getValues()}, the result is indexed by the original
|
||||
* keys of the choices. If the original array contained nested arrays, these
|
||||
* nested arrays are represented here as well:
|
||||
*
|
||||
* $form->add('field', 'choice', [
|
||||
* 'choices' => [
|
||||
* 'Decided' => ['Yes' => true, 'No' => false],
|
||||
* 'Undecided' => ['Maybe' => null],
|
||||
* ],
|
||||
* ]);
|
||||
*
|
||||
* In this example, the result of this method is:
|
||||
*
|
||||
* [
|
||||
* 'Decided' => ['Yes' => '0', 'No' => '1'],
|
||||
* 'Undecided' => ['Maybe' => '2'],
|
||||
* ]
|
||||
*
|
||||
* Nested arrays do not make sense in a view format unless
|
||||
* they are used as a convenient way of grouping.
|
||||
* If the implementation does not intend to support grouped choices,
|
||||
* this method SHOULD be equivalent to {@link getValues()}.
|
||||
* The $groupBy callback parameter SHOULD be used instead.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getStructuredValues(): array;
|
||||
|
||||
/**
|
||||
* Returns the original keys of the choices.
|
||||
*
|
||||
* The original keys are the keys of the choice array that was passed in the
|
||||
* "choice" option of the choice type. Note that this array may contain
|
||||
* duplicates if the "choice" option contained choice groups:
|
||||
*
|
||||
* $form->add('field', 'choice', [
|
||||
* 'choices' => [
|
||||
* 'Decided' => [true, false],
|
||||
* 'Undecided' => [null],
|
||||
* ],
|
||||
* ]);
|
||||
*
|
||||
* In this example, the original key 0 appears twice, once for `true` and
|
||||
* once for `null`.
|
||||
*
|
||||
* @return int[]|string[] The original choice keys indexed by the
|
||||
* corresponding choice values
|
||||
*/
|
||||
public function getOriginalKeys(): array;
|
||||
|
||||
/**
|
||||
* Returns the choices corresponding to the given values.
|
||||
*
|
||||
* The choices are returned with the same keys and in the same order as the
|
||||
* corresponding values in the given array.
|
||||
*
|
||||
* @param string[] $values An array of choice values. Non-existing values in
|
||||
* this array are ignored
|
||||
*/
|
||||
public function getChoicesForValues(array $values): array;
|
||||
|
||||
/**
|
||||
* Returns the values corresponding to the given choices.
|
||||
*
|
||||
* The values are returned with the same keys and in the same order as the
|
||||
* corresponding choices in the given array.
|
||||
*
|
||||
* @param array $choices An array of choices. Non-existing choices in this
|
||||
* array are ignored
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getValuesForChoices(array $choices): array;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory\Cache;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator;
|
||||
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormTypeExtensionInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
|
||||
/**
|
||||
* A template decorator for static {@see ChoiceType} options.
|
||||
*
|
||||
* Used as fly weight for {@see CachingFactoryDecorator}.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
abstract class AbstractStaticOption
|
||||
{
|
||||
private static array $options = [];
|
||||
|
||||
private bool|string|array|\Closure|ChoiceLoaderInterface $option;
|
||||
|
||||
/**
|
||||
* @param mixed $option Any pseudo callable, array, string or bool to define a choice list option
|
||||
* @param mixed $vary Dynamic data used to compute a unique hash when caching the option
|
||||
*/
|
||||
final public function __construct(FormTypeInterface|FormTypeExtensionInterface $formType, mixed $option, mixed $vary = null)
|
||||
{
|
||||
$hash = CachingFactoryDecorator::generateHash([static::class, $formType, $vary]);
|
||||
|
||||
$this->option = self::$options[$hash] ??= $option instanceof \Closure || \is_string($option) || \is_bool($option) || $option instanceof ChoiceLoaderInterface || !\is_callable($option) ? $option : $option(...);
|
||||
}
|
||||
|
||||
final public function getOption(): mixed
|
||||
{
|
||||
return $this->option;
|
||||
}
|
||||
|
||||
final public static function reset(): void
|
||||
{
|
||||
self::$options = [];
|
||||
}
|
||||
}
|
||||
27
lib/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php
Normal file
27
lib/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory\Cache;
|
||||
|
||||
use Symfony\Component\Form\FormTypeExtensionInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
|
||||
/**
|
||||
* A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface}
|
||||
* which configures a "choice_attr" option.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
final class ChoiceAttr extends AbstractStaticOption
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory\Cache;
|
||||
|
||||
use Symfony\Component\Form\FormTypeExtensionInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
|
||||
/**
|
||||
* A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface}
|
||||
* which configures a "choice_name" callback.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
final class ChoiceFieldName extends AbstractStaticOption
|
||||
{
|
||||
}
|
||||
27
lib/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php
Normal file
27
lib/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory\Cache;
|
||||
|
||||
use Symfony\Component\Form\FormTypeExtensionInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
|
||||
/**
|
||||
* A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface}
|
||||
* which configures a "choice_filter" option.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
final class ChoiceFilter extends AbstractStaticOption
|
||||
{
|
||||
}
|
||||
27
lib/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php
Normal file
27
lib/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory\Cache;
|
||||
|
||||
use Symfony\Component\Form\FormTypeExtensionInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
|
||||
/**
|
||||
* A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface}
|
||||
* which configures a "choice_label" option.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
final class ChoiceLabel extends AbstractStaticOption
|
||||
{
|
||||
}
|
||||
43
lib/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php
Normal file
43
lib/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory\Cache;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
|
||||
use Symfony\Component\Form\FormTypeExtensionInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
|
||||
/**
|
||||
* A cacheable wrapper for {@see FormTypeInterface} or {@see FormTypeExtensionInterface}
|
||||
* which configures a "choice_loader" option.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
final class ChoiceLoader extends AbstractStaticOption implements ChoiceLoaderInterface
|
||||
{
|
||||
public function loadChoiceList(?callable $value = null): ChoiceListInterface
|
||||
{
|
||||
return $this->getOption()->loadChoiceList($value);
|
||||
}
|
||||
|
||||
public function loadChoicesForValues(array $values, ?callable $value = null): array
|
||||
{
|
||||
return $this->getOption()->loadChoicesForValues($values, $value);
|
||||
}
|
||||
|
||||
public function loadValuesForChoices(array $choices, ?callable $value = null): array
|
||||
{
|
||||
return $this->getOption()->loadValuesForChoices($choices, $value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory\Cache;
|
||||
|
||||
use Symfony\Component\Form\FormTypeExtensionInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
|
||||
/**
|
||||
* A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface}
|
||||
* which configures a "choice_translation_parameters" option.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @author Vincent Langlet <vincentlanglet@users.noreply.github.com>
|
||||
*/
|
||||
final class ChoiceTranslationParameters extends AbstractStaticOption
|
||||
{
|
||||
}
|
||||
27
lib/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php
Normal file
27
lib/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory\Cache;
|
||||
|
||||
use Symfony\Component\Form\FormTypeExtensionInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
|
||||
/**
|
||||
* A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface}
|
||||
* which configures a "choice_value" callback.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
final class ChoiceValue extends AbstractStaticOption
|
||||
{
|
||||
}
|
||||
27
lib/symfony/form/ChoiceList/Factory/Cache/GroupBy.php
Normal file
27
lib/symfony/form/ChoiceList/Factory/Cache/GroupBy.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory\Cache;
|
||||
|
||||
use Symfony\Component\Form\FormTypeExtensionInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
|
||||
/**
|
||||
* A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface}
|
||||
* which configures a "group_by" callback.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
final class GroupBy extends AbstractStaticOption
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory\Cache;
|
||||
|
||||
use Symfony\Component\Form\FormTypeExtensionInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
|
||||
/**
|
||||
* A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface}
|
||||
* which configures a "preferred_choices" option.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
final class PreferredChoice extends AbstractStaticOption
|
||||
{
|
||||
}
|
||||
232
lib/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php
Normal file
232
lib/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php
Normal file
@@ -0,0 +1,232 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
|
||||
use Symfony\Component\Form\ChoiceList\View\ChoiceListView;
|
||||
use Symfony\Contracts\Service\ResetInterface;
|
||||
|
||||
/**
|
||||
* Caches the choice lists created by the decorated factory.
|
||||
*
|
||||
* To cache a list based on its options, arguments must be decorated
|
||||
* by a {@see Cache\AbstractStaticOption} implementation.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
class CachingFactoryDecorator implements ChoiceListFactoryInterface, ResetInterface
|
||||
{
|
||||
private ChoiceListFactoryInterface $decoratedFactory;
|
||||
|
||||
/**
|
||||
* @var ChoiceListInterface[]
|
||||
*/
|
||||
private array $lists = [];
|
||||
|
||||
/**
|
||||
* @var ChoiceListView[]
|
||||
*/
|
||||
private array $views = [];
|
||||
|
||||
/**
|
||||
* Generates a SHA-256 hash for the given value.
|
||||
*
|
||||
* Optionally, a namespace string can be passed. Calling this method will
|
||||
* the same values, but different namespaces, will return different hashes.
|
||||
*
|
||||
* @return string The SHA-256 hash
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public static function generateHash(mixed $value, string $namespace = ''): string
|
||||
{
|
||||
if (\is_object($value)) {
|
||||
$value = spl_object_hash($value);
|
||||
} elseif (\is_array($value)) {
|
||||
array_walk_recursive($value, static function (&$v) {
|
||||
if (\is_object($v)) {
|
||||
$v = spl_object_hash($v);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return hash('sha256', $namespace.':'.serialize($value));
|
||||
}
|
||||
|
||||
public function __construct(ChoiceListFactoryInterface $decoratedFactory)
|
||||
{
|
||||
$this->decoratedFactory = $decoratedFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the decorated factory.
|
||||
*/
|
||||
public function getDecoratedFactory(): ChoiceListFactoryInterface
|
||||
{
|
||||
return $this->decoratedFactory;
|
||||
}
|
||||
|
||||
public function createListFromChoices(iterable $choices, mixed $value = null, mixed $filter = null): ChoiceListInterface
|
||||
{
|
||||
if ($choices instanceof \Traversable) {
|
||||
$choices = iterator_to_array($choices);
|
||||
}
|
||||
|
||||
$cache = true;
|
||||
// Only cache per value and filter when needed. The value is not validated on purpose.
|
||||
// The decorated factory may decide which values to accept and which not.
|
||||
if ($value instanceof Cache\ChoiceValue) {
|
||||
$value = $value->getOption();
|
||||
} elseif ($value) {
|
||||
$cache = false;
|
||||
}
|
||||
if ($filter instanceof Cache\ChoiceFilter) {
|
||||
$filter = $filter->getOption();
|
||||
} elseif ($filter) {
|
||||
$cache = false;
|
||||
}
|
||||
|
||||
if (!$cache) {
|
||||
return $this->decoratedFactory->createListFromChoices($choices, $value, $filter);
|
||||
}
|
||||
|
||||
$hash = self::generateHash([$choices, $value, $filter], 'fromChoices');
|
||||
|
||||
if (!isset($this->lists[$hash])) {
|
||||
$this->lists[$hash] = $this->decoratedFactory->createListFromChoices($choices, $value, $filter);
|
||||
}
|
||||
|
||||
return $this->lists[$hash];
|
||||
}
|
||||
|
||||
public function createListFromLoader(ChoiceLoaderInterface $loader, mixed $value = null, mixed $filter = null): ChoiceListInterface
|
||||
{
|
||||
$cache = true;
|
||||
|
||||
if ($loader instanceof Cache\ChoiceLoader) {
|
||||
$loader = $loader->getOption();
|
||||
} else {
|
||||
$cache = false;
|
||||
}
|
||||
|
||||
if ($value instanceof Cache\ChoiceValue) {
|
||||
$value = $value->getOption();
|
||||
} elseif ($value) {
|
||||
$cache = false;
|
||||
}
|
||||
|
||||
if ($filter instanceof Cache\ChoiceFilter) {
|
||||
$filter = $filter->getOption();
|
||||
} elseif ($filter) {
|
||||
$cache = false;
|
||||
}
|
||||
|
||||
if (!$cache) {
|
||||
return $this->decoratedFactory->createListFromLoader($loader, $value, $filter);
|
||||
}
|
||||
|
||||
$hash = self::generateHash([$loader, $value, $filter], 'fromLoader');
|
||||
|
||||
if (!isset($this->lists[$hash])) {
|
||||
$this->lists[$hash] = $this->decoratedFactory->createListFromLoader($loader, $value, $filter);
|
||||
}
|
||||
|
||||
return $this->lists[$hash];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $duplicatePreferredChoices
|
||||
*/
|
||||
public function createView(ChoiceListInterface $list, mixed $preferredChoices = null, mixed $label = null, mixed $index = null, mixed $groupBy = null, mixed $attr = null, mixed $labelTranslationParameters = []/* , bool $duplicatePreferredChoices = true */): ChoiceListView
|
||||
{
|
||||
$duplicatePreferredChoices = \func_num_args() > 7 ? func_get_arg(7) : true;
|
||||
$cache = true;
|
||||
|
||||
if ($preferredChoices instanceof Cache\PreferredChoice) {
|
||||
$preferredChoices = $preferredChoices->getOption();
|
||||
} elseif ($preferredChoices) {
|
||||
$cache = false;
|
||||
}
|
||||
|
||||
if ($label instanceof Cache\ChoiceLabel) {
|
||||
$label = $label->getOption();
|
||||
} elseif (null !== $label) {
|
||||
$cache = false;
|
||||
}
|
||||
|
||||
if ($index instanceof Cache\ChoiceFieldName) {
|
||||
$index = $index->getOption();
|
||||
} elseif ($index) {
|
||||
$cache = false;
|
||||
}
|
||||
|
||||
if ($groupBy instanceof Cache\GroupBy) {
|
||||
$groupBy = $groupBy->getOption();
|
||||
} elseif ($groupBy) {
|
||||
$cache = false;
|
||||
}
|
||||
|
||||
if ($attr instanceof Cache\ChoiceAttr) {
|
||||
$attr = $attr->getOption();
|
||||
} elseif ($attr) {
|
||||
$cache = false;
|
||||
}
|
||||
|
||||
if ($labelTranslationParameters instanceof Cache\ChoiceTranslationParameters) {
|
||||
$labelTranslationParameters = $labelTranslationParameters->getOption();
|
||||
} elseif ([] !== $labelTranslationParameters) {
|
||||
$cache = false;
|
||||
}
|
||||
|
||||
if (!$cache) {
|
||||
return $this->decoratedFactory->createView(
|
||||
$list,
|
||||
$preferredChoices,
|
||||
$label,
|
||||
$index,
|
||||
$groupBy,
|
||||
$attr,
|
||||
$labelTranslationParameters,
|
||||
$duplicatePreferredChoices,
|
||||
);
|
||||
}
|
||||
|
||||
$hash = self::generateHash([$list, $preferredChoices, $label, $index, $groupBy, $attr, $labelTranslationParameters, $duplicatePreferredChoices]);
|
||||
|
||||
if (!isset($this->views[$hash])) {
|
||||
$this->views[$hash] = $this->decoratedFactory->createView(
|
||||
$list,
|
||||
$preferredChoices,
|
||||
$label,
|
||||
$index,
|
||||
$groupBy,
|
||||
$attr,
|
||||
$labelTranslationParameters,
|
||||
$duplicatePreferredChoices,
|
||||
);
|
||||
}
|
||||
|
||||
return $this->views[$hash];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function reset()
|
||||
{
|
||||
$this->lists = [];
|
||||
$this->views = [];
|
||||
Cache\AbstractStaticOption::reset();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
|
||||
use Symfony\Component\Form\ChoiceList\View\ChoiceListView;
|
||||
|
||||
/**
|
||||
* Creates {@link ChoiceListInterface} instances.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
interface ChoiceListFactoryInterface
|
||||
{
|
||||
/**
|
||||
* Creates a choice list for the given choices.
|
||||
*
|
||||
* The choices should be passed in the values of the choices array.
|
||||
*
|
||||
* Optionally, a callable can be passed for generating the choice values.
|
||||
* The callable receives the choice as only argument.
|
||||
* Null may be passed when the choice list contains the empty value.
|
||||
*
|
||||
* @param callable|null $filter The callable filtering the choices
|
||||
*/
|
||||
public function createListFromChoices(iterable $choices, ?callable $value = null, ?callable $filter = null): ChoiceListInterface;
|
||||
|
||||
/**
|
||||
* Creates a choice list that is loaded with the given loader.
|
||||
*
|
||||
* Optionally, a callable can be passed for generating the choice values.
|
||||
* The callable receives the choice as only argument.
|
||||
* Null may be passed when the choice list contains the empty value.
|
||||
*
|
||||
* @param callable|null $filter The callable filtering the choices
|
||||
*/
|
||||
public function createListFromLoader(ChoiceLoaderInterface $loader, ?callable $value = null, ?callable $filter = null): ChoiceListInterface;
|
||||
|
||||
/**
|
||||
* Creates a view for the given choice list.
|
||||
*
|
||||
* Callables may be passed for all optional arguments. The callables receive
|
||||
* the choice as first and the array key as the second argument.
|
||||
*
|
||||
* * The callable for the label and the name should return the generated
|
||||
* label/choice name.
|
||||
* * The callable for the preferred choices should return true or false,
|
||||
* depending on whether the choice should be preferred or not.
|
||||
* * The callable for the grouping should return the group name or null if
|
||||
* a choice should not be grouped.
|
||||
* * The callable for the attributes should return an array of HTML
|
||||
* attributes that will be inserted in the tag of the choice.
|
||||
*
|
||||
* If no callable is passed, the labels will be generated from the choice
|
||||
* keys. The view indices will be generated using an incrementing integer
|
||||
* by default.
|
||||
*
|
||||
* The preferred choices can also be passed as array. Each choice that is
|
||||
* contained in that array will be marked as preferred.
|
||||
*
|
||||
* The attributes can be passed as multi-dimensional array. The keys should
|
||||
* match the keys of the choices. The values should be arrays of HTML
|
||||
* attributes that should be added to the respective choice.
|
||||
*
|
||||
* @param array|callable|null $preferredChoices The preferred choices
|
||||
* @param callable|false|null $label The callable generating the choice labels;
|
||||
* pass false to discard the label
|
||||
* @param array|callable|null $attr The callable generating the HTML attributes
|
||||
* @param array|callable $labelTranslationParameters The parameters used to translate the choice labels
|
||||
* @param bool $duplicatePreferredChoices Whether the preferred choices should be duplicated
|
||||
* on top of the list and in their original position
|
||||
* or only in the top of the list
|
||||
*/
|
||||
public function createView(ChoiceListInterface $list, array|callable|null $preferredChoices = null, callable|false|null $label = null, ?callable $index = null, ?callable $groupBy = null, array|callable|null $attr = null, array|callable $labelTranslationParameters = []/* , bool $duplicatePreferredChoices = true */): ChoiceListView;
|
||||
}
|
||||
307
lib/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php
Normal file
307
lib/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php
Normal file
@@ -0,0 +1,307 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\ArrayChoiceList;
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
use Symfony\Component\Form\ChoiceList\LazyChoiceList;
|
||||
use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader;
|
||||
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
|
||||
use Symfony\Component\Form\ChoiceList\Loader\FilterChoiceLoaderDecorator;
|
||||
use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView;
|
||||
use Symfony\Component\Form\ChoiceList\View\ChoiceListView;
|
||||
use Symfony\Component\Form\ChoiceList\View\ChoiceView;
|
||||
use Symfony\Contracts\Translation\TranslatableInterface;
|
||||
|
||||
/**
|
||||
* Default implementation of {@link ChoiceListFactoryInterface}.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
class DefaultChoiceListFactory implements ChoiceListFactoryInterface
|
||||
{
|
||||
public function createListFromChoices(iterable $choices, ?callable $value = null, ?callable $filter = null): ChoiceListInterface
|
||||
{
|
||||
if ($filter) {
|
||||
// filter the choice list lazily
|
||||
return $this->createListFromLoader(new FilterChoiceLoaderDecorator(
|
||||
new CallbackChoiceLoader(static fn () => $choices),
|
||||
$filter
|
||||
), $value);
|
||||
}
|
||||
|
||||
return new ArrayChoiceList($choices, $value);
|
||||
}
|
||||
|
||||
public function createListFromLoader(ChoiceLoaderInterface $loader, ?callable $value = null, ?callable $filter = null): ChoiceListInterface
|
||||
{
|
||||
if ($filter) {
|
||||
$loader = new FilterChoiceLoaderDecorator($loader, $filter);
|
||||
}
|
||||
|
||||
return new LazyChoiceList($loader, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $duplicatePreferredChoices
|
||||
*/
|
||||
public function createView(ChoiceListInterface $list, array|callable|null $preferredChoices = null, callable|false|null $label = null, ?callable $index = null, ?callable $groupBy = null, array|callable|null $attr = null, array|callable $labelTranslationParameters = []/* , bool $duplicatePreferredChoices = true */): ChoiceListView
|
||||
{
|
||||
$duplicatePreferredChoices = \func_num_args() > 7 ? func_get_arg(7) : true;
|
||||
$preferredViews = [];
|
||||
$preferredViewsOrder = [];
|
||||
$otherViews = [];
|
||||
$choices = $list->getChoices();
|
||||
$keys = $list->getOriginalKeys();
|
||||
|
||||
if (!\is_callable($preferredChoices)) {
|
||||
if (!$preferredChoices) {
|
||||
$preferredChoices = null;
|
||||
} else {
|
||||
// make sure we have keys that reflect order
|
||||
$preferredChoices = array_values($preferredChoices);
|
||||
$preferredChoices = static fn ($choice) => array_search($choice, $preferredChoices, true);
|
||||
}
|
||||
}
|
||||
|
||||
// The names are generated from an incrementing integer by default
|
||||
$index ??= 0;
|
||||
|
||||
// If $groupBy is a callable returning a string
|
||||
// choices are added to the group with the name returned by the callable.
|
||||
// If $groupBy is a callable returning an array
|
||||
// choices are added to the groups with names returned by the callable
|
||||
// If the callable returns null, the choice is not added to any group
|
||||
if (\is_callable($groupBy)) {
|
||||
foreach ($choices as $value => $choice) {
|
||||
self::addChoiceViewsGroupedByCallable(
|
||||
$groupBy,
|
||||
$choice,
|
||||
$value,
|
||||
$label,
|
||||
$keys,
|
||||
$index,
|
||||
$attr,
|
||||
$labelTranslationParameters,
|
||||
$preferredChoices,
|
||||
$preferredViews,
|
||||
$preferredViewsOrder,
|
||||
$otherViews,
|
||||
$duplicatePreferredChoices,
|
||||
);
|
||||
}
|
||||
|
||||
// Remove empty group views that may have been created by
|
||||
// addChoiceViewsGroupedByCallable()
|
||||
foreach ($preferredViews as $key => $view) {
|
||||
if ($view instanceof ChoiceGroupView && 0 === \count($view->choices)) {
|
||||
unset($preferredViews[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($otherViews as $key => $view) {
|
||||
if ($view instanceof ChoiceGroupView && 0 === \count($view->choices)) {
|
||||
unset($otherViews[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($preferredViewsOrder as $key => $groupViewsOrder) {
|
||||
if ($groupViewsOrder) {
|
||||
$preferredViewsOrder[$key] = min($groupViewsOrder);
|
||||
} else {
|
||||
unset($preferredViewsOrder[$key]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Otherwise use the original structure of the choices
|
||||
self::addChoiceViewsFromStructuredValues(
|
||||
$list->getStructuredValues(),
|
||||
$label,
|
||||
$choices,
|
||||
$keys,
|
||||
$index,
|
||||
$attr,
|
||||
$labelTranslationParameters,
|
||||
$preferredChoices,
|
||||
$preferredViews,
|
||||
$preferredViewsOrder,
|
||||
$otherViews,
|
||||
$duplicatePreferredChoices,
|
||||
);
|
||||
}
|
||||
|
||||
uksort($preferredViews, static fn ($a, $b) => isset($preferredViewsOrder[$a], $preferredViewsOrder[$b]) ? $preferredViewsOrder[$a] <=> $preferredViewsOrder[$b] : 0);
|
||||
|
||||
return new ChoiceListView($otherViews, $preferredViews);
|
||||
}
|
||||
|
||||
private static function addChoiceView($choice, string $value, $label, array $keys, &$index, $attr, $labelTranslationParameters, ?callable $isPreferred, array &$preferredViews, array &$preferredViewsOrder, array &$otherViews, bool $duplicatePreferredChoices): void
|
||||
{
|
||||
// $value may be an integer or a string, since it's stored in the array
|
||||
// keys. We want to guarantee it's a string though.
|
||||
$key = $keys[$value];
|
||||
$nextIndex = \is_int($index) ? $index++ : $index($choice, $key, $value);
|
||||
|
||||
// BC normalize label to accept a false value
|
||||
if (null === $label) {
|
||||
// If the labels are null, use the original choice key by default
|
||||
$label = (string) $key;
|
||||
} elseif (false !== $label) {
|
||||
// If "choice_label" is set to false and "expanded" is true, the value false
|
||||
// should be passed on to the "label" option of the checkboxes/radio buttons
|
||||
$dynamicLabel = $label($choice, $key, $value);
|
||||
|
||||
if (false === $dynamicLabel) {
|
||||
$label = false;
|
||||
} elseif ($dynamicLabel instanceof TranslatableInterface) {
|
||||
$label = $dynamicLabel;
|
||||
} else {
|
||||
$label = (string) $dynamicLabel;
|
||||
}
|
||||
}
|
||||
|
||||
$view = new ChoiceView(
|
||||
$choice,
|
||||
$value,
|
||||
$label,
|
||||
// The attributes may be a callable or a mapping from choice indices
|
||||
// to nested arrays
|
||||
\is_callable($attr) ? $attr($choice, $key, $value) : ($attr[$key] ?? []),
|
||||
// The label translation parameters may be a callable or a mapping from choice indices
|
||||
// to nested arrays
|
||||
\is_callable($labelTranslationParameters) ? $labelTranslationParameters($choice, $key, $value) : ($labelTranslationParameters[$key] ?? [])
|
||||
);
|
||||
|
||||
// $isPreferred may be null if no choices are preferred
|
||||
if (null !== $isPreferred && false !== $preferredKey = $isPreferred($choice, $key, $value)) {
|
||||
$preferredViews[$nextIndex] = $view;
|
||||
$preferredViewsOrder[$nextIndex] = $preferredKey;
|
||||
|
||||
if ($duplicatePreferredChoices) {
|
||||
$otherViews[$nextIndex] = $view;
|
||||
}
|
||||
} else {
|
||||
$otherViews[$nextIndex] = $view;
|
||||
}
|
||||
}
|
||||
|
||||
private static function addChoiceViewsFromStructuredValues(array $values, $label, array $choices, array $keys, &$index, $attr, $labelTranslationParameters, ?callable $isPreferred, array &$preferredViews, array &$preferredViewsOrder, array &$otherViews, bool $duplicatePreferredChoices): void
|
||||
{
|
||||
foreach ($values as $key => $value) {
|
||||
if (null === $value) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add the contents of groups to new ChoiceGroupView instances
|
||||
if (\is_array($value)) {
|
||||
$preferredViewsForGroup = [];
|
||||
$otherViewsForGroup = [];
|
||||
|
||||
self::addChoiceViewsFromStructuredValues(
|
||||
$value,
|
||||
$label,
|
||||
$choices,
|
||||
$keys,
|
||||
$index,
|
||||
$attr,
|
||||
$labelTranslationParameters,
|
||||
$isPreferred,
|
||||
$preferredViewsForGroup,
|
||||
$preferredViewsOrder,
|
||||
$otherViewsForGroup,
|
||||
$duplicatePreferredChoices,
|
||||
);
|
||||
|
||||
if (\count($preferredViewsForGroup) > 0) {
|
||||
$preferredViews[$key] = new ChoiceGroupView($key, $preferredViewsForGroup);
|
||||
}
|
||||
|
||||
if (\count($otherViewsForGroup) > 0) {
|
||||
$otherViews[$key] = new ChoiceGroupView($key, $otherViewsForGroup);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add ungrouped items directly
|
||||
self::addChoiceView(
|
||||
$choices[$value],
|
||||
$value,
|
||||
$label,
|
||||
$keys,
|
||||
$index,
|
||||
$attr,
|
||||
$labelTranslationParameters,
|
||||
$isPreferred,
|
||||
$preferredViews,
|
||||
$preferredViewsOrder,
|
||||
$otherViews,
|
||||
$duplicatePreferredChoices,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private static function addChoiceViewsGroupedByCallable(callable $groupBy, $choice, string $value, $label, array $keys, &$index, $attr, $labelTranslationParameters, ?callable $isPreferred, array &$preferredViews, array &$preferredViewsOrder, array &$otherViews, bool $duplicatePreferredChoices): void
|
||||
{
|
||||
$groupLabels = $groupBy($choice, $keys[$value], $value);
|
||||
|
||||
if (null === $groupLabels) {
|
||||
// If the callable returns null, don't group the choice
|
||||
self::addChoiceView(
|
||||
$choice,
|
||||
$value,
|
||||
$label,
|
||||
$keys,
|
||||
$index,
|
||||
$attr,
|
||||
$labelTranslationParameters,
|
||||
$isPreferred,
|
||||
$preferredViews,
|
||||
$preferredViewsOrder,
|
||||
$otherViews,
|
||||
$duplicatePreferredChoices,
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$groupLabels = \is_array($groupLabels) ? array_map('strval', $groupLabels) : [(string) $groupLabels];
|
||||
|
||||
foreach ($groupLabels as $groupLabel) {
|
||||
// Initialize the group views if necessary. Unnecessarily built group
|
||||
// views will be cleaned up at the end of createView()
|
||||
if (!isset($preferredViews[$groupLabel])) {
|
||||
$preferredViews[$groupLabel] = new ChoiceGroupView($groupLabel);
|
||||
$otherViews[$groupLabel] = new ChoiceGroupView($groupLabel);
|
||||
}
|
||||
if (!isset($preferredViewsOrder[$groupLabel])) {
|
||||
$preferredViewsOrder[$groupLabel] = [];
|
||||
}
|
||||
|
||||
self::addChoiceView(
|
||||
$choice,
|
||||
$value,
|
||||
$label,
|
||||
$keys,
|
||||
$index,
|
||||
$attr,
|
||||
$labelTranslationParameters,
|
||||
$isPreferred,
|
||||
$preferredViews[$groupLabel]->choices,
|
||||
$preferredViewsOrder[$groupLabel],
|
||||
$otherViews[$groupLabel]->choices,
|
||||
$duplicatePreferredChoices,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
193
lib/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php
Normal file
193
lib/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php
Normal file
@@ -0,0 +1,193 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Factory;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
|
||||
use Symfony\Component\Form\ChoiceList\View\ChoiceListView;
|
||||
use Symfony\Component\PropertyAccess\Exception\UnexpectedTypeException;
|
||||
use Symfony\Component\PropertyAccess\PropertyAccess;
|
||||
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
||||
use Symfony\Component\PropertyAccess\PropertyPath;
|
||||
use Symfony\Component\PropertyAccess\PropertyPathInterface;
|
||||
|
||||
/**
|
||||
* Adds property path support to a choice list factory.
|
||||
*
|
||||
* Pass the decorated factory to the constructor:
|
||||
*
|
||||
* $decorator = new PropertyAccessDecorator($factory);
|
||||
*
|
||||
* You can now pass property paths for generating choice values, labels, view
|
||||
* indices, HTML attributes and for determining the preferred choices and the
|
||||
* choice groups:
|
||||
*
|
||||
* // extract values from the $value property
|
||||
* $list = $createListFromChoices($objects, 'value');
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class PropertyAccessDecorator implements ChoiceListFactoryInterface
|
||||
{
|
||||
private ChoiceListFactoryInterface $decoratedFactory;
|
||||
private PropertyAccessorInterface $propertyAccessor;
|
||||
|
||||
public function __construct(ChoiceListFactoryInterface $decoratedFactory, ?PropertyAccessorInterface $propertyAccessor = null)
|
||||
{
|
||||
$this->decoratedFactory = $decoratedFactory;
|
||||
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the decorated factory.
|
||||
*/
|
||||
public function getDecoratedFactory(): ChoiceListFactoryInterface
|
||||
{
|
||||
return $this->decoratedFactory;
|
||||
}
|
||||
|
||||
public function createListFromChoices(iterable $choices, mixed $value = null, mixed $filter = null): ChoiceListInterface
|
||||
{
|
||||
if (\is_string($value)) {
|
||||
$value = new PropertyPath($value);
|
||||
}
|
||||
|
||||
if ($value instanceof PropertyPathInterface) {
|
||||
$accessor = $this->propertyAccessor;
|
||||
// The callable may be invoked with a non-object/array value
|
||||
// when such values are passed to
|
||||
// ChoiceListInterface::getValuesForChoices(). Handle this case
|
||||
// so that the call to getValue() doesn't break.
|
||||
$value = static fn ($choice) => \is_object($choice) || \is_array($choice) ? $accessor->getValue($choice, $value) : null;
|
||||
}
|
||||
|
||||
if (\is_string($filter)) {
|
||||
$filter = new PropertyPath($filter);
|
||||
}
|
||||
|
||||
if ($filter instanceof PropertyPath) {
|
||||
$accessor = $this->propertyAccessor;
|
||||
$filter = static fn ($choice) => (\is_object($choice) || \is_array($choice)) && $accessor->getValue($choice, $filter);
|
||||
}
|
||||
|
||||
return $this->decoratedFactory->createListFromChoices($choices, $value, $filter);
|
||||
}
|
||||
|
||||
public function createListFromLoader(ChoiceLoaderInterface $loader, mixed $value = null, mixed $filter = null): ChoiceListInterface
|
||||
{
|
||||
if (\is_string($value)) {
|
||||
$value = new PropertyPath($value);
|
||||
}
|
||||
|
||||
if ($value instanceof PropertyPathInterface) {
|
||||
$accessor = $this->propertyAccessor;
|
||||
// The callable may be invoked with a non-object/array value
|
||||
// when such values are passed to
|
||||
// ChoiceListInterface::getValuesForChoices(). Handle this case
|
||||
// so that the call to getValue() doesn't break.
|
||||
$value = static fn ($choice) => \is_object($choice) || \is_array($choice) ? $accessor->getValue($choice, $value) : null;
|
||||
}
|
||||
|
||||
if (\is_string($filter)) {
|
||||
$filter = new PropertyPath($filter);
|
||||
}
|
||||
|
||||
if ($filter instanceof PropertyPath) {
|
||||
$accessor = $this->propertyAccessor;
|
||||
$filter = static fn ($choice) => (\is_object($choice) || \is_array($choice)) && $accessor->getValue($choice, $filter);
|
||||
}
|
||||
|
||||
return $this->decoratedFactory->createListFromLoader($loader, $value, $filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $duplicatePreferredChoices
|
||||
*/
|
||||
public function createView(ChoiceListInterface $list, mixed $preferredChoices = null, mixed $label = null, mixed $index = null, mixed $groupBy = null, mixed $attr = null, mixed $labelTranslationParameters = []/* , bool $duplicatePreferredChoices = true */): ChoiceListView
|
||||
{
|
||||
$duplicatePreferredChoices = \func_num_args() > 7 ? func_get_arg(7) : true;
|
||||
$accessor = $this->propertyAccessor;
|
||||
|
||||
if (\is_string($label)) {
|
||||
$label = new PropertyPath($label);
|
||||
}
|
||||
|
||||
if ($label instanceof PropertyPathInterface) {
|
||||
$label = static fn ($choice) => $accessor->getValue($choice, $label);
|
||||
}
|
||||
|
||||
if (\is_string($preferredChoices)) {
|
||||
$preferredChoices = new PropertyPath($preferredChoices);
|
||||
}
|
||||
|
||||
if ($preferredChoices instanceof PropertyPathInterface) {
|
||||
$preferredChoices = static function ($choice) use ($accessor, $preferredChoices) {
|
||||
try {
|
||||
return $accessor->getValue($choice, $preferredChoices);
|
||||
} catch (UnexpectedTypeException) {
|
||||
// Assume not preferred if not readable
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (\is_string($index)) {
|
||||
$index = new PropertyPath($index);
|
||||
}
|
||||
|
||||
if ($index instanceof PropertyPathInterface) {
|
||||
$index = static fn ($choice) => $accessor->getValue($choice, $index);
|
||||
}
|
||||
|
||||
if (\is_string($groupBy)) {
|
||||
$groupBy = new PropertyPath($groupBy);
|
||||
}
|
||||
|
||||
if ($groupBy instanceof PropertyPathInterface) {
|
||||
$groupBy = static function ($choice) use ($accessor, $groupBy) {
|
||||
try {
|
||||
return $accessor->getValue($choice, $groupBy);
|
||||
} catch (UnexpectedTypeException) {
|
||||
// Don't group if path is not readable
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (\is_string($attr)) {
|
||||
$attr = new PropertyPath($attr);
|
||||
}
|
||||
|
||||
if ($attr instanceof PropertyPathInterface) {
|
||||
$attr = static fn ($choice) => $accessor->getValue($choice, $attr);
|
||||
}
|
||||
|
||||
if (\is_string($labelTranslationParameters)) {
|
||||
$labelTranslationParameters = new PropertyPath($labelTranslationParameters);
|
||||
}
|
||||
|
||||
if ($labelTranslationParameters instanceof PropertyPath) {
|
||||
$labelTranslationParameters = static fn ($choice) => $accessor->getValue($choice, $labelTranslationParameters);
|
||||
}
|
||||
|
||||
return $this->decoratedFactory->createView(
|
||||
$list,
|
||||
$preferredChoices,
|
||||
$label,
|
||||
$index,
|
||||
$groupBy,
|
||||
$attr,
|
||||
$labelTranslationParameters,
|
||||
$duplicatePreferredChoices,
|
||||
);
|
||||
}
|
||||
}
|
||||
83
lib/symfony/form/ChoiceList/LazyChoiceList.php
Normal file
83
lib/symfony/form/ChoiceList/LazyChoiceList.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
|
||||
|
||||
/**
|
||||
* A choice list that loads its choices lazily.
|
||||
*
|
||||
* The choices are fetched using a {@link ChoiceLoaderInterface} instance.
|
||||
* If only {@link getChoicesForValues()} or {@link getValuesForChoices()} is
|
||||
* called, the choice list is only loaded partially for improved performance.
|
||||
*
|
||||
* Once {@link getChoices()} or {@link getValues()} is called, the list is
|
||||
* loaded fully.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class LazyChoiceList implements ChoiceListInterface
|
||||
{
|
||||
private ChoiceLoaderInterface $loader;
|
||||
|
||||
/**
|
||||
* The callable creating string values for each choice.
|
||||
*
|
||||
* If null, choices are cast to strings.
|
||||
*/
|
||||
private ?\Closure $value;
|
||||
|
||||
/**
|
||||
* Creates a lazily-loaded list using the given loader.
|
||||
*
|
||||
* Optionally, a callable can be passed for generating the choice values.
|
||||
* The callable receives the choice as first and the array key as the second
|
||||
* argument.
|
||||
*
|
||||
* @param callable|null $value The callable generating the choice values
|
||||
*/
|
||||
public function __construct(ChoiceLoaderInterface $loader, ?callable $value = null)
|
||||
{
|
||||
$this->loader = $loader;
|
||||
$this->value = null === $value ? null : $value(...);
|
||||
}
|
||||
|
||||
public function getChoices(): array
|
||||
{
|
||||
return $this->loader->loadChoiceList($this->value)->getChoices();
|
||||
}
|
||||
|
||||
public function getValues(): array
|
||||
{
|
||||
return $this->loader->loadChoiceList($this->value)->getValues();
|
||||
}
|
||||
|
||||
public function getStructuredValues(): array
|
||||
{
|
||||
return $this->loader->loadChoiceList($this->value)->getStructuredValues();
|
||||
}
|
||||
|
||||
public function getOriginalKeys(): array
|
||||
{
|
||||
return $this->loader->loadChoiceList($this->value)->getOriginalKeys();
|
||||
}
|
||||
|
||||
public function getChoicesForValues(array $values): array
|
||||
{
|
||||
return $this->loader->loadChoicesForValues($values, $this->value);
|
||||
}
|
||||
|
||||
public function getValuesForChoices(array $choices): array
|
||||
{
|
||||
return $this->loader->loadValuesForChoices($choices, $this->value);
|
||||
}
|
||||
}
|
||||
66
lib/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php
Normal file
66
lib/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Loader;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\ArrayChoiceList;
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
|
||||
/**
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
abstract class AbstractChoiceLoader implements ChoiceLoaderInterface
|
||||
{
|
||||
private ?iterable $choices;
|
||||
|
||||
/**
|
||||
* @final
|
||||
*/
|
||||
public function loadChoiceList(?callable $value = null): ChoiceListInterface
|
||||
{
|
||||
return new ArrayChoiceList($this->choices ??= $this->loadChoices(), $value);
|
||||
}
|
||||
|
||||
public function loadChoicesForValues(array $values, ?callable $value = null): array
|
||||
{
|
||||
if (!$values) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $this->doLoadChoicesForValues($values, $value);
|
||||
}
|
||||
|
||||
public function loadValuesForChoices(array $choices, ?callable $value = null): array
|
||||
{
|
||||
if (!$choices) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if ($value) {
|
||||
// if a value callback exists, use it
|
||||
return array_map(fn ($item) => (string) $value($item), $choices);
|
||||
}
|
||||
|
||||
return $this->doLoadValuesForChoices($choices);
|
||||
}
|
||||
|
||||
abstract protected function loadChoices(): iterable;
|
||||
|
||||
protected function doLoadChoicesForValues(array $values, ?callable $value): array
|
||||
{
|
||||
return $this->loadChoiceList($value)->getChoicesForValues($values);
|
||||
}
|
||||
|
||||
protected function doLoadValuesForChoices(array $choices): array
|
||||
{
|
||||
return $this->loadChoiceList()->getValuesForChoices($choices);
|
||||
}
|
||||
}
|
||||
35
lib/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php
Normal file
35
lib/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Loader;
|
||||
|
||||
/**
|
||||
* Loads an {@link ArrayChoiceList} instance from a callable returning iterable choices.
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
class CallbackChoiceLoader extends AbstractChoiceLoader
|
||||
{
|
||||
private \Closure $callback;
|
||||
|
||||
/**
|
||||
* @param callable $callback The callable returning iterable choices
|
||||
*/
|
||||
public function __construct(callable $callback)
|
||||
{
|
||||
$this->callback = $callback(...);
|
||||
}
|
||||
|
||||
protected function loadChoices(): iterable
|
||||
{
|
||||
return ($this->callback)();
|
||||
}
|
||||
}
|
||||
72
lib/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php
Normal file
72
lib/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Loader;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
|
||||
/**
|
||||
* Loads a choice list.
|
||||
*
|
||||
* The methods {@link loadChoicesForValues()} and {@link loadValuesForChoices()}
|
||||
* can be used to load the list only partially in cases where a fully-loaded
|
||||
* list is not necessary.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
interface ChoiceLoaderInterface
|
||||
{
|
||||
/**
|
||||
* Loads a list of choices.
|
||||
*
|
||||
* Optionally, a callable can be passed for generating the choice values.
|
||||
* The callable receives the choice as only argument.
|
||||
* Null may be passed when the choice list contains the empty value.
|
||||
*
|
||||
* @param callable|null $value The callable which generates the values
|
||||
* from choices
|
||||
*/
|
||||
public function loadChoiceList(?callable $value = null): ChoiceListInterface;
|
||||
|
||||
/**
|
||||
* Loads the choices corresponding to the given values.
|
||||
*
|
||||
* The choices are returned with the same keys and in the same order as the
|
||||
* corresponding values in the given array.
|
||||
*
|
||||
* Optionally, a callable can be passed for generating the choice values.
|
||||
* The callable receives the choice as only argument.
|
||||
* Null may be passed when the choice list contains the empty value.
|
||||
*
|
||||
* @param string[] $values An array of choice values. Non-existing
|
||||
* values in this array are ignored
|
||||
* @param callable|null $value The callable generating the choice values
|
||||
*/
|
||||
public function loadChoicesForValues(array $values, ?callable $value = null): array;
|
||||
|
||||
/**
|
||||
* Loads the values corresponding to the given choices.
|
||||
*
|
||||
* The values are returned with the same keys and in the same order as the
|
||||
* corresponding choices in the given array.
|
||||
*
|
||||
* Optionally, a callable can be passed for generating the choice values.
|
||||
* The callable receives the choice as only argument.
|
||||
* Null may be passed when the choice list contains the empty value.
|
||||
*
|
||||
* @param array $choices An array of choices. Non-existing choices in
|
||||
* this array are ignored
|
||||
* @param callable|null $value The callable generating the choice values
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function loadValuesForChoices(array $choices, ?callable $value = null): array;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Loader;
|
||||
|
||||
/**
|
||||
* A decorator to filter choices only when they are loaded or partially loaded.
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
*/
|
||||
class FilterChoiceLoaderDecorator extends AbstractChoiceLoader
|
||||
{
|
||||
private ChoiceLoaderInterface $decoratedLoader;
|
||||
private \Closure $filter;
|
||||
|
||||
public function __construct(ChoiceLoaderInterface $loader, callable $filter)
|
||||
{
|
||||
$this->decoratedLoader = $loader;
|
||||
$this->filter = $filter(...);
|
||||
}
|
||||
|
||||
protected function loadChoices(): iterable
|
||||
{
|
||||
$list = $this->decoratedLoader->loadChoiceList();
|
||||
|
||||
if (array_values($list->getValues()) === array_values($structuredValues = $list->getStructuredValues())) {
|
||||
return array_filter(array_combine($list->getOriginalKeys(), $list->getChoices()), $this->filter);
|
||||
}
|
||||
|
||||
foreach ($structuredValues as $group => $values) {
|
||||
if (\is_array($values)) {
|
||||
if ($values && $filtered = array_filter($list->getChoicesForValues($values), $this->filter)) {
|
||||
$choices[$group] = $filtered;
|
||||
}
|
||||
continue;
|
||||
// filter empty groups
|
||||
}
|
||||
|
||||
if ($filtered = array_filter($list->getChoicesForValues([$values]), $this->filter)) {
|
||||
$choices[$group] = $filtered[0];
|
||||
}
|
||||
}
|
||||
|
||||
return $choices ?? [];
|
||||
}
|
||||
|
||||
public function loadChoicesForValues(array $values, ?callable $value = null): array
|
||||
{
|
||||
return array_filter($this->decoratedLoader->loadChoicesForValues($values, $value), $this->filter);
|
||||
}
|
||||
|
||||
public function loadValuesForChoices(array $choices, ?callable $value = null): array
|
||||
{
|
||||
return $this->decoratedLoader->loadValuesForChoices(array_filter($choices, $this->filter), $value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\Loader;
|
||||
|
||||
/**
|
||||
* Callback choice loader optimized for Intl choice types.
|
||||
*
|
||||
* @author Jules Pietri <jules@heahprod.com>
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*/
|
||||
class IntlCallbackChoiceLoader extends CallbackChoiceLoader
|
||||
{
|
||||
public function loadChoicesForValues(array $values, ?callable $value = null): array
|
||||
{
|
||||
return parent::loadChoicesForValues(array_filter($values), $value);
|
||||
}
|
||||
|
||||
public function loadValuesForChoices(array $choices, ?callable $value = null): array
|
||||
{
|
||||
$choices = array_filter($choices);
|
||||
|
||||
// If no callable is set, choices are the same as values
|
||||
if (null === $value) {
|
||||
return $choices;
|
||||
}
|
||||
|
||||
return parent::loadValuesForChoices($choices, $value);
|
||||
}
|
||||
}
|
||||
44
lib/symfony/form/ChoiceList/View/ChoiceGroupView.php
Normal file
44
lib/symfony/form/ChoiceList/View/ChoiceGroupView.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\View;
|
||||
|
||||
/**
|
||||
* Represents a group of choices in templates.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @implements \IteratorAggregate<array-key, ChoiceGroupView|ChoiceView>
|
||||
*/
|
||||
class ChoiceGroupView implements \IteratorAggregate
|
||||
{
|
||||
public $label;
|
||||
public $choices;
|
||||
|
||||
/**
|
||||
* Creates a new choice group view.
|
||||
*
|
||||
* @param array<ChoiceGroupView|ChoiceView> $choices the choice views in the group
|
||||
*/
|
||||
public function __construct(string $label, array $choices = [])
|
||||
{
|
||||
$this->label = $label;
|
||||
$this->choices = $choices;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Traversable<array-key, ChoiceGroupView|ChoiceView>
|
||||
*/
|
||||
public function getIterator(): \Traversable
|
||||
{
|
||||
return new \ArrayIterator($this->choices);
|
||||
}
|
||||
}
|
||||
57
lib/symfony/form/ChoiceList/View/ChoiceListView.php
Normal file
57
lib/symfony/form/ChoiceList/View/ChoiceListView.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\View;
|
||||
|
||||
/**
|
||||
* Represents a choice list in templates.
|
||||
*
|
||||
* A choice list contains choices and optionally preferred choices which are
|
||||
* displayed in the very beginning of the list. Both choices and preferred
|
||||
* choices may be grouped in {@link ChoiceGroupView} instances.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class ChoiceListView
|
||||
{
|
||||
public $choices;
|
||||
public $preferredChoices;
|
||||
|
||||
/**
|
||||
* Creates a new choice list view.
|
||||
*
|
||||
* @param array<ChoiceGroupView|ChoiceView> $choices The choice views
|
||||
* @param array<ChoiceGroupView|ChoiceView> $preferredChoices the preferred choice views
|
||||
*/
|
||||
public function __construct(array $choices = [], array $preferredChoices = [])
|
||||
{
|
||||
$this->choices = $choices;
|
||||
$this->preferredChoices = $preferredChoices;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether a placeholder is in the choices.
|
||||
*
|
||||
* A placeholder must be the first child element, not be in a group and have an empty value.
|
||||
*/
|
||||
public function hasPlaceholder(): bool
|
||||
{
|
||||
if ($this->preferredChoices) {
|
||||
$firstChoice = reset($this->preferredChoices);
|
||||
|
||||
return $firstChoice instanceof ChoiceView && '' === $firstChoice->value;
|
||||
}
|
||||
|
||||
$firstChoice = reset($this->choices);
|
||||
|
||||
return $firstChoice instanceof ChoiceView && '' === $firstChoice->value;
|
||||
}
|
||||
}
|
||||
54
lib/symfony/form/ChoiceList/View/ChoiceView.php
Normal file
54
lib/symfony/form/ChoiceList/View/ChoiceView.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\ChoiceList\View;
|
||||
|
||||
use Symfony\Contracts\Translation\TranslatableInterface;
|
||||
|
||||
/**
|
||||
* Represents a choice in templates.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class ChoiceView
|
||||
{
|
||||
public $label;
|
||||
public $value;
|
||||
public $data;
|
||||
|
||||
/**
|
||||
* Additional attributes for the HTML tag.
|
||||
*/
|
||||
public $attr;
|
||||
|
||||
/**
|
||||
* Additional parameters used to translate the label.
|
||||
*/
|
||||
public $labelTranslationParameters;
|
||||
|
||||
/**
|
||||
* Creates a new choice view.
|
||||
*
|
||||
* @param mixed $data The original choice
|
||||
* @param string $value The view representation of the choice
|
||||
* @param string|TranslatableInterface|false $label The label displayed to humans; pass false to discard the label
|
||||
* @param array $attr Additional attributes for the HTML tag
|
||||
* @param array $labelTranslationParameters Additional parameters used to translate the label
|
||||
*/
|
||||
public function __construct(mixed $data, string $value, string|TranslatableInterface|false $label, array $attr = [], array $labelTranslationParameters = [])
|
||||
{
|
||||
$this->data = $data;
|
||||
$this->value = $value;
|
||||
$this->label = $label;
|
||||
$this->attr = $attr;
|
||||
$this->labelTranslationParameters = $labelTranslationParameters;
|
||||
}
|
||||
}
|
||||
29
lib/symfony/form/ClearableErrorsInterface.php
Normal file
29
lib/symfony/form/ClearableErrorsInterface.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
/**
|
||||
* A form element whose errors can be cleared.
|
||||
*
|
||||
* @author Colin O'Dell <colinodell@gmail.com>
|
||||
*/
|
||||
interface ClearableErrorsInterface
|
||||
{
|
||||
/**
|
||||
* Removes all the errors of this form.
|
||||
*
|
||||
* @param bool $deep Whether to remove errors from child forms as well
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function clearErrors(bool $deep = false): static;
|
||||
}
|
||||
25
lib/symfony/form/ClickableInterface.php
Normal file
25
lib/symfony/form/ClickableInterface.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
/**
|
||||
* A clickable form element.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
interface ClickableInterface
|
||||
{
|
||||
/**
|
||||
* Returns whether this element was clicked.
|
||||
*/
|
||||
public function isClicked(): bool;
|
||||
}
|
||||
291
lib/symfony/form/Command/DebugCommand.php
Normal file
291
lib/symfony/form/Command/DebugCommand.php
Normal file
@@ -0,0 +1,291 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Command;
|
||||
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Completion\CompletionInput;
|
||||
use Symfony\Component\Console\Completion\CompletionSuggestions;
|
||||
use Symfony\Component\Console\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter;
|
||||
use Symfony\Component\Form\Console\Helper\DescriptorHelper;
|
||||
use Symfony\Component\Form\Extension\Core\CoreExtension;
|
||||
use Symfony\Component\Form\FormRegistryInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
use Symfony\Component\HttpKernel\Debug\FileLinkFormatter as LegacyFileLinkFormatter;
|
||||
|
||||
/**
|
||||
* A console command for retrieving information about form types.
|
||||
*
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*/
|
||||
#[AsCommand(name: 'debug:form', description: 'Display form type information')]
|
||||
class DebugCommand extends Command
|
||||
{
|
||||
private FormRegistryInterface $formRegistry;
|
||||
private array $namespaces;
|
||||
private array $types;
|
||||
private array $extensions;
|
||||
private array $guessers;
|
||||
private FileLinkFormatter|LegacyFileLinkFormatter|null $fileLinkFormatter;
|
||||
|
||||
public function __construct(FormRegistryInterface $formRegistry, array $namespaces = ['Symfony\Component\Form\Extension\Core\Type'], array $types = [], array $extensions = [], array $guessers = [], FileLinkFormatter|LegacyFileLinkFormatter|null $fileLinkFormatter = null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->formRegistry = $formRegistry;
|
||||
$this->namespaces = $namespaces;
|
||||
$this->types = $types;
|
||||
$this->extensions = $extensions;
|
||||
$this->guessers = $guessers;
|
||||
$this->fileLinkFormatter = $fileLinkFormatter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setDefinition([
|
||||
new InputArgument('class', InputArgument::OPTIONAL, 'The form type class'),
|
||||
new InputArgument('option', InputArgument::OPTIONAL, 'The form type option'),
|
||||
new InputOption('show-deprecated', null, InputOption::VALUE_NONE, 'Display deprecated options in form types'),
|
||||
new InputOption('format', null, InputOption::VALUE_REQUIRED, \sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions())), 'txt'),
|
||||
])
|
||||
->setHelp(<<<'EOF'
|
||||
The <info>%command.name%</info> command displays information about form types.
|
||||
|
||||
<info>php %command.full_name%</info>
|
||||
|
||||
The command lists all built-in types, services types, type extensions and
|
||||
guessers currently available.
|
||||
|
||||
<info>php %command.full_name% Symfony\Component\Form\Extension\Core\Type\ChoiceType</info>
|
||||
<info>php %command.full_name% ChoiceType</info>
|
||||
|
||||
The command lists all defined options that contains the given form type,
|
||||
as well as their parents and type extensions.
|
||||
|
||||
<info>php %command.full_name% ChoiceType choice_value</info>
|
||||
|
||||
Use the <info>--show-deprecated</info> option to display form types with
|
||||
deprecated options or the deprecated options of the given form type:
|
||||
|
||||
<info>php %command.full_name% --show-deprecated</info>
|
||||
<info>php %command.full_name% ChoiceType --show-deprecated</info>
|
||||
|
||||
The command displays the definition of the given option name.
|
||||
|
||||
<info>php %command.full_name% --format=json</info>
|
||||
|
||||
The command lists everything in a machine readable json format.
|
||||
EOF
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
if (null === $class = $input->getArgument('class')) {
|
||||
$object = null;
|
||||
$options['core_types'] = $this->getCoreTypes();
|
||||
$options['service_types'] = array_values(array_diff($this->types, $options['core_types']));
|
||||
if ($input->getOption('show-deprecated')) {
|
||||
$options['core_types'] = $this->filterTypesByDeprecated($options['core_types']);
|
||||
$options['service_types'] = $this->filterTypesByDeprecated($options['service_types']);
|
||||
}
|
||||
$options['extensions'] = $this->extensions;
|
||||
$options['guessers'] = $this->guessers;
|
||||
foreach ($options as $k => $list) {
|
||||
sort($options[$k]);
|
||||
}
|
||||
} else {
|
||||
if (!class_exists($class) || !is_subclass_of($class, FormTypeInterface::class)) {
|
||||
$class = $this->getFqcnTypeClass($input, $io, $class);
|
||||
}
|
||||
$resolvedType = $this->formRegistry->getType($class);
|
||||
|
||||
if ($option = $input->getArgument('option')) {
|
||||
$object = $resolvedType->getOptionsResolver();
|
||||
|
||||
if (!$object->isDefined($option)) {
|
||||
$message = \sprintf('Option "%s" is not defined in "%s".', $option, $resolvedType->getInnerType()::class);
|
||||
|
||||
if ($alternatives = $this->findAlternatives($option, $object->getDefinedOptions())) {
|
||||
if (1 === \count($alternatives)) {
|
||||
$message .= "\n\nDid you mean this?\n ";
|
||||
} else {
|
||||
$message .= "\n\nDid you mean one of these?\n ";
|
||||
}
|
||||
$message .= implode("\n ", $alternatives);
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException($message);
|
||||
}
|
||||
|
||||
$options['type'] = $resolvedType->getInnerType();
|
||||
$options['option'] = $option;
|
||||
} else {
|
||||
$object = $resolvedType;
|
||||
}
|
||||
}
|
||||
|
||||
$helper = new DescriptorHelper($this->fileLinkFormatter);
|
||||
$options['format'] = $input->getOption('format');
|
||||
$options['show_deprecated'] = $input->getOption('show-deprecated');
|
||||
$helper->describe($io, $object, $options);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private function getFqcnTypeClass(InputInterface $input, SymfonyStyle $io, string $shortClassName): string
|
||||
{
|
||||
$classes = $this->getFqcnTypeClasses($shortClassName);
|
||||
|
||||
if (0 === $count = \count($classes)) {
|
||||
$message = \sprintf("Could not find type \"%s\" into the following namespaces:\n %s", $shortClassName, implode("\n ", $this->namespaces));
|
||||
|
||||
$allTypes = array_merge($this->getCoreTypes(), $this->types);
|
||||
if ($alternatives = $this->findAlternatives($shortClassName, $allTypes)) {
|
||||
if (1 === \count($alternatives)) {
|
||||
$message .= "\n\nDid you mean this?\n ";
|
||||
} else {
|
||||
$message .= "\n\nDid you mean one of these?\n ";
|
||||
}
|
||||
$message .= implode("\n ", $alternatives);
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException($message);
|
||||
}
|
||||
if (1 === $count) {
|
||||
return $classes[0];
|
||||
}
|
||||
if (!$input->isInteractive()) {
|
||||
throw new InvalidArgumentException(\sprintf("The type \"%s\" is ambiguous.\n\nDid you mean one of these?\n %s.", $shortClassName, implode("\n ", $classes)));
|
||||
}
|
||||
|
||||
return $io->choice(\sprintf("The type \"%s\" is ambiguous.\n\nSelect one of the following form types to display its information:", $shortClassName), $classes, $classes[0]);
|
||||
}
|
||||
|
||||
private function getFqcnTypeClasses(string $shortClassName): array
|
||||
{
|
||||
$classes = [];
|
||||
sort($this->namespaces);
|
||||
foreach ($this->namespaces as $namespace) {
|
||||
if (class_exists($fqcn = $namespace.'\\'.$shortClassName)) {
|
||||
$classes[] = $fqcn;
|
||||
} elseif (class_exists($fqcn = $namespace.'\\'.ucfirst($shortClassName))) {
|
||||
$classes[] = $fqcn;
|
||||
} elseif (class_exists($fqcn = $namespace.'\\'.ucfirst($shortClassName).'Type')) {
|
||||
$classes[] = $fqcn;
|
||||
} elseif (str_ends_with($shortClassName, 'type') && class_exists($fqcn = $namespace.'\\'.ucfirst(substr($shortClassName, 0, -4).'Type'))) {
|
||||
$classes[] = $fqcn;
|
||||
}
|
||||
}
|
||||
|
||||
return $classes;
|
||||
}
|
||||
|
||||
private function getCoreTypes(): array
|
||||
{
|
||||
$coreExtension = new CoreExtension();
|
||||
$loadTypesRefMethod = (new \ReflectionObject($coreExtension))->getMethod('loadTypes');
|
||||
$coreTypes = $loadTypesRefMethod->invoke($coreExtension);
|
||||
$coreTypes = array_map(static fn (FormTypeInterface $type) => $type::class, $coreTypes);
|
||||
sort($coreTypes);
|
||||
|
||||
return $coreTypes;
|
||||
}
|
||||
|
||||
private function filterTypesByDeprecated(array $types): array
|
||||
{
|
||||
$typesWithDeprecatedOptions = [];
|
||||
foreach ($types as $class) {
|
||||
$optionsResolver = $this->formRegistry->getType($class)->getOptionsResolver();
|
||||
foreach ($optionsResolver->getDefinedOptions() as $option) {
|
||||
if ($optionsResolver->isDeprecated($option)) {
|
||||
$typesWithDeprecatedOptions[] = $class;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $typesWithDeprecatedOptions;
|
||||
}
|
||||
|
||||
private function findAlternatives(string $name, array $collection): array
|
||||
{
|
||||
$alternatives = [];
|
||||
foreach ($collection as $item) {
|
||||
$lev = levenshtein($name, $item);
|
||||
if ($lev <= \strlen($name) / 3 || str_contains($item, $name)) {
|
||||
$alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev;
|
||||
}
|
||||
}
|
||||
|
||||
$threshold = 1e3;
|
||||
$alternatives = array_filter($alternatives, static fn ($lev) => $lev < 2 * $threshold);
|
||||
ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE);
|
||||
|
||||
return array_keys($alternatives);
|
||||
}
|
||||
|
||||
public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
|
||||
{
|
||||
if ($input->mustSuggestArgumentValuesFor('class')) {
|
||||
$suggestions->suggestValues(array_merge($this->getCoreTypes(), $this->types));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($input->mustSuggestArgumentValuesFor('option') && null !== $class = $input->getArgument('class')) {
|
||||
$this->completeOptions($class, $suggestions);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($input->mustSuggestOptionValuesFor('format')) {
|
||||
$suggestions->suggestValues($this->getAvailableFormatOptions());
|
||||
}
|
||||
}
|
||||
|
||||
private function completeOptions(string $class, CompletionSuggestions $suggestions): void
|
||||
{
|
||||
if (!class_exists($class) || !is_subclass_of($class, FormTypeInterface::class)) {
|
||||
$classes = $this->getFqcnTypeClasses($class);
|
||||
|
||||
if (1 === \count($classes)) {
|
||||
$class = $classes[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->formRegistry->hasType($class)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$resolvedType = $this->formRegistry->getType($class);
|
||||
$suggestions->suggestValues($resolvedType->getOptionsResolver()->getDefinedOptions());
|
||||
}
|
||||
|
||||
private function getAvailableFormatOptions(): array
|
||||
{
|
||||
return (new DescriptorHelper())->getFormats();
|
||||
}
|
||||
}
|
||||
195
lib/symfony/form/Console/Descriptor/Descriptor.php
Normal file
195
lib/symfony/form/Console/Descriptor/Descriptor.php
Normal file
@@ -0,0 +1,195 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Console\Descriptor;
|
||||
|
||||
use Symfony\Component\Console\Descriptor\DescriptorInterface;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\OutputStyle;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symfony\Component\Form\ResolvedFormTypeInterface;
|
||||
use Symfony\Component\Form\Util\OptionsResolverWrapper;
|
||||
use Symfony\Component\OptionsResolver\Debug\OptionsResolverIntrospector;
|
||||
use Symfony\Component\OptionsResolver\Exception\NoConfigurationException;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
abstract class Descriptor implements DescriptorInterface
|
||||
{
|
||||
protected OutputStyle $output;
|
||||
protected array $ownOptions = [];
|
||||
protected array $overriddenOptions = [];
|
||||
protected array $parentOptions = [];
|
||||
protected array $extensionOptions = [];
|
||||
protected array $requiredOptions = [];
|
||||
protected array $parents = [];
|
||||
protected array $extensions = [];
|
||||
|
||||
public function describe(OutputInterface $output, ?object $object, array $options = []): void
|
||||
{
|
||||
$this->output = $output instanceof OutputStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output);
|
||||
|
||||
match (true) {
|
||||
null === $object => $this->describeDefaults($options),
|
||||
$object instanceof ResolvedFormTypeInterface => $this->describeResolvedFormType($object, $options),
|
||||
$object instanceof OptionsResolver => $this->describeOption($object, $options),
|
||||
default => throw new \InvalidArgumentException(\sprintf('Object of type "%s" is not describable.', get_debug_type($object))),
|
||||
};
|
||||
}
|
||||
|
||||
abstract protected function describeDefaults(array $options): void;
|
||||
|
||||
abstract protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []): void;
|
||||
|
||||
abstract protected function describeOption(OptionsResolver $optionsResolver, array $options): void;
|
||||
|
||||
protected function collectOptions(ResolvedFormTypeInterface $type): void
|
||||
{
|
||||
$this->parents = [];
|
||||
$this->extensions = [];
|
||||
|
||||
if (null !== $type->getParent()) {
|
||||
$optionsResolver = clone $this->getParentOptionsResolver($type->getParent());
|
||||
} else {
|
||||
$optionsResolver = new OptionsResolver();
|
||||
}
|
||||
|
||||
$type->getInnerType()->configureOptions($ownOptionsResolver = new OptionsResolverWrapper());
|
||||
$this->ownOptions = array_diff($ownOptionsResolver->getDefinedOptions(), $optionsResolver->getDefinedOptions());
|
||||
$overriddenOptions = array_intersect(array_merge($ownOptionsResolver->getDefinedOptions(), $ownOptionsResolver->getUndefinedOptions()), $optionsResolver->getDefinedOptions());
|
||||
|
||||
$this->parentOptions = [];
|
||||
foreach ($this->parents as $class => $parentOptions) {
|
||||
$this->overriddenOptions[$class] = array_intersect($overriddenOptions, $parentOptions);
|
||||
$this->parentOptions[$class] = array_diff($parentOptions, $overriddenOptions);
|
||||
}
|
||||
|
||||
$type->getInnerType()->configureOptions($optionsResolver);
|
||||
$this->collectTypeExtensionsOptions($type, $optionsResolver);
|
||||
$this->extensionOptions = [];
|
||||
foreach ($this->extensions as $class => $extensionOptions) {
|
||||
$this->overriddenOptions[$class] = array_intersect($overriddenOptions, $extensionOptions);
|
||||
$this->extensionOptions[$class] = array_diff($extensionOptions, $overriddenOptions);
|
||||
}
|
||||
|
||||
$this->overriddenOptions = array_filter($this->overriddenOptions);
|
||||
$this->parentOptions = array_filter($this->parentOptions);
|
||||
$this->extensionOptions = array_filter($this->extensionOptions);
|
||||
$this->requiredOptions = $optionsResolver->getRequiredOptions();
|
||||
|
||||
$this->parents = array_keys($this->parents);
|
||||
$this->extensions = array_keys($this->extensions);
|
||||
}
|
||||
|
||||
protected function getOptionDefinition(OptionsResolver $optionsResolver, string $option): array
|
||||
{
|
||||
$definition = [];
|
||||
|
||||
if ($info = $optionsResolver->getInfo($option)) {
|
||||
$definition = [
|
||||
'info' => $info,
|
||||
];
|
||||
}
|
||||
|
||||
$definition += [
|
||||
'required' => $optionsResolver->isRequired($option),
|
||||
'deprecated' => $optionsResolver->isDeprecated($option),
|
||||
];
|
||||
|
||||
$introspector = new OptionsResolverIntrospector($optionsResolver);
|
||||
|
||||
$map = [
|
||||
'default' => 'getDefault',
|
||||
'lazy' => 'getLazyClosures',
|
||||
'allowedTypes' => 'getAllowedTypes',
|
||||
'allowedValues' => 'getAllowedValues',
|
||||
'normalizers' => 'getNormalizers',
|
||||
'deprecation' => 'getDeprecation',
|
||||
];
|
||||
|
||||
foreach ($map as $key => $method) {
|
||||
try {
|
||||
$definition[$key] = $introspector->{$method}($option);
|
||||
} catch (NoConfigurationException) {
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($definition['deprecation']) && isset($definition['deprecation']['message']) && \is_string($definition['deprecation']['message'])) {
|
||||
$definition['deprecationMessage'] = strtr($definition['deprecation']['message'], ['%name%' => $option]);
|
||||
$definition['deprecationPackage'] = $definition['deprecation']['package'];
|
||||
$definition['deprecationVersion'] = $definition['deprecation']['version'];
|
||||
}
|
||||
|
||||
return $definition;
|
||||
}
|
||||
|
||||
protected function filterOptionsByDeprecated(ResolvedFormTypeInterface $type): void
|
||||
{
|
||||
$deprecatedOptions = [];
|
||||
$resolver = $type->getOptionsResolver();
|
||||
foreach ($resolver->getDefinedOptions() as $option) {
|
||||
if ($resolver->isDeprecated($option)) {
|
||||
$deprecatedOptions[] = $option;
|
||||
}
|
||||
}
|
||||
|
||||
$filterByDeprecated = static function (array $options) use ($deprecatedOptions) {
|
||||
foreach ($options as $class => $opts) {
|
||||
if ($deprecated = array_intersect($deprecatedOptions, $opts)) {
|
||||
$options[$class] = $deprecated;
|
||||
} else {
|
||||
unset($options[$class]);
|
||||
}
|
||||
}
|
||||
|
||||
return $options;
|
||||
};
|
||||
|
||||
$this->ownOptions = array_intersect($deprecatedOptions, $this->ownOptions);
|
||||
$this->overriddenOptions = $filterByDeprecated($this->overriddenOptions);
|
||||
$this->parentOptions = $filterByDeprecated($this->parentOptions);
|
||||
$this->extensionOptions = $filterByDeprecated($this->extensionOptions);
|
||||
}
|
||||
|
||||
private function getParentOptionsResolver(ResolvedFormTypeInterface $type): OptionsResolver
|
||||
{
|
||||
$this->parents[$class = $type->getInnerType()::class] = [];
|
||||
|
||||
if (null !== $type->getParent()) {
|
||||
$optionsResolver = clone $this->getParentOptionsResolver($type->getParent());
|
||||
} else {
|
||||
$optionsResolver = new OptionsResolver();
|
||||
}
|
||||
|
||||
$inheritedOptions = $optionsResolver->getDefinedOptions();
|
||||
$type->getInnerType()->configureOptions($optionsResolver);
|
||||
$this->parents[$class] = array_diff($optionsResolver->getDefinedOptions(), $inheritedOptions);
|
||||
|
||||
$this->collectTypeExtensionsOptions($type, $optionsResolver);
|
||||
|
||||
return $optionsResolver;
|
||||
}
|
||||
|
||||
private function collectTypeExtensionsOptions(ResolvedFormTypeInterface $type, OptionsResolver $optionsResolver): void
|
||||
{
|
||||
foreach ($type->getTypeExtensions() as $extension) {
|
||||
$inheritedOptions = $optionsResolver->getDefinedOptions();
|
||||
$extension->configureOptions($optionsResolver);
|
||||
$this->extensions[$extension::class] = array_diff($optionsResolver->getDefinedOptions(), $inheritedOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
118
lib/symfony/form/Console/Descriptor/JsonDescriptor.php
Normal file
118
lib/symfony/form/Console/Descriptor/JsonDescriptor.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Console\Descriptor;
|
||||
|
||||
use Symfony\Component\Form\ResolvedFormTypeInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class JsonDescriptor extends Descriptor
|
||||
{
|
||||
protected function describeDefaults(array $options): void
|
||||
{
|
||||
$data['builtin_form_types'] = $options['core_types'];
|
||||
$data['service_form_types'] = $options['service_types'];
|
||||
if (!$options['show_deprecated']) {
|
||||
$data['type_extensions'] = $options['extensions'];
|
||||
$data['type_guessers'] = $options['guessers'];
|
||||
}
|
||||
|
||||
$this->writeData($data, $options);
|
||||
}
|
||||
|
||||
protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []): void
|
||||
{
|
||||
$this->collectOptions($resolvedFormType);
|
||||
|
||||
if ($options['show_deprecated']) {
|
||||
$this->filterOptionsByDeprecated($resolvedFormType);
|
||||
}
|
||||
|
||||
$formOptions = [
|
||||
'own' => $this->ownOptions,
|
||||
'overridden' => $this->overriddenOptions,
|
||||
'parent' => $this->parentOptions,
|
||||
'extension' => $this->extensionOptions,
|
||||
'required' => $this->requiredOptions,
|
||||
];
|
||||
$this->sortOptions($formOptions);
|
||||
|
||||
$data = [
|
||||
'class' => $resolvedFormType->getInnerType()::class,
|
||||
'block_prefix' => $resolvedFormType->getInnerType()->getBlockPrefix(),
|
||||
'options' => $formOptions,
|
||||
'parent_types' => $this->parents,
|
||||
'type_extensions' => $this->extensions,
|
||||
];
|
||||
|
||||
$this->writeData($data, $options);
|
||||
}
|
||||
|
||||
protected function describeOption(OptionsResolver $optionsResolver, array $options): void
|
||||
{
|
||||
$definition = $this->getOptionDefinition($optionsResolver, $options['option']);
|
||||
|
||||
$map = [];
|
||||
if ($definition['deprecated']) {
|
||||
$map['deprecated'] = 'deprecated';
|
||||
if (\is_string($definition['deprecationMessage'])) {
|
||||
$map['deprecation_message'] = 'deprecationMessage';
|
||||
}
|
||||
}
|
||||
$map += [
|
||||
'info' => 'info',
|
||||
'required' => 'required',
|
||||
'default' => 'default',
|
||||
'allowed_types' => 'allowedTypes',
|
||||
'allowed_values' => 'allowedValues',
|
||||
];
|
||||
foreach ($map as $label => $name) {
|
||||
if (\array_key_exists($name, $definition)) {
|
||||
$data[$label] = $definition[$name];
|
||||
|
||||
if ('default' === $name) {
|
||||
$data['is_lazy'] = isset($definition['lazy']);
|
||||
}
|
||||
}
|
||||
}
|
||||
$data['has_normalizer'] = isset($definition['normalizers']);
|
||||
|
||||
$this->writeData($data, $options);
|
||||
}
|
||||
|
||||
private function writeData(array $data, array $options): void
|
||||
{
|
||||
$flags = $options['json_encoding'] ?? 0;
|
||||
|
||||
$this->output->write(json_encode($data, $flags | \JSON_PRETTY_PRINT)."\n");
|
||||
}
|
||||
|
||||
private function sortOptions(array &$options): void
|
||||
{
|
||||
foreach ($options as &$opts) {
|
||||
$sorted = false;
|
||||
foreach ($opts as &$opt) {
|
||||
if (\is_array($opt)) {
|
||||
sort($opt);
|
||||
$sorted = true;
|
||||
}
|
||||
}
|
||||
if (!$sorted) {
|
||||
sort($opts);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
219
lib/symfony/form/Console/Descriptor/TextDescriptor.php
Normal file
219
lib/symfony/form/Console/Descriptor/TextDescriptor.php
Normal file
@@ -0,0 +1,219 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Console\Descriptor;
|
||||
|
||||
use Symfony\Component\Console\Helper\Dumper;
|
||||
use Symfony\Component\Console\Helper\TableSeparator;
|
||||
use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter;
|
||||
use Symfony\Component\Form\ResolvedFormTypeInterface;
|
||||
use Symfony\Component\HttpKernel\Debug\FileLinkFormatter as LegacyFileLinkFormatter;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class TextDescriptor extends Descriptor
|
||||
{
|
||||
private FileLinkFormatter|LegacyFileLinkFormatter|null $fileLinkFormatter;
|
||||
|
||||
public function __construct(FileLinkFormatter|LegacyFileLinkFormatter|null $fileLinkFormatter = null)
|
||||
{
|
||||
$this->fileLinkFormatter = $fileLinkFormatter;
|
||||
}
|
||||
|
||||
protected function describeDefaults(array $options): void
|
||||
{
|
||||
if ($options['core_types']) {
|
||||
$this->output->section('Built-in form types (Symfony\Component\Form\Extension\Core\Type)');
|
||||
$shortClassNames = array_map(fn ($fqcn) => $this->formatClassLink($fqcn, \array_slice(explode('\\', $fqcn), -1)[0]), $options['core_types']);
|
||||
for ($i = 0, $loopsMax = \count($shortClassNames); $i * 5 < $loopsMax; ++$i) {
|
||||
$this->output->writeln(' '.implode(', ', \array_slice($shortClassNames, $i * 5, 5)));
|
||||
}
|
||||
}
|
||||
|
||||
if ($options['service_types']) {
|
||||
$this->output->section('Service form types');
|
||||
$this->output->listing(array_map($this->formatClassLink(...), $options['service_types']));
|
||||
}
|
||||
|
||||
if (!$options['show_deprecated']) {
|
||||
if ($options['extensions']) {
|
||||
$this->output->section('Type extensions');
|
||||
$this->output->listing(array_map($this->formatClassLink(...), $options['extensions']));
|
||||
}
|
||||
|
||||
if ($options['guessers']) {
|
||||
$this->output->section('Type guessers');
|
||||
$this->output->listing(array_map($this->formatClassLink(...), $options['guessers']));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []): void
|
||||
{
|
||||
$this->collectOptions($resolvedFormType);
|
||||
|
||||
if ($options['show_deprecated']) {
|
||||
$this->filterOptionsByDeprecated($resolvedFormType);
|
||||
}
|
||||
|
||||
$formOptions = $this->normalizeAndSortOptionsColumns(array_filter([
|
||||
'own' => $this->ownOptions,
|
||||
'overridden' => $this->overriddenOptions,
|
||||
'parent' => $this->parentOptions,
|
||||
'extension' => $this->extensionOptions,
|
||||
]));
|
||||
|
||||
// setting headers and column order
|
||||
$tableHeaders = array_intersect_key([
|
||||
'own' => 'Options',
|
||||
'overridden' => 'Overridden options',
|
||||
'parent' => 'Parent options',
|
||||
'extension' => 'Extension options',
|
||||
], $formOptions);
|
||||
|
||||
$this->output->title(\sprintf('%s (Block prefix: "%s")', $resolvedFormType->getInnerType()::class, $resolvedFormType->getInnerType()->getBlockPrefix()));
|
||||
|
||||
if ($formOptions) {
|
||||
$this->output->table($tableHeaders, $this->buildTableRows($tableHeaders, $formOptions));
|
||||
}
|
||||
|
||||
if ($this->parents) {
|
||||
$this->output->section('Parent types');
|
||||
$this->output->listing(array_map($this->formatClassLink(...), $this->parents));
|
||||
}
|
||||
|
||||
if ($this->extensions) {
|
||||
$this->output->section('Type extensions');
|
||||
$this->output->listing(array_map($this->formatClassLink(...), $this->extensions));
|
||||
}
|
||||
}
|
||||
|
||||
protected function describeOption(OptionsResolver $optionsResolver, array $options): void
|
||||
{
|
||||
$definition = $this->getOptionDefinition($optionsResolver, $options['option']);
|
||||
|
||||
$dump = new Dumper($this->output);
|
||||
$map = [];
|
||||
if ($definition['deprecated']) {
|
||||
$map = [
|
||||
'Deprecated' => 'deprecated',
|
||||
'Deprecation package' => 'deprecationPackage',
|
||||
'Deprecation version' => 'deprecationVersion',
|
||||
'Deprecation message' => 'deprecationMessage',
|
||||
];
|
||||
}
|
||||
$map += [
|
||||
'Info' => 'info',
|
||||
'Required' => 'required',
|
||||
'Default' => 'default',
|
||||
'Allowed types' => 'allowedTypes',
|
||||
'Allowed values' => 'allowedValues',
|
||||
'Normalizers' => 'normalizers',
|
||||
];
|
||||
$rows = [];
|
||||
foreach ($map as $label => $name) {
|
||||
$value = \array_key_exists($name, $definition) ? $dump($definition[$name]) : '-';
|
||||
if ('default' === $name && isset($definition['lazy'])) {
|
||||
$value = "Value: $value\n\nClosure(s): ".$dump($definition['lazy']);
|
||||
}
|
||||
|
||||
$rows[] = ["<info>$label</info>", $value];
|
||||
$rows[] = new TableSeparator();
|
||||
}
|
||||
array_pop($rows);
|
||||
|
||||
$this->output->title(\sprintf('%s (%s)', $options['type']::class, $options['option']));
|
||||
$this->output->table([], $rows);
|
||||
}
|
||||
|
||||
private function buildTableRows(array $headers, array $options): array
|
||||
{
|
||||
$tableRows = [];
|
||||
$count = \count(max($options));
|
||||
for ($i = 0; $i < $count; ++$i) {
|
||||
$cells = [];
|
||||
foreach (array_keys($headers) as $group) {
|
||||
$option = $options[$group][$i] ?? null;
|
||||
if (\is_string($option) && \in_array($option, $this->requiredOptions, true)) {
|
||||
$option .= ' <info>(required)</info>';
|
||||
}
|
||||
$cells[] = $option;
|
||||
}
|
||||
$tableRows[] = $cells;
|
||||
}
|
||||
|
||||
return $tableRows;
|
||||
}
|
||||
|
||||
private function normalizeAndSortOptionsColumns(array $options): array
|
||||
{
|
||||
foreach ($options as $group => $opts) {
|
||||
$sorted = false;
|
||||
foreach ($opts as $class => $opt) {
|
||||
if (\is_string($class)) {
|
||||
unset($options[$group][$class]);
|
||||
}
|
||||
|
||||
if (!\is_array($opt) || 0 === \count($opt)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!$sorted) {
|
||||
$options[$group] = [];
|
||||
} else {
|
||||
$options[$group][] = null;
|
||||
}
|
||||
$options[$group][] = \sprintf('<info>%s</info>', (new \ReflectionClass($class))->getShortName());
|
||||
$options[$group][] = new TableSeparator();
|
||||
|
||||
sort($opt);
|
||||
$sorted = true;
|
||||
$options[$group] = array_merge($options[$group], $opt);
|
||||
}
|
||||
|
||||
if (!$sorted) {
|
||||
sort($options[$group]);
|
||||
}
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
private function formatClassLink(string $class, ?string $text = null): string
|
||||
{
|
||||
$text ??= $class;
|
||||
|
||||
if ('' === $fileLink = $this->getFileLink($class)) {
|
||||
return $text;
|
||||
}
|
||||
|
||||
return \sprintf('<href=%s>%s</>', $fileLink, $text);
|
||||
}
|
||||
|
||||
private function getFileLink(string $class): string
|
||||
{
|
||||
if (null === $this->fileLinkFormatter) {
|
||||
return '';
|
||||
}
|
||||
|
||||
try {
|
||||
$r = new \ReflectionClass($class);
|
||||
} catch (\ReflectionException) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return (string) $this->fileLinkFormatter->format($r->getFileName(), $r->getStartLine());
|
||||
}
|
||||
}
|
||||
34
lib/symfony/form/Console/Helper/DescriptorHelper.php
Normal file
34
lib/symfony/form/Console/Helper/DescriptorHelper.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Console\Helper;
|
||||
|
||||
use Symfony\Component\Console\Helper\DescriptorHelper as BaseDescriptorHelper;
|
||||
use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter;
|
||||
use Symfony\Component\Form\Console\Descriptor\JsonDescriptor;
|
||||
use Symfony\Component\Form\Console\Descriptor\TextDescriptor;
|
||||
use Symfony\Component\HttpKernel\Debug\FileLinkFormatter as LegacyFileLinkFormatter;
|
||||
|
||||
/**
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class DescriptorHelper extends BaseDescriptorHelper
|
||||
{
|
||||
public function __construct(FileLinkFormatter|LegacyFileLinkFormatter|null $fileLinkFormatter = null)
|
||||
{
|
||||
$this
|
||||
->register('txt', new TextDescriptor($fileLinkFormatter))
|
||||
->register('json', new JsonDescriptor())
|
||||
;
|
||||
}
|
||||
}
|
||||
50
lib/symfony/form/DataAccessorInterface.php
Normal file
50
lib/symfony/form/DataAccessorInterface.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
/**
|
||||
* Writes and reads values to/from an object or array bound to a form.
|
||||
*
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*/
|
||||
interface DataAccessorInterface
|
||||
{
|
||||
/**
|
||||
* Returns the value at the end of the property of the object graph.
|
||||
*
|
||||
* @throws Exception\AccessException If unable to read from the given form data
|
||||
*/
|
||||
public function getValue(object|array $viewData, FormInterface $form): mixed;
|
||||
|
||||
/**
|
||||
* Sets the value at the end of the property of the object graph.
|
||||
*
|
||||
* @throws Exception\AccessException If unable to write the given value
|
||||
*/
|
||||
public function setValue(object|array &$viewData, mixed $value, FormInterface $form): void;
|
||||
|
||||
/**
|
||||
* Returns whether a value can be read from an object graph.
|
||||
*
|
||||
* Whenever this method returns true, {@link getValue()} is guaranteed not
|
||||
* to throw an exception when called with the same arguments.
|
||||
*/
|
||||
public function isReadable(object|array $viewData, FormInterface $form): bool;
|
||||
|
||||
/**
|
||||
* Returns whether a value can be written at a given object graph.
|
||||
*
|
||||
* Whenever this method returns true, {@link setValue()} is guaranteed not
|
||||
* to throw an exception when called with the same arguments.
|
||||
*/
|
||||
public function isWritable(object|array $viewData, FormInterface $form): bool;
|
||||
}
|
||||
66
lib/symfony/form/DataMapperInterface.php
Normal file
66
lib/symfony/form/DataMapperInterface.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
/**
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
interface DataMapperInterface
|
||||
{
|
||||
/**
|
||||
* Maps the view data of a compound form to its children.
|
||||
*
|
||||
* The method is responsible for calling {@link FormInterface::setData()}
|
||||
* on the children of compound forms, defining their underlying model data.
|
||||
*
|
||||
* @param mixed $viewData View data of the compound form being initialized
|
||||
* @param \Traversable<mixed, FormInterface> $forms A list of {@link FormInterface} instances
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported
|
||||
*/
|
||||
public function mapDataToForms(mixed $viewData, \Traversable $forms);
|
||||
|
||||
/**
|
||||
* Maps the model data of a list of children forms into the view data of their parent.
|
||||
*
|
||||
* This is the internal cascade call of FormInterface::submit for compound forms, since they
|
||||
* cannot be bound to any input nor the request as scalar, but their children may:
|
||||
*
|
||||
* $compoundForm->submit($arrayOfChildrenViewData)
|
||||
* // inside:
|
||||
* $childForm->submit($childViewData);
|
||||
* // for each entry, do the same and/or reverse transform
|
||||
* $this->dataMapper->mapFormsToData($compoundForm, $compoundInitialViewData)
|
||||
* // then reverse transform
|
||||
*
|
||||
* When a simple form is submitted the following is happening:
|
||||
*
|
||||
* $simpleForm->submit($submittedViewData)
|
||||
* // inside:
|
||||
* $this->viewData = $submittedViewData
|
||||
* // then reverse transform
|
||||
*
|
||||
* The model data can be an array or an object, so this second argument is always passed
|
||||
* by reference.
|
||||
*
|
||||
* @param \Traversable<mixed, FormInterface> $forms A list of {@link FormInterface} instances
|
||||
* @param mixed &$viewData The compound form's view data that get mapped
|
||||
* its children model data
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported
|
||||
*/
|
||||
public function mapFormsToData(\Traversable $forms, mixed &$viewData);
|
||||
}
|
||||
99
lib/symfony/form/DataTransformerInterface.php
Normal file
99
lib/symfony/form/DataTransformerInterface.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form;
|
||||
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms a value between different representations.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @template TValue
|
||||
* @template TTransformedValue
|
||||
*/
|
||||
interface DataTransformerInterface
|
||||
{
|
||||
/**
|
||||
* Transforms a value from the original representation to a transformed representation.
|
||||
*
|
||||
* This method is called when the form field is initialized with its default data, on
|
||||
* two occasions for two types of transformers:
|
||||
*
|
||||
* 1. Model transformers which normalize the model data.
|
||||
* This is mainly useful when the same form type (the same configuration)
|
||||
* has to handle different kind of underlying data, e.g The DateType can
|
||||
* deal with strings or \DateTime objects as input.
|
||||
*
|
||||
* 2. View transformers which adapt the normalized data to the view format.
|
||||
* a/ When the form is simple, the value returned by convention is used
|
||||
* directly in the view and thus can only be a string or an array. In
|
||||
* this case the data class should be null.
|
||||
*
|
||||
* b/ When the form is compound the returned value should be an array or
|
||||
* an object to be mapped to the children. Each property of the compound
|
||||
* data will be used as model data by each child and will be transformed
|
||||
* too. In this case data class should be the class of the object, or null
|
||||
* when it is an array.
|
||||
*
|
||||
* All transformers are called in a configured order from model data to view value.
|
||||
* At the end of this chain the view data will be validated against the data class
|
||||
* setting.
|
||||
*
|
||||
* This method must be able to deal with empty values. Usually this will
|
||||
* be NULL, but depending on your implementation other empty values are
|
||||
* possible as well (such as empty strings). The reasoning behind this is
|
||||
* that data transformers must be chainable. If the transform() method
|
||||
* of the first data transformer outputs NULL, the second must be able to
|
||||
* process that value.
|
||||
*
|
||||
* @param TValue|null $value The value in the original representation
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @psalm-return TTransformedValue|null
|
||||
*
|
||||
* @throws TransformationFailedException when the transformation fails
|
||||
*/
|
||||
public function transform(mixed $value);
|
||||
|
||||
/**
|
||||
* Transforms a value from the transformed representation to its original
|
||||
* representation.
|
||||
*
|
||||
* This method is called when {@link Form::submit()} is called to transform the requests tainted data
|
||||
* into an acceptable format.
|
||||
*
|
||||
* The same transformers are called in the reverse order so the responsibility is to
|
||||
* return one of the types that would be expected as input of transform().
|
||||
*
|
||||
* This method must be able to deal with empty values. Usually this will
|
||||
* be an empty string, but depending on your implementation other empty
|
||||
* values are possible as well (such as NULL). The reasoning behind
|
||||
* this is that value transformers must be chainable. If the
|
||||
* reverseTransform() method of the first value transformer outputs an
|
||||
* empty string, the second value transformer must be able to process that
|
||||
* value.
|
||||
*
|
||||
* By convention, reverseTransform() should return NULL if an empty string
|
||||
* is passed.
|
||||
*
|
||||
* @param TTransformedValue|null $value The value in the transformed representation
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @psalm-return TValue|null
|
||||
*
|
||||
* @throws TransformationFailedException when the transformation fails
|
||||
*/
|
||||
public function reverseTransform(mixed $value);
|
||||
}
|
||||
130
lib/symfony/form/DependencyInjection/FormPass.php
Normal file
130
lib/symfony/form/DependencyInjection/FormPass.php
Normal file
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\DependencyInjection;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
|
||||
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait;
|
||||
use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
/**
|
||||
* Adds all services with the tags "form.type", "form.type_extension" and
|
||||
* "form.type_guesser" as arguments of the "form.extension" service.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class FormPass implements CompilerPassInterface
|
||||
{
|
||||
use PriorityTaggedServiceTrait;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
if (!$container->hasDefinition('form.extension')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$definition = $container->getDefinition('form.extension');
|
||||
$definition->replaceArgument(0, $this->processFormTypes($container));
|
||||
$definition->replaceArgument(1, $this->processFormTypeExtensions($container));
|
||||
$definition->replaceArgument(2, $this->processFormTypeGuessers($container));
|
||||
}
|
||||
|
||||
private function processFormTypes(ContainerBuilder $container): Reference
|
||||
{
|
||||
// Get service locator argument
|
||||
$servicesMap = [];
|
||||
$namespaces = ['Symfony\Component\Form\Extension\Core\Type' => true];
|
||||
|
||||
// Builds an array with fully-qualified type class names as keys and service IDs as values
|
||||
foreach ($container->findTaggedServiceIds('form.type', true) as $serviceId => $tag) {
|
||||
// Add form type service to the service locator
|
||||
$serviceDefinition = $container->getDefinition($serviceId);
|
||||
$servicesMap[$formType = $serviceDefinition->getClass()] = new Reference($serviceId);
|
||||
$namespaces[substr($formType, 0, strrpos($formType, '\\'))] = true;
|
||||
}
|
||||
|
||||
if ($container->hasDefinition('console.command.form_debug')) {
|
||||
$commandDefinition = $container->getDefinition('console.command.form_debug');
|
||||
$commandDefinition->setArgument(1, array_keys($namespaces));
|
||||
$commandDefinition->setArgument(2, array_keys($servicesMap));
|
||||
}
|
||||
|
||||
return ServiceLocatorTagPass::register($container, $servicesMap);
|
||||
}
|
||||
|
||||
private function processFormTypeExtensions(ContainerBuilder $container): array
|
||||
{
|
||||
$typeExtensions = [];
|
||||
$typeExtensionsClasses = [];
|
||||
foreach ($this->findAndSortTaggedServices('form.type_extension', $container) as $reference) {
|
||||
$serviceId = (string) $reference;
|
||||
$serviceDefinition = $container->getDefinition($serviceId);
|
||||
|
||||
$tag = $serviceDefinition->getTag('form.type_extension');
|
||||
$typeExtensionClass = $container->getParameterBag()->resolveValue($serviceDefinition->getClass());
|
||||
|
||||
if (isset($tag[0]['extended_type'])) {
|
||||
$typeExtensions[$tag[0]['extended_type']][] = new Reference($serviceId);
|
||||
$typeExtensionsClasses[] = $typeExtensionClass;
|
||||
} else {
|
||||
$extendsTypes = false;
|
||||
|
||||
$typeExtensionsClasses[] = $typeExtensionClass;
|
||||
foreach ($typeExtensionClass::getExtendedTypes() as $extendedType) {
|
||||
$typeExtensions[$extendedType][] = new Reference($serviceId);
|
||||
$extendsTypes = true;
|
||||
}
|
||||
|
||||
if (!$extendsTypes) {
|
||||
throw new InvalidArgumentException(\sprintf('The getExtendedTypes() method for service "%s" does not return any extended types.', $serviceId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($typeExtensions as $extendedType => $extensions) {
|
||||
$typeExtensions[$extendedType] = new IteratorArgument($extensions);
|
||||
}
|
||||
|
||||
if ($container->hasDefinition('console.command.form_debug')) {
|
||||
$commandDefinition = $container->getDefinition('console.command.form_debug');
|
||||
$commandDefinition->setArgument(3, $typeExtensionsClasses);
|
||||
}
|
||||
|
||||
return $typeExtensions;
|
||||
}
|
||||
|
||||
private function processFormTypeGuessers(ContainerBuilder $container): ArgumentInterface
|
||||
{
|
||||
$guessers = [];
|
||||
$guessersClasses = [];
|
||||
foreach ($container->findTaggedServiceIds('form.type_guesser', true) as $serviceId => $tags) {
|
||||
$guessers[] = new Reference($serviceId);
|
||||
|
||||
$serviceDefinition = $container->getDefinition($serviceId);
|
||||
$guessersClasses[] = $serviceDefinition->getClass();
|
||||
}
|
||||
|
||||
if ($container->hasDefinition('console.command.form_debug')) {
|
||||
$commandDefinition = $container->getDefinition('console.command.form_debug');
|
||||
$commandDefinition->setArgument(4, $guessersClasses);
|
||||
}
|
||||
|
||||
return new IteratorArgument($guessers);
|
||||
}
|
||||
}
|
||||
33
lib/symfony/form/Event/PostSetDataEvent.php
Normal file
33
lib/symfony/form/Event/PostSetDataEvent.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Event;
|
||||
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
|
||||
/**
|
||||
* This event is dispatched at the end of the Form::setData() method.
|
||||
*
|
||||
* It can be used to modify a form depending on the populated data (adding or
|
||||
* removing fields dynamically).
|
||||
*/
|
||||
final class PostSetDataEvent extends FormEvent
|
||||
{
|
||||
/**
|
||||
* @deprecated since Symfony 6.4, it will throw an exception in 7.0.
|
||||
*/
|
||||
public function setData(mixed $data): void
|
||||
{
|
||||
trigger_deprecation('symfony/form', '6.4', 'Calling "%s()" will throw an exception as of 7.0, listen to "form.pre_set_data" instead.', __METHOD__);
|
||||
// throw new BadMethodCallException('Form data cannot be changed during "form.post_set_data", you should use "form.pre_set_data" instead.');
|
||||
parent::setData($data);
|
||||
}
|
||||
}
|
||||
33
lib/symfony/form/Event/PostSubmitEvent.php
Normal file
33
lib/symfony/form/Event/PostSubmitEvent.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Event;
|
||||
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
|
||||
/**
|
||||
* This event is dispatched after the Form::submit()
|
||||
* once the model and view data have been denormalized.
|
||||
*
|
||||
* It can be used to fetch data after denormalization.
|
||||
*/
|
||||
final class PostSubmitEvent extends FormEvent
|
||||
{
|
||||
/**
|
||||
* @deprecated since Symfony 6.4, it will throw an exception in 7.0.
|
||||
*/
|
||||
public function setData(mixed $data): void
|
||||
{
|
||||
trigger_deprecation('symfony/form', '6.4', 'Calling "%s()" will throw an exception as of 7.0, listen to "form.pre_submit" or "form.submit" instead.', __METHOD__);
|
||||
// throw new BadMethodCallException('Form data cannot be changed during "form.post_submit", you should use "form.pre_submit" or "form.submit" instead.');
|
||||
parent::setData($data);
|
||||
}
|
||||
}
|
||||
23
lib/symfony/form/Event/PreSetDataEvent.php
Normal file
23
lib/symfony/form/Event/PreSetDataEvent.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Event;
|
||||
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
|
||||
/**
|
||||
* This event is dispatched at the beginning of the Form::setData() method.
|
||||
*
|
||||
* It can be used to modify the data given during pre-population.
|
||||
*/
|
||||
final class PreSetDataEvent extends FormEvent
|
||||
{
|
||||
}
|
||||
25
lib/symfony/form/Event/PreSubmitEvent.php
Normal file
25
lib/symfony/form/Event/PreSubmitEvent.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Event;
|
||||
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
|
||||
/**
|
||||
* This event is dispatched at the beginning of the Form::submit() method.
|
||||
*
|
||||
* It can be used to:
|
||||
* - Change data from the request, before submitting the data to the form.
|
||||
* - Add or remove form fields, before submitting the data to the form.
|
||||
*/
|
||||
final class PreSubmitEvent extends FormEvent
|
||||
{
|
||||
}
|
||||
24
lib/symfony/form/Event/SubmitEvent.php
Normal file
24
lib/symfony/form/Event/SubmitEvent.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Event;
|
||||
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
|
||||
/**
|
||||
* This event is dispatched just before the Form::submit() method
|
||||
* transforms back the normalized data to the model and view data.
|
||||
*
|
||||
* It can be used to change data from the normalized representation of the data.
|
||||
*/
|
||||
final class SubmitEvent extends FormEvent
|
||||
{
|
||||
}
|
||||
16
lib/symfony/form/Exception/AccessException.php
Normal file
16
lib/symfony/form/Exception/AccessException.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
class AccessException extends RuntimeException
|
||||
{
|
||||
}
|
||||
22
lib/symfony/form/Exception/AlreadySubmittedException.php
Normal file
22
lib/symfony/form/Exception/AlreadySubmittedException.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
/**
|
||||
* Thrown when an operation is called that is not acceptable after submitting
|
||||
* a form.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class AlreadySubmittedException extends LogicException
|
||||
{
|
||||
}
|
||||
21
lib/symfony/form/Exception/BadMethodCallException.php
Normal file
21
lib/symfony/form/Exception/BadMethodCallException.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
/**
|
||||
* Base BadMethodCallException for the Form component.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
|
||||
{
|
||||
}
|
||||
16
lib/symfony/form/Exception/ErrorMappingException.php
Normal file
16
lib/symfony/form/Exception/ErrorMappingException.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
class ErrorMappingException extends RuntimeException
|
||||
{
|
||||
}
|
||||
21
lib/symfony/form/Exception/ExceptionInterface.php
Normal file
21
lib/symfony/form/Exception/ExceptionInterface.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
/**
|
||||
* Base ExceptionInterface for the Form component.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
interface ExceptionInterface extends \Throwable
|
||||
{
|
||||
}
|
||||
21
lib/symfony/form/Exception/InvalidArgumentException.php
Normal file
21
lib/symfony/form/Exception/InvalidArgumentException.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
/**
|
||||
* Base InvalidArgumentException for the Form component.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
|
||||
{
|
||||
}
|
||||
16
lib/symfony/form/Exception/InvalidConfigurationException.php
Normal file
16
lib/symfony/form/Exception/InvalidConfigurationException.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
class InvalidConfigurationException extends InvalidArgumentException
|
||||
{
|
||||
}
|
||||
21
lib/symfony/form/Exception/LogicException.php
Normal file
21
lib/symfony/form/Exception/LogicException.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
/**
|
||||
* Base LogicException for Form component.
|
||||
*
|
||||
* @author Alexander Kotynia <aleksander.kot@gmail.com>
|
||||
*/
|
||||
class LogicException extends \LogicException implements ExceptionInterface
|
||||
{
|
||||
}
|
||||
21
lib/symfony/form/Exception/OutOfBoundsException.php
Normal file
21
lib/symfony/form/Exception/OutOfBoundsException.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
/**
|
||||
* Base OutOfBoundsException for Form component.
|
||||
*
|
||||
* @author Alexander Kotynia <aleksander.kot@gmail.com>
|
||||
*/
|
||||
class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface
|
||||
{
|
||||
}
|
||||
21
lib/symfony/form/Exception/RuntimeException.php
Normal file
21
lib/symfony/form/Exception/RuntimeException.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
/**
|
||||
* Base RuntimeException for the Form component.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class RuntimeException extends \RuntimeException implements ExceptionInterface
|
||||
{
|
||||
}
|
||||
16
lib/symfony/form/Exception/StringCastException.php
Normal file
16
lib/symfony/form/Exception/StringCastException.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
class StringCastException extends RuntimeException
|
||||
{
|
||||
}
|
||||
55
lib/symfony/form/Exception/TransformationFailedException.php
Normal file
55
lib/symfony/form/Exception/TransformationFailedException.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
/**
|
||||
* Indicates a value transformation error.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class TransformationFailedException extends RuntimeException
|
||||
{
|
||||
private ?string $invalidMessage;
|
||||
private array $invalidMessageParameters;
|
||||
|
||||
public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null, ?string $invalidMessage = null, array $invalidMessageParameters = [])
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
|
||||
$this->setInvalidMessage($invalidMessage, $invalidMessageParameters);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the message that will be shown to the user.
|
||||
*
|
||||
* @param string|null $invalidMessage The message or message key
|
||||
* @param array $invalidMessageParameters Data to be passed into the translator
|
||||
*/
|
||||
public function setInvalidMessage(?string $invalidMessage = null, array $invalidMessageParameters = []): void
|
||||
{
|
||||
if (1 > \func_num_args()) {
|
||||
trigger_deprecation('symfony/form', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
|
||||
}
|
||||
$this->invalidMessage = $invalidMessage;
|
||||
$this->invalidMessageParameters = $invalidMessageParameters;
|
||||
}
|
||||
|
||||
public function getInvalidMessage(): ?string
|
||||
{
|
||||
return $this->invalidMessage;
|
||||
}
|
||||
|
||||
public function getInvalidMessageParameters(): array
|
||||
{
|
||||
return $this->invalidMessageParameters;
|
||||
}
|
||||
}
|
||||
20
lib/symfony/form/Exception/UnexpectedTypeException.php
Normal file
20
lib/symfony/form/Exception/UnexpectedTypeException.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Exception;
|
||||
|
||||
class UnexpectedTypeException extends InvalidArgumentException
|
||||
{
|
||||
public function __construct(mixed $value, string $expectedType)
|
||||
{
|
||||
parent::__construct(\sprintf('Expected argument of type "%s", "%s" given', $expectedType, get_debug_type($value)));
|
||||
}
|
||||
}
|
||||
89
lib/symfony/form/Extension/Core/CoreExtension.php
Normal file
89
lib/symfony/form/Extension/Core/CoreExtension.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core;
|
||||
|
||||
use Symfony\Component\Form\AbstractExtension;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TransformationFailureExtension;
|
||||
use Symfony\Component\PropertyAccess\PropertyAccess;
|
||||
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* Represents the main form extension, which loads the core functionality.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class CoreExtension extends AbstractExtension
|
||||
{
|
||||
private PropertyAccessorInterface $propertyAccessor;
|
||||
private ChoiceListFactoryInterface $choiceListFactory;
|
||||
private ?TranslatorInterface $translator;
|
||||
|
||||
public function __construct(?PropertyAccessorInterface $propertyAccessor = null, ?ChoiceListFactoryInterface $choiceListFactory = null, ?TranslatorInterface $translator = null)
|
||||
{
|
||||
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
|
||||
$this->choiceListFactory = $choiceListFactory ?? new CachingFactoryDecorator(new PropertyAccessDecorator(new DefaultChoiceListFactory(), $this->propertyAccessor));
|
||||
$this->translator = $translator;
|
||||
}
|
||||
|
||||
protected function loadTypes(): array
|
||||
{
|
||||
return [
|
||||
new Type\FormType($this->propertyAccessor),
|
||||
new Type\BirthdayType(),
|
||||
new Type\CheckboxType(),
|
||||
new Type\ChoiceType($this->choiceListFactory, $this->translator),
|
||||
new Type\CollectionType(),
|
||||
new Type\CountryType(),
|
||||
new Type\DateIntervalType(),
|
||||
new Type\DateType(),
|
||||
new Type\DateTimeType(),
|
||||
new Type\EmailType(),
|
||||
new Type\HiddenType(),
|
||||
new Type\IntegerType(),
|
||||
new Type\LanguageType(),
|
||||
new Type\LocaleType(),
|
||||
new Type\MoneyType(),
|
||||
new Type\NumberType(),
|
||||
new Type\PasswordType(),
|
||||
new Type\PercentType(),
|
||||
new Type\RadioType(),
|
||||
new Type\RangeType(),
|
||||
new Type\RepeatedType(),
|
||||
new Type\SearchType(),
|
||||
new Type\TextareaType(),
|
||||
new Type\TextType(),
|
||||
new Type\TimeType(),
|
||||
new Type\TimezoneType(),
|
||||
new Type\UrlType(),
|
||||
new Type\FileType($this->translator),
|
||||
new Type\ButtonType(),
|
||||
new Type\SubmitType(),
|
||||
new Type\ResetType(),
|
||||
new Type\CurrencyType(),
|
||||
new Type\TelType(),
|
||||
new Type\ColorType($this->translator),
|
||||
new Type\WeekType(),
|
||||
];
|
||||
}
|
||||
|
||||
protected function loadTypeExtensions(): array
|
||||
{
|
||||
return [
|
||||
new TransformationFailureExtension($this->translator),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataAccessor;
|
||||
|
||||
use Symfony\Component\Form\DataAccessorInterface;
|
||||
use Symfony\Component\Form\Exception\AccessException;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
|
||||
/**
|
||||
* Writes and reads values to/from an object or array using callback functions.
|
||||
*
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*/
|
||||
class CallbackAccessor implements DataAccessorInterface
|
||||
{
|
||||
public function getValue(object|array $data, FormInterface $form): mixed
|
||||
{
|
||||
if (null === $getter = $form->getConfig()->getOption('getter')) {
|
||||
throw new AccessException('Unable to read from the given form data as no getter is defined.');
|
||||
}
|
||||
|
||||
return ($getter)($data, $form);
|
||||
}
|
||||
|
||||
public function setValue(object|array &$data, mixed $value, FormInterface $form): void
|
||||
{
|
||||
if (null === $setter = $form->getConfig()->getOption('setter')) {
|
||||
throw new AccessException('Unable to write the given value as no setter is defined.');
|
||||
}
|
||||
|
||||
($setter)($data, $form->getData(), $form);
|
||||
}
|
||||
|
||||
public function isReadable(object|array $data, FormInterface $form): bool
|
||||
{
|
||||
return null !== $form->getConfig()->getOption('getter');
|
||||
}
|
||||
|
||||
public function isWritable(object|array $data, FormInterface $form): bool
|
||||
{
|
||||
return null !== $form->getConfig()->getOption('setter');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataAccessor;
|
||||
|
||||
use Symfony\Component\Form\DataAccessorInterface;
|
||||
use Symfony\Component\Form\Exception\AccessException;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
|
||||
/**
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
*/
|
||||
class ChainAccessor implements DataAccessorInterface
|
||||
{
|
||||
private iterable $accessors;
|
||||
|
||||
/**
|
||||
* @param DataAccessorInterface[]|iterable $accessors
|
||||
*/
|
||||
public function __construct(iterable $accessors)
|
||||
{
|
||||
$this->accessors = $accessors;
|
||||
}
|
||||
|
||||
public function getValue(object|array $data, FormInterface $form): mixed
|
||||
{
|
||||
foreach ($this->accessors as $accessor) {
|
||||
if ($accessor->isReadable($data, $form)) {
|
||||
return $accessor->getValue($data, $form);
|
||||
}
|
||||
}
|
||||
|
||||
throw new AccessException('Unable to read from the given form data as no accessor in the chain is able to read the data.');
|
||||
}
|
||||
|
||||
public function setValue(object|array &$data, mixed $value, FormInterface $form): void
|
||||
{
|
||||
foreach ($this->accessors as $accessor) {
|
||||
if ($accessor->isWritable($data, $form)) {
|
||||
$accessor->setValue($data, $value, $form);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
throw new AccessException('Unable to write the given value as no accessor in the chain is able to set the data.');
|
||||
}
|
||||
|
||||
public function isReadable(object|array $data, FormInterface $form): bool
|
||||
{
|
||||
foreach ($this->accessors as $accessor) {
|
||||
if ($accessor->isReadable($data, $form)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isWritable(object|array $data, FormInterface $form): bool
|
||||
{
|
||||
foreach ($this->accessors as $accessor) {
|
||||
if ($accessor->isWritable($data, $form)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataAccessor;
|
||||
|
||||
use Symfony\Component\Form\DataAccessorInterface;
|
||||
use Symfony\Component\Form\DataMapperInterface;
|
||||
use Symfony\Component\Form\Exception\AccessException;
|
||||
use Symfony\Component\Form\Extension\Core\DataMapper\DataMapper;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\PropertyAccess\Exception\AccessException as PropertyAccessException;
|
||||
use Symfony\Component\PropertyAccess\Exception\NoSuchIndexException;
|
||||
use Symfony\Component\PropertyAccess\Exception\UninitializedPropertyException;
|
||||
use Symfony\Component\PropertyAccess\PropertyAccess;
|
||||
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
||||
use Symfony\Component\PropertyAccess\PropertyPathInterface;
|
||||
|
||||
/**
|
||||
* Writes and reads values to/from an object or array using property path.
|
||||
*
|
||||
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class PropertyPathAccessor implements DataAccessorInterface
|
||||
{
|
||||
private PropertyAccessorInterface $propertyAccessor;
|
||||
|
||||
public function __construct(?PropertyAccessorInterface $propertyAccessor = null)
|
||||
{
|
||||
$this->propertyAccessor = $propertyAccessor ?? PropertyAccess::createPropertyAccessor();
|
||||
}
|
||||
|
||||
public function getValue(object|array $data, FormInterface $form): mixed
|
||||
{
|
||||
if (null === $propertyPath = $form->getPropertyPath()) {
|
||||
throw new AccessException('Unable to read from the given form data as no property path is defined.');
|
||||
}
|
||||
|
||||
return $this->getPropertyValue($data, $propertyPath);
|
||||
}
|
||||
|
||||
public function setValue(object|array &$data, mixed $value, FormInterface $form): void
|
||||
{
|
||||
if (null === $propertyPath = $form->getPropertyPath()) {
|
||||
throw new AccessException('Unable to write the given value as no property path is defined.');
|
||||
}
|
||||
|
||||
$getValue = function () use ($data, $form, $propertyPath) {
|
||||
$dataMapper = $this->getDataMapper($form);
|
||||
|
||||
if ($dataMapper instanceof DataMapper && null !== $dataAccessor = $dataMapper->getDataAccessor()) {
|
||||
return $dataAccessor->getValue($data, $form);
|
||||
}
|
||||
|
||||
return $this->getPropertyValue($data, $propertyPath);
|
||||
};
|
||||
|
||||
// If the field is of type DateTimeInterface and the data is the same skip the update to
|
||||
// keep the original object hash
|
||||
if ($value instanceof \DateTimeInterface && $value == $getValue()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the data is identical to the value in $data, we are
|
||||
// dealing with a reference
|
||||
if (!\is_object($data) || !$form->getConfig()->getByReference() || $value !== $getValue()) {
|
||||
$this->propertyAccessor->setValue($data, $propertyPath, $value);
|
||||
}
|
||||
}
|
||||
|
||||
public function isReadable(object|array $data, FormInterface $form): bool
|
||||
{
|
||||
return null !== $form->getPropertyPath();
|
||||
}
|
||||
|
||||
public function isWritable(object|array $data, FormInterface $form): bool
|
||||
{
|
||||
return null !== $form->getPropertyPath();
|
||||
}
|
||||
|
||||
private function getPropertyValue(object|array $data, PropertyPathInterface $propertyPath): mixed
|
||||
{
|
||||
try {
|
||||
return $this->propertyAccessor->getValue($data, $propertyPath);
|
||||
} catch (PropertyAccessException $e) {
|
||||
if (\is_array($data) && $e instanceof NoSuchIndexException) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!$e instanceof UninitializedPropertyException
|
||||
// For versions without UninitializedPropertyException check the exception message
|
||||
&& (class_exists(UninitializedPropertyException::class) || !str_contains($e->getMessage(), 'You should initialize it'))
|
||||
) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private function getDataMapper(FormInterface $form): ?DataMapperInterface
|
||||
{
|
||||
do {
|
||||
$dataMapper = $form->getConfig()->getDataMapper();
|
||||
} while (null === $dataMapper && null !== $form = $form->getParent());
|
||||
|
||||
return $dataMapper;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataMapper;
|
||||
|
||||
use Symfony\Component\Form\DataMapperInterface;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
|
||||
/**
|
||||
* Maps choices to/from checkbox forms.
|
||||
*
|
||||
* A {@link ChoiceListInterface} implementation is used to find the
|
||||
* corresponding string values for the choices. Each checkbox form whose "value"
|
||||
* option corresponds to any of the selected values is marked as selected.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class CheckboxListMapper implements DataMapperInterface
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function mapDataToForms(mixed $choices, \Traversable $checkboxes)
|
||||
{
|
||||
if (!\is_array($choices ??= [])) {
|
||||
throw new UnexpectedTypeException($choices, 'array');
|
||||
}
|
||||
|
||||
foreach ($checkboxes as $checkbox) {
|
||||
$value = $checkbox->getConfig()->getOption('value');
|
||||
$checkbox->setData(\in_array($value, $choices, true));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function mapFormsToData(\Traversable $checkboxes, mixed &$choices)
|
||||
{
|
||||
if (!\is_array($choices)) {
|
||||
throw new UnexpectedTypeException($choices, 'array');
|
||||
}
|
||||
|
||||
$values = [];
|
||||
|
||||
foreach ($checkboxes as $checkbox) {
|
||||
if ($checkbox->getData()) {
|
||||
// construct an array of choice values
|
||||
$values[] = $checkbox->getConfig()->getOption('value');
|
||||
}
|
||||
}
|
||||
|
||||
$choices = $values;
|
||||
}
|
||||
}
|
||||
85
lib/symfony/form/Extension/Core/DataMapper/DataMapper.php
Normal file
85
lib/symfony/form/Extension/Core/DataMapper/DataMapper.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataMapper;
|
||||
|
||||
use Symfony\Component\Form\DataAccessorInterface;
|
||||
use Symfony\Component\Form\DataMapperInterface;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
use Symfony\Component\Form\Extension\Core\DataAccessor\CallbackAccessor;
|
||||
use Symfony\Component\Form\Extension\Core\DataAccessor\ChainAccessor;
|
||||
use Symfony\Component\Form\Extension\Core\DataAccessor\PropertyPathAccessor;
|
||||
|
||||
/**
|
||||
* Maps arrays/objects to/from forms using data accessors.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class DataMapper implements DataMapperInterface
|
||||
{
|
||||
private DataAccessorInterface $dataAccessor;
|
||||
|
||||
public function __construct(?DataAccessorInterface $dataAccessor = null)
|
||||
{
|
||||
$this->dataAccessor = $dataAccessor ?? new ChainAccessor([
|
||||
new CallbackAccessor(),
|
||||
new PropertyPathAccessor(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function mapDataToForms(mixed $data, \Traversable $forms): void
|
||||
{
|
||||
$empty = null === $data || [] === $data;
|
||||
|
||||
if (!$empty && !\is_array($data) && !\is_object($data)) {
|
||||
throw new UnexpectedTypeException($data, 'object, array or empty');
|
||||
}
|
||||
|
||||
foreach ($forms as $form) {
|
||||
$config = $form->getConfig();
|
||||
|
||||
if (!$empty && $config->getMapped() && $this->dataAccessor->isReadable($data, $form)) {
|
||||
$form->setData($this->dataAccessor->getValue($data, $form));
|
||||
} else {
|
||||
$form->setData($config->getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function mapFormsToData(\Traversable $forms, mixed &$data): void
|
||||
{
|
||||
if (null === $data) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!\is_array($data) && !\is_object($data)) {
|
||||
throw new UnexpectedTypeException($data, 'object, array or empty');
|
||||
}
|
||||
|
||||
foreach ($forms as $form) {
|
||||
$config = $form->getConfig();
|
||||
|
||||
// Write-back is disabled if the form is not synchronized (transformation failed),
|
||||
// if the form was not submitted and if the form is disabled (modification not allowed)
|
||||
if ($config->getMapped() && $form->isSubmitted() && $form->isSynchronized() && !$form->isDisabled() && $this->dataAccessor->isWritable($data, $form)) {
|
||||
$this->dataAccessor->setValue($data, $form->getData(), $form);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function getDataAccessor(): DataAccessorInterface
|
||||
{
|
||||
return $this->dataAccessor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataMapper;
|
||||
|
||||
use Symfony\Component\Form\DataMapperInterface;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
|
||||
/**
|
||||
* Maps choices to/from radio forms.
|
||||
*
|
||||
* A {@link ChoiceListInterface} implementation is used to find the
|
||||
* corresponding string values for the choices. The radio form whose "value"
|
||||
* option corresponds to the selected value is marked as selected.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class RadioListMapper implements DataMapperInterface
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function mapDataToForms(mixed $choice, \Traversable $radios)
|
||||
{
|
||||
if (!\is_string($choice)) {
|
||||
throw new UnexpectedTypeException($choice, 'string');
|
||||
}
|
||||
|
||||
foreach ($radios as $radio) {
|
||||
$value = $radio->getConfig()->getOption('value');
|
||||
$radio->setData($choice === $value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function mapFormsToData(\Traversable $radios, mixed &$choice)
|
||||
{
|
||||
if (null !== $choice && !\is_string($choice)) {
|
||||
throw new UnexpectedTypeException($choice, 'null or string');
|
||||
}
|
||||
|
||||
$choice = null;
|
||||
|
||||
foreach ($radios as $radio) {
|
||||
if ($radio->getData()) {
|
||||
if ('placeholder' === $radio->getName()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$choice = $radio->getConfig()->getOption('value');
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @implements DataTransformerInterface<array, array>
|
||||
*/
|
||||
class ArrayToPartsTransformer implements DataTransformerInterface
|
||||
{
|
||||
private array $partMapping;
|
||||
|
||||
public function __construct(array $partMapping)
|
||||
{
|
||||
$this->partMapping = $partMapping;
|
||||
}
|
||||
|
||||
public function transform(mixed $array): mixed
|
||||
{
|
||||
if (!\is_array($array ??= [])) {
|
||||
throw new TransformationFailedException('Expected an array.');
|
||||
}
|
||||
|
||||
$result = [];
|
||||
|
||||
foreach ($this->partMapping as $partKey => $originalKeys) {
|
||||
if (!$array) {
|
||||
$result[$partKey] = null;
|
||||
} else {
|
||||
$result[$partKey] = array_intersect_key($array, array_flip($originalKeys));
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function reverseTransform(mixed $array): mixed
|
||||
{
|
||||
if (!\is_array($array)) {
|
||||
throw new TransformationFailedException('Expected an array.');
|
||||
}
|
||||
|
||||
$result = [];
|
||||
$emptyKeys = [];
|
||||
|
||||
foreach ($this->partMapping as $partKey => $originalKeys) {
|
||||
if (!empty($array[$partKey])) {
|
||||
foreach ($originalKeys as $originalKey) {
|
||||
if (isset($array[$partKey][$originalKey])) {
|
||||
$result[$originalKey] = $array[$partKey][$originalKey];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$emptyKeys[] = $partKey;
|
||||
}
|
||||
}
|
||||
|
||||
if (\count($emptyKeys) > 0) {
|
||||
if (\count($emptyKeys) === \count($this->partMapping)) {
|
||||
// All parts empty
|
||||
return null;
|
||||
}
|
||||
|
||||
throw new TransformationFailedException(\sprintf('The keys "%s" should not be empty.', implode('", "', $emptyKeys)));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* @template TTransformedValue
|
||||
*
|
||||
* @implements DataTransformerInterface<\DateTimeInterface, TTransformedValue>
|
||||
*/
|
||||
abstract class BaseDateTimeTransformer implements DataTransformerInterface
|
||||
{
|
||||
protected static $formats = [
|
||||
\IntlDateFormatter::NONE,
|
||||
\IntlDateFormatter::FULL,
|
||||
\IntlDateFormatter::LONG,
|
||||
\IntlDateFormatter::MEDIUM,
|
||||
\IntlDateFormatter::SHORT,
|
||||
];
|
||||
|
||||
protected $inputTimezone;
|
||||
|
||||
protected $outputTimezone;
|
||||
|
||||
/**
|
||||
* @param string|null $inputTimezone The name of the input timezone
|
||||
* @param string|null $outputTimezone The name of the output timezone
|
||||
*
|
||||
* @throws InvalidArgumentException if a timezone is not valid
|
||||
*/
|
||||
public function __construct(?string $inputTimezone = null, ?string $outputTimezone = null)
|
||||
{
|
||||
$this->inputTimezone = $inputTimezone ?: date_default_timezone_get();
|
||||
$this->outputTimezone = $outputTimezone ?: date_default_timezone_get();
|
||||
|
||||
// Check if input and output timezones are valid
|
||||
try {
|
||||
new \DateTimeZone($this->inputTimezone);
|
||||
} catch (\Exception $e) {
|
||||
throw new InvalidArgumentException(\sprintf('Input timezone is invalid: "%s".', $this->inputTimezone), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
try {
|
||||
new \DateTimeZone($this->outputTimezone);
|
||||
} catch (\Exception $e) {
|
||||
throw new InvalidArgumentException(\sprintf('Output timezone is invalid: "%s".', $this->outputTimezone), $e->getCode(), $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms between a Boolean and a string.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
|
||||
*
|
||||
* @implements DataTransformerInterface<bool, string>
|
||||
*/
|
||||
class BooleanToStringTransformer implements DataTransformerInterface
|
||||
{
|
||||
private string $trueValue;
|
||||
|
||||
private array $falseValues;
|
||||
|
||||
/**
|
||||
* @param string $trueValue The value emitted upon transform if the input is true
|
||||
*/
|
||||
public function __construct(string $trueValue, array $falseValues = [null])
|
||||
{
|
||||
$this->trueValue = $trueValue;
|
||||
$this->falseValues = $falseValues;
|
||||
if (\in_array($this->trueValue, $this->falseValues, true)) {
|
||||
throw new InvalidArgumentException('The specified "true" value is contained in the false-values.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a Boolean into a string.
|
||||
*
|
||||
* @param bool $value Boolean value
|
||||
*
|
||||
* @throws TransformationFailedException if the given value is not a Boolean
|
||||
*/
|
||||
public function transform(mixed $value): ?string
|
||||
{
|
||||
if (null === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!\is_bool($value)) {
|
||||
throw new TransformationFailedException('Expected a Boolean.');
|
||||
}
|
||||
|
||||
return $value ? $this->trueValue : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a string into a Boolean.
|
||||
*
|
||||
* @param string $value String value
|
||||
*
|
||||
* @throws TransformationFailedException if the given value is not a string
|
||||
*/
|
||||
public function reverseTransform(mixed $value): bool
|
||||
{
|
||||
if (\in_array($value, $this->falseValues, true)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!\is_string($value)) {
|
||||
throw new TransformationFailedException('Expected a string.');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @implements DataTransformerInterface<mixed, string>
|
||||
*/
|
||||
class ChoiceToValueTransformer implements DataTransformerInterface
|
||||
{
|
||||
private ChoiceListInterface $choiceList;
|
||||
|
||||
public function __construct(ChoiceListInterface $choiceList)
|
||||
{
|
||||
$this->choiceList = $choiceList;
|
||||
}
|
||||
|
||||
public function transform(mixed $choice): mixed
|
||||
{
|
||||
return (string) current($this->choiceList->getValuesForChoices([$choice]));
|
||||
}
|
||||
|
||||
public function reverseTransform(mixed $value): mixed
|
||||
{
|
||||
if (null !== $value && !\is_string($value)) {
|
||||
throw new TransformationFailedException('Expected a string or null.');
|
||||
}
|
||||
|
||||
$choices = $this->choiceList->getChoicesForValues([(string) $value]);
|
||||
|
||||
if (1 !== \count($choices)) {
|
||||
if (null === $value || '' === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
throw new TransformationFailedException(\sprintf('The choice "%s" does not exist or is not unique.', $value));
|
||||
}
|
||||
|
||||
return current($choices);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @implements DataTransformerInterface<array, array>
|
||||
*/
|
||||
class ChoicesToValuesTransformer implements DataTransformerInterface
|
||||
{
|
||||
private ChoiceListInterface $choiceList;
|
||||
|
||||
public function __construct(ChoiceListInterface $choiceList)
|
||||
{
|
||||
$this->choiceList = $choiceList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws TransformationFailedException if the given value is not an array
|
||||
*/
|
||||
public function transform(mixed $array): array
|
||||
{
|
||||
if (null === $array) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!\is_array($array)) {
|
||||
throw new TransformationFailedException('Expected an array.');
|
||||
}
|
||||
|
||||
return $this->choiceList->getValuesForChoices($array);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws TransformationFailedException if the given value is not an array
|
||||
* or if no matching choice could be
|
||||
* found for some given value
|
||||
*/
|
||||
public function reverseTransform(mixed $array): array
|
||||
{
|
||||
if (null === $array) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!\is_array($array)) {
|
||||
throw new TransformationFailedException('Expected an array.');
|
||||
}
|
||||
|
||||
$choices = $this->choiceList->getChoicesForValues($array);
|
||||
|
||||
if (\count($choices) !== \count($array)) {
|
||||
throw new TransformationFailedException('Could not find all matching choices for the given values.');
|
||||
}
|
||||
|
||||
return $choices;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Passes a value through multiple value transformers.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class DataTransformerChain implements DataTransformerInterface
|
||||
{
|
||||
protected $transformers;
|
||||
|
||||
/**
|
||||
* Uses the given value transformers to transform values.
|
||||
*
|
||||
* @param DataTransformerInterface[] $transformers
|
||||
*/
|
||||
public function __construct(array $transformers)
|
||||
{
|
||||
$this->transformers = $transformers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passes the value through the transform() method of all nested transformers.
|
||||
*
|
||||
* The transformers receive the value in the same order as they were passed
|
||||
* to the constructor. Each transformer receives the result of the previous
|
||||
* transformer as input. The output of the last transformer is returned
|
||||
* by this method.
|
||||
*
|
||||
* @param mixed $value The original value
|
||||
*
|
||||
* @throws TransformationFailedException
|
||||
*/
|
||||
public function transform(mixed $value): mixed
|
||||
{
|
||||
foreach ($this->transformers as $transformer) {
|
||||
$value = $transformer->transform($value);
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passes the value through the reverseTransform() method of all nested
|
||||
* transformers.
|
||||
*
|
||||
* The transformers receive the value in the reverse order as they were passed
|
||||
* to the constructor. Each transformer receives the result of the previous
|
||||
* transformer as input. The output of the last transformer is returned
|
||||
* by this method.
|
||||
*
|
||||
* @param mixed $value The transformed value
|
||||
*
|
||||
* @throws TransformationFailedException
|
||||
*/
|
||||
public function reverseTransform(mixed $value): mixed
|
||||
{
|
||||
for ($i = \count($this->transformers) - 1; $i >= 0; --$i) {
|
||||
$value = $this->transformers[$i]->reverseTransform($value);
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DataTransformerInterface[]
|
||||
*/
|
||||
public function getTransformers(): array
|
||||
{
|
||||
return $this->transformers;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
|
||||
/**
|
||||
* Transforms between a normalized date interval and an interval string/array.
|
||||
*
|
||||
* @author Steffen Roßkamp <steffen.rosskamp@gimmickmedia.de>
|
||||
*
|
||||
* @implements DataTransformerInterface<\DateInterval, array>
|
||||
*/
|
||||
class DateIntervalToArrayTransformer implements DataTransformerInterface
|
||||
{
|
||||
public const YEARS = 'years';
|
||||
public const MONTHS = 'months';
|
||||
public const DAYS = 'days';
|
||||
public const HOURS = 'hours';
|
||||
public const MINUTES = 'minutes';
|
||||
public const SECONDS = 'seconds';
|
||||
public const INVERT = 'invert';
|
||||
|
||||
private const AVAILABLE_FIELDS = [
|
||||
self::YEARS => 'y',
|
||||
self::MONTHS => 'm',
|
||||
self::DAYS => 'd',
|
||||
self::HOURS => 'h',
|
||||
self::MINUTES => 'i',
|
||||
self::SECONDS => 's',
|
||||
self::INVERT => 'r',
|
||||
];
|
||||
private array $fields;
|
||||
private bool $pad;
|
||||
|
||||
/**
|
||||
* @param string[]|null $fields The date fields
|
||||
* @param bool $pad Whether to use padding
|
||||
*/
|
||||
public function __construct(?array $fields = null, bool $pad = false)
|
||||
{
|
||||
$this->fields = $fields ?? ['years', 'months', 'days', 'hours', 'minutes', 'seconds', 'invert'];
|
||||
$this->pad = $pad;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a normalized date interval into an interval array.
|
||||
*
|
||||
* @param \DateInterval $dateInterval Normalized date interval
|
||||
*
|
||||
* @throws UnexpectedTypeException if the given value is not a \DateInterval instance
|
||||
*/
|
||||
public function transform(mixed $dateInterval): array
|
||||
{
|
||||
if (null === $dateInterval) {
|
||||
return array_intersect_key(
|
||||
[
|
||||
'years' => '',
|
||||
'months' => '',
|
||||
'weeks' => '',
|
||||
'days' => '',
|
||||
'hours' => '',
|
||||
'minutes' => '',
|
||||
'seconds' => '',
|
||||
'invert' => false,
|
||||
],
|
||||
array_flip($this->fields)
|
||||
);
|
||||
}
|
||||
if (!$dateInterval instanceof \DateInterval) {
|
||||
throw new UnexpectedTypeException($dateInterval, \DateInterval::class);
|
||||
}
|
||||
$result = [];
|
||||
foreach (self::AVAILABLE_FIELDS as $field => $char) {
|
||||
$result[$field] = $dateInterval->format('%'.($this->pad ? strtoupper($char) : $char));
|
||||
}
|
||||
if (\in_array('weeks', $this->fields, true)) {
|
||||
$result['weeks'] = '0';
|
||||
if (isset($result['days']) && (int) $result['days'] >= 7) {
|
||||
$result['weeks'] = (string) floor($result['days'] / 7);
|
||||
$result['days'] = (string) ($result['days'] % 7);
|
||||
}
|
||||
}
|
||||
$result['invert'] = '-' === $result['invert'];
|
||||
$result = array_intersect_key($result, array_flip($this->fields));
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms an interval array into a normalized date interval.
|
||||
*
|
||||
* @param array $value Interval array
|
||||
*
|
||||
* @throws UnexpectedTypeException if the given value is not an array
|
||||
* @throws TransformationFailedException if the value could not be transformed
|
||||
*/
|
||||
public function reverseTransform(mixed $value): ?\DateInterval
|
||||
{
|
||||
if (null === $value) {
|
||||
return null;
|
||||
}
|
||||
if (!\is_array($value)) {
|
||||
throw new UnexpectedTypeException($value, 'array');
|
||||
}
|
||||
if ('' === implode('', $value)) {
|
||||
return null;
|
||||
}
|
||||
$emptyFields = [];
|
||||
foreach ($this->fields as $field) {
|
||||
if (!isset($value[$field])) {
|
||||
$emptyFields[] = $field;
|
||||
}
|
||||
}
|
||||
if (\count($emptyFields) > 0) {
|
||||
throw new TransformationFailedException(\sprintf('The fields "%s" should not be empty.', implode('", "', $emptyFields)));
|
||||
}
|
||||
if (isset($value['invert']) && !\is_bool($value['invert'])) {
|
||||
throw new TransformationFailedException('The value of "invert" must be boolean.');
|
||||
}
|
||||
foreach (self::AVAILABLE_FIELDS as $field => $char) {
|
||||
if ('invert' !== $field && isset($value[$field]) && !ctype_digit((string) $value[$field])) {
|
||||
throw new TransformationFailedException(\sprintf('This amount of "%s" is invalid.', $field));
|
||||
}
|
||||
}
|
||||
try {
|
||||
if (!empty($value['weeks'])) {
|
||||
$interval = \sprintf(
|
||||
'P%sY%sM%sWT%sH%sM%sS',
|
||||
empty($value['years']) ? '0' : $value['years'],
|
||||
empty($value['months']) ? '0' : $value['months'],
|
||||
empty($value['weeks']) ? '0' : $value['weeks'],
|
||||
empty($value['hours']) ? '0' : $value['hours'],
|
||||
empty($value['minutes']) ? '0' : $value['minutes'],
|
||||
empty($value['seconds']) ? '0' : $value['seconds']
|
||||
);
|
||||
} else {
|
||||
$interval = \sprintf(
|
||||
'P%sY%sM%sDT%sH%sM%sS',
|
||||
empty($value['years']) ? '0' : $value['years'],
|
||||
empty($value['months']) ? '0' : $value['months'],
|
||||
empty($value['days']) ? '0' : $value['days'],
|
||||
empty($value['hours']) ? '0' : $value['hours'],
|
||||
empty($value['minutes']) ? '0' : $value['minutes'],
|
||||
empty($value['seconds']) ? '0' : $value['seconds']
|
||||
);
|
||||
}
|
||||
$dateInterval = new \DateInterval($interval);
|
||||
if (isset($value['invert'])) {
|
||||
$dateInterval->invert = $value['invert'] ? 1 : 0;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
return $dateInterval;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
|
||||
/**
|
||||
* Transforms between a date string and a DateInterval object.
|
||||
*
|
||||
* @author Steffen Roßkamp <steffen.rosskamp@gimmickmedia.de>
|
||||
*
|
||||
* @implements DataTransformerInterface<\DateInterval, string>
|
||||
*/
|
||||
class DateIntervalToStringTransformer implements DataTransformerInterface
|
||||
{
|
||||
private string $format;
|
||||
|
||||
/**
|
||||
* Transforms a \DateInterval instance to a string.
|
||||
*
|
||||
* @see \DateInterval::format() for supported formats
|
||||
*
|
||||
* @param string $format The date format
|
||||
*/
|
||||
public function __construct(string $format = 'P%yY%mM%dDT%hH%iM%sS')
|
||||
{
|
||||
$this->format = $format;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a DateInterval object into a date string with the configured format.
|
||||
*
|
||||
* @param \DateInterval|null $value A DateInterval object
|
||||
*
|
||||
* @throws UnexpectedTypeException if the given value is not a \DateInterval instance
|
||||
*/
|
||||
public function transform(mixed $value): string
|
||||
{
|
||||
if (null === $value) {
|
||||
return '';
|
||||
}
|
||||
if (!$value instanceof \DateInterval) {
|
||||
throw new UnexpectedTypeException($value, \DateInterval::class);
|
||||
}
|
||||
|
||||
return $value->format($this->format);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a date string in the configured format into a DateInterval object.
|
||||
*
|
||||
* @param string $value An ISO 8601 or date string like date interval presentation
|
||||
*
|
||||
* @throws UnexpectedTypeException if the given value is not a string
|
||||
* @throws TransformationFailedException if the date interval could not be parsed
|
||||
*/
|
||||
public function reverseTransform(mixed $value): ?\DateInterval
|
||||
{
|
||||
if (null === $value) {
|
||||
return null;
|
||||
}
|
||||
if (!\is_string($value)) {
|
||||
throw new UnexpectedTypeException($value, 'string');
|
||||
}
|
||||
if ('' === $value) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->isISO8601($value)) {
|
||||
throw new TransformationFailedException('Non ISO 8601 date strings are not supported yet.');
|
||||
}
|
||||
$valuePattern = '/^'.preg_replace('/%([yYmMdDhHiIsSwW])(\w)/', '(?P<$1>\d+)$2', $this->format).'$/';
|
||||
if (!preg_match($valuePattern, $value)) {
|
||||
throw new TransformationFailedException(\sprintf('Value "%s" contains intervals not accepted by format "%s".', $value, $this->format));
|
||||
}
|
||||
try {
|
||||
$dateInterval = new \DateInterval($value);
|
||||
} catch (\Exception $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
return $dateInterval;
|
||||
}
|
||||
|
||||
private function isISO8601(string $string): bool
|
||||
{
|
||||
return preg_match('/^P(?=\w*(?:\d|%\w))(?:\d+Y|%[yY]Y)?(?:\d+M|%[mM]M)?(?:(?:\d+D|%[dD]D)|(?:\d+W|%[wW]W))?(?:T(?:\d+H|[hH]H)?(?:\d+M|[iI]M)?(?:\d+S|[sS]S)?)?$/', $string);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms between a DateTimeImmutable object and a DateTime object.
|
||||
*
|
||||
* @author Valentin Udaltsov <udaltsov.valentin@gmail.com>
|
||||
*
|
||||
* @implements DataTransformerInterface<\DateTimeImmutable, \DateTime>
|
||||
*/
|
||||
final class DateTimeImmutableToDateTimeTransformer implements DataTransformerInterface
|
||||
{
|
||||
/**
|
||||
* Transforms a DateTimeImmutable into a DateTime object.
|
||||
*
|
||||
* @param \DateTimeImmutable|null $value A DateTimeImmutable object
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not a \DateTimeImmutable
|
||||
*/
|
||||
public function transform(mixed $value): ?\DateTime
|
||||
{
|
||||
if (null === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!$value instanceof \DateTimeImmutable) {
|
||||
throw new TransformationFailedException('Expected a \DateTimeImmutable.');
|
||||
}
|
||||
|
||||
return \DateTime::createFromImmutable($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a DateTime object into a DateTimeImmutable object.
|
||||
*
|
||||
* @param \DateTime|null $value A DateTime object
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not a \DateTime
|
||||
*/
|
||||
public function reverseTransform(mixed $value): ?\DateTimeImmutable
|
||||
{
|
||||
if (null === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!$value instanceof \DateTime) {
|
||||
throw new TransformationFailedException('Expected a \DateTime.');
|
||||
}
|
||||
|
||||
return \DateTimeImmutable::createFromMutable($value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms between a normalized time and a localized time string/array.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
|
||||
*
|
||||
* @extends BaseDateTimeTransformer<array>
|
||||
*/
|
||||
class DateTimeToArrayTransformer extends BaseDateTimeTransformer
|
||||
{
|
||||
private bool $pad;
|
||||
private array $fields;
|
||||
private \DateTimeInterface $referenceDate;
|
||||
|
||||
/**
|
||||
* @param string|null $inputTimezone The input timezone
|
||||
* @param string|null $outputTimezone The output timezone
|
||||
* @param string[]|null $fields The date fields
|
||||
* @param bool $pad Whether to use padding
|
||||
*/
|
||||
public function __construct(?string $inputTimezone = null, ?string $outputTimezone = null, ?array $fields = null, bool $pad = false, ?\DateTimeInterface $referenceDate = null)
|
||||
{
|
||||
parent::__construct($inputTimezone, $outputTimezone);
|
||||
|
||||
$this->fields = $fields ?? ['year', 'month', 'day', 'hour', 'minute', 'second'];
|
||||
$this->pad = $pad;
|
||||
$this->referenceDate = $referenceDate ?? new \DateTimeImmutable('1970-01-01 00:00:00');
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a normalized date into a localized date.
|
||||
*
|
||||
* @param \DateTimeInterface $dateTime A DateTimeInterface object
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not a \DateTimeInterface
|
||||
*/
|
||||
public function transform(mixed $dateTime): array
|
||||
{
|
||||
if (null === $dateTime) {
|
||||
return array_intersect_key([
|
||||
'year' => '',
|
||||
'month' => '',
|
||||
'day' => '',
|
||||
'hour' => '',
|
||||
'minute' => '',
|
||||
'second' => '',
|
||||
], array_flip($this->fields));
|
||||
}
|
||||
|
||||
if (!$dateTime instanceof \DateTimeInterface) {
|
||||
throw new TransformationFailedException('Expected a \DateTimeInterface.');
|
||||
}
|
||||
|
||||
if ($this->inputTimezone !== $this->outputTimezone) {
|
||||
$dateTime = \DateTimeImmutable::createFromInterface($dateTime);
|
||||
$dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone));
|
||||
}
|
||||
|
||||
$result = array_intersect_key([
|
||||
'year' => $dateTime->format('Y'),
|
||||
'month' => $dateTime->format('m'),
|
||||
'day' => $dateTime->format('d'),
|
||||
'hour' => $dateTime->format('H'),
|
||||
'minute' => $dateTime->format('i'),
|
||||
'second' => $dateTime->format('s'),
|
||||
], array_flip($this->fields));
|
||||
|
||||
if (!$this->pad) {
|
||||
foreach ($result as &$entry) {
|
||||
// remove leading zeros
|
||||
$entry = (string) (int) $entry;
|
||||
}
|
||||
// unset reference to keep scope clear
|
||||
unset($entry);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a localized date into a normalized date.
|
||||
*
|
||||
* @param array $value Localized date
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not an array,
|
||||
* if the value could not be transformed
|
||||
*/
|
||||
public function reverseTransform(mixed $value): ?\DateTime
|
||||
{
|
||||
if (null === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!\is_array($value)) {
|
||||
throw new TransformationFailedException('Expected an array.');
|
||||
}
|
||||
|
||||
if ('' === implode('', $value)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$emptyFields = [];
|
||||
|
||||
foreach ($this->fields as $field) {
|
||||
if (!isset($value[$field])) {
|
||||
$emptyFields[] = $field;
|
||||
}
|
||||
}
|
||||
|
||||
if (\count($emptyFields) > 0) {
|
||||
throw new TransformationFailedException(\sprintf('The fields "%s" should not be empty.', implode('", "', $emptyFields)));
|
||||
}
|
||||
|
||||
if (isset($value['month']) && !ctype_digit((string) $value['month'])) {
|
||||
throw new TransformationFailedException('This month is invalid.');
|
||||
}
|
||||
|
||||
if (isset($value['day']) && !ctype_digit((string) $value['day'])) {
|
||||
throw new TransformationFailedException('This day is invalid.');
|
||||
}
|
||||
|
||||
if (isset($value['year']) && !ctype_digit((string) $value['year'])) {
|
||||
throw new TransformationFailedException('This year is invalid.');
|
||||
}
|
||||
|
||||
if (!empty($value['month']) && !empty($value['day']) && !empty($value['year']) && false === checkdate($value['month'], $value['day'], $value['year'])) {
|
||||
throw new TransformationFailedException('This is an invalid date.');
|
||||
}
|
||||
|
||||
if (isset($value['hour']) && !ctype_digit((string) $value['hour'])) {
|
||||
throw new TransformationFailedException('This hour is invalid.');
|
||||
}
|
||||
|
||||
if (isset($value['minute']) && !ctype_digit((string) $value['minute'])) {
|
||||
throw new TransformationFailedException('This minute is invalid.');
|
||||
}
|
||||
|
||||
if (isset($value['second']) && !ctype_digit((string) $value['second'])) {
|
||||
throw new TransformationFailedException('This second is invalid.');
|
||||
}
|
||||
|
||||
try {
|
||||
$dateTime = new \DateTime(\sprintf(
|
||||
'%s-%s-%s %s:%s:%s',
|
||||
empty($value['year']) ? $this->referenceDate->format('Y') : $value['year'],
|
||||
empty($value['month']) ? $this->referenceDate->format('m') : $value['month'],
|
||||
empty($value['day']) ? $this->referenceDate->format('d') : $value['day'],
|
||||
$value['hour'] ?? $this->referenceDate->format('H'),
|
||||
$value['minute'] ?? $this->referenceDate->format('i'),
|
||||
$value['second'] ?? $this->referenceDate->format('s')
|
||||
),
|
||||
new \DateTimeZone($this->outputTimezone)
|
||||
);
|
||||
|
||||
if ($this->inputTimezone !== $this->outputTimezone) {
|
||||
$dateTime->setTimezone(new \DateTimeZone($this->inputTimezone));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
return $dateTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* @author Franz Wilding <franz.wilding@me.com>
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Fred Cox <mcfedr@gmail.com>
|
||||
*
|
||||
* @extends BaseDateTimeTransformer<string>
|
||||
*/
|
||||
class DateTimeToHtml5LocalDateTimeTransformer extends BaseDateTimeTransformer
|
||||
{
|
||||
public const HTML5_FORMAT = 'Y-m-d\\TH:i:s';
|
||||
public const HTML5_FORMAT_NO_SECONDS = 'Y-m-d\\TH:i';
|
||||
|
||||
public function __construct(?string $inputTimezone = null, ?string $outputTimezone = null, private bool $withSeconds = false)
|
||||
{
|
||||
parent::__construct($inputTimezone, $outputTimezone);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a \DateTime into a local date and time string.
|
||||
*
|
||||
* According to the HTML standard, the input string of a datetime-local
|
||||
* input is an RFC3339 date followed by 'T', followed by an RFC3339 time.
|
||||
* https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-local-date-and-time-string
|
||||
*
|
||||
* @param \DateTimeInterface $dateTime
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not an
|
||||
* instance of \DateTime or \DateTimeInterface
|
||||
*/
|
||||
public function transform(mixed $dateTime): string
|
||||
{
|
||||
if (null === $dateTime) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!$dateTime instanceof \DateTimeInterface) {
|
||||
throw new TransformationFailedException('Expected a \DateTimeInterface.');
|
||||
}
|
||||
|
||||
if ($this->inputTimezone !== $this->outputTimezone) {
|
||||
$dateTime = \DateTimeImmutable::createFromInterface($dateTime);
|
||||
$dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone));
|
||||
}
|
||||
|
||||
return $dateTime->format($this->withSeconds ? self::HTML5_FORMAT : self::HTML5_FORMAT_NO_SECONDS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a local date and time string into a \DateTime.
|
||||
*
|
||||
* When transforming back to DateTime the regex is slightly laxer, taking into
|
||||
* account rules for parsing a local date and time string
|
||||
* https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#parse-a-local-date-and-time-string
|
||||
*
|
||||
* @param string $dateTimeLocal Formatted string
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not a string,
|
||||
* if the value could not be transformed
|
||||
*/
|
||||
public function reverseTransform(mixed $dateTimeLocal): ?\DateTime
|
||||
{
|
||||
if (!\is_string($dateTimeLocal)) {
|
||||
throw new TransformationFailedException('Expected a string.');
|
||||
}
|
||||
|
||||
if ('' === $dateTimeLocal) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// to maintain backwards compatibility we do not strictly validate the submitted date
|
||||
// see https://github.com/symfony/symfony/issues/28699
|
||||
if (!preg_match('/^(\d{4})-(\d{2})-(\d{2})[T ]\d{2}:\d{2}(?::\d{2})?/', $dateTimeLocal, $matches)) {
|
||||
throw new TransformationFailedException(\sprintf('The date "%s" is not a valid date.', $dateTimeLocal));
|
||||
}
|
||||
|
||||
try {
|
||||
$dateTime = new \DateTime($dateTimeLocal, new \DateTimeZone($this->outputTimezone));
|
||||
} catch (\Exception $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
if ($this->inputTimezone !== $dateTime->getTimezone()->getName()) {
|
||||
$dateTime->setTimezone(new \DateTimeZone($this->inputTimezone));
|
||||
}
|
||||
|
||||
if (!checkdate($matches[2], $matches[3], $matches[1])) {
|
||||
throw new TransformationFailedException(\sprintf('The date "%s-%s-%s" is not a valid date.', $matches[1], $matches[2], $matches[3]));
|
||||
}
|
||||
|
||||
return $dateTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
|
||||
/**
|
||||
* Transforms between a normalized time and a localized time string.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
|
||||
*
|
||||
* @extends BaseDateTimeTransformer<string>
|
||||
*/
|
||||
class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
|
||||
{
|
||||
private int $dateFormat;
|
||||
private int $timeFormat;
|
||||
private ?string $pattern;
|
||||
private int $calendar;
|
||||
|
||||
/**
|
||||
* @see BaseDateTimeTransformer::formats for available format options
|
||||
*
|
||||
* @param string|null $inputTimezone The name of the input timezone
|
||||
* @param string|null $outputTimezone The name of the output timezone
|
||||
* @param int|null $dateFormat The date format
|
||||
* @param int|null $timeFormat The time format
|
||||
* @param int $calendar One of the \IntlDateFormatter calendar constants
|
||||
* @param string|null $pattern A pattern to pass to \IntlDateFormatter
|
||||
*
|
||||
* @throws UnexpectedTypeException If a format is not supported or if a timezone is not a string
|
||||
*/
|
||||
public function __construct(?string $inputTimezone = null, ?string $outputTimezone = null, ?int $dateFormat = null, ?int $timeFormat = null, int $calendar = \IntlDateFormatter::GREGORIAN, ?string $pattern = null)
|
||||
{
|
||||
parent::__construct($inputTimezone, $outputTimezone);
|
||||
|
||||
$dateFormat ??= \IntlDateFormatter::MEDIUM;
|
||||
$timeFormat ??= \IntlDateFormatter::SHORT;
|
||||
|
||||
if (!\in_array($dateFormat, self::$formats, true)) {
|
||||
throw new UnexpectedTypeException($dateFormat, implode('", "', self::$formats));
|
||||
}
|
||||
|
||||
if (!\in_array($timeFormat, self::$formats, true)) {
|
||||
throw new UnexpectedTypeException($timeFormat, implode('", "', self::$formats));
|
||||
}
|
||||
|
||||
$this->dateFormat = $dateFormat;
|
||||
$this->timeFormat = $timeFormat;
|
||||
$this->calendar = $calendar;
|
||||
$this->pattern = $pattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a normalized date into a localized date string/array.
|
||||
*
|
||||
* @param \DateTimeInterface $dateTime A DateTimeInterface object
|
||||
*
|
||||
* @throws TransformationFailedException if the given value is not a \DateTimeInterface
|
||||
* or if the date could not be transformed
|
||||
*/
|
||||
public function transform(mixed $dateTime): string
|
||||
{
|
||||
if (null === $dateTime) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!$dateTime instanceof \DateTimeInterface) {
|
||||
throw new TransformationFailedException('Expected a \DateTimeInterface.');
|
||||
}
|
||||
|
||||
$value = $this->getIntlDateFormatter()->format($dateTime->getTimestamp());
|
||||
|
||||
if (0 != intl_get_error_code()) {
|
||||
throw new TransformationFailedException(intl_get_error_message());
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a localized date string/array into a normalized date.
|
||||
*
|
||||
* @param string $value Localized date string
|
||||
*
|
||||
* @throws TransformationFailedException if the given value is not a string,
|
||||
* if the date could not be parsed
|
||||
*/
|
||||
public function reverseTransform(mixed $value): ?\DateTime
|
||||
{
|
||||
if (!\is_string($value)) {
|
||||
throw new TransformationFailedException('Expected a string.');
|
||||
}
|
||||
|
||||
if ('' === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// date-only patterns require parsing to be done in UTC, as midnight might not exist in the local timezone due
|
||||
// to DST changes
|
||||
$dateOnly = $this->isPatternDateOnly();
|
||||
$dateFormatter = $this->getIntlDateFormatter($dateOnly);
|
||||
|
||||
try {
|
||||
$timestamp = @$dateFormatter->parse($value);
|
||||
} catch (\IntlException $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
if (0 != intl_get_error_code()) {
|
||||
throw new TransformationFailedException(intl_get_error_message(), intl_get_error_code());
|
||||
} elseif ($timestamp > 253402214400) {
|
||||
// This timestamp represents UTC midnight of 9999-12-31 to prevent 5+ digit years
|
||||
throw new TransformationFailedException('Years beyond 9999 are not supported.');
|
||||
} elseif (false === $timestamp) {
|
||||
// the value couldn't be parsed but the Intl extension didn't report an error code, this
|
||||
// could be the case when the Intl polyfill is used which always returns 0 as the error code
|
||||
throw new TransformationFailedException(\sprintf('"%s" could not be parsed as a date.', $value));
|
||||
}
|
||||
|
||||
try {
|
||||
if ($dateOnly) {
|
||||
// we only care about year-month-date, which has been delivered as a timestamp pointing to UTC midnight
|
||||
$dateTime = new \DateTime(gmdate('Y-m-d', $timestamp), new \DateTimeZone($this->outputTimezone));
|
||||
} else {
|
||||
// read timestamp into DateTime object - the formatter delivers a timestamp
|
||||
$dateTime = new \DateTime(\sprintf('@%s', $timestamp));
|
||||
}
|
||||
// set timezone separately, as it would be ignored if set via the constructor,
|
||||
// see https://php.net/datetime.construct
|
||||
$dateTime->setTimezone(new \DateTimeZone($this->outputTimezone));
|
||||
} catch (\Exception $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
if ($this->outputTimezone !== $this->inputTimezone) {
|
||||
$dateTime->setTimezone(new \DateTimeZone($this->inputTimezone));
|
||||
}
|
||||
|
||||
return $dateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a preconfigured IntlDateFormatter instance.
|
||||
*
|
||||
* @param bool $ignoreTimezone Use UTC regardless of the configured timezone
|
||||
*
|
||||
* @throws TransformationFailedException in case the date formatter cannot be constructed
|
||||
*/
|
||||
protected function getIntlDateFormatter(bool $ignoreTimezone = false): \IntlDateFormatter
|
||||
{
|
||||
$dateFormat = $this->dateFormat;
|
||||
$timeFormat = $this->timeFormat;
|
||||
$timezone = new \DateTimeZone($ignoreTimezone ? 'UTC' : $this->outputTimezone);
|
||||
|
||||
$calendar = $this->calendar;
|
||||
$pattern = $this->pattern;
|
||||
|
||||
$intlDateFormatter = new \IntlDateFormatter(\Locale::getDefault(), $dateFormat, $timeFormat, $timezone, $calendar, $pattern ?? '');
|
||||
|
||||
// new \intlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/66323
|
||||
if (!$intlDateFormatter) {
|
||||
throw new TransformationFailedException(intl_get_error_message(), intl_get_error_code());
|
||||
}
|
||||
|
||||
$intlDateFormatter->setLenient(false);
|
||||
|
||||
return $intlDateFormatter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the pattern contains only a date.
|
||||
*/
|
||||
protected function isPatternDateOnly(): bool
|
||||
{
|
||||
if (null === $this->pattern) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// strip escaped text
|
||||
$pattern = preg_replace("#'(.*?)'#", '', $this->pattern);
|
||||
|
||||
// check for the absence of time-related placeholders
|
||||
return 0 === preg_match('#[ahHkKmsSAzZOvVxX]#', $pattern);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @extends BaseDateTimeTransformer<string>
|
||||
*/
|
||||
class DateTimeToRfc3339Transformer extends BaseDateTimeTransformer
|
||||
{
|
||||
/**
|
||||
* Transforms a normalized date into a localized date.
|
||||
*
|
||||
* @param \DateTimeInterface $dateTime A DateTimeInterface object
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not a \DateTimeInterface
|
||||
*/
|
||||
public function transform(mixed $dateTime): string
|
||||
{
|
||||
if (null === $dateTime) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!$dateTime instanceof \DateTimeInterface) {
|
||||
throw new TransformationFailedException('Expected a \DateTimeInterface.');
|
||||
}
|
||||
|
||||
if ($this->inputTimezone !== $this->outputTimezone) {
|
||||
$dateTime = \DateTimeImmutable::createFromInterface($dateTime);
|
||||
$dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone));
|
||||
}
|
||||
|
||||
return preg_replace('/\+00:00$/', 'Z', $dateTime->format('c'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a formatted string following RFC 3339 into a normalized date.
|
||||
*
|
||||
* @param string $rfc3339 Formatted string
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not a string,
|
||||
* if the value could not be transformed
|
||||
*/
|
||||
public function reverseTransform(mixed $rfc3339): ?\DateTime
|
||||
{
|
||||
if (!\is_string($rfc3339)) {
|
||||
throw new TransformationFailedException('Expected a string.');
|
||||
}
|
||||
|
||||
if ('' === $rfc3339) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!preg_match('/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))$/', $rfc3339, $matches)) {
|
||||
throw new TransformationFailedException(\sprintf('The date "%s" is not a valid date.', $rfc3339));
|
||||
}
|
||||
|
||||
try {
|
||||
$dateTime = new \DateTime($rfc3339);
|
||||
} catch (\Exception $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
if ($this->inputTimezone !== $dateTime->getTimezone()->getName()) {
|
||||
$dateTime->setTimezone(new \DateTimeZone($this->inputTimezone));
|
||||
}
|
||||
|
||||
if (!checkdate($matches[2], $matches[3], $matches[1])) {
|
||||
throw new TransformationFailedException(\sprintf('The date "%s-%s-%s" is not a valid date.', $matches[1], $matches[2], $matches[3]));
|
||||
}
|
||||
|
||||
return $dateTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms between a date string and a DateTime object.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
|
||||
*
|
||||
* @extends BaseDateTimeTransformer<string>
|
||||
*/
|
||||
class DateTimeToStringTransformer extends BaseDateTimeTransformer
|
||||
{
|
||||
/**
|
||||
* Format used for generating strings.
|
||||
*/
|
||||
private string $generateFormat;
|
||||
|
||||
/**
|
||||
* Format used for parsing strings.
|
||||
*
|
||||
* Different than the {@link $generateFormat} because formats for parsing
|
||||
* support additional characters in PHP that are not supported for
|
||||
* generating strings.
|
||||
*/
|
||||
private string $parseFormat;
|
||||
|
||||
/**
|
||||
* Transforms a \DateTime instance to a string.
|
||||
*
|
||||
* @see \DateTime::format() for supported formats
|
||||
*
|
||||
* @param string|null $inputTimezone The name of the input timezone
|
||||
* @param string|null $outputTimezone The name of the output timezone
|
||||
* @param string $format The date format
|
||||
* @param string|null $parseFormat The parse format when different from $format
|
||||
*/
|
||||
public function __construct(?string $inputTimezone = null, ?string $outputTimezone = null, string $format = 'Y-m-d H:i:s', ?string $parseFormat = null)
|
||||
{
|
||||
parent::__construct($inputTimezone, $outputTimezone);
|
||||
|
||||
$this->generateFormat = $format;
|
||||
$this->parseFormat = $parseFormat ?? $format;
|
||||
|
||||
// See https://php.net/datetime.createfromformat
|
||||
// The character "|" in the format makes sure that the parts of a date
|
||||
// that are *not* specified in the format are reset to the corresponding
|
||||
// values from 1970-01-01 00:00:00 instead of the current time.
|
||||
// Without "|" and "Y-m-d", "2010-02-03" becomes "2010-02-03 12:32:47",
|
||||
// where the time corresponds to the current server time.
|
||||
// With "|" and "Y-m-d", "2010-02-03" becomes "2010-02-03 00:00:00",
|
||||
// which is at least deterministic and thus used here.
|
||||
if (!str_contains($this->parseFormat, '|')) {
|
||||
$this->parseFormat .= '|';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a DateTime object into a date string with the configured format
|
||||
* and timezone.
|
||||
*
|
||||
* @param \DateTimeInterface $dateTime A DateTimeInterface object
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not a \DateTimeInterface
|
||||
*/
|
||||
public function transform(mixed $dateTime): string
|
||||
{
|
||||
if (null === $dateTime) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!$dateTime instanceof \DateTimeInterface) {
|
||||
throw new TransformationFailedException('Expected a \DateTimeInterface.');
|
||||
}
|
||||
|
||||
$dateTime = \DateTimeImmutable::createFromInterface($dateTime);
|
||||
$dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone));
|
||||
|
||||
return $dateTime->format($this->generateFormat);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a date string in the configured timezone into a DateTime object.
|
||||
*
|
||||
* @param string $value A value as produced by PHP's date() function
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not a string,
|
||||
* or could not be transformed
|
||||
*/
|
||||
public function reverseTransform(mixed $value): ?\DateTime
|
||||
{
|
||||
if (empty($value)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!\is_string($value)) {
|
||||
throw new TransformationFailedException('Expected a string.');
|
||||
}
|
||||
|
||||
if (str_contains($value, "\0")) {
|
||||
throw new TransformationFailedException('Null bytes not allowed');
|
||||
}
|
||||
|
||||
$outputTz = new \DateTimeZone($this->outputTimezone);
|
||||
$dateTime = \DateTime::createFromFormat($this->parseFormat, $value, $outputTz);
|
||||
|
||||
$lastErrors = \DateTime::getLastErrors() ?: ['error_count' => 0, 'warning_count' => 0];
|
||||
|
||||
if (0 < $lastErrors['warning_count'] || 0 < $lastErrors['error_count']) {
|
||||
throw new TransformationFailedException(implode(', ', array_merge(array_values($lastErrors['warnings']), array_values($lastErrors['errors']))));
|
||||
}
|
||||
|
||||
try {
|
||||
if ($this->inputTimezone !== $this->outputTimezone) {
|
||||
$dateTime->setTimezone(new \DateTimeZone($this->inputTimezone));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
return $dateTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms between a timestamp and a DateTime object.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
|
||||
*
|
||||
* @extends BaseDateTimeTransformer<int|numeric-string>
|
||||
*/
|
||||
class DateTimeToTimestampTransformer extends BaseDateTimeTransformer
|
||||
{
|
||||
/**
|
||||
* Transforms a DateTime object into a timestamp in the configured timezone.
|
||||
*
|
||||
* @param \DateTimeInterface $dateTime A DateTimeInterface object
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not a \DateTimeInterface
|
||||
*/
|
||||
public function transform(mixed $dateTime): ?int
|
||||
{
|
||||
if (null === $dateTime) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!$dateTime instanceof \DateTimeInterface) {
|
||||
throw new TransformationFailedException('Expected a \DateTimeInterface.');
|
||||
}
|
||||
|
||||
return $dateTime->getTimestamp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a timestamp in the configured timezone into a DateTime object.
|
||||
*
|
||||
* @param string $value A timestamp
|
||||
*
|
||||
* @throws TransformationFailedException If the given value is not a timestamp
|
||||
* or if the given timestamp is invalid
|
||||
*/
|
||||
public function reverseTransform(mixed $value): ?\DateTime
|
||||
{
|
||||
if (null === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!is_numeric($value)) {
|
||||
throw new TransformationFailedException('Expected a numeric.');
|
||||
}
|
||||
|
||||
try {
|
||||
$dateTime = new \DateTime();
|
||||
$dateTime->setTimezone(new \DateTimeZone($this->outputTimezone));
|
||||
$dateTime->setTimestamp($value);
|
||||
|
||||
if ($this->inputTimezone !== $this->outputTimezone) {
|
||||
$dateTime->setTimezone(new \DateTimeZone($this->inputTimezone));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
return $dateTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms between a timezone identifier string and a DateTimeZone object.
|
||||
*
|
||||
* @author Roland Franssen <franssen.roland@gmail.com>
|
||||
*
|
||||
* @implements DataTransformerInterface<\DateTimeZone|array<\DateTimeZone>, string|array<string>>
|
||||
*/
|
||||
class DateTimeZoneToStringTransformer implements DataTransformerInterface
|
||||
{
|
||||
private bool $multiple;
|
||||
|
||||
public function __construct(bool $multiple = false)
|
||||
{
|
||||
$this->multiple = $multiple;
|
||||
}
|
||||
|
||||
public function transform(mixed $dateTimeZone): mixed
|
||||
{
|
||||
if (null === $dateTimeZone) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($this->multiple) {
|
||||
if (!\is_array($dateTimeZone)) {
|
||||
throw new TransformationFailedException('Expected an array of \DateTimeZone objects.');
|
||||
}
|
||||
|
||||
return array_map([new self(), 'transform'], $dateTimeZone);
|
||||
}
|
||||
|
||||
if (!$dateTimeZone instanceof \DateTimeZone) {
|
||||
throw new TransformationFailedException('Expected a \DateTimeZone object.');
|
||||
}
|
||||
|
||||
return $dateTimeZone->getName();
|
||||
}
|
||||
|
||||
public function reverseTransform(mixed $value): mixed
|
||||
{
|
||||
if (null === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($this->multiple) {
|
||||
if (!\is_array($value)) {
|
||||
throw new TransformationFailedException('Expected an array of timezone identifier strings.');
|
||||
}
|
||||
|
||||
return array_map([new self(), 'reverseTransform'], $value);
|
||||
}
|
||||
|
||||
if (!\is_string($value)) {
|
||||
throw new TransformationFailedException('Expected a timezone identifier string.');
|
||||
}
|
||||
|
||||
try {
|
||||
return new \DateTimeZone($value);
|
||||
} catch (\Exception $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms between an integer and a localized number with grouping
|
||||
* (each thousand) and comma separators.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class IntegerToLocalizedStringTransformer extends NumberToLocalizedStringTransformer
|
||||
{
|
||||
/**
|
||||
* Constructs a transformer.
|
||||
*
|
||||
* @param bool $grouping Whether thousands should be grouped
|
||||
* @param int|null $roundingMode One of the ROUND_ constants in this class
|
||||
* @param string|null $locale locale used for transforming
|
||||
*/
|
||||
public function __construct(?bool $grouping = false, ?int $roundingMode = \NumberFormatter::ROUND_DOWN, ?string $locale = null)
|
||||
{
|
||||
parent::__construct(0, $grouping, $roundingMode, $locale);
|
||||
}
|
||||
|
||||
public function reverseTransform(mixed $value): int|float|null
|
||||
{
|
||||
$decimalSeparator = $this->getNumberFormatter()->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL);
|
||||
|
||||
if (\is_string($value) && str_contains($value, $decimalSeparator)) {
|
||||
throw new TransformationFailedException(\sprintf('The value "%s" is not a valid integer.', $value));
|
||||
}
|
||||
|
||||
$result = parent::reverseTransform($value);
|
||||
|
||||
return null !== $result ? (int) $result : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected function castParsedValue(int|float $value): int|float
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms between a timezone identifier string and a IntlTimeZone object.
|
||||
*
|
||||
* @author Roland Franssen <franssen.roland@gmail.com>
|
||||
*
|
||||
* @implements DataTransformerInterface<\IntlTimeZone|array<\IntlTimeZone>, string|array<string>>
|
||||
*/
|
||||
class IntlTimeZoneToStringTransformer implements DataTransformerInterface
|
||||
{
|
||||
private bool $multiple;
|
||||
|
||||
public function __construct(bool $multiple = false)
|
||||
{
|
||||
$this->multiple = $multiple;
|
||||
}
|
||||
|
||||
public function transform(mixed $intlTimeZone): mixed
|
||||
{
|
||||
if (null === $intlTimeZone) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($this->multiple) {
|
||||
if (!\is_array($intlTimeZone)) {
|
||||
throw new TransformationFailedException('Expected an array of \IntlTimeZone objects.');
|
||||
}
|
||||
|
||||
return array_map([new self(), 'transform'], $intlTimeZone);
|
||||
}
|
||||
|
||||
if (!$intlTimeZone instanceof \IntlTimeZone) {
|
||||
throw new TransformationFailedException('Expected a \IntlTimeZone object.');
|
||||
}
|
||||
|
||||
return $intlTimeZone->getID();
|
||||
}
|
||||
|
||||
public function reverseTransform(mixed $value): mixed
|
||||
{
|
||||
if (null === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($this->multiple) {
|
||||
if (!\is_array($value)) {
|
||||
throw new TransformationFailedException('Expected an array of timezone identifier strings.');
|
||||
}
|
||||
|
||||
return array_map([new self(), 'reverseTransform'], $value);
|
||||
}
|
||||
|
||||
if (!\is_string($value)) {
|
||||
throw new TransformationFailedException('Expected a timezone identifier string.');
|
||||
}
|
||||
|
||||
$intlTimeZone = \IntlTimeZone::createTimeZone($value);
|
||||
|
||||
if ('Etc/Unknown' === $intlTimeZone->getID()) {
|
||||
throw new TransformationFailedException(\sprintf('Unknown timezone identifier "%s".', $value));
|
||||
}
|
||||
|
||||
return $intlTimeZone;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms between a normalized format and a localized money string.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
|
||||
*/
|
||||
class MoneyToLocalizedStringTransformer extends NumberToLocalizedStringTransformer
|
||||
{
|
||||
private int $divisor;
|
||||
|
||||
public function __construct(?int $scale = 2, ?bool $grouping = true, ?int $roundingMode = \NumberFormatter::ROUND_HALFUP, ?int $divisor = 1, ?string $locale = null)
|
||||
{
|
||||
parent::__construct($scale ?? 2, $grouping ?? true, $roundingMode, $locale);
|
||||
|
||||
$this->divisor = $divisor ?? 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a normalized format into a localized money string.
|
||||
*
|
||||
* @param int|float|string|null $value Normalized number
|
||||
*
|
||||
* @throws TransformationFailedException if the given value is not numeric or
|
||||
* if the value cannot be transformed
|
||||
*/
|
||||
public function transform(mixed $value): string
|
||||
{
|
||||
if (null !== $value && '' !== $value && 1 !== $this->divisor) {
|
||||
if (!is_numeric($value)) {
|
||||
throw new TransformationFailedException('Expected a numeric.');
|
||||
}
|
||||
$value /= $this->divisor;
|
||||
}
|
||||
|
||||
return parent::transform($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a localized money string into a normalized format.
|
||||
*
|
||||
* @param string $value Localized money string
|
||||
*
|
||||
* @throws TransformationFailedException if the given value is not a string
|
||||
* or if the value cannot be transformed
|
||||
*/
|
||||
public function reverseTransform(mixed $value): int|float|null
|
||||
{
|
||||
$value = parent::reverseTransform($value);
|
||||
if (null !== $value && 1 !== $this->divisor) {
|
||||
$value = (float) (string) ($value * $this->divisor);
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms between a number type and a localized number with grouping
|
||||
* (each thousand) and comma separators.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
|
||||
*
|
||||
* @implements DataTransformerInterface<int|float, string>
|
||||
*/
|
||||
class NumberToLocalizedStringTransformer implements DataTransformerInterface
|
||||
{
|
||||
protected $grouping;
|
||||
|
||||
protected $roundingMode;
|
||||
|
||||
private ?int $scale;
|
||||
private ?string $locale;
|
||||
|
||||
public function __construct(?int $scale = null, ?bool $grouping = false, ?int $roundingMode = \NumberFormatter::ROUND_HALFUP, ?string $locale = null)
|
||||
{
|
||||
$this->scale = $scale;
|
||||
$this->grouping = $grouping ?? false;
|
||||
$this->roundingMode = $roundingMode ?? \NumberFormatter::ROUND_HALFUP;
|
||||
$this->locale = $locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a number type into localized number.
|
||||
*
|
||||
* @param int|float|string|null $value Number value
|
||||
*
|
||||
* @throws TransformationFailedException if the given value is not numeric
|
||||
* or if the value cannot be transformed
|
||||
*/
|
||||
public function transform(mixed $value): string
|
||||
{
|
||||
if (null === $value || '' === $value) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!is_numeric($value)) {
|
||||
throw new TransformationFailedException('Expected a numeric.');
|
||||
}
|
||||
|
||||
$formatter = $this->getNumberFormatter();
|
||||
$value = $formatter->format($value);
|
||||
|
||||
if (intl_is_failure($formatter->getErrorCode())) {
|
||||
throw new TransformationFailedException($formatter->getErrorMessage());
|
||||
}
|
||||
|
||||
// Convert non-breaking and narrow non-breaking spaces to normal ones
|
||||
$value = str_replace(["\xc2\xa0", "\xe2\x80\xaf"], ' ', $value);
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a localized number into an integer or float.
|
||||
*
|
||||
* @param string $value The localized value
|
||||
*
|
||||
* @throws TransformationFailedException if the given value is not a string
|
||||
* or if the value cannot be transformed
|
||||
*/
|
||||
public function reverseTransform(mixed $value): int|float|null
|
||||
{
|
||||
if (null !== $value && !\is_string($value)) {
|
||||
throw new TransformationFailedException('Expected a string.');
|
||||
}
|
||||
|
||||
if (null === $value || '' === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (\in_array($value, ['NaN', 'NAN', 'nan'], true)) {
|
||||
throw new TransformationFailedException('"NaN" is not a valid number.');
|
||||
}
|
||||
|
||||
$position = 0;
|
||||
$formatter = $this->getNumberFormatter();
|
||||
$groupSep = $formatter->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL);
|
||||
$decSep = $formatter->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL);
|
||||
|
||||
if ('.' !== $decSep && (!$this->grouping || '.' !== $groupSep)) {
|
||||
$value = str_replace('.', $decSep, $value);
|
||||
}
|
||||
|
||||
if (',' !== $decSep && (!$this->grouping || ',' !== $groupSep)) {
|
||||
$value = str_replace(',', $decSep, $value);
|
||||
}
|
||||
|
||||
// If the value is in exponential notation with a negative exponent, we end up with a float value too
|
||||
if (str_contains($value, $decSep) || false !== stripos($value, 'e-')) {
|
||||
$type = \NumberFormatter::TYPE_DOUBLE;
|
||||
} else {
|
||||
$type = \PHP_INT_SIZE === 8
|
||||
? \NumberFormatter::TYPE_INT64
|
||||
: \NumberFormatter::TYPE_INT32;
|
||||
}
|
||||
|
||||
try {
|
||||
$result = @$formatter->parse($value, $type, $position);
|
||||
} catch (\IntlException $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
if (intl_is_failure($formatter->getErrorCode())) {
|
||||
throw new TransformationFailedException($formatter->getErrorMessage(), $formatter->getErrorCode());
|
||||
}
|
||||
|
||||
if ($result >= \PHP_INT_MAX || $result <= -\PHP_INT_MAX) {
|
||||
throw new TransformationFailedException('I don\'t have a clear idea what infinity looks like.');
|
||||
}
|
||||
|
||||
$result = $this->castParsedValue($result);
|
||||
|
||||
if (false !== $encoding = mb_detect_encoding($value, null, true)) {
|
||||
$length = mb_strlen($value, $encoding);
|
||||
$remainder = mb_substr($value, $position, $length, $encoding);
|
||||
} else {
|
||||
$length = \strlen($value);
|
||||
$remainder = substr($value, $position, $length);
|
||||
}
|
||||
|
||||
// After parsing, position holds the index of the character where the
|
||||
// parsing stopped
|
||||
if ($position < $length) {
|
||||
// Check if there are unrecognized characters at the end of the
|
||||
// number (excluding whitespace characters)
|
||||
$remainder = trim($remainder, " \t\n\r\0\x0b\xc2\xa0");
|
||||
|
||||
if ('' !== $remainder) {
|
||||
throw new TransformationFailedException(\sprintf('The number contains unrecognized characters: "%s".', $remainder));
|
||||
}
|
||||
}
|
||||
|
||||
// NumberFormatter::parse() does not round
|
||||
return $this->round($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a preconfigured \NumberFormatter instance.
|
||||
*/
|
||||
protected function getNumberFormatter(): \NumberFormatter
|
||||
{
|
||||
$formatter = new \NumberFormatter($this->locale ?? \Locale::getDefault(), \NumberFormatter::DECIMAL);
|
||||
|
||||
if (null !== $this->scale) {
|
||||
$formatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $this->scale);
|
||||
$formatter->setAttribute(\NumberFormatter::ROUNDING_MODE, $this->roundingMode);
|
||||
}
|
||||
|
||||
$formatter->setAttribute(\NumberFormatter::GROUPING_USED, $this->grouping);
|
||||
|
||||
return $formatter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected function castParsedValue(int|float $value): int|float
|
||||
{
|
||||
if (\is_int($value) && $value === (int) $float = (float) $value) {
|
||||
return $float;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rounds a number according to the configured scale and rounding mode.
|
||||
*/
|
||||
private function round(int|float $number): int|float
|
||||
{
|
||||
if (\is_int($number)) {
|
||||
return $number;
|
||||
}
|
||||
|
||||
if (null !== $this->scale && null !== $this->roundingMode) {
|
||||
// shift number to maintain the correct scale during rounding
|
||||
$roundingCoef = 10 ** $this->scale;
|
||||
// string representation to avoid rounding errors, similar to bcmul()
|
||||
$number = (string) ($number * $roundingCoef);
|
||||
|
||||
switch ($this->roundingMode) {
|
||||
case \NumberFormatter::ROUND_CEILING:
|
||||
$number = ceil($number);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_FLOOR:
|
||||
$number = floor($number);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_UP:
|
||||
$number = $number > 0 ? ceil($number) : floor($number);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_DOWN:
|
||||
$number = $number > 0 ? floor($number) : ceil($number);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_HALFEVEN:
|
||||
$number = round($number, 0, \PHP_ROUND_HALF_EVEN);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_HALFUP:
|
||||
$number = round($number, 0, \PHP_ROUND_HALF_UP);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_HALFDOWN:
|
||||
$number = round($number, 0, \PHP_ROUND_HALF_DOWN);
|
||||
break;
|
||||
}
|
||||
|
||||
$number = 1 === $roundingCoef ? (int) $number : $number / $roundingCoef;
|
||||
}
|
||||
|
||||
return $number;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
|
||||
/**
|
||||
* Transforms between a normalized format (integer or float) and a percentage value.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
|
||||
*
|
||||
* @implements DataTransformerInterface<int|float, string>
|
||||
*/
|
||||
class PercentToLocalizedStringTransformer implements DataTransformerInterface
|
||||
{
|
||||
public const FRACTIONAL = 'fractional';
|
||||
public const INTEGER = 'integer';
|
||||
|
||||
protected static $types = [
|
||||
self::FRACTIONAL,
|
||||
self::INTEGER,
|
||||
];
|
||||
|
||||
private int $roundingMode;
|
||||
private string $type;
|
||||
private int $scale;
|
||||
private bool $html5Format;
|
||||
|
||||
/**
|
||||
* @see self::$types for a list of supported types
|
||||
*
|
||||
* @param int $roundingMode A value from \NumberFormatter, such as \NumberFormatter::ROUND_HALFUP
|
||||
* @param bool $html5Format Use an HTML5 specific format, see https://www.w3.org/TR/html51/sec-forms.html#date-time-and-number-formats
|
||||
*
|
||||
* @throws UnexpectedTypeException if the given value of type is unknown
|
||||
*/
|
||||
public function __construct(?int $scale = null, ?string $type = null, int $roundingMode = \NumberFormatter::ROUND_HALFUP, bool $html5Format = false)
|
||||
{
|
||||
$type ??= self::FRACTIONAL;
|
||||
|
||||
if (!\in_array($type, self::$types, true)) {
|
||||
throw new UnexpectedTypeException($type, implode('", "', self::$types));
|
||||
}
|
||||
|
||||
$this->type = $type;
|
||||
$this->scale = $scale ?? 0;
|
||||
$this->roundingMode = $roundingMode;
|
||||
$this->html5Format = $html5Format;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms between a normalized format (integer or float) into a percentage value.
|
||||
*
|
||||
* @param int|float $value Normalized value
|
||||
*
|
||||
* @throws TransformationFailedException if the given value is not numeric or
|
||||
* if the value could not be transformed
|
||||
*/
|
||||
public function transform(mixed $value): string
|
||||
{
|
||||
if (null === $value) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!is_numeric($value)) {
|
||||
throw new TransformationFailedException('Expected a numeric.');
|
||||
}
|
||||
|
||||
if (self::FRACTIONAL == $this->type) {
|
||||
$value *= 100;
|
||||
}
|
||||
|
||||
$formatter = $this->getNumberFormatter();
|
||||
$value = $formatter->format($value);
|
||||
|
||||
if (intl_is_failure($formatter->getErrorCode())) {
|
||||
throw new TransformationFailedException($formatter->getErrorMessage());
|
||||
}
|
||||
|
||||
// replace the UTF-8 non break spaces
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms between a percentage value into a normalized format (integer or float).
|
||||
*
|
||||
* @param string $value Percentage value
|
||||
*
|
||||
* @throws TransformationFailedException if the given value is not a string or
|
||||
* if the value could not be transformed
|
||||
*/
|
||||
public function reverseTransform(mixed $value): int|float|null
|
||||
{
|
||||
if (!\is_string($value)) {
|
||||
throw new TransformationFailedException('Expected a string.');
|
||||
}
|
||||
|
||||
if ('' === $value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$position = 0;
|
||||
$formatter = $this->getNumberFormatter();
|
||||
$groupSep = $formatter->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL);
|
||||
$decSep = $formatter->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL);
|
||||
$grouping = $formatter->getAttribute(\NumberFormatter::GROUPING_USED);
|
||||
|
||||
if ('.' !== $decSep && (!$grouping || '.' !== $groupSep)) {
|
||||
$value = str_replace('.', $decSep, $value);
|
||||
}
|
||||
|
||||
if (',' !== $decSep && (!$grouping || ',' !== $groupSep)) {
|
||||
$value = str_replace(',', $decSep, $value);
|
||||
}
|
||||
|
||||
if (str_contains($value, $decSep)) {
|
||||
$type = \NumberFormatter::TYPE_DOUBLE;
|
||||
} else {
|
||||
$type = \PHP_INT_SIZE === 8 ? \NumberFormatter::TYPE_INT64 : \NumberFormatter::TYPE_INT32;
|
||||
}
|
||||
|
||||
try {
|
||||
// replace normal spaces so that the formatter can read them
|
||||
$result = @$formatter->parse(str_replace(' ', "\xc2\xa0", $value), $type, $position);
|
||||
} catch (\IntlException $e) {
|
||||
throw new TransformationFailedException($e->getMessage(), 0, $e);
|
||||
}
|
||||
|
||||
if (intl_is_failure($formatter->getErrorCode())) {
|
||||
throw new TransformationFailedException($formatter->getErrorMessage(), $formatter->getErrorCode());
|
||||
}
|
||||
|
||||
if (self::FRACTIONAL == $this->type) {
|
||||
$result /= 100;
|
||||
}
|
||||
|
||||
if (\function_exists('mb_detect_encoding') && false !== $encoding = mb_detect_encoding($value, null, true)) {
|
||||
$length = mb_strlen($value, $encoding);
|
||||
$remainder = mb_substr($value, $position, $length, $encoding);
|
||||
} else {
|
||||
$length = \strlen($value);
|
||||
$remainder = substr($value, $position, $length);
|
||||
}
|
||||
|
||||
// After parsing, position holds the index of the character where the
|
||||
// parsing stopped
|
||||
if ($position < $length) {
|
||||
// Check if there are unrecognized characters at the end of the
|
||||
// number (excluding whitespace characters)
|
||||
$remainder = trim($remainder, " \t\n\r\0\x0b\xc2\xa0");
|
||||
|
||||
if ('' !== $remainder) {
|
||||
throw new TransformationFailedException(\sprintf('The number contains unrecognized characters: "%s".', $remainder));
|
||||
}
|
||||
}
|
||||
|
||||
return $this->round($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a preconfigured \NumberFormatter instance.
|
||||
*/
|
||||
protected function getNumberFormatter(): \NumberFormatter
|
||||
{
|
||||
// Values used in HTML5 number inputs should be formatted as in "1234.5", ie. 'en' format without grouping,
|
||||
// according to https://www.w3.org/TR/html51/sec-forms.html#date-time-and-number-formats
|
||||
$formatter = new \NumberFormatter($this->html5Format ? 'en' : \Locale::getDefault(), \NumberFormatter::DECIMAL);
|
||||
|
||||
if ($this->html5Format) {
|
||||
$formatter->setAttribute(\NumberFormatter::GROUPING_USED, 0);
|
||||
}
|
||||
|
||||
$formatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $this->scale);
|
||||
|
||||
if (null !== $this->roundingMode) {
|
||||
$formatter->setAttribute(\NumberFormatter::ROUNDING_MODE, $this->roundingMode);
|
||||
}
|
||||
|
||||
return $formatter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rounds a number according to the configured scale and rounding mode.
|
||||
*/
|
||||
private function round(int|float $number): int|float
|
||||
{
|
||||
if (null !== $this->scale && null !== $this->roundingMode) {
|
||||
// shift number to maintain the correct scale during rounding
|
||||
$roundingCoef = 10 ** $this->scale;
|
||||
|
||||
if (self::FRACTIONAL == $this->type) {
|
||||
$roundingCoef *= 100;
|
||||
}
|
||||
|
||||
// string representation to avoid rounding errors, similar to bcmul()
|
||||
$number = (string) ($number * $roundingCoef);
|
||||
|
||||
switch ($this->roundingMode) {
|
||||
case \NumberFormatter::ROUND_CEILING:
|
||||
$number = ceil($number);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_FLOOR:
|
||||
$number = floor($number);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_UP:
|
||||
$number = $number > 0 ? ceil($number) : floor($number);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_DOWN:
|
||||
$number = $number > 0 ? floor($number) : ceil($number);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_HALFEVEN:
|
||||
$number = round($number, 0, \PHP_ROUND_HALF_EVEN);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_HALFUP:
|
||||
$number = round($number, 0, \PHP_ROUND_HALF_UP);
|
||||
break;
|
||||
case \NumberFormatter::ROUND_HALFDOWN:
|
||||
$number = round($number, 0, \PHP_ROUND_HALF_DOWN);
|
||||
break;
|
||||
}
|
||||
|
||||
$number = 1 === $roundingCoef ? (int) $number : $number / $roundingCoef;
|
||||
}
|
||||
|
||||
return $number;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user