summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Rowlands2018-01-18 07:54:38 (GMT)
committerLee Rowlands2018-01-18 07:54:38 (GMT)
commit47c2dda6d141de838c7cc218d69a91840f0e7b9e (patch)
treedb3cb3733a73fd17a51177c2687acbfe6aae9a55
parent6a3ba025c415c84c2abd42230ff7ae94e594bf8d (diff)
Issue #2927746 by alexpott, catch, slasher13, mpdonadio, martin107, RoSk0, jibran, larowlan, pounard, Mile23, Jo Fitzgerald, deviantintegral, pritish.kumar: Update Symfony components to 3.4.*
-rw-r--r--composer.lock551
-rw-r--r--core/composer.json31
-rw-r--r--core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php13
-rw-r--r--core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php63
-rw-r--r--core/lib/Drupal/Component/Serialization/YamlSymfony.php2
-rw-r--r--core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php27
-rw-r--r--core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php11
-rw-r--r--core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php7
-rw-r--r--core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php10
-rw-r--r--core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php9
-rw-r--r--core/modules/comment/tests/src/Functional/CommentPreviewTest.php2
-rw-r--r--core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php24
-rw-r--r--core/modules/rest/src/RestServiceProvider.php8
-rw-r--r--core/tests/Drupal/KernelTests/Core/Database/QueryTest.php12
-rw-r--r--core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php4
-rw-r--r--core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php55
-rw-r--r--core/tests/Drupal/Tests/Component/Serialization/YamlTest.php34
-rw-r--r--core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php4
-rw-r--r--core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php2
-rw-r--r--core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php19
-rw-r--r--core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php8
-rw-r--r--core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php9
-rw-r--r--core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php12
-rw-r--r--core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php6
24 files changed, 641 insertions, 282 deletions
diff --git a/composer.lock b/composer.lock
index 3b12629..e298fe0 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1044,6 +1044,55 @@
"time": "2017-03-13T16:27:32+00:00"
},
{
+ "name": "psr/container",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "time": "2017-02-14T16:28:37+00:00"
+ },
+ {
"name": "psr/http-message",
"version": "1.0.1",
"source": {
@@ -1250,23 +1299,23 @@
},
{
"name": "symfony/class-loader",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/class-loader.git",
- "reference": "fc4c04bfd17130a9dccfded9578353f311967da7"
+ "reference": "e63c12699822bb3b667e7216ba07fbcc3a3e203e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/class-loader/zipball/fc4c04bfd17130a9dccfded9578353f311967da7",
- "reference": "fc4c04bfd17130a9dccfded9578353f311967da7",
+ "url": "https://api.github.com/repos/symfony/class-loader/zipball/e63c12699822bb3b667e7216ba07fbcc3a3e203e",
+ "reference": "e63c12699822bb3b667e7216ba07fbcc3a3e203e",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"require-dev": {
- "symfony/finder": "~2.8|~3.0",
+ "symfony/finder": "~2.8|~3.0|~4.0",
"symfony/polyfill-apcu": "~1.1"
},
"suggest": {
@@ -1275,7 +1324,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1302,43 +1351,49 @@
],
"description": "Symfony ClassLoader Component",
"homepage": "https://symfony.com",
- "time": "2017-04-12T14:13:17+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/console",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38"
+ "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38",
- "reference": "a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38",
+ "url": "https://api.github.com/repos/symfony/console/zipball/8394c8ef121949e8f858f13bc1e34f05169e4e7d",
+ "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
- "symfony/debug": "~2.8|~3.0",
+ "php": "^5.5.9|>=7.0.8",
+ "symfony/debug": "~2.8|~3.0|~4.0",
"symfony/polyfill-mbstring": "~1.0"
},
+ "conflict": {
+ "symfony/dependency-injection": "<3.4",
+ "symfony/process": "<3.3"
+ },
"require-dev": {
"psr/log": "~1.0",
- "symfony/event-dispatcher": "~2.8|~3.0",
- "symfony/filesystem": "~2.8|~3.0",
- "symfony/process": "~2.8|~3.0"
+ "symfony/config": "~3.3|~4.0",
+ "symfony/dependency-injection": "~3.4|~4.0",
+ "symfony/event-dispatcher": "~2.8|~3.0|~4.0",
+ "symfony/lock": "~3.4|~4.0",
+ "symfony/process": "~3.3|~4.0"
},
"suggest": {
"psr/log": "For using the console logger",
"symfony/event-dispatcher": "",
- "symfony/filesystem": "",
+ "symfony/lock": "",
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1365,37 +1420,36 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2017-04-26T01:39:17+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/debug",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "fd6eeee656a5a7b384d56f1072243fe1c0e81686"
+ "reference": "603b95dda8b00020e4e6e60dc906e7b715b1c245"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/fd6eeee656a5a7b384d56f1072243fe1c0e81686",
- "reference": "fd6eeee656a5a7b384d56f1072243fe1c0e81686",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/603b95dda8b00020e4e6e60dc906e7b715b1c245",
+ "reference": "603b95dda8b00020e4e6e60dc906e7b715b1c245",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"psr/log": "~1.0"
},
"conflict": {
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
},
"require-dev": {
- "symfony/class-loader": "~2.8|~3.0",
- "symfony/http-kernel": "~2.8|~3.0"
+ "symfony/http-kernel": "~2.8|~3.0|~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1422,43 +1476,51 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2017-04-19T20:17:50+00:00"
+ "time": "2018-01-03T17:14:19+00:00"
},
{
"name": "symfony/dependency-injection",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "5e00857475b6d1fa31ff4c76f1fddf1cfa9e8d59"
+ "reference": "35f957ca171a431710966bec6e2f8636d3b019c4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/5e00857475b6d1fa31ff4c76f1fddf1cfa9e8d59",
- "reference": "5e00857475b6d1fa31ff4c76f1fddf1cfa9e8d59",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/35f957ca171a431710966bec6e2f8636d3b019c4",
+ "reference": "35f957ca171a431710966bec6e2f8636d3b019c4",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8",
+ "psr/container": "^1.0"
},
"conflict": {
- "symfony/yaml": "<3.2"
+ "symfony/config": "<3.3.7",
+ "symfony/finder": "<3.3",
+ "symfony/proxy-manager-bridge": "<3.4",
+ "symfony/yaml": "<3.4"
+ },
+ "provide": {
+ "psr/container-implementation": "1.0"
},
"require-dev": {
- "symfony/config": "~2.8|~3.0",
- "symfony/expression-language": "~2.8|~3.0",
- "symfony/yaml": "~3.2"
+ "symfony/config": "~3.3|~4.0",
+ "symfony/expression-language": "~2.8|~3.0|~4.0",
+ "symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"symfony/config": "",
"symfony/expression-language": "For using expressions in service container configuration",
+ "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required",
"symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
"symfony/yaml": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1485,31 +1547,34 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
- "time": "2017-04-26T01:39:17+00:00"
+ "time": "2018-01-04T15:56:45+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "b8a401f733b43251e1d088c589368b2a94155e40"
+ "reference": "26b87b6bca8f8f797331a30b76fdae5342dc26ca"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b8a401f733b43251e1d088c589368b2a94155e40",
- "reference": "b8a401f733b43251e1d088c589368b2a94155e40",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/26b87b6bca8f8f797331a30b76fdae5342dc26ca",
+ "reference": "26b87b6bca8f8f797331a30b76fdae5342dc26ca",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
+ },
+ "conflict": {
+ "symfony/dependency-injection": "<3.3"
},
"require-dev": {
"psr/log": "~1.0",
- "symfony/config": "~2.8|~3.0",
- "symfony/dependency-injection": "~2.8|~3.0",
- "symfony/expression-language": "~2.8|~3.0",
- "symfony/stopwatch": "~2.8|~3.0"
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.3|~4.0",
+ "symfony/expression-language": "~2.8|~3.0|~4.0",
+ "symfony/stopwatch": "~2.8|~3.0|~4.0"
},
"suggest": {
"symfony/dependency-injection": "",
@@ -1518,7 +1583,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1545,33 +1610,34 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2017-05-01T14:58:48+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/http-foundation",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "9de6add7f731e5af7f5b2e9c0da365e43383ebef"
+ "reference": "4a213be1cc8598089b8c7451529a2927b49b5d26"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9de6add7f731e5af7f5b2e9c0da365e43383ebef",
- "reference": "9de6add7f731e5af7f5b2e9c0da365e43383ebef",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/4a213be1cc8598089b8c7451529a2927b49b5d26",
+ "reference": "4a213be1cc8598089b8c7451529a2927b49b5d26",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
- "symfony/polyfill-mbstring": "~1.1"
+ "php": "^5.5.9|>=7.0.8",
+ "symfony/polyfill-mbstring": "~1.1",
+ "symfony/polyfill-php70": "~1.6"
},
"require-dev": {
- "symfony/expression-language": "~2.8|~3.0"
+ "symfony/expression-language": "~2.8|~3.0|~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1598,52 +1664,58 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2017-05-01T14:55:58+00:00"
+ "time": "2018-01-03T17:14:19+00:00"
},
{
"name": "symfony/http-kernel",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "46e8b209abab55c072c47d72d5cd1d62c0585e05"
+ "reference": "1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/46e8b209abab55c072c47d72d5cd1d62c0585e05",
- "reference": "46e8b209abab55c072c47d72d5cd1d62c0585e05",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e",
+ "reference": "1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"psr/log": "~1.0",
- "symfony/debug": "~2.8|~3.0",
- "symfony/event-dispatcher": "~2.8|~3.0",
- "symfony/http-foundation": "~2.8.13|~3.1.6|~3.2"
+ "symfony/debug": "~2.8|~3.0|~4.0",
+ "symfony/event-dispatcher": "~2.8|~3.0|~4.0",
+ "symfony/http-foundation": "^3.3.11|~4.0"
},
"conflict": {
- "symfony/config": "<2.8"
+ "symfony/config": "<2.8",
+ "symfony/dependency-injection": "<3.4",
+ "symfony/var-dumper": "<3.3",
+ "twig/twig": "<1.34|<2.4,>=2"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0"
},
"require-dev": {
- "symfony/browser-kit": "~2.8|~3.0",
+ "psr/cache": "~1.0",
+ "symfony/browser-kit": "~2.8|~3.0|~4.0",
"symfony/class-loader": "~2.8|~3.0",
- "symfony/config": "~2.8|~3.0",
- "symfony/console": "~2.8|~3.0",
- "symfony/css-selector": "~2.8|~3.0",
- "symfony/dependency-injection": "~2.8|~3.0",
- "symfony/dom-crawler": "~2.8|~3.0",
- "symfony/expression-language": "~2.8|~3.0",
- "symfony/finder": "~2.8|~3.0",
- "symfony/process": "~2.8|~3.0",
- "symfony/routing": "~2.8|~3.0",
- "symfony/stopwatch": "~2.8|~3.0",
- "symfony/templating": "~2.8|~3.0",
- "symfony/translation": "~2.8|~3.0",
- "symfony/var-dumper": "~3.2"
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/console": "~2.8|~3.0|~4.0",
+ "symfony/css-selector": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.4|~4.0",
+ "symfony/dom-crawler": "~2.8|~3.0|~4.0",
+ "symfony/expression-language": "~2.8|~3.0|~4.0",
+ "symfony/finder": "~2.8|~3.0|~4.0",
+ "symfony/process": "~2.8|~3.0|~4.0",
+ "symfony/routing": "~3.4|~4.0",
+ "symfony/stopwatch": "~2.8|~3.0|~4.0",
+ "symfony/templating": "~2.8|~3.0|~4.0",
+ "symfony/translation": "~2.8|~3.0|~4.0",
+ "symfony/var-dumper": "~3.3|~4.0"
},
"suggest": {
"symfony/browser-kit": "",
- "symfony/class-loader": "",
"symfony/config": "",
"symfony/console": "",
"symfony/dependency-injection": "",
@@ -1653,7 +1725,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1680,20 +1752,20 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
- "time": "2017-05-01T17:46:48+00:00"
+ "time": "2018-01-05T08:33:00+00:00"
},
{
"name": "symfony/polyfill-iconv",
- "version": "v1.3.0",
+ "version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-iconv.git",
- "reference": "cba36f3616d9866b3e52662e88da5c090fac1e97"
+ "reference": "7a84ccdb8c953ee274c96dd6bde778d873fc824a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/cba36f3616d9866b3e52662e88da5c090fac1e97",
- "reference": "cba36f3616d9866b3e52662e88da5c090fac1e97",
+ "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/7a84ccdb8c953ee274c96dd6bde778d873fc824a",
+ "reference": "7a84ccdb8c953ee274c96dd6bde778d873fc824a",
"shasum": ""
},
"require": {
@@ -1705,7 +1777,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.6-dev"
}
},
"autoload": {
@@ -1739,20 +1811,20 @@
"portable",
"shim"
],
- "time": "2016-11-14T01:06:16+00:00"
+ "time": "2017-10-11T12:05:26+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.3.0",
+ "version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4"
+ "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4",
- "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
+ "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"shasum": ""
},
"require": {
@@ -1764,7 +1836,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.6-dev"
}
},
"autoload": {
@@ -1798,29 +1870,88 @@
"portable",
"shim"
],
- "time": "2016-11-14T01:06:16+00:00"
+ "time": "2017-10-11T12:05:26+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php70",
+ "version": "v1.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php70.git",
+ "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff",
+ "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff",
+ "shasum": ""
+ },
+ "require": {
+ "paragonie/random_compat": "~1.0|~2.0",
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.6-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php70\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2017-10-11T12:05:26+00:00"
},
{
"name": "symfony/process",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "999c2cf5061e627e6cd551dc9ebf90dd1d11d9f0"
+ "reference": "ff69f110c6b33fd33cd2089ba97d6112f44ef0ba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/999c2cf5061e627e6cd551dc9ebf90dd1d11d9f0",
- "reference": "999c2cf5061e627e6cd551dc9ebf90dd1d11d9f0",
+ "url": "https://api.github.com/repos/symfony/process/zipball/ff69f110c6b33fd33cd2089ba97d6112f44ef0ba",
+ "reference": "ff69f110c6b33fd33cd2089ba97d6112f44ef0ba",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1847,29 +1978,29 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2017-04-12T14:13:17+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/psr-http-message-bridge",
- "version": "v1.0.0",
+ "version": "v1.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/psr-http-message-bridge.git",
- "reference": "66085f246d3893cbdbcec5f5ad15ac60546cf0de"
+ "reference": "c2b757934f2d9681a287e662efbc27c41fe8ef86"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/66085f246d3893cbdbcec5f5ad15ac60546cf0de",
- "reference": "66085f246d3893cbdbcec5f5ad15ac60546cf0de",
+ "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/c2b757934f2d9681a287e662efbc27c41fe8ef86",
+ "reference": "c2b757934f2d9681a287e662efbc27c41fe8ef86",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"psr/http-message": "~1.0",
- "symfony/http-foundation": "~2.3|~3.0"
+ "symfony/http-foundation": "~2.3|~3.0|~4.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.7|~3.0"
+ "symfony/phpunit-bridge": "~3.2|4.0"
},
"suggest": {
"psr/http-message-implementation": "To use the HttpFoundation factory",
@@ -1907,36 +2038,39 @@
"http-message",
"psr-7"
],
- "time": "2016-09-14T18:37:20+00:00"
+ "time": "2017-12-19T00:31:44+00:00"
},
{
"name": "symfony/routing",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "5029745d6d463585e8b487dbc83d6333f408853a"
+ "reference": "e2b6d6fe7b090c7af720b75c7722c6dfa7a52658"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/5029745d6d463585e8b487dbc83d6333f408853a",
- "reference": "5029745d6d463585e8b487dbc83d6333f408853a",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/e2b6d6fe7b090c7af720b75c7722c6dfa7a52658",
+ "reference": "e2b6d6fe7b090c7af720b75c7722c6dfa7a52658",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"conflict": {
- "symfony/config": "<2.8"
+ "symfony/config": "<2.8",
+ "symfony/dependency-injection": "<3.3",
+ "symfony/yaml": "<3.4"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"doctrine/common": "~2.2",
"psr/log": "~1.0",
- "symfony/config": "~2.8|~3.0",
- "symfony/expression-language": "~2.8|~3.0",
- "symfony/http-foundation": "~2.8|~3.0",
- "symfony/yaml": "~2.8|~3.0"
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.3|~4.0",
+ "symfony/expression-language": "~2.8|~3.0|~4.0",
+ "symfony/http-foundation": "~2.8|~3.0|~4.0",
+ "symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"doctrine/annotations": "For using the annotation loader",
@@ -1949,7 +2083,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1982,40 +2116,43 @@
"uri",
"url"
],
- "time": "2017-04-12T14:13:17+00:00"
+ "time": "2018-01-04T15:09:34+00:00"
},
{
"name": "symfony/serializer",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/serializer.git",
- "reference": "6eeae1ba82005b761a53b7b8cf960bbf40c95986"
+ "reference": "054e20557e48276064a5698e3444d3eb6beef139"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/serializer/zipball/6eeae1ba82005b761a53b7b8cf960bbf40c95986",
- "reference": "6eeae1ba82005b761a53b7b8cf960bbf40c95986",
+ "url": "https://api.github.com/repos/symfony/serializer/zipball/054e20557e48276064a5698e3444d3eb6beef139",
+ "reference": "054e20557e48276064a5698e3444d3eb6beef139",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"conflict": {
+ "phpdocumentor/type-resolver": "<0.2.1",
+ "symfony/dependency-injection": "<3.2",
"symfony/property-access": ">=3.0,<3.0.4|>=2.8,<2.8.4",
"symfony/property-info": "<3.1",
- "symfony/yaml": "<3.1"
+ "symfony/yaml": "<3.4"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"doctrine/cache": "~1.0",
- "phpdocumentor/reflection-docblock": "~3.0",
- "symfony/cache": "~3.1",
- "symfony/config": "~2.8|~3.0",
- "symfony/http-foundation": "~2.8|~3.0",
- "symfony/property-access": "~2.8|~3.0",
- "symfony/property-info": "~3.1",
- "symfony/yaml": "~3.1"
+ "phpdocumentor/reflection-docblock": "^3.0|^4.0",
+ "symfony/cache": "~3.1|~4.0",
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.2|~4.0",
+ "symfony/http-foundation": "~2.8|~3.0|~4.0",
+ "symfony/property-access": "~2.8|~3.0|~4.0",
+ "symfony/property-info": "~3.1|~4.0",
+ "symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.",
@@ -2030,7 +2167,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2057,34 +2194,38 @@
],
"description": "Symfony Serializer Component",
"homepage": "https://symfony.com",
- "time": "2017-05-01T14:55:58+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/translation",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "f4a04d2df710f81515df576b2de06bdeee518b83"
+ "reference": "17b5962d252b2d6d1d37a2485ebb7ddc5b2bef0a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/f4a04d2df710f81515df576b2de06bdeee518b83",
- "reference": "f4a04d2df710f81515df576b2de06bdeee518b83",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/17b5962d252b2d6d1d37a2485ebb7ddc5b2bef0a",
+ "reference": "17b5962d252b2d6d1d37a2485ebb7ddc5b2bef0a",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
- "symfony/config": "<2.8"
+ "symfony/config": "<2.8",
+ "symfony/dependency-injection": "<3.4",
+ "symfony/yaml": "<3.4"
},
"require-dev": {
"psr/log": "~1.0",
- "symfony/config": "~2.8|~3.0",
- "symfony/intl": "^2.8.18|^3.2.5",
- "symfony/yaml": "~2.8|~3.0"
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.4|~4.0",
+ "symfony/finder": "~2.8|~3.0|~4.0",
+ "symfony/intl": "^2.8.18|^3.2.5|~4.0",
+ "symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"psr/log": "To use logging capability in translator",
@@ -2094,7 +2235,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2121,40 +2262,47 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
- "time": "2017-04-12T14:13:17+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/validator",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/validator.git",
- "reference": "98bf011bf1f3b69bece3b79e19633e9c51545b2b"
+ "reference": "10828736a48411f2c4d87a7fe61c2d02ccb922be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/validator/zipball/98bf011bf1f3b69bece3b79e19633e9c51545b2b",
- "reference": "98bf011bf1f3b69bece3b79e19633e9c51545b2b",
+ "url": "https://api.github.com/repos/symfony/validator/zipball/10828736a48411f2c4d87a7fe61c2d02ccb922be",
+ "reference": "10828736a48411f2c4d87a7fe61c2d02ccb922be",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"symfony/polyfill-mbstring": "~1.0",
- "symfony/translation": "~2.8|~3.0"
+ "symfony/translation": "~2.8|~3.0|~4.0"
},
"conflict": {
- "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
+ "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
+ "symfony/dependency-injection": "<3.3",
+ "symfony/http-kernel": "<3.3.5",
+ "symfony/yaml": "<3.4"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"doctrine/cache": "~1.0",
"egulias/email-validator": "^1.2.8|~2.0",
- "symfony/cache": "~3.1",
- "symfony/config": "~2.8|~3.0",
- "symfony/expression-language": "~2.8|~3.0",
- "symfony/http-foundation": "~2.8|~3.0",
- "symfony/intl": "^2.8.18|^3.2.5",
- "symfony/yaml": "~2.8|~3.0"
+ "symfony/cache": "~3.1|~4.0",
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.3|~4.0",
+ "symfony/expression-language": "~2.8|~3.0|~4.0",
+ "symfony/http-foundation": "~2.8|~3.0|~4.0",
+ "symfony/http-kernel": "^3.3.5|~4.0",
+ "symfony/intl": "^2.8.18|^3.2.5|~4.0",
+ "symfony/property-access": "~2.8|~3.0|~4.0",
+ "symfony/var-dumper": "~3.3|~4.0",
+ "symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.",
@@ -2165,13 +2313,13 @@
"symfony/expression-language": "For using the Expression validator",
"symfony/http-foundation": "",
"symfony/intl": "",
- "symfony/property-access": "For using the Expression validator",
+ "symfony/property-access": "For accessing properties within comparison constraints",
"symfony/yaml": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2198,27 +2346,30 @@
],
"description": "Symfony Validator Component",
"homepage": "https://symfony.com",
- "time": "2017-04-12T14:13:17+00:00"
+ "time": "2018-01-03T17:14:19+00:00"
},
{
"name": "symfony/yaml",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6"
+ "reference": "25c192f25721a74084272671f658797d9e0e0146"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/acec26fcf7f3031e094e910b94b002fa53d4e4d6",
- "reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/25c192f25721a74084272671f658797d9e0e0146",
+ "reference": "25c192f25721a74084272671f658797d9e0e0146",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
+ },
+ "conflict": {
+ "symfony/console": "<3.4"
},
"require-dev": {
- "symfony/console": "~2.8|~3.0"
+ "symfony/console": "~3.4|~4.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
@@ -2226,7 +2377,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2253,7 +2404,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2017-05-01T14:55:58+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "twig/twig",
@@ -4019,25 +4170,25 @@
},
{
"name": "symfony/browser-kit",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "9fab1ab6f77b77f3df5fc5250fc6956811699b57"
+ "reference": "490f27762705c8489bd042fe3e9377a191dba9b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/9fab1ab6f77b77f3df5fc5250fc6956811699b57",
- "reference": "9fab1ab6f77b77f3df5fc5250fc6956811699b57",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/490f27762705c8489bd042fe3e9377a191dba9b4",
+ "reference": "490f27762705c8489bd042fe3e9377a191dba9b4",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
- "symfony/dom-crawler": "~2.8|~3.0"
+ "php": "^5.5.9|>=7.0.8",
+ "symfony/dom-crawler": "~2.8|~3.0|~4.0"
},
"require-dev": {
- "symfony/css-selector": "~2.8|~3.0",
- "symfony/process": "~2.8|~3.0"
+ "symfony/css-selector": "~2.8|~3.0|~4.0",
+ "symfony/process": "~2.8|~3.0|~4.0"
},
"suggest": {
"symfony/process": ""
@@ -4045,7 +4196,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -4072,29 +4223,29 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
- "time": "2017-04-12T14:13:17+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "02983c144038e697c959e6b06ef6666de759ccbc"
+ "reference": "e66394bc7610e69279bfdb3ab11b4fe65403f556"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/02983c144038e697c959e6b06ef6666de759ccbc",
- "reference": "02983c144038e697c959e6b06ef6666de759ccbc",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/e66394bc7610e69279bfdb3ab11b4fe65403f556",
+ "reference": "e66394bc7610e69279bfdb3ab11b4fe65403f556",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -4125,28 +4276,28 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2017-05-01T14:55:58+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/dom-crawler",
- "version": "v3.2.8",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "f1ad34e8af09ed17570e027cf0c58a12eddec286"
+ "reference": "09bd97b844b3151fab82f2fdd62db9c464b3910a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/f1ad34e8af09ed17570e027cf0c58a12eddec286",
- "reference": "f1ad34e8af09ed17570e027cf0c58a12eddec286",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/09bd97b844b3151fab82f2fdd62db9c464b3910a",
+ "reference": "09bd97b844b3151fab82f2fdd62db9c464b3910a",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
- "symfony/css-selector": "~2.8|~3.0"
+ "symfony/css-selector": "~2.8|~3.0|~4.0"
},
"suggest": {
"symfony/css-selector": ""
@@ -4154,7 +4305,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -4181,7 +4332,7 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2017-04-12T14:13:17+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/phpunit-bridge",
@@ -4258,7 +4409,7 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"platform-dev": []
}
diff --git a/core/composer.json b/core/composer.json
index aeb15b4..2e1b1c2 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -4,20 +4,20 @@
"type": "drupal-core",
"license": "GPL-2.0+",
"require": {
- "php": ">=5.5.9",
- "symfony/class-loader": "~3.2.8",
- "symfony/console": "~3.2.8",
- "symfony/dependency-injection": "~3.2.8",
- "symfony/event-dispatcher": "~3.2.8",
- "symfony/http-foundation": "~3.2.8",
- "symfony/http-kernel": "~3.2.8",
- "symfony/routing": "~3.2.8",
- "symfony/serializer": "~3.2.8",
- "symfony/translation": "~3.2.8",
- "symfony/validator": "~3.2.8",
- "symfony/process": "~3.2.8",
+ "php": "^5.5.9|>=7.0.8",
+ "symfony/class-loader": "~3.4.0",
+ "symfony/console": "~3.4.0",
+ "symfony/dependency-injection": "~3.4.0",
+ "symfony/event-dispatcher": "~3.4.0",
+ "symfony/http-foundation": "~3.4.0",
+ "symfony/http-kernel": "~3.4.0",
+ "symfony/routing": "~3.4.0",
+ "symfony/serializer": "~3.4.0",
+ "symfony/translation": "~3.4.0",
+ "symfony/validator": "~3.4.0",
+ "symfony/process": "~3.4.0",
"symfony/polyfill-iconv": "^1.0",
- "symfony/yaml": "~3.2.8",
+ "symfony/yaml": "~3.4.0",
"twig/twig": "^1.35.0",
"doctrine/common": "^2.5",
"doctrine/annotations": "^1.2",
@@ -46,8 +46,9 @@
"mikey179/vfsStream": "^1.2",
"phpunit/phpunit": "^4.8.35 || ^6.1",
"phpspec/prophecy": "^1.4",
- "symfony/css-selector": "~3.2.8",
- "symfony/phpunit-bridge": "^3.4.3"
+ "symfony/css-selector": "^3.4.0",
+ "symfony/phpunit-bridge": "^3.4.3",
+ "symfony/debug": "^3.4.0"
},
"replace": {
"drupal/action": "self.version",
diff --git a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
index 11768d0..dfd2a43 100644
--- a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
+++ b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
@@ -65,7 +65,7 @@ class OptimizedPhpArrayDumper extends Dumper {
$definition['aliases'] = $this->getAliases();
$definition['parameters'] = $this->getParameters();
$definition['services'] = $this->getServiceDefinitions();
- $definition['frozen'] = $this->container->isFrozen();
+ $definition['frozen'] = $this->container->isCompiled();
$definition['machine_format'] = $this->supportsMachineFormat();
return $definition;
}
@@ -103,8 +103,8 @@ class OptimizedPhpArrayDumper extends Dumper {
}
$parameters = $this->container->getParameterBag()->all();
- $is_frozen = $this->container->isFrozen();
- return $this->prepareParameters($parameters, $is_frozen);
+ $is_compiled = $this->container->isCompiled();
+ return $this->prepareParameters($parameters, $is_compiled);
}
/**
@@ -309,10 +309,10 @@ class OptimizedPhpArrayDumper extends Dumper {
}
}
else {
- if (is_object($value)) {
+ $code[$key] = $this->dumpValue($value);
+ if (is_object($code[$key])) {
$resolve = TRUE;
}
- $code[$key] = $this->dumpValue($value);
}
}
@@ -403,6 +403,9 @@ class OptimizedPhpArrayDumper extends Dumper {
elseif ($value instanceof Parameter) {
return $this->getParameterCall((string) $value);
}
+ elseif (is_string($value) && preg_match('/^\%(.*)\%$/', $value, $matches)) {
+ return $this->getParameterCall($matches[1]);
+ }
elseif ($value instanceof Expression) {
throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
}
diff --git a/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php b/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php
index a23f333..1fd808c 100644
--- a/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php
+++ b/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php
@@ -104,8 +104,11 @@ class ContainerAwareEventDispatcher implements EventDispatcherInterface {
if (!isset($definition['callable'])) {
$definition['callable'] = [$this->container->get($definition['service'][0]), $definition['service'][1]];
}
+ if (is_array($definition['callable']) && isset($definition['callable'][0]) && $definition['callable'][0] instanceof \Closure) {
+ $definition['callable'][0] = $definition['callable'][0]();
+ }
- $definition['callable']($event, $event_name, $this);
+ call_user_func($definition['callable'], $event, $event_name, $this);
if ($event->isPropagationStopped()) {
return $event;
}
@@ -144,6 +147,9 @@ class ContainerAwareEventDispatcher implements EventDispatcherInterface {
if (!isset($definition['callable'])) {
$definition['callable'] = [$this->container->get($definition['service'][0]), $definition['service'][1]];
}
+ if (is_array($definition['callable']) && isset($definition['callable'][0]) && $definition['callable'][0] instanceof \Closure) {
+ $definition['callable'][0] = $definition['callable'][0]();
+ }
$result[] = $definition['callable'];
}
@@ -156,27 +162,29 @@ class ContainerAwareEventDispatcher implements EventDispatcherInterface {
/**
* {@inheritdoc}
*/
- public function getListenerPriority($eventName, $listener) {
- // Parts copied from \Symfony\Component\EventDispatcher, that's why you see
- // a yoda condition here.
- if (!isset($this->listeners[$eventName])) {
+ public function getListenerPriority($event_name, $listener) {
+ if (!isset($this->listeners[$event_name])) {
return;
}
- foreach ($this->listeners[$eventName] as $priority => $listeners) {
- if (FALSE !== ($key = array_search(['callable' => $listener], $listeners, TRUE))) {
- return $priority;
- }
+ if (is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) {
+ $listener[0] = $listener[0]();
}
// Resolve service definitions if the listener has not been found so far.
- foreach ($this->listeners[$eventName] as $priority => &$definitions) {
+ foreach ($this->listeners[$event_name] as $priority => &$definitions) {
foreach ($definitions as $key => &$definition) {
if (!isset($definition['callable'])) {
// Once the callable is retrieved we keep it for subsequent method
// invocations on this class.
- $definition['callable'] = [$this->container->get($definition['service'][0]), $definition['service'][1]];
- if ($definition['callable'] === $listener) {
- return $priority;
- }
+ $definition['callable'] = [
+ $this->container->get($definition['service'][0]),
+ $definition['service'][1],
+ ];
+ }
+ if (is_array($definition['callable']) && isset($definition['callable'][0]) && $definition['callable'][0] instanceof \Closure) {
+ $definition['callable'][0] = $definition['callable'][0]();
+ }
+ if ($definition['callable'] === $listener) {
+ return $priority;
}
}
}
@@ -186,7 +194,17 @@ class ContainerAwareEventDispatcher implements EventDispatcherInterface {
* {@inheritdoc}
*/
public function hasListeners($event_name = NULL) {
- return (bool) count($this->getListeners($event_name));
+ if ($event_name !== NULL) {
+ return !empty($this->listeners[$event_name]);
+ }
+
+ foreach ($this->listeners as $event_listeners) {
+ if ($event_listeners) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
}
/**
@@ -214,10 +232,23 @@ class ContainerAwareEventDispatcher implements EventDispatcherInterface {
$definition['callable'] = [$this->container->get($definition['service'][0]), $definition['service'][1]];
}
+ if (is_array($definition['callable']) && isset($definition['callable'][0]) && $definition['callable'][0] instanceof \Closure && !$listener instanceof \Closure) {
+ $definition['callable'][0] = $definition['callable'][0]();
+ }
+
+ if (is_array($definition['callable']) && isset($definition['callable'][0]) && !$definition['callable'][0] instanceof \Closure && is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) {
+ $listener[0] = $listener[0]();
+ }
if ($definition['callable'] === $listener) {
- unset($this->listeners[$event_name][$priority][$key]);
+ unset($definitions[$key]);
}
}
+ if ($definitions) {
+ $this->listeners[$event_name][$priority] = $definitions;
+ }
+ else {
+ unset($this->listeners[$event_name][$priority]);
+ }
}
}
diff --git a/core/lib/Drupal/Component/Serialization/YamlSymfony.php b/core/lib/Drupal/Component/Serialization/YamlSymfony.php
index d35e09c..efe3039 100644
--- a/core/lib/Drupal/Component/Serialization/YamlSymfony.php
+++ b/core/lib/Drupal/Component/Serialization/YamlSymfony.php
@@ -34,7 +34,7 @@ class YamlSymfony implements SerializationInterface {
$yaml = new Parser();
// Make sure we have a single trailing newline. A very simple config like
// 'foo: bar' with no newline will fail to parse otherwise.
- return $yaml->parse($raw, SymfonyYaml::PARSE_EXCEPTION_ON_INVALID_TYPE);
+ return $yaml->parse($raw, SymfonyYaml::PARSE_EXCEPTION_ON_INVALID_TYPE | SymfonyYaml::PARSE_KEYS_AS_STRINGS);
}
catch (\Exception $e) {
throw new InvalidDataTypeException($e->getMessage(), $e->getCode(), $e);
diff --git a/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php b/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php
index e0becc7..00b6f76 100644
--- a/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php
+++ b/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php
@@ -46,9 +46,12 @@ class ContainerBuilder extends SymfonyContainerBuilder {
}
/**
- * {@inheritdoc}
+ * A 1to1 copy of parent::shareService.
+ *
+ * @todo https://www.drupal.org/project/drupal/issues/2937010 Since Symfony
+ * 3.4 this is not a 1to1 copy.
*/
- protected function shareService(Definition $definition, $service, $id)
+ protected function shareService(Definition $definition, $service, $id, array &$inlineServices)
{
if ($definition->isShared()) {
$this->services[$lowerId = strtolower($id)] = $service;
@@ -85,7 +88,20 @@ class ContainerBuilder extends SymfonyContainerBuilder {
if (strtolower($id) !== $id) {
throw new \InvalidArgumentException("Service ID names must be lowercase: $id");
}
- return parent::register($id, $class);
+ $definition = parent::register($id, $class);
+ // As of Symfony 3.4 all services are private by default.
+ $definition->setPublic(TRUE);
+ return $definition;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setAlias($alias, $id) {
+ $alias = parent::setAlias($alias, $id);
+ // As of Symfony 3.4 all aliases are private by default.
+ $alias->setPublic(TRUE);
+ return $alias;
}
/**
@@ -100,8 +116,11 @@ class ContainerBuilder extends SymfonyContainerBuilder {
/**
* A 1to1 copy of parent::callMethod.
+ *
+ * @todo https://www.drupal.org/project/drupal/issues/2937010 Since Symfony
+ * 3.4 this is not a 1to1 copy.
*/
- protected function callMethod($service, $call) {
+ protected function callMethod($service, $call, array &$inlineServices = array()) {
$services = self::getServiceConditionals($call[1]);
foreach ($services as $s) {
diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
index d999450..55687bb 100644
--- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
+++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
@@ -8,7 +8,7 @@ use Drupal\Core\Serialization\Yaml;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\DefinitionDecorator;
+use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
@@ -155,9 +155,11 @@ class YamlFileLoader
}
if (isset($service['parent'])) {
- $definition = new DefinitionDecorator($service['parent']);
+ $definition = new ChildDefinition($service['parent']);
} else {
$definition = new Definition();
+ // As of Symfony 3.4 all services are private by default.
+ $definition->setPublic(TRUE);
}
if (isset($service['class'])) {
@@ -329,7 +331,10 @@ class YamlFileLoader
throw new InvalidArgumentException(sprintf('The service file "%s" is not valid.', $file));
}
- return $this->validate(Yaml::decode(file_get_contents($file)), $file);
+ // @todo Remove preg_replace() once
+ // https://github.com/symfony/symfony/pull/25787 is in Symfony 3.4.
+ $content = preg_replace('/:$\n^\s+{\s*}$/m', ': {}', file_get_contents($file));
+ return $this->validate(Yaml::decode($content), $file);
}
/**
diff --git a/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php b/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php
index 6c9c178..0e49c5b 100644
--- a/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php
+++ b/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php
@@ -76,10 +76,10 @@ class FormAjaxSubscriber implements EventSubscriberInterface {
// the configured upload limit.
if ($exception instanceof BrokenPostRequestException && $request->query->has(FormBuilderInterface::AJAX_FORM_REQUEST)) {
$this->drupalSetMessage($this->t('An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (@size) that this server supports.', ['@size' => $this->formatSize($exception->getSize())]), 'error');
- $response = new AjaxResponse();
+ $response = new AjaxResponse(NULL, 200);
$status_messages = ['#type' => 'status_messages'];
$response->addCommand(new PrependCommand(NULL, $status_messages));
- $response->headers->set('X-Status-Code', 200);
+ $event->allowCustomResponseCode();
$event->setResponse($response);
return;
}
@@ -99,7 +99,8 @@ class FormAjaxSubscriber implements EventSubscriberInterface {
// Since this response is being set in place of an exception, explicitly
// mark this as a 200 status.
- $response->headers->set('X-Status-Code', 200);
+ $response->setStatusCode(200);
+ $event->allowCustomResponseCode();
$event->setResponse($response);
}
catch (\Exception $e) {
diff --git a/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php b/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php
index e3e4895..cf4cd89 100644
--- a/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php
+++ b/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php
@@ -59,23 +59,23 @@ class ReverseProxyMiddleware implements HttpKernelInterface {
// Initialize proxy settings.
if ($settings->get('reverse_proxy', FALSE)) {
$ip_header = $settings->get('reverse_proxy_header', 'X_FORWARDED_FOR');
- $request::setTrustedHeaderName($request::HEADER_CLIENT_IP, $ip_header);
+ $request::setTrustedHeaderName($request::HEADER_X_FORWARDED_FOR, $ip_header);
$proto_header = $settings->get('reverse_proxy_proto_header', 'X_FORWARDED_PROTO');
- $request::setTrustedHeaderName($request::HEADER_CLIENT_PROTO, $proto_header);
+ $request::setTrustedHeaderName($request::HEADER_X_FORWARDED_PROTO, $proto_header);
$host_header = $settings->get('reverse_proxy_host_header', 'X_FORWARDED_HOST');
- $request::setTrustedHeaderName($request::HEADER_CLIENT_HOST, $host_header);
+ $request::setTrustedHeaderName($request::HEADER_X_FORWARDED_HOST, $host_header);
$port_header = $settings->get('reverse_proxy_port_header', 'X_FORWARDED_PORT');
- $request::setTrustedHeaderName($request::HEADER_CLIENT_PORT, $port_header);
+ $request::setTrustedHeaderName($request::HEADER_X_FORWARDED_PORT, $port_header);
$forwarded_header = $settings->get('reverse_proxy_forwarded_header', 'FORWARDED');
$request::setTrustedHeaderName($request::HEADER_FORWARDED, $forwarded_header);
$proxies = $settings->get('reverse_proxy_addresses', []);
if (count($proxies) > 0) {
- $request::setTrustedProxies($proxies);
+ $request::setTrustedProxies($proxies, Request::HEADER_X_FORWARDED_ALL | Request::HEADER_FORWARDED);
}
}
}
diff --git a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
index 3165815..03990d8 100644
--- a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
+++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
@@ -120,6 +120,9 @@ trait FunctionalTestSetupTrait {
// Add a listener to validate configuration schema on save.
$yaml = new SymfonyYaml();
$content = file_get_contents($directory . '/services.yml');
+ // @todo Remove preg_replace() once
+ // https://github.com/symfony/symfony/pull/25787 is in Symfony 3.4.
+ $content = preg_replace('/:$\n^\s+{\s*}$/m', ': {}', $content);
$services = $yaml->parse($content);
$services['services']['simpletest.config_schema_checker'] = [
'class' => ConfigSchemaChecker::class,
@@ -165,7 +168,11 @@ trait FunctionalTestSetupTrait {
$filename = $this->siteDirectory . '/services.yml';
chmod($filename, 0666);
- $services = Yaml::decode(file_get_contents($filename));
+ // @todo Remove preg_replace() once
+ // https://github.com/symfony/symfony/pull/25787 is in Symfony 3.4.
+ $content = file_get_contents($filename);
+ $content = preg_replace('/:$\n^\s+{\s*}$/m', ': {}', $content);
+ $services = Yaml::decode($content);
$services['parameters'][$name] = $value;
file_put_contents($filename, Yaml::encode($services));
diff --git a/core/modules/comment/tests/src/Functional/CommentPreviewTest.php b/core/modules/comment/tests/src/Functional/CommentPreviewTest.php
index 868ebe4..91544b6 100644
--- a/core/modules/comment/tests/src/Functional/CommentPreviewTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentPreviewTest.php
@@ -117,6 +117,8 @@ class CommentPreviewTest extends CommentTestBase {
// Go back and re-submit the form.
$this->getSession()->getDriver()->back();
+ $submit_button = $this->assertSession()->buttonExists('Save');
+ $submit_button->click();
$this->assertText('Your comment has been posted.');
$elements = $this->xpath('//section[contains(@class, "comment-wrapper")]/article');
$this->assertEqual(2, count($elements));
diff --git a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
index dc10323..4170e25 100644
--- a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
@@ -172,12 +172,24 @@ EOD;
'import' => $import,
];
$this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
- $this->assertRaw(t('Are you sure you want to update the %name @type?', ['%name' => 'second', '@type' => 'test configuration']));
- $this->drupalPostForm(NULL, [], t('Confirm'));
- $entity = $storage->load('second');
- $this->assertRaw(t('The configuration was imported successfully.'));
- $this->assertTrue(is_string($entity->label()), 'Entity label is a string');
- $this->assertTrue(strpos($entity->label(), 'ObjectSerialization') > 0, 'Label contains serialized object');
+ if (extension_loaded('yaml')) {
+ // If the yaml extension is loaded it will work but not create the PHP
+ // object.
+ $this->assertRaw(t('Are you sure you want to update the %name @type?', [
+ '%name' => 'second',
+ '@type' => 'test configuration'
+ ]));
+ $this->drupalPostForm(NULL, [], t('Confirm'));
+ $entity = $storage->load('second');
+ $this->assertRaw(t('The configuration was imported successfully.'));
+ $this->assertTrue(is_string($entity->label()), 'Entity label is a string');
+ $this->assertTrue(strpos($entity->label(), 'ObjectSerialization') > 0, 'Label contains serialized object');
+ }
+ else {
+ // If the Symfony parser is used there will be an error.
+ $this->assertSession()->responseContains('The import failed with the following message:');
+ $this->assertSession()->responseContains('Object support when parsing a YAML file has been disabled');
+ }
}
/**
diff --git a/core/modules/rest/src/RestServiceProvider.php b/core/modules/rest/src/RestServiceProvider.php
index e705de4..ca63bc7 100644
--- a/core/modules/rest/src/RestServiceProvider.php
+++ b/core/modules/rest/src/RestServiceProvider.php
@@ -7,7 +7,7 @@ use Drupal\Core\DependencyInjection\ServiceProviderInterface;
use Drupal\rest\LinkManager\LinkManager;
use Drupal\rest\LinkManager\RelationLinkManager;
use Drupal\rest\LinkManager\TypeLinkManager;
-use Symfony\Component\DependencyInjection\DefinitionDecorator;
+use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Reference;
/**
@@ -28,21 +28,21 @@ class RestServiceProvider implements ServiceProviderInterface {
// @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
// Use hal.link_manager instead.
// @see https://www.drupal.org/node/2830467
- $service_definition = new DefinitionDecorator(new Reference('hal.link_manager'));
+ $service_definition = new ChildDefinition(new Reference('hal.link_manager'));
$service_definition->setClass(LinkManager::class);
$container->setDefinition('rest.link_manager', $service_definition);
// @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
// Use hal.link_manager.type instead.
// @see https://www.drupal.org/node/2830467
- $service_definition = new DefinitionDecorator(new Reference('hal.link_manager.type'));
+ $service_definition = new ChildDefinition(new Reference('hal.link_manager.type'));
$service_definition->setClass(TypeLinkManager::class);
$container->setDefinition('rest.link_manager.type', $service_definition);
// @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
// Use hal.link_manager.relation instead.
// @see https://www.drupal.org/node/2830467
- $service_definition = new DefinitionDecorator(new Reference('hal.link_manager.relation'));
+ $service_definition = new ChildDefinition(new Reference('hal.link_manager.relation'));
$service_definition->setClass(RelationLinkManager::class);
$container->setDefinition('rest.link_manager.relation', $service_definition);
}
diff --git a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php
index 04ba8ad..76ed2e2 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php
@@ -67,9 +67,15 @@ class QueryTest extends DatabaseTestBase {
public function testConditionOperatorArgumentsSQLInjection() {
$injection = "IS NOT NULL) ;INSERT INTO {test} (name) VALUES ('test12345678'); -- ";
- // Convert errors to exceptions for testing purposes below.
- set_error_handler(function ($severity, $message, $filename, $lineno) {
- throw new \ErrorException($message, 0, $severity, $filename, $lineno);
+ $previous_error_handler = set_error_handler(function ($severity, $message, $filename, $lineno, $context) use (&$previous_error_handler) {
+ // Normalize the filename to use UNIX directory separators.
+ if (preg_match('@core/lib/Drupal/Core/Database/Query/Condition.php$@', str_replace(DIRECTORY_SEPARATOR, '/', $filename))) {
+ // Convert errors to exceptions for testing purposes below.
+ throw new \ErrorException($message, 0, $severity, $filename, $lineno);
+ }
+ if ($previous_error_handler) {
+ return $previous_error_handler($severity, $message, $filename, $lineno, $context);
+ }
});
try {
$result = db_select('test', 't')
diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
index c1b7095..2ed2e74 100644
--- a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
+++ b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
@@ -68,7 +68,7 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper {
$this->containerBuilder->getAliases()->willReturn([]);
$this->containerBuilder->getParameterBag()->willReturn(new ParameterBag());
$this->containerBuilder->getDefinitions()->willReturn(NULL);
- $this->containerBuilder->isFrozen()->willReturn(TRUE);
+ $this->containerBuilder->isCompiled()->willReturn(TRUE);
$definition = [];
$definition['aliases'] = [];
@@ -147,7 +147,7 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper {
$parameter_bag = new ParameterBag($parameters);
$this->containerBuilder->getParameterBag()->willReturn($parameter_bag);
- $this->containerBuilder->isFrozen()->willReturn($is_frozen);
+ $this->containerBuilder->isCompiled()->willReturn($is_frozen);
if (isset($parameters['reference'])) {
$definition = new Definition('\stdClass');
diff --git a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
index a750eca..baafcd5 100644
--- a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
+++ b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
@@ -193,4 +193,59 @@ class ContainerAwareEventDispatcherTest extends SymfonyContainerAwareEventDispat
$this->assertSame(5, $actualPriority);
}
+ /**
+ * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead.
+ * @group legacy
+ */
+ public function testAddAListenerService() {
+ parent::testAddAListenerService();
+ }
+
+ /**
+ * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead.
+ * @group legacy
+ */
+ public function testPreventDuplicateListenerService() {
+ parent::testPreventDuplicateListenerService();
+ }
+
+ /**
+ * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead.
+ * @group legacy
+ */
+ public function testAddASubscriberService() {
+ parent::testAddASubscriberService();
+ }
+
+ /**
+ * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead.
+ * @group legacy
+ */
+ public function testHasListenersOnLazyLoad() {
+ parent::testHasListenersOnLazyLoad();
+ }
+
+ /**
+ * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead.
+ * @group legacy
+ */
+ public function testGetListenersOnLazyLoad() {
+ parent::testGetListenersOnLazyLoad();
+ }
+
+ /**
+ * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead.
+ * @group legacy
+ */
+ public function testRemoveAfterDispatch() {
+ parent::testRemoveAfterDispatch();
+ }
+
+ /**
+ * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead.
+ * @group legacy
+ */
+ public function testRemoveBeforeDispatch() {
+ parent::testRemoveBeforeDispatch();
+ }
}
diff --git a/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php b/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php
index becd7c0..b74a64f 100644
--- a/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php
+++ b/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php
@@ -77,20 +77,46 @@ class YamlTest extends TestCase {
}
/**
- * Ensures that decoding php objects is similar for PECL and Symfony.
+ * Ensures that decoding php objects does not work in PECL.
*
* @requires extension yaml
+ *
+ * @see \Drupal\Tests\Component\Serialization\YamlTest::testObjectSupportDisabledSymfony()
*/
- public function testObjectSupportDisabled() {
+ public function testObjectSupportDisabledPecl() {
$object = new \stdClass();
$object->foo = 'bar';
// In core all Yaml encoding is done via Symfony and it does not support
- // objects so in order to encode an object we hace to use the PECL
+ // objects so in order to encode an object we have to use the PECL
// extension.
// @see \Drupal\Component\Serialization\Yaml::encode()
$yaml = YamlPecl::encode([$object]);
$this->assertEquals(['O:8:"stdClass":1:{s:3:"foo";s:3:"bar";}'], YamlPecl::decode($yaml));
- $this->assertEquals(['!php/object "O:8:\"stdClass\":1:{s:3:\"foo\";s:3:\"bar\";}"'], YamlSymfony::decode($yaml));
+ }
+
+ /**
+ * Ensures that decoding php objects does not work in Symfony.
+ *
+ * @requires extension yaml
+ *
+ * @see \Drupal\Tests\Component\Serialization\YamlTest::testObjectSupportDisabledPecl()
+ */
+ public function testObjectSupportDisabledSymfony() {
+ if (method_exists($this, 'setExpectedExceptionRegExp')) {
+ $this->setExpectedExceptionRegExp(InvalidDataTypeException::class, '/^Object support when parsing a YAML file has been disabled/');
+ }
+ else {
+ $this->expectException(InvalidDataTypeException::class);
+ $this->expectExceptionMessageRegExp('/^Object support when parsing a YAML file has been disabled/');
+ }
+ $object = new \stdClass();
+ $object->foo = 'bar';
+ // In core all Yaml encoding is done via Symfony and it does not support
+ // objects so in order to encode an object we have to use the PECL
+ // extension.
+ // @see \Drupal\Component\Serialization\Yaml::encode()
+ $yaml = YamlPecl::encode([$object]);
+ YamlSymfony::decode($yaml);
}
/**
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php
index aea2524..638bd15 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php
@@ -39,7 +39,7 @@ class ProxyServicesPassTest extends UnitTestCase {
$this->proxyServicesPass->process($container);
- $this->assertCount(1, $container->getDefinitions());
+ $this->assertCount(2, $container->getDefinitions());
$this->assertEquals('Drupal\Core\Plugin\CachedDiscoveryClearer', $container->getDefinition('plugin_cache_clearer')->getClass());
}
@@ -53,7 +53,7 @@ class ProxyServicesPassTest extends UnitTestCase {
$this->proxyServicesPass->process($container);
- $this->assertCount(2, $container->getDefinitions());
+ $this->assertCount(3, $container->getDefinitions());
$non_proxy_definition = $container->getDefinition('drupal.proxy_original_service.plugin_cache_clearer');
$this->assertEquals('Drupal\Core\Plugin\CachedDiscoveryClearer', $non_proxy_definition->getClass());
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php
index 5fe2b44..848c458 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php
@@ -38,7 +38,7 @@ class TaggedHandlersPassTest extends UnitTestCase {
$handler_pass = new TaggedHandlersPass();
$handler_pass->process($container);
- $this->assertCount(1, $container->getDefinitions());
+ $this->assertCount(2, $container->getDefinitions());
$this->assertFalse($container->getDefinition('consumer_id')->hasMethodCall('addHandler'));
}
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php
index 026154d..08465d6 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php
@@ -62,6 +62,25 @@ class ContainerBuilderTest extends UnitTestCase {
}
/**
+ * @covers ::register
+ */
+ public function testRegister() {
+ $container = new ContainerBuilder();
+ $service = $container->register('bar');
+ $this->assertTrue($service->isPublic());
+ }
+
+ /**
+ * @covers ::setAlias
+ */
+ public function testSetAlias() {
+ $container = new ContainerBuilder();
+ $container->register('bar');
+ $alias = $container->setAlias('foo', 'bar');
+ $this->assertTrue($alias->isPublic());
+ }
+
+ /**
* Tests serialization.
*/
public function testSerialize() {
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php
index 97b2c94..4093b6a 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php
@@ -28,6 +28,9 @@ class YamlFileLoaderTest extends UnitTestCase {
services:
example_service:
class: \Drupal\Core\ExampleClass
+ example_private_service:
+ class: \Drupal\Core\ExampleClass
+ public: false
YAML;
vfsStream::setup('drupal', NULL, [
@@ -39,6 +42,11 @@ YAML;
$yaml_file_loader->load('vfs://drupal/modules/example/example.yml');
$this->assertEquals(['_provider' => [['provider' => 'example']]], $builder->getDefinition('example_service')->getTags());
+ $this->assertTrue($builder->getDefinition('example_service')->isPublic());
+ $this->assertFalse($builder->getDefinition('example_private_service')->isPublic());
+ $builder->compile();
+ $this->assertTrue($builder->has('example_service'));
+ $this->assertFalse($builder->has('example_private_service'));
}
}
diff --git a/core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php b/core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php
index 278ec06..aa69ad0 100644
--- a/core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php
@@ -76,7 +76,8 @@ class FormAjaxSubscriberTest extends UnitTestCase {
->willReturn($response);
$event = $this->assertResponseFromException($request, $exception, $response);
- $this->assertSame(200, $event->getResponse()->headers->get('X-Status-Code'));
+ $this->assertTrue($event->isAllowingCustomResponseCode());
+ $this->assertSame(200, $event->getResponse()->getStatusCode());
}
/**
@@ -100,7 +101,8 @@ class FormAjaxSubscriberTest extends UnitTestCase {
->willReturn($response);
$event = $this->assertResponseFromException($request, $exception, $response);
- $this->assertSame(200, $event->getResponse()->headers->get('X-Status-Code'));
+ $this->assertTrue($event->isAllowingCustomResponseCode());
+ $this->assertSame(200, $event->getResponse()->getStatusCode());
}
/**
@@ -176,9 +178,10 @@ class FormAjaxSubscriberTest extends UnitTestCase {
$event = new GetResponseForExceptionEvent($this->httpKernel, $request, HttpKernelInterface::MASTER_REQUEST, $exception);
$this->subscriber->onException($event);
+ $this->assertTrue($event->isAllowingCustomResponseCode());
$actual_response = $event->getResponse();
$this->assertInstanceOf('\Drupal\Core\Ajax\AjaxResponse', $actual_response);
- $this->assertSame(200, $actual_response->headers->get('X-Status-Code'));
+ $this->assertSame(200, $actual_response->getStatusCode());
$expected_commands[] = [
'command' => 'insert',
'method' => 'prepend',
diff --git a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php
index b7a784d..9350327 100644
--- a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php
+++ b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php
@@ -47,6 +47,10 @@ class ReverseProxyMiddlewareTest extends UnitTestCase {
* Tests that subscriber sets trusted headers when reverse proxy is set.
*
* @dataProvider reverseProxyEnabledProvider
+ *
+ * @group legacy
+ *
+ * @expectedDeprecation The "Symfony\Component\HttpFoundation\Request::setTrustedHeaderName()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the $trustedHeaderSet argument of the Request::setTrustedProxies() method instead.
*/
public function testReverseProxyEnabled($provided_settings) {
// Enable reverse proxy and add test values.
@@ -87,10 +91,10 @@ class ReverseProxyMiddlewareTest extends UnitTestCase {
$request = new Request();
$middleware->handle($request);
- $this->assertSame($settings->get('reverse_proxy_header'), $request->getTrustedHeaderName($request::HEADER_CLIENT_IP));
- $this->assertSame($settings->get('reverse_proxy_proto_header'), $request->getTrustedHeaderName($request::HEADER_CLIENT_PROTO));
- $this->assertSame($settings->get('reverse_proxy_host_header'), $request->getTrustedHeaderName($request::HEADER_CLIENT_HOST));
- $this->assertSame($settings->get('reverse_proxy_port_header'), $request->getTrustedHeaderName($request::HEADER_CLIENT_PORT));
+ $this->assertSame($settings->get('reverse_proxy_header'), $request->getTrustedHeaderName($request::HEADER_X_FORWARDED_FOR));
+ $this->assertSame($settings->get('reverse_proxy_proto_header'), $request->getTrustedHeaderName($request::HEADER_X_FORWARDED_PROTO));
+ $this->assertSame($settings->get('reverse_proxy_host_header'), $request->getTrustedHeaderName($request::HEADER_X_FORWARDED_HOST));
+ $this->assertSame($settings->get('reverse_proxy_port_header'), $request->getTrustedHeaderName($request::HEADER_X_FORWARDED_PORT));
$this->assertSame($settings->get('reverse_proxy_forwarded_header'), $request->getTrustedHeaderName($request::HEADER_FORWARDED));
$this->assertSame($settings->get('reverse_proxy_addresses'), $request->getTrustedProxies());
}
diff --git a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
index 26967fa..5bcc74e 100644
--- a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
+++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
@@ -318,6 +318,12 @@ trait DeprecationListenerTrait {
"The 'rest.entity.workflow.GET.json' route is deprecated since version 8.5.x and will be removed in 9.0.0. Use the 'rest.entity.workflow.GET' route instead.",
"The 'rest.entity.workflow.GET.xml' route is deprecated since version 8.5.x and will be removed in 9.0.0. Use the 'rest.entity.workflow.GET' route instead.",
"The 'rest.entity.workflow.GET.hal_json' route is deprecated since version 8.5.x and will be removed in 9.0.0. Use the 'rest.entity.workflow.GET' route instead.",
+ 'The Symfony\Component\ClassLoader\ApcClassLoader class is deprecated since Symfony 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.',
+ 'The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead.',
+ 'The Symfony\Component\HttpFoundation\Session\Storage\Handler\WriteCheckSessionHandler class is deprecated since Symfony 3.4 and will be removed in 4.0. Implement `SessionUpdateTimestampHandlerInterface` or extend `AbstractSessionHandler` instead.',
+ 'The "session_handler.write_check" service relies on the deprecated "Symfony\Component\HttpFoundation\Session\Storage\Handler\WriteCheckSessionHandler" class. It should either be deprecated or its implementation upgraded.',
+ 'Not setting the strict option of the Choice constraint to true is deprecated since Symfony 3.4 and will throw an exception in 4.0.',
+ 'Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since Symfony 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable instead.',
];
}