diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index d4182db630352..84dd98f43ad2b 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,6 +1,6 @@
| Q | A
| ------------- | ---
-| Branch? | 5.x for features / 4.4 or 5.2 for bug fixes
+| Branch? | 5.4 for features / 4.4, 5.2 or 5.3 for bug fixes
| Bug fix? | yes/no
| New feature? | yes/no
| Deprecations? | yes/no
diff --git a/.travis.yml b/.travis.yml
index a77e0422ba5d4..1b9678a7b6388 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,12 +50,14 @@ before_install:
set -e
stty cols 120
cp .github/composer-config.json "$(composer config home)/config.json"
+ git config --global user.email ""
+ git config --global user.name "Symfony"
export PHPUNIT=$(readlink -f ./phpunit)
export PHPUNIT_X="$PHPUNIT --exclude-group tty,benchmark,intl-data"
export COMPOSER_UP='composer update --no-progress --ansi'
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
- export SYMFONY_DEPRECATIONS_HELPER=max[indirect]=170
export SYMFONY_FEATURE_BRANCH=$(curl -s https://flex.symfony.com/versions.json | jq -r '."dev-name"')
+ export SYMFONY_VERSIONS=$(git ls-remote -q --heads | cut -f2 | grep -o '/[1-9][0-9]*\.[0-9].*' | sort -V)
nanoseconds () {
local cmd="date"
@@ -180,11 +182,6 @@ install:
- |
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
- git config --global user.email ""
- git config --global user.name "Symfony"
-
- SYMFONY_VERSIONS=$(git ls-remote -q --heads);
-
if [[ ! $deps ]]; then
php .github/build-packages.php HEAD^ $SYMFONY_VERSION src/Symfony/Bridge/PhpUnit
else
@@ -201,10 +198,10 @@ install:
fi
- |
- # For the feature-branch, when deps=high, the version before it is checked out and tested with the locally patched components
- if [[ $deps = high && $TRAVIS_BRANCH = $SYMFONY_FEATURE_BRANCH ]]; then
+ # For the highest branch, when deps=high, the version before it is checked out and tested with the locally patched components
+ if [[ $deps = high && $SYMFONY_VERSION = $(echo "$SYMFONY_VERSIONS" | tail -n 1 | sed s/.//) ]]; then
export FLIP='^'
- export SYMFONY_VERSION=$(echo "$SYMFONY_VERSIONS" | grep -o '/[1-9]\.[0-9].*' | tail -n 1 | sed s/.//) &&
+ export SYMFONY_VERSION=$(echo "$SYMFONY_VERSIONS" | grep -FB1 /$SYMFONY_VERSION | head -n 1 | sed s/.//) &&
git fetch --depth=2 origin $SYMFONY_VERSION &&
git checkout -m FETCH_HEAD &&
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
@@ -212,7 +209,7 @@ install:
- |
# Skip the phpunit-bridge on bugfix-branches when $deps is empty
- if [[ ! $deps && ! $TRAVIS_BRANCH = $SYMFONY_FEATURE_BRANCH ]]; then
+ if [[ ! $deps && $SYMFONY_VERSION != $SYMFONY_FEATURE_BRANCH ]]; then
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h\n' | sort)
fi
@@ -227,7 +224,7 @@ install:
- |
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one
- [[ $deps = high && ${SYMFONY_VERSION%.*} != $(echo "$SYMFONY_VERSIONS" | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1 | grep -o '[0-9]*' | head -n 1) ]] && export LEGACY=,legacy
+ [[ $deps = high && $SYMFONY_VERSION = *.4 ]] && export LEGACY=,legacy
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
if [[ $deps ]]; then mv composer.json.phpunit composer.json; fi
@@ -264,7 +261,7 @@ install:
(cd src/Symfony/Component/HttpFoundation; mv composer.bak composer.json)
COMPONENTS=$(git diff --name-only src/ | grep composer.json || true)
- if [[ $COMPONENTS && $LEGACY && ! $TRAVIS_BRANCH = $SYMFONY_FEATURE_BRANCH && $TRAVIS_PULL_REQUEST != false && $(echo "$SYMFONY_VERSIONS" | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1) = $SYMFONY_FEATURE_BRANCH ]]; then
+ if [[ $COMPONENTS && $SYMFONY_VERSION = *.4 && $TRAVIS_PULL_REQUEST != false ]]; then
export FLIP='^'
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
diff --git a/CHANGELOG-4.4.md b/CHANGELOG-4.4.md
index 6e4c195f4ccc4..87e51995fca8b 100644
--- a/CHANGELOG-4.4.md
+++ b/CHANGELOG-4.4.md
@@ -7,6 +7,15 @@ in 4.4 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.4.0...v4.4.1
+* 4.4.25 (2021-06-01)
+
+ * bug #41000 [Form] Use !isset for checks cause this doesn't falsely include 0 (Kai Dederichs)
+ * bug #41407 [DependencyInjection] keep container.service_subscriber tag on the decorated definition (xabbuh)
+ * bug #40866 [Filesystem] fix readlink() for Windows (a1812)
+ * bug #41394 [Form] fix support for years outside of the 32b range on x86 arch (nicolas-grekas)
+ * bug #39847 [Messenger] Fix merging PrototypedArrayNode associative values (svityashchuk)
+ * bug #41346 [WebProfilerBundle] Wrapping exception js in Sfjs check and also loading base_js Sfjs if needed (weaverryan)
+
* 4.4.24 (2021-05-19)
* security #cve-2021-21424 [Security\Core] Fix user enumeration via response body on invalid credentials (chalasr)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 082da17e5c9f3..311957098418a 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -14,8 +14,8 @@ The Symfony Connect username in parenthesis allows to get more information
- Christophe Coevoet (stof)
- Maxime Steinhausser (ogizanagi)
- Kévin Dunglas (dunglas)
- - Grégoire Pineau (lyrixx)
- Jérémy DERUSSÉ (jderusse)
+ - Grégoire Pineau (lyrixx)
- Wouter De Jong (wouterj)
- Jordi Boggiano (seldaek)
- Victor Berchet (victor)
@@ -140,6 +140,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Adrien Brault (adrienbrault)
- Julien Falque (julienfalque)
- Jacob Dreesen (jdreesen)
+ - Malte Schlüter (maltemaltesich)
- Joel Wurtz (brouznouf)
- Florian Voutzinos (florianv)
- Teoh Han Hui (teohhanhui)
@@ -152,10 +153,10 @@ The Symfony Connect username in parenthesis allows to get more information
- Tugdual Saunier (tucksaun)
- excelwebzone
- Gordon Franke (gimler)
+ - Saif Eddin Gmati (azjezz)
- Jesse Rushlow (geeshoe)
- Fabien Pennequin (fabienpennequin)
- Théo FIDRY (theofidry)
- - Saif Eddin Gmati (azjezz)
- Eric GELOEN (gelo)
- Matthieu Napoli (mnapoli)
- HypeMC (hypemc)
@@ -182,6 +183,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Albert Casademont (acasademont)
- Arnaud Kleinpeter (nanocom)
- Guilherme Blanco (guilhermeblanco)
+ - Smaine Milianni (ismail1432)
- SpacePossum
- Pablo Godel (pgodel)
- Andreas Braun
@@ -194,6 +196,7 @@ The Symfony Connect username in parenthesis allows to get more information
- George Mponos (gmponos)
- jwdeitch
- Fabien Bourigault (fbourigault)
+ - Alexander Menshchikov (zmey_kk)
- YaFou
- Mikael Pajunen
- Andreas Schempp (aschempp)
@@ -207,12 +210,10 @@ The Symfony Connect username in parenthesis allows to get more information
- Chi-teck
- Jeroen Spee (jeroens)
- Timo Bakx (timobakx)
- - Smaine Milianni (ismail1432)
- Marco Pivetta (ocramius)
- Vincent Touzet (vincenttouzet)
- Rouven Weßling (realityking)
- Jérôme Parmentier (lctrs)
- - Alexander Menshchikov (zmey_kk)
- Ben Davies (bendavies)
- Alessandro Lai (jean85)
- Clemens Tolboom
@@ -268,7 +269,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Ruben Gonzalez (rubenrua)
- Benjamin Dulau (dbenjamin)
- Baptiste Lafontaine (magnetik)
- - Malte Schlüter (maltemaltesich)
- Mathieu Lemoine (lemoinem)
- Christian Schmidt
- Andreas Hucks (meandmymonkey)
@@ -301,6 +301,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Jeremy Livingston (jeremylivingston)
- Michael Lee (zerustech)
- Matthieu Auger (matthieuauger)
+ - Michael Babker (mbabker)
- Leszek Prabucki (l3l0)
- Nicolas Philippe (nikophil)
- Colin O'Dell (colinodell)
@@ -342,7 +343,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Sébastien Lavoie (lavoiesl)
- Dariusz
- Farhad Safarov (safarov)
- - Michael Babker (mbabker)
- Thomas Lallement (raziel057)
- Francois Zaninotto
- Claude Khedhiri (ck-developer)
@@ -453,6 +453,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Bertrand Zuchuat (garfield-fr)
- Gabor Toth (tgabi333)
- realmfoo
+ - Roman Martinuk (a2a4)
- Thomas Tourlourat (armetiz)
- Andrey Esaulov (andremaha)
- Grégoire Passault (gregwar)
@@ -473,6 +474,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Francesc Rosàs (frosas)
- Romain Pierre (romain-pierre)
- Julien Galenski (ruian)
+ - Dieter
- Bongiraud Dominique
- Kyle
- janschoenherr
@@ -546,7 +548,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Philipp Cordes
- Jeroen Thora (bolle)
- Costin Bereveanu (schniper)
- - Roman Martinuk (a2a4)
- Loïc Chardonnet (gnusat)
- Marek Kalnik (marekkalnik)
- Vyacheslav Salakhutdinov (megazoll)
@@ -596,7 +597,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Christophe L. (christophelau)
- Sander Toonen (xatoo)
- Anthon Pang (robocoder)
- - Dieter
- Marko Kaznovac (kaznovac)
- Marc Laporte
- Michał Jusięga
@@ -623,6 +623,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Niklas Fiekas
- Philippe Segatori
- Markus Bachmann (baachi)
+ - fd6130 (fdtvui)
- Kévin THERAGE (kevin_therage)
- Michel Hunziker
- Gunnstein Lye (glye)
@@ -873,7 +874,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Safonov Nikita (ns3777k)
- vitaliytv
- Nicolas Martin (cocorambo)
- - fd6130 (fdtvui)
- Dalibor Karlović (dkarlovi)
- Sebastian Blum
- Alexis Lefebvre
@@ -1179,6 +1179,7 @@ The Symfony Connect username in parenthesis allows to get more information
- possum
- Denis Zunke (donalberto)
- Ahmadou Waly Ndiaye (waly)
+ - Antonin CLAUZIER (0x346e3730)
- moldman
- Evert Harmeling (evertharmeling)
- Jonathan Johnson (jrjohnson)
@@ -1234,6 +1235,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Eric Hertwig
- Niels Robin-Aubertin
- Adrien Wilmet (adrienfr)
+ - Aleksandar Jakovljevic (ajakov)
- Laurent Bassin (lbassin)
- Hamza Makraz (makraz)
- andrey1s
@@ -1610,6 +1612,7 @@ The Symfony Connect username in parenthesis allows to get more information
- hjkl
- Tony Cosentino (tony-co)
- Dan Wilga
+ - Oleksii Svitiashchuk
- Andrew Tch
- Alexander Cheprasov
- Tristan Bessoussa (sf_tristanb)
@@ -1651,6 +1654,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Gustavo Adrian
- Jorrit Schippers (jorrit)
- Yannick
+ - Kai Dederichs
- Vladimir Luchaninov (luchaninov)
- spdionis
- rchoquet
@@ -2774,6 +2778,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Jordane VASPARD (elementaire)
- Elliot Anderson (elliot)
- Fabien D. (fabd)
+ - Faizan Akram Dar (faizanakram)
- Carsten Eilers (fnc)
- Sorin Gitlan (forapathy)
- Yohan Giarelli (frequence-web)
diff --git a/composer.json b/composer.json
index 39a35f30f1087..c3ef535f772d1 100644
--- a/composer.json
+++ b/composer.json
@@ -49,7 +49,8 @@
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php72": "~1.5",
"symfony/polyfill-php73": "^1.11",
- "symfony/polyfill-php80": "^1.15"
+ "symfony/polyfill-php80": "^1.15",
+ "symfony/polyfill-php81": "^1.22"
},
"replace": {
"symfony/asset": "self.version",
@@ -124,7 +125,6 @@
"doctrine/data-fixtures": "^1.1",
"doctrine/dbal": "^2.6|^3.0",
"doctrine/orm": "^2.6.3",
- "doctrine/doctrine-bundle": "^1.5|^2.0",
"guzzlehttp/promises": "^1.4",
"masterminds/html5": "^2.6",
"monolog/monolog": "^1.25.1",
diff --git a/phpunit b/phpunit
index 3a18c4c782e1e..7ca6ceeccbee8 100755
--- a/phpunit
+++ b/phpunit
@@ -1,7 +1,9 @@
#!/usr/bin/env php
getMethod('evaluate')->hasReturnType()) {
+} elseif (\PHP_VERSION_ID < 70100 || !$r->getMethod('evaluate')->hasReturnType()) {
trait ConstraintTrait
{
use Legacy\ConstraintTraitForV8;
diff --git a/src/Symfony/Bridge/PhpUnit/README.md b/src/Symfony/Bridge/PhpUnit/README.md
index 89707340a8f80..b7c041a8ee5a7 100644
--- a/src/Symfony/Bridge/PhpUnit/README.md
+++ b/src/Symfony/Bridge/PhpUnit/README.md
@@ -7,8 +7,8 @@ especially user deprecation notices management.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/phpunit_bridge.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/phpunit_bridge.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Bridge/ProxyManager/README.md b/src/Symfony/Bridge/ProxyManager/README.md
index 8297ce1ed914b..ff6c6b2f76505 100644
--- a/src/Symfony/Bridge/ProxyManager/README.md
+++ b/src/Symfony/Bridge/ProxyManager/README.md
@@ -7,9 +7,9 @@ Symfony components.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
[1]: https://github.com/FriendsOfPHP/proxy-manager-lts
diff --git a/src/Symfony/Bridge/Twig/README.md b/src/Symfony/Bridge/Twig/README.md
index 8077918405ab9..533d573dbcabe 100644
--- a/src/Symfony/Bridge/Twig/README.md
+++ b/src/Symfony/Bridge/Twig/README.md
@@ -7,7 +7,7 @@ various Symfony components.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
index 1e0ee70ccbaaf..e63b10115cc14 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
@@ -895,28 +895,30 @@ private function registerRouterConfiguration(array $config, ContainerBuilder $co
$container->setParameter('request_listener.http_port', $config['http_port']);
$container->setParameter('request_listener.https_port', $config['https_port']);
- if ($this->annotationsConfigEnabled) {
- $container->register('routing.loader.annotation', AnnotatedRouteControllerLoader::class)
- ->setPublic(false)
- ->addTag('routing.loader', ['priority' => -10])
- ->addArgument(new Reference('annotation_reader'));
-
- $container->register('routing.loader.annotation.directory', AnnotationDirectoryLoader::class)
- ->setPublic(false)
- ->addTag('routing.loader', ['priority' => -10])
- ->setArguments([
- new Reference('file_locator'),
- new Reference('routing.loader.annotation'),
- ]);
-
- $container->register('routing.loader.annotation.file', AnnotationFileLoader::class)
- ->setPublic(false)
- ->addTag('routing.loader', ['priority' => -10])
- ->setArguments([
- new Reference('file_locator'),
- new Reference('routing.loader.annotation'),
- ]);
+ if (!$this->annotationsConfigEnabled) {
+ return;
}
+
+ $container->register('routing.loader.annotation', AnnotatedRouteControllerLoader::class)
+ ->setPublic(false)
+ ->addTag('routing.loader', ['priority' => -10])
+ ->addArgument(new Reference('annotation_reader'));
+
+ $container->register('routing.loader.annotation.directory', AnnotationDirectoryLoader::class)
+ ->setPublic(false)
+ ->addTag('routing.loader', ['priority' => -10])
+ ->setArguments([
+ new Reference('file_locator'),
+ new Reference('routing.loader.annotation'),
+ ]);
+
+ $container->register('routing.loader.annotation.file', AnnotationFileLoader::class)
+ ->setPublic(false)
+ ->addTag('routing.loader', ['priority' => -10])
+ ->setArguments([
+ new Reference('file_locator'),
+ new Reference('routing.loader.annotation'),
+ ]);
}
private function registerSessionConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader)
diff --git a/src/Symfony/Bundle/FrameworkBundle/README.md b/src/Symfony/Bundle/FrameworkBundle/README.md
index 59e1b44643c88..76c7700fa03af 100644
--- a/src/Symfony/Bundle/FrameworkBundle/README.md
+++ b/src/Symfony/Bundle/FrameworkBundle/README.md
@@ -7,7 +7,7 @@ Symfony full-stack framework.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Bundle/SecurityBundle/README.md b/src/Symfony/Bundle/SecurityBundle/README.md
index 01f967c8d9e32..63b502f87ba5c 100644
--- a/src/Symfony/Bundle/SecurityBundle/README.md
+++ b/src/Symfony/Bundle/SecurityBundle/README.md
@@ -7,7 +7,7 @@ Symfony full-stack framework.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json
index 872ef66b7d3c2..eb0ac43064c10 100644
--- a/src/Symfony/Bundle/SecurityBundle/composer.json
+++ b/src/Symfony/Bundle/SecurityBundle/composer.json
@@ -27,7 +27,7 @@
"symfony/security-http": "^4.4.5"
},
"require-dev": {
- "doctrine/doctrine-bundle": "^1.5|^2.0",
+ "doctrine/annotations": "^1.10.4",
"symfony/asset": "^3.4|^4.0|^5.0",
"symfony/browser-kit": "^4.2|^5.0",
"symfony/console": "^3.4|^4.0|^5.0",
diff --git a/src/Symfony/Bundle/TwigBundle/README.md b/src/Symfony/Bundle/TwigBundle/README.md
index 2d6266ef807a0..3ae2985baef94 100644
--- a/src/Symfony/Bundle/TwigBundle/README.md
+++ b/src/Symfony/Bundle/TwigBundle/README.md
@@ -7,7 +7,7 @@ framework.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Bundle/WebProfilerBundle/README.md b/src/Symfony/Bundle/WebProfilerBundle/README.md
index 49df78bb32e24..e3c1400b1c6e9 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/README.md
+++ b/src/Symfony/Bundle/WebProfilerBundle/README.md
@@ -10,7 +10,7 @@ vulnerabilities in your project.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig
index f70bfc01c3983..859b7b2f28ab5 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig
+++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig
@@ -5,7 +5,7 @@
them as JavaScript source code. Always use '/*' comments instead
of '//' comments to avoid impossible-to-debug side-effects #}
-if (typeof Sfjs === 'undefined') {
+if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') {
Sfjs = (function() {
"use strict";
diff --git a/src/Symfony/Bundle/WebServerBundle/README.md b/src/Symfony/Bundle/WebServerBundle/README.md
index 284a3015fd63a..1d733098617d0 100644
--- a/src/Symfony/Bundle/WebServerBundle/README.md
+++ b/src/Symfony/Bundle/WebServerBundle/README.md
@@ -12,7 +12,7 @@ application.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Asset/README.md b/src/Symfony/Component/Asset/README.md
index 3291698493bc1..37e7ea37014ff 100644
--- a/src/Symfony/Component/Asset/README.md
+++ b/src/Symfony/Component/Asset/README.md
@@ -7,8 +7,8 @@ CSS stylesheets, JavaScript files and image files.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/asset/introduction.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/asset/introduction.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/BrowserKit/README.md b/src/Symfony/Component/BrowserKit/README.md
index ef6d75b7837e5..aa5217096c7e4 100644
--- a/src/Symfony/Component/BrowserKit/README.md
+++ b/src/Symfony/Component/BrowserKit/README.md
@@ -10,8 +10,8 @@ component to make real HTTP requests.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/browser_kit/introduction.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/browser_kit/introduction.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Cache/README.md b/src/Symfony/Component/Cache/README.md
index 8fc7564415770..74052052c8c33 100644
--- a/src/Symfony/Component/Cache/README.md
+++ b/src/Symfony/Component/Cache/README.md
@@ -12,8 +12,8 @@ interoperability between PSR-6 implementations.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/cache.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/cache.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php
index 68bb270172eb6..72d3578be7a09 100644
--- a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php
+++ b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php
@@ -225,11 +225,11 @@ protected function normalizeValue($value)
$value = $this->remapXml($value);
- $isAssoc = array_keys($value) !== range(0, \count($value) - 1);
+ $isList = array_is_list($value);
$normalized = [];
foreach ($value as $k => $v) {
if (null !== $this->keyAttribute && \is_array($v)) {
- if (!isset($v[$this->keyAttribute]) && \is_int($k) && !$isAssoc) {
+ if (!isset($v[$this->keyAttribute]) && \is_int($k) && $isList) {
$ex = new InvalidConfigurationException(sprintf('The attribute "%s" must be set for path "%s".', $this->keyAttribute, $this->getPath()));
$ex->setPath($this->getPath());
@@ -271,7 +271,7 @@ protected function normalizeValue($value)
}
$prototype = $this->getPrototypeForChild($k);
- if (null !== $this->keyAttribute || $isAssoc) {
+ if (null !== $this->keyAttribute || !$isList) {
$normalized[$k] = $prototype->normalize($v);
} else {
$normalized[] = $prototype->normalize($v);
@@ -304,9 +304,10 @@ protected function mergeValues($leftSide, $rightSide)
return $rightSide;
}
+ $isList = array_is_list($rightSide);
foreach ($rightSide as $k => $v) {
- // prototype, and key is irrelevant, append the element
- if (null === $this->keyAttribute) {
+ // prototype, and key is irrelevant there are no named keys, append the element
+ if (null === $this->keyAttribute && $isList) {
$leftSide[] = $v;
continue;
}
diff --git a/src/Symfony/Component/Config/README.md b/src/Symfony/Component/Config/README.md
index 5315624661e6a..10c2ddd05831b 100644
--- a/src/Symfony/Component/Config/README.md
+++ b/src/Symfony/Component/Config/README.md
@@ -8,8 +8,8 @@ files, or for instance a database).
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/config.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/config.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php
index 7a58ead8da967..58d2408a71c90 100644
--- a/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php
@@ -338,4 +338,56 @@ public function getDataForKeyRemovedLeftValueOnly()
],
];
}
+
+ /**
+ * @dataProvider getPrototypedArrayNodeDataToMerge
+ */
+ public function testPrototypedArrayNodeMerge($left, $right, $expected)
+ {
+ $node = new PrototypedArrayNode('options');
+ $node->setNormalizeKeys(false);
+ $node->setPrototype(new VariableNode('value'));
+ $node->setDefaultValue([]);
+
+ $result = $node->merge($left, $right);
+
+ self::assertSame($result, $expected);
+ }
+
+ public function getPrototypedArrayNodeDataToMerge()
+ {
+ return [
+ // data to merged is a plain array
+ [
+ ['foo', 'bar'],
+ ['foo', 'baz', 'qux'],
+ ['foo', 'bar', 'foo', 'baz', 'qux'],
+ ],
+ // data to be merged is an associative array
+ [
+ ['option1' => true, 'option2' => 'foo'],
+ [
+ 'option2' => 'bar',
+ 'option3' => 42,
+ 'option4' => [
+ 'option41' => 'baz',
+ 'option42' => [
+ 'option423' => 'qux',
+ ],
+ ],
+ ],
+ [
+ 'option1' => true,
+ 'option2' => 'bar',
+ 'option3' => 42,
+ 'option4' => [
+ 'option41' => 'baz',
+ 'option42' => [
+ 'option423' => 'qux',
+ ],
+ ],
+ ],
+ ],
+ ];
+ }
}
diff --git a/src/Symfony/Component/Config/composer.json b/src/Symfony/Component/Config/composer.json
index d71373bb8151f..13e4cd409f3ac 100644
--- a/src/Symfony/Component/Config/composer.json
+++ b/src/Symfony/Component/Config/composer.json
@@ -18,7 +18,8 @@
"require": {
"php": ">=7.1.3",
"symfony/filesystem": "^3.4|^4.0|^5.0",
- "symfony/polyfill-ctype": "~1.8"
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-php81": "^1.22"
},
"require-dev": {
"symfony/event-dispatcher": "^3.4|^4.0|^5.0",
diff --git a/src/Symfony/Component/Console/README.md b/src/Symfony/Component/Console/README.md
index 3e2fc605e5bfd..c89b4a1a2066b 100644
--- a/src/Symfony/Component/Console/README.md
+++ b/src/Symfony/Component/Console/README.md
@@ -7,11 +7,11 @@ interfaces.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/console.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/console.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
Credits
-------
diff --git a/src/Symfony/Component/CssSelector/README.md b/src/Symfony/Component/CssSelector/README.md
index 7c4c411635dc2..ede4a3acc3157 100644
--- a/src/Symfony/Component/CssSelector/README.md
+++ b/src/Symfony/Component/CssSelector/README.md
@@ -6,11 +6,11 @@ The CssSelector component converts CSS selectors to XPath expressions.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/css_selector.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/css_selector.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
Credits
-------
diff --git a/src/Symfony/Component/Debug/README.md b/src/Symfony/Component/Debug/README.md
index 90b36f0cb8e59..0627e69c35f31 100644
--- a/src/Symfony/Component/Debug/README.md
+++ b/src/Symfony/Component/Debug/README.md
@@ -24,7 +24,7 @@ Debug::enable();
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php b/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php
index 7659b8336e7bd..fed2916f34def 100644
--- a/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php
+++ b/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php
@@ -82,10 +82,12 @@ public function process(ContainerBuilder $container)
$decoratingTags = $decoratingDefinition->getTags();
$resetTags = [];
- if (isset($decoratingTags['container.service_locator'])) {
- // container.service_locator has special logic and it must not be transferred out to decorators
- $resetTags = ['container.service_locator' => $decoratingTags['container.service_locator']];
- unset($decoratingTags['container.service_locator']);
+ // container.service_locator and container.service_subscriber have special logic and they must not be transferred out to decorators
+ foreach (['container.service_locator', 'container.service_subscriber'] as $containerTag) {
+ if (isset($decoratingTags[$containerTag])) {
+ $resetTags[$containerTag] = $decoratingTags[$containerTag];
+ unset($decoratingTags[$containerTag]);
+ }
}
$definition->setTags(array_merge($decoratingTags, $definition->getTags()));
diff --git a/src/Symfony/Component/DependencyInjection/README.md b/src/Symfony/Component/DependencyInjection/README.md
index cb2d4a11c5886..fa6719a7998f1 100644
--- a/src/Symfony/Component/DependencyInjection/README.md
+++ b/src/Symfony/Component/DependencyInjection/README.md
@@ -7,8 +7,8 @@ way objects are constructed in your application.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/dependency_injection.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/dependency_injection.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php
index ce9a2cfafeebb..a739dda3a679a 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php
@@ -243,6 +243,25 @@ public function testProcessLeavesServiceLocatorTagOnOriginalDefinition()
$this->assertEquals(['bar' => ['attr' => 'baz'], 'foobar' => ['attr' => 'bar']], $container->getDefinition('baz')->getTags());
}
+ public function testProcessLeavesServiceSubscriberTagOnOriginalDefinition()
+ {
+ $container = new ContainerBuilder();
+ $container
+ ->register('foo')
+ ->setTags(['container.service_subscriber' => [], 'bar' => ['attr' => 'baz']])
+ ;
+ $container
+ ->register('baz')
+ ->setTags(['foobar' => ['attr' => 'bar']])
+ ->setDecoratedService('foo')
+ ;
+
+ $this->process($container);
+
+ $this->assertEquals(['container.service_subscriber' => []], $container->getDefinition('baz.inner')->getTags());
+ $this->assertEquals(['bar' => ['attr' => 'baz'], 'foobar' => ['attr' => 'bar']], $container->getDefinition('baz')->getTags());
+ }
+
protected function process(ContainerBuilder $container)
{
$repeatedPass = new DecoratorServicePass();
diff --git a/src/Symfony/Component/DomCrawler/README.md b/src/Symfony/Component/DomCrawler/README.md
index 5fad2e27adc2f..c77a5e39cff2a 100644
--- a/src/Symfony/Component/DomCrawler/README.md
+++ b/src/Symfony/Component/DomCrawler/README.md
@@ -6,8 +6,8 @@ The DomCrawler component eases DOM navigation for HTML and XML documents.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/dom_crawler.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/dom_crawler.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Dotenv/README.md b/src/Symfony/Component/Dotenv/README.md
index 855b8c02a1df6..08c90fcc88022 100644
--- a/src/Symfony/Component/Dotenv/README.md
+++ b/src/Symfony/Component/Dotenv/README.md
@@ -30,7 +30,7 @@ $dotenv->loadEnv(__DIR__.'/.env');
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/ErrorHandler/README.md b/src/Symfony/Component/ErrorHandler/README.md
index d14ccfd7b9c58..dd0be15e8a845 100644
--- a/src/Symfony/Component/ErrorHandler/README.md
+++ b/src/Symfony/Component/ErrorHandler/README.md
@@ -35,7 +35,7 @@ $data = ErrorHandler::call(static function () use ($filename, $datetimeFormat) {
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/ErrorHandler/Resources/assets/js/exception.js b/src/Symfony/Component/ErrorHandler/Resources/assets/js/exception.js
index 8cc7b5318449a..0720a3a358aac 100644
--- a/src/Symfony/Component/ErrorHandler/Resources/assets/js/exception.js
+++ b/src/Symfony/Component/ErrorHandler/Resources/assets/js/exception.js
@@ -1,279 +1,280 @@
/* This file is based on WebProfilerBundle/Resources/views/Profiler/base_js.html.twig.
If you make any change in this file, verify the same change is needed in the other file. */
/* .tab');
- var tabNavigation = document.createElement('ul');
- tabNavigation.className = 'tab-navigation';
-
- var selectedTabId = 'tab-' + i + '-0'; /* select the first tab by default */
- for (var j = 0; j < tabs.length; j++) {
- var tabId = 'tab-' + i + '-' + j;
- var tabTitle = tabs[j].querySelector('.tab-title').innerHTML;
-
- var tabNavigationItem = document.createElement('li');
- tabNavigationItem.setAttribute('data-tab-id', tabId);
- if (hasClass(tabs[j], 'active')) { selectedTabId = tabId; }
- if (hasClass(tabs[j], 'disabled')) { addClass(tabNavigationItem, 'disabled'); }
- tabNavigationItem.innerHTML = tabTitle;
- tabNavigation.appendChild(tabNavigationItem);
-
- var tabContent = tabs[j].querySelector('.tab-content');
- tabContent.parentElement.setAttribute('id', tabId);
- }
+if (typeof Sfjs === 'undefined') {
+ Sfjs = (function() {
+ "use strict";
+
+ if ('classList' in document.documentElement) {
+ var hasClass = function (el, cssClass) { return el.classList.contains(cssClass); };
+ var removeClass = function(el, cssClass) { el.classList.remove(cssClass); };
+ var addClass = function(el, cssClass) { el.classList.add(cssClass); };
+ var toggleClass = function(el, cssClass) { el.classList.toggle(cssClass); };
+ } else {
+ var hasClass = function (el, cssClass) { return el.className.match(new RegExp('\\b' + cssClass + '\\b')); };
+ var removeClass = function(el, cssClass) { el.className = el.className.replace(new RegExp('\\b' + cssClass + '\\b'), ' '); };
+ var addClass = function(el, cssClass) { if (!hasClass(el, cssClass)) { el.className += " " + cssClass; } };
+ var toggleClass = function(el, cssClass) { hasClass(el, cssClass) ? removeClass(el, cssClass) : addClass(el, cssClass); };
+ }
- tabGroups[i].insertBefore(tabNavigation, tabGroups[i].firstChild);
- addClass(document.querySelector('[data-tab-id="' + selectedTabId + '"]'), 'active');
- }
+ var addEventListener;
+
+ var el = document.createElement('div');
+ if (!('addEventListener' in el)) {
+ addEventListener = function (element, eventName, callback) {
+ element.attachEvent('on' + eventName, callback);
+ };
+ } else {
+ addEventListener = function (element, eventName, callback) {
+ element.addEventListener(eventName, callback, false);
+ };
+ }
- /* display the active tab and add the 'click' event listeners */
- for (i = 0; i < tabGroups.length; i++) {
- tabNavigation = tabGroups[i].querySelectorAll(':scope >.tab-navigation li');
+ return {
+ addEventListener: addEventListener,
- for (j = 0; j < tabNavigation.length; j++) {
- tabId = tabNavigation[j].getAttribute('data-tab-id');
- document.getElementById(tabId).querySelector('.tab-title').className = 'hidden';
+ createTabs: function() {
+ var tabGroups = document.querySelectorAll('.sf-tabs:not([data-processed=true])');
- if (hasClass(tabNavigation[j], 'active')) {
- document.getElementById(tabId).className = 'block';
- } else {
- document.getElementById(tabId).className = 'hidden';
+ /* create the tab navigation for each group of tabs */
+ for (var i = 0; i < tabGroups.length; i++) {
+ var tabs = tabGroups[i].querySelectorAll(':scope > .tab');
+ var tabNavigation = document.createElement('ul');
+ tabNavigation.className = 'tab-navigation';
+
+ var selectedTabId = 'tab-' + i + '-0'; /* select the first tab by default */
+ for (var j = 0; j < tabs.length; j++) {
+ var tabId = 'tab-' + i + '-' + j;
+ var tabTitle = tabs[j].querySelector('.tab-title').innerHTML;
+
+ var tabNavigationItem = document.createElement('li');
+ tabNavigationItem.setAttribute('data-tab-id', tabId);
+ if (hasClass(tabs[j], 'active')) { selectedTabId = tabId; }
+ if (hasClass(tabs[j], 'disabled')) { addClass(tabNavigationItem, 'disabled'); }
+ tabNavigationItem.innerHTML = tabTitle;
+ tabNavigation.appendChild(tabNavigationItem);
+
+ var tabContent = tabs[j].querySelector('.tab-content');
+ tabContent.parentElement.setAttribute('id', tabId);
}
- tabNavigation[j].addEventListener('click', function(e) {
- var activeTab = e.target || e.srcElement;
+ tabGroups[i].insertBefore(tabNavigation, tabGroups[i].firstChild);
+ addClass(document.querySelector('[data-tab-id="' + selectedTabId + '"]'), 'active');
+ }
- /* needed because when the tab contains HTML contents, user can click */
- /* on any of those elements instead of their parent '
' element */
- while (activeTab.tagName.toLowerCase() !== 'li') {
- activeTab = activeTab.parentNode;
- }
+ /* display the active tab and add the 'click' event listeners */
+ for (i = 0; i < tabGroups.length; i++) {
+ tabNavigation = tabGroups[i].querySelectorAll(':scope >.tab-navigation li');
- /* get the full list of tabs through the parent of the active tab element */
- var tabNavigation = activeTab.parentNode.children;
- for (var k = 0; k < tabNavigation.length; k++) {
- var tabId = tabNavigation[k].getAttribute('data-tab-id');
+ for (j = 0; j < tabNavigation.length; j++) {
+ tabId = tabNavigation[j].getAttribute('data-tab-id');
+ document.getElementById(tabId).querySelector('.tab-title').className = 'hidden';
+
+ if (hasClass(tabNavigation[j], 'active')) {
+ document.getElementById(tabId).className = 'block';
+ } else {
document.getElementById(tabId).className = 'hidden';
- removeClass(tabNavigation[k], 'active');
}
- addClass(activeTab, 'active');
- var activeTabId = activeTab.getAttribute('data-tab-id');
- document.getElementById(activeTabId).className = 'block';
- });
- }
-
- tabGroups[i].setAttribute('data-processed', 'true');
- }
- },
+ tabNavigation[j].addEventListener('click', function(e) {
+ var activeTab = e.target || e.srcElement;
- createToggles: function() {
- var toggles = document.querySelectorAll('.sf-toggle:not([data-processed=true])');
+ /* needed because when the tab contains HTML contents, user can click */
+ /* on any of those elements instead of their parent '' element */
+ while (activeTab.tagName.toLowerCase() !== 'li') {
+ activeTab = activeTab.parentNode;
+ }
- for (var i = 0; i < toggles.length; i++) {
- var elementSelector = toggles[i].getAttribute('data-toggle-selector');
- var element = document.querySelector(elementSelector);
+ /* get the full list of tabs through the parent of the active tab element */
+ var tabNavigation = activeTab.parentNode.children;
+ for (var k = 0; k < tabNavigation.length; k++) {
+ var tabId = tabNavigation[k].getAttribute('data-tab-id');
+ document.getElementById(tabId).className = 'hidden';
+ removeClass(tabNavigation[k], 'active');
+ }
- addClass(element, 'sf-toggle-content');
+ addClass(activeTab, 'active');
+ var activeTabId = activeTab.getAttribute('data-tab-id');
+ document.getElementById(activeTabId).className = 'block';
+ });
+ }
- if (toggles[i].hasAttribute('data-toggle-initial') && toggles[i].getAttribute('data-toggle-initial') == 'display') {
- addClass(toggles[i], 'sf-toggle-on');
- addClass(element, 'sf-toggle-visible');
- } else {
- addClass(toggles[i], 'sf-toggle-off');
- addClass(element, 'sf-toggle-hidden');
+ tabGroups[i].setAttribute('data-processed', 'true');
}
+ },
- addEventListener(toggles[i], 'click', function(e) {
- e.preventDefault();
+ createToggles: function() {
+ var toggles = document.querySelectorAll('.sf-toggle:not([data-processed=true])');
- if ('' !== window.getSelection().toString()) {
- /* Don't do anything on text selection */
- return;
- }
+ for (var i = 0; i < toggles.length; i++) {
+ var elementSelector = toggles[i].getAttribute('data-toggle-selector');
+ var element = document.querySelector(elementSelector);
- var toggle = e.target || e.srcElement;
+ addClass(element, 'sf-toggle-content');
- /* needed because when the toggle contains HTML contents, user can click */
- /* on any of those elements instead of their parent '.sf-toggle' element */
- while (!hasClass(toggle, 'sf-toggle')) {
- toggle = toggle.parentNode;
+ if (toggles[i].hasAttribute('data-toggle-initial') && toggles[i].getAttribute('data-toggle-initial') == 'display') {
+ addClass(toggles[i], 'sf-toggle-on');
+ addClass(element, 'sf-toggle-visible');
+ } else {
+ addClass(toggles[i], 'sf-toggle-off');
+ addClass(element, 'sf-toggle-hidden');
}
- var element = document.querySelector(toggle.getAttribute('data-toggle-selector'));
+ addEventListener(toggles[i], 'click', function(e) {
+ e.preventDefault();
- toggleClass(toggle, 'sf-toggle-on');
- toggleClass(toggle, 'sf-toggle-off');
- toggleClass(element, 'sf-toggle-hidden');
- toggleClass(element, 'sf-toggle-visible');
+ if ('' !== window.getSelection().toString()) {
+ /* Don't do anything on text selection */
+ return;
+ }
- /* the toggle doesn't change its contents when clicking on it */
- if (!toggle.hasAttribute('data-toggle-alt-content')) {
- return;
- }
+ var toggle = e.target || e.srcElement;
- if (!toggle.hasAttribute('data-toggle-original-content')) {
- toggle.setAttribute('data-toggle-original-content', toggle.innerHTML);
- }
+ /* needed because when the toggle contains HTML contents, user can click */
+ /* on any of those elements instead of their parent '.sf-toggle' element */
+ while (!hasClass(toggle, 'sf-toggle')) {
+ toggle = toggle.parentNode;
+ }
- var currentContent = toggle.innerHTML;
- var originalContent = toggle.getAttribute('data-toggle-original-content');
- var altContent = toggle.getAttribute('data-toggle-alt-content');
- toggle.innerHTML = currentContent !== altContent ? altContent : originalContent;
- });
+ var element = document.querySelector(toggle.getAttribute('data-toggle-selector'));
+
+ toggleClass(toggle, 'sf-toggle-on');
+ toggleClass(toggle, 'sf-toggle-off');
+ toggleClass(element, 'sf-toggle-hidden');
+ toggleClass(element, 'sf-toggle-visible');
- /* Prevents from disallowing clicks on links inside toggles */
- var toggleLinks = toggles[i].querySelectorAll('a');
- for (var j = 0; j < toggleLinks.length; j++) {
- addEventListener(toggleLinks[j], 'click', function(e) {
- e.stopPropagation();
+ /* the toggle doesn't change its contents when clicking on it */
+ if (!toggle.hasAttribute('data-toggle-alt-content')) {
+ return;
+ }
+
+ if (!toggle.hasAttribute('data-toggle-original-content')) {
+ toggle.setAttribute('data-toggle-original-content', toggle.innerHTML);
+ }
+
+ var currentContent = toggle.innerHTML;
+ var originalContent = toggle.getAttribute('data-toggle-original-content');
+ var altContent = toggle.getAttribute('data-toggle-alt-content');
+ toggle.innerHTML = currentContent !== altContent ? altContent : originalContent;
});
- }
- toggles[i].setAttribute('data-processed', 'true');
- }
- },
-
- createFilters: function() {
- document.querySelectorAll('[data-filters] [data-filter]').forEach(function (filter) {
- var filters = filter.closest('[data-filters]'),
- type = 'choice',
- name = filter.dataset.filter,
- ucName = name.charAt(0).toUpperCase()+name.slice(1),
- list = document.createElement('ul'),
- values = filters.dataset['filter'+ucName] || filters.querySelectorAll('[data-filter-'+name+']'),
- labels = {},
- defaults = null,
- indexed = {},
- processed = {};
- if (typeof values === 'string') {
- type = 'level';
- labels = values.split(',');
- values = values.toLowerCase().split(',');
- defaults = values.length - 1;
- }
- addClass(list, 'filter-list');
- addClass(list, 'filter-list-'+type);
- values.forEach(function (value, i) {
- if (value instanceof HTMLElement) {
- value = value.dataset['filter'+ucName];
- }
- if (value in processed) {
- return;
+ /* Prevents from disallowing clicks on links inside toggles */
+ var toggleLinks = toggles[i].querySelectorAll('a');
+ for (var j = 0; j < toggleLinks.length; j++) {
+ addEventListener(toggleLinks[j], 'click', function(e) {
+ e.stopPropagation();
+ });
}
- var option = document.createElement('li'),
- label = i in labels ? labels[i] : value,
- active = false,
- matches;
- if ('' === label) {
- option.innerHTML = '(none)';
- } else {
- option.innerText = label;
+
+ toggles[i].setAttribute('data-processed', 'true');
+ }
+ },
+
+ createFilters: function() {
+ document.querySelectorAll('[data-filters] [data-filter]').forEach(function (filter) {
+ var filters = filter.closest('[data-filters]'),
+ type = 'choice',
+ name = filter.dataset.filter,
+ ucName = name.charAt(0).toUpperCase()+name.slice(1),
+ list = document.createElement('ul'),
+ values = filters.dataset['filter'+ucName] || filters.querySelectorAll('[data-filter-'+name+']'),
+ labels = {},
+ defaults = null,
+ indexed = {},
+ processed = {};
+ if (typeof values === 'string') {
+ type = 'level';
+ labels = values.split(',');
+ values = values.toLowerCase().split(',');
+ defaults = values.length - 1;
}
- option.dataset.filter = value;
- option.setAttribute('title', 1 === (matches = filters.querySelectorAll('[data-filter-'+name+'="'+value+'"]').length) ? 'Matches 1 row' : 'Matches '+matches+' rows');
- indexed[value] = i;
- list.appendChild(option);
- addEventListener(option, 'click', function () {
- if ('choice' === type) {
- filters.querySelectorAll('[data-filter-'+name+']').forEach(function (row) {
- if (option.dataset.filter === row.dataset['filter'+ucName]) {
- toggleClass(row, 'filter-hidden-'+name);
+ addClass(list, 'filter-list');
+ addClass(list, 'filter-list-'+type);
+ values.forEach(function (value, i) {
+ if (value instanceof HTMLElement) {
+ value = value.dataset['filter'+ucName];
+ }
+ if (value in processed) {
+ return;
+ }
+ var option = document.createElement('li'),
+ label = i in labels ? labels[i] : value,
+ active = false,
+ matches;
+ if ('' === label) {
+ option.innerHTML = '(none)';
+ } else {
+ option.innerText = label;
+ }
+ option.dataset.filter = value;
+ option.setAttribute('title', 1 === (matches = filters.querySelectorAll('[data-filter-'+name+'="'+value+'"]').length) ? 'Matches 1 row' : 'Matches '+matches+' rows');
+ indexed[value] = i;
+ list.appendChild(option);
+ addEventListener(option, 'click', function () {
+ if ('choice' === type) {
+ filters.querySelectorAll('[data-filter-'+name+']').forEach(function (row) {
+ if (option.dataset.filter === row.dataset['filter'+ucName]) {
+ toggleClass(row, 'filter-hidden-'+name);
+ }
+ });
+ toggleClass(option, 'active');
+ } else if ('level' === type) {
+ if (i === this.parentNode.querySelectorAll('.active').length - 1) {
+ return;
}
- });
- toggleClass(option, 'active');
- } else if ('level' === type) {
- if (i === this.parentNode.querySelectorAll('.active').length - 1) {
- return;
- }
- this.parentNode.querySelectorAll('li').forEach(function (currentOption, j) {
- if (j <= i) {
- addClass(currentOption, 'active');
- if (i === j) {
- addClass(currentOption, 'last-active');
+ this.parentNode.querySelectorAll('li').forEach(function (currentOption, j) {
+ if (j <= i) {
+ addClass(currentOption, 'active');
+ if (i === j) {
+ addClass(currentOption, 'last-active');
+ } else {
+ removeClass(currentOption, 'last-active');
+ }
} else {
+ removeClass(currentOption, 'active');
removeClass(currentOption, 'last-active');
}
- } else {
- removeClass(currentOption, 'active');
- removeClass(currentOption, 'last-active');
- }
- });
- filters.querySelectorAll('[data-filter-'+name+']').forEach(function (row) {
- if (i < indexed[row.dataset['filter'+ucName]]) {
- addClass(row, 'filter-hidden-'+name);
- } else {
- removeClass(row, 'filter-hidden-'+name);
- }
+ });
+ filters.querySelectorAll('[data-filter-'+name+']').forEach(function (row) {
+ if (i < indexed[row.dataset['filter'+ucName]]) {
+ addClass(row, 'filter-hidden-'+name);
+ } else {
+ removeClass(row, 'filter-hidden-'+name);
+ }
+ });
+ }
+ });
+ if ('choice' === type) {
+ active = null === defaults || 0 <= defaults.indexOf(value);
+ } else if ('level' === type) {
+ active = i <= defaults;
+ if (active && i === defaults) {
+ addClass(option, 'last-active');
+ }
+ }
+ if (active) {
+ addClass(option, 'active');
+ } else {
+ filters.querySelectorAll('[data-filter-'+name+'="'+value+'"]').forEach(function (row) {
+ toggleClass(row, 'filter-hidden-'+name);
});
}
+ processed[value] = true;
});
- if ('choice' === type) {
- active = null === defaults || 0 <= defaults.indexOf(value);
- } else if ('level' === type) {
- active = i <= defaults;
- if (active && i === defaults) {
- addClass(option, 'last-active');
- }
- }
- if (active) {
- addClass(option, 'active');
- } else {
- filters.querySelectorAll('[data-filter-'+name+'="'+value+'"]').forEach(function (row) {
- toggleClass(row, 'filter-hidden-'+name);
- });
+
+ if (1 < list.childNodes.length) {
+ filter.appendChild(list);
+ filter.dataset.filtered = '';
}
- processed[value] = true;
});
-
- if (1 < list.childNodes.length) {
- filter.appendChild(list);
- filter.dataset.filtered = '';
- }
- });
- }
- };
-})();
-
-Sfjs.addEventListener(document, 'DOMContentLoaded', function() {
- Sfjs.createTabs();
- Sfjs.createToggles();
- Sfjs.createFilters();
-});
-
+ }
+ };
+ })();
+
+ Sfjs.addEventListener(document, 'DOMContentLoaded', function() {
+ Sfjs.createTabs();
+ Sfjs.createToggles();
+ Sfjs.createFilters();
+ });
+}
/*]]>*/
diff --git a/src/Symfony/Component/EventDispatcher/CHANGELOG.md b/src/Symfony/Component/EventDispatcher/CHANGELOG.md
index 54fd04227b36c..4a3ea066efd30 100644
--- a/src/Symfony/Component/EventDispatcher/CHANGELOG.md
+++ b/src/Symfony/Component/EventDispatcher/CHANGELOG.md
@@ -29,21 +29,21 @@ CHANGELOG
3.4.0
-----
- * Implementing `TraceableEventDispatcherInterface` without the `reset()` method has been deprecated.
+ * Implementing `TraceableEventDispatcherInterface` without the `reset()` method has been deprecated.
3.3.0
-----
- * The ContainerAwareEventDispatcher class has been deprecated. Use EventDispatcher with closure factories instead.
+ * The ContainerAwareEventDispatcher class has been deprecated. Use EventDispatcher with closure factories instead.
3.0.0
-----
- * The method `getListenerPriority($eventName, $listener)` has been added to the
- `EventDispatcherInterface`.
- * The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()`
- and `Event::getName()` have been removed.
- The event dispatcher and the event name are passed to the listener call.
+ * The method `getListenerPriority($eventName, $listener)` has been added to the
+ `EventDispatcherInterface`.
+ * The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()`
+ and `Event::getName()` have been removed.
+ The event dispatcher and the event name are passed to the listener call.
2.5.0
-----
diff --git a/src/Symfony/Component/EventDispatcher/README.md b/src/Symfony/Component/EventDispatcher/README.md
index e0d38eed017f8..dcdb68d218115 100644
--- a/src/Symfony/Component/EventDispatcher/README.md
+++ b/src/Symfony/Component/EventDispatcher/README.md
@@ -8,8 +8,8 @@ them.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/event_dispatcher.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/event_dispatcher.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/ExpressionLanguage/README.md b/src/Symfony/Component/ExpressionLanguage/README.md
index 08b310d10b140..2b2e3de535538 100644
--- a/src/Symfony/Component/ExpressionLanguage/README.md
+++ b/src/Symfony/Component/ExpressionLanguage/README.md
@@ -8,8 +8,8 @@ evaluate expressions. An expression is a one-liner that returns a value
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/expression_language/introduction.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/expression_language/introduction.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php
index 483c0b4261bfa..f8dbb983fc525 100644
--- a/src/Symfony/Component/Filesystem/Filesystem.php
+++ b/src/Symfony/Component/Filesystem/Filesystem.php
@@ -416,14 +416,14 @@ public function readlink($path, $canonicalize = false)
return null;
}
- if ('\\' === \DIRECTORY_SEPARATOR) {
+ if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70410) {
$path = readlink($path);
}
return realpath($path);
}
- if ('\\' === \DIRECTORY_SEPARATOR) {
+ if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70400) {
return realpath($path);
}
diff --git a/src/Symfony/Component/Filesystem/README.md b/src/Symfony/Component/Filesystem/README.md
index cb03d43c15dd2..f2f6d45f7386e 100644
--- a/src/Symfony/Component/Filesystem/README.md
+++ b/src/Symfony/Component/Filesystem/README.md
@@ -6,8 +6,8 @@ The Filesystem component provides basic utilities for the filesystem.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/filesystem.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/filesystem.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
index 77f780127e050..8d71de39a1cb4 100644
--- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
+++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
@@ -376,7 +376,7 @@ public function testRemoveCleansInvalidLinks()
// create symlink to nonexistent dir
rmdir($basePath.'dir');
- $this->assertFalse('\\' === \DIRECTORY_SEPARATOR ? @readlink($basePath.'dir-link') : is_dir($basePath.'dir-link'));
+ $this->assertFalse('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70400 ? @readlink($basePath.'dir-link') : is_dir($basePath.'dir-link'));
$this->filesystem->remove($basePath);
@@ -1032,7 +1032,12 @@ public function testReadAbsoluteLink()
$this->filesystem->symlink($link1, $link2);
$this->assertEquals($file, $this->filesystem->readlink($link1));
- $this->assertEquals($link1, $this->filesystem->readlink($link2));
+
+ if (!('\\' == \DIRECTORY_SEPARATOR && \PHP_MAJOR_VERSION === 7 && \PHP_MINOR_VERSION === 3)) {
+ // Skip for Windows with PHP 7.3.*
+ $this->assertEquals($link1, $this->filesystem->readlink($link2));
+ }
+
$this->assertEquals($file, $this->filesystem->readlink($link1, true));
$this->assertEquals($file, $this->filesystem->readlink($link2, true));
$this->assertEquals($file, $this->filesystem->readlink($file, true));
diff --git a/src/Symfony/Component/Finder/README.md b/src/Symfony/Component/Finder/README.md
index 0b19c752572d8..22bdeb9bcf853 100644
--- a/src/Symfony/Component/Finder/README.md
+++ b/src/Symfony/Component/Finder/README.md
@@ -7,8 +7,8 @@ interface.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/finder.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/finder.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php
index e9896732f9020..2a4d10c0e3645 100644
--- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php
+++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php
@@ -170,9 +170,9 @@ public function reverseTransform($value)
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'],
- empty($value['hour']) ? $this->referenceDate->format('H') : $value['hour'],
- empty($value['minute']) ? $this->referenceDate->format('i') : $value['minute'],
- empty($value['second']) ? $this->referenceDate->format('s') : $value['second']
+ $value['hour'] ?? $this->referenceDate->format('H'),
+ $value['minute'] ?? $this->referenceDate->format('i'),
+ $value['second'] ?? $this->referenceDate->format('s')
),
new \DateTimeZone($this->outputTimezone)
);
diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php
index 0b9a4ffab3694..88f5457625836 100644
--- a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php
+++ b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php
@@ -381,9 +381,7 @@ private function listYears(array $years)
$result = [];
foreach ($years as $year) {
- if (false !== $y = gmmktime(0, 0, 0, 6, 15, $year)) {
- $result[$y] = $year;
- }
+ $result[\PHP_INT_SIZE === 4 ? \DateTime::createFromFormat('Y e', $year.' UTC')->format('U') : gmmktime(0, 0, 0, 6, 15, $year)] = $year;
}
return $result;
diff --git a/src/Symfony/Component/Form/README.md b/src/Symfony/Component/Form/README.md
index 5519cd00058dd..0cda654d7384f 100644
--- a/src/Symfony/Component/Form/README.md
+++ b/src/Symfony/Component/Form/README.md
@@ -6,8 +6,8 @@ The Form component allows you to easily create, process and reuse HTML forms.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/form.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/form.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
index 5891cc08aa29b..74e0a8d35524f 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
@@ -204,6 +204,32 @@ public function testSubmitFromSingleTextRaw()
$this->assertEquals('02.06.2010', $form->getViewData());
}
+ public function testArrayDateWithReferenceDoesUseReferenceTimeOnZero()
+ {
+ // we test against "de_DE", so we need the full implementation
+ IntlTestHelper::requireFullIntl($this, false);
+
+ \Locale::setDefault('de_DE');
+
+ $input = [
+ 'day' => '0',
+ 'month' => '0',
+ 'year' => '0',
+ ];
+
+ $form = $this->factory->create(static::TESTED_TYPE, $input, [
+ 'format' => \IntlDateFormatter::MEDIUM,
+ 'html5' => false,
+ 'model_timezone' => 'UTC',
+ 'view_timezone' => 'Europe/Berlin',
+ 'input' => 'array',
+ 'widget' => 'single_text',
+ ]);
+
+ $this->assertSame($input, $form->getData());
+ $this->assertEquals('01.01.1970', $form->getViewData());
+ }
+
public function testSubmitFromText()
{
$form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -927,19 +953,15 @@ public function testDayErrorsBubbleUp($widget)
$this->assertSame([$error], iterator_to_array($form->getErrors()));
}
- public function testYearsFor32BitsMachines()
+ public function testYears()
{
- if (4 !== \PHP_INT_SIZE) {
- $this->markTestSkipped('PHP 32 bit is required.');
- }
-
$view = $this->factory->create(static::TESTED_TYPE, null, [
- 'years' => range(1900, 2040),
+ 'years' => [1900, 2000, 2040],
])
->createView();
$listChoices = [];
- foreach (range(1902, 2037) as $y) {
+ foreach ([1900, 2000, 2040] as $y) {
$listChoices[] = new ChoiceView($y, $y, $y);
}
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
index 4c9700b7ef89e..ca4977b0500d1 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
@@ -969,6 +969,28 @@ public function testSubmitNullUsesDefaultEmptyData($emptyData = [], $expectedDat
$this->assertSame($expectedData, $form->getData());
}
+ public function testArrayTimeWithReferenceDoesNotUseReferenceTimeOnZero()
+ {
+ $form = $this->factory->create(static::TESTED_TYPE, null, [
+ 'model_timezone' => 'UTC',
+ 'view_timezone' => 'Europe/Berlin',
+ 'reference_date' => new \DateTimeImmutable('01-01-2021 12:34:56', new \DateTimeZone('UTC')),
+ 'input' => 'array',
+ ]);
+
+ $input = [
+ 'hour' => '0',
+ 'minute' => '0',
+ ];
+ $form->submit($input);
+
+ $this->assertEquals([
+ 'hour' => '23',
+ 'minute' => '0',
+ ], $form->getData());
+ $this->assertSame($input, $form->getViewData());
+ }
+
/**
* @dataProvider provideEmptyData
*/
diff --git a/src/Symfony/Component/HttpClient/README.md b/src/Symfony/Component/HttpClient/README.md
index 0c33db1c7c8e7..214489b7e7f76 100644
--- a/src/Symfony/Component/HttpClient/README.md
+++ b/src/Symfony/Component/HttpClient/README.md
@@ -6,8 +6,8 @@ The HttpClient component provides powerful methods to fetch HTTP resources synch
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/http_client.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/http_client.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/HttpFoundation/README.md b/src/Symfony/Component/HttpFoundation/README.md
index ac98f9b80ad5d..5cf9007444456 100644
--- a/src/Symfony/Component/HttpFoundation/README.md
+++ b/src/Symfony/Component/HttpFoundation/README.md
@@ -7,8 +7,8 @@ specification.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/http_foundation.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/http_foundation.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php
index e323fc3987ea9..27bf3e27a6de9 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php
@@ -122,9 +122,6 @@ public function testGc()
$this->proxy->gc(86400);
}
- /**
- * @requires PHPUnit 5.1
- */
public function testValidateId()
{
$mock = $this->createMock(TestSessionHandler::class);
@@ -137,9 +134,6 @@ public function testValidateId()
$this->assertTrue($this->proxy->validateId('id'));
}
- /**
- * @requires PHPUnit 5.1
- */
public function testUpdateTimestamp()
{
$mock = $this->createMock(TestSessionHandler::class);
diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Store.php b/src/Symfony/Component/HttpKernel/HttpCache/Store.php
index 3b69289f17df7..7dfdc491dda8d 100644
--- a/src/Symfony/Component/HttpKernel/HttpCache/Store.php
+++ b/src/Symfony/Component/HttpKernel/HttpCache/Store.php
@@ -349,7 +349,7 @@ private function load(string $key): ?string
{
$path = $this->getPath($key);
- return file_exists($path) && false !== ($contents = file_get_contents($path)) ? $contents : null;
+ return file_exists($path) && false !== ($contents = @file_get_contents($path)) ? $contents : null;
}
/**
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php
index 3492753cf5cb1..82ee8b26b9716 100644
--- a/src/Symfony/Component/HttpKernel/Kernel.php
+++ b/src/Symfony/Component/HttpKernel/Kernel.php
@@ -76,11 +76,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
private static $freshCache = [];
- public const VERSION = '4.4.24';
- public const VERSION_ID = 40424;
+ public const VERSION = '4.4.25';
+ public const VERSION_ID = 40425;
public const MAJOR_VERSION = 4;
public const MINOR_VERSION = 4;
- public const RELEASE_VERSION = 24;
+ public const RELEASE_VERSION = 25;
public const EXTRA_VERSION = '';
public const END_OF_MAINTENANCE = '11/2022';
diff --git a/src/Symfony/Component/HttpKernel/README.md b/src/Symfony/Component/HttpKernel/README.md
index 0136784a72d87..18d15f5ad835f 100644
--- a/src/Symfony/Component/HttpKernel/README.md
+++ b/src/Symfony/Component/HttpKernel/README.md
@@ -8,8 +8,8 @@ enough to create full-stack frameworks, micro-frameworks or advanced CMS systems
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/http_kernel.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/http_kernel.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Inflector/README.md b/src/Symfony/Component/Inflector/README.md
index a978850a44b07..6020695a8fa87 100644
--- a/src/Symfony/Component/Inflector/README.md
+++ b/src/Symfony/Component/Inflector/README.md
@@ -7,7 +7,7 @@ The Inflector component converts words between their singular and plural forms
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php
index 317510c2368fe..5011ee3321a32 100644
--- a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php
+++ b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php
@@ -180,7 +180,7 @@ public static function create($locale, $datetype, $timetype, $timezone = null, $
/**
* Format the date/time value (timestamp) as a string.
*
- * @param int|\DateTimeInterface $timestamp The timestamp to format
+ * @param int|string|\DateTimeInterface $timestamp The timestamp to format
*
* @return string|bool The formatted value or false if formatting failed
*
@@ -192,11 +192,15 @@ public function format($timestamp)
{
// intl allows timestamps to be passed as arrays - we don't
if (\is_array($timestamp)) {
- $message = 'Only integer Unix timestamps and DateTime objects are supported';
+ $message = 'Only Unix timestamps and DateTime objects are supported';
throw new MethodArgumentValueNotImplementedException(__METHOD__, 'timestamp', $timestamp, $message);
}
+ if (\is_string($timestamp) && $dt = \DateTime::createFromFormat('U', $timestamp)) {
+ $timestamp = $dt;
+ }
+
// behave like the intl extension
$argumentError = null;
if (!\is_int($timestamp) && !$timestamp instanceof \DateTimeInterface) {
@@ -212,7 +216,7 @@ public function format($timestamp)
}
if ($timestamp instanceof \DateTimeInterface) {
- $timestamp = $timestamp->getTimestamp();
+ $timestamp = $timestamp->format('U');
}
$transformer = new FullTransformer($this->getPattern(), $this->getTimeZoneId());
@@ -586,8 +590,7 @@ public function setTimeZone($timeZone)
*/
protected function createDateTime($timestamp)
{
- $dateTime = new \DateTime();
- $dateTime->setTimestamp($timestamp);
+ $dateTime = \DateTime::createFromFormat('U', $timestamp);
$dateTime->setTimezone($this->dateTimeZone);
return $dateTime;
diff --git a/src/Symfony/Component/Intl/README.md b/src/Symfony/Component/Intl/README.md
index e1fdbc9789051..39bc2af90cb78 100644
--- a/src/Symfony/Component/Intl/README.md
+++ b/src/Symfony/Component/Intl/README.md
@@ -10,12 +10,12 @@ locales, you should [install the intl PHP extension][0] instead.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/intl.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
- * [Docker images with intl support](https://hub.docker.com/r/jakzal/php-intl)
- (for the Intl component development)
+ * [Documentation](https://symfony.com/doc/current/components/intl.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Docker images with intl support](https://hub.docker.com/r/jakzal/php-intl)
+ (for the Intl component development)
[0]: https://php.net/intl.setup
diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php
index de61e7fb8409d..fd562b4d48797 100644
--- a/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php
+++ b/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php
@@ -72,7 +72,7 @@ public function testFormatWithUnsupportedTimestampArgument()
} catch (\Exception $e) {
$this->assertInstanceOf(MethodArgumentValueNotImplementedException::class, $e);
- $this->assertStringEndsWith('Only integer Unix timestamps and DateTime objects are supported. Please install the "intl" extension for full localization capabilities.', $e->getMessage());
+ $this->assertStringEndsWith('Only Unix timestamps and DateTime objects are supported. Please install the "intl" extension for full localization capabilities.', $e->getMessage());
}
}
diff --git a/src/Symfony/Component/Ldap/README.md b/src/Symfony/Component/Ldap/README.md
index 81e7768c6fdd0..7bfbe4c20a040 100644
--- a/src/Symfony/Component/Ldap/README.md
+++ b/src/Symfony/Component/Ldap/README.md
@@ -15,8 +15,8 @@ previous version of the component will break with this version.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/ldap)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/ldap)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Lock/README.md b/src/Symfony/Component/Lock/README.md
index 720986febfc66..b17304ae1134a 100644
--- a/src/Symfony/Component/Lock/README.md
+++ b/src/Symfony/Component/Lock/README.md
@@ -2,13 +2,13 @@ Lock Component
==============
The Lock component creates and manages locks, a mechanism to provide exclusive
-access to a shared resource.
+access to a shared resource.
Resources
---------
- * [Documentation](https://symfony.com/doc/master/components/lock.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/master/components/lock.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/README.md b/src/Symfony/Component/Mailer/Bridge/Amazon/README.md
index 1159927c41f9f..8624d50d2b99f 100644
--- a/src/Symfony/Component/Mailer/Bridge/Amazon/README.md
+++ b/src/Symfony/Component/Mailer/Bridge/Amazon/README.md
@@ -6,7 +6,7 @@ Provides Amazon SES integration for Symfony Mailer.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Mailer/Bridge/Google/README.md b/src/Symfony/Component/Mailer/Bridge/Google/README.md
index ac382d2169ddc..960cf705554c1 100644
--- a/src/Symfony/Component/Mailer/Bridge/Google/README.md
+++ b/src/Symfony/Component/Mailer/Bridge/Google/README.md
@@ -6,7 +6,7 @@ Provides Google Gmail integration for Symfony Mailer.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Mailer/Bridge/Mailchimp/README.md b/src/Symfony/Component/Mailer/Bridge/Mailchimp/README.md
index 56224554a504b..58860e6ada493 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/README.md
+++ b/src/Symfony/Component/Mailer/Bridge/Mailchimp/README.md
@@ -6,7 +6,7 @@ Provides Mandrill integration for Symfony Mailer.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Mailer/Bridge/Mailgun/README.md b/src/Symfony/Component/Mailer/Bridge/Mailgun/README.md
index 4c04b71595d54..bfac5774f1bf7 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailgun/README.md
+++ b/src/Symfony/Component/Mailer/Bridge/Mailgun/README.md
@@ -6,7 +6,7 @@ Provides Mailgun integration for Symfony Mailer.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Mailer/Bridge/Postmark/README.md b/src/Symfony/Component/Mailer/Bridge/Postmark/README.md
index 44246cfe0904c..0f184a5f7db00 100644
--- a/src/Symfony/Component/Mailer/Bridge/Postmark/README.md
+++ b/src/Symfony/Component/Mailer/Bridge/Postmark/README.md
@@ -6,7 +6,7 @@ Provides Postmark integration for Symfony Mailer.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/README.md b/src/Symfony/Component/Mailer/Bridge/Sendgrid/README.md
index 647d746be973f..1d5c6e1104b71 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/README.md
+++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/README.md
@@ -6,7 +6,7 @@ Provides Sendgrid integration for Symfony Mailer.
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Mailer/README.md b/src/Symfony/Component/Mailer/README.md
index 173ebe44bc705..05c56fddf3259 100644
--- a/src/Symfony/Component/Mailer/README.md
+++ b/src/Symfony/Component/Mailer/README.md
@@ -36,16 +36,20 @@ set up the `BodyRenderer`:
```php
use Symfony\Bridge\Twig\Mime\BodyRenderer;
+use Symfony\Bridge\Twig\Mime\TemplatedEmail;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\Mailer\EventListener\MessageListener;
+use Symfony\Component\Mailer\Mailer;
+use Symfony\Component\Mailer\Transport;
use Twig\Environment as TwigEnvironment;
$twig = new TwigEnvironment(...);
-$messageListener = new MessageListener(new BodyRenderer($twig));
+$messageListener = new MessageListener(null, new BodyRenderer($twig));
$eventDispatcher = new EventDispatcher();
$eventDispatcher->addSubscriber($messageListener);
+$transport = Transport::fromDsn('smtp://localhost', $eventDispatcher);
$mailer = new Mailer($transport, null, $eventDispatcher);
$email = (new TemplatedEmail())
@@ -56,14 +60,14 @@ $email = (new TemplatedEmail())
'username' => 'foo',
])
;
-$mailer->mail($email);
+$mailer->send($email);
```
Resources
---------
- * [Documentation](https://symfony.com/doc/current/mailer.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/mailer.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Messenger/README.md b/src/Symfony/Component/Messenger/README.md
index 77b7fc3b181c9..a253171a5529c 100644
--- a/src/Symfony/Component/Messenger/README.md
+++ b/src/Symfony/Component/Messenger/README.md
@@ -7,8 +7,8 @@ other applications or via message queues.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/messenger.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/messenger.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Mime/README.md b/src/Symfony/Component/Mime/README.md
index 4d565c9205fe1..8e4d5c77f607f 100644
--- a/src/Symfony/Component/Mime/README.md
+++ b/src/Symfony/Component/Mime/README.md
@@ -6,8 +6,8 @@ The MIME component allows manipulating MIME messages.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/mime.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/mime.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/OptionsResolver/README.md b/src/Symfony/Component/OptionsResolver/README.md
index 245e69b548d6d..c63b9005eba24 100644
--- a/src/Symfony/Component/OptionsResolver/README.md
+++ b/src/Symfony/Component/OptionsResolver/README.md
@@ -8,8 +8,8 @@ value), normalization and more.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/options_resolver.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/options_resolver.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Process/README.md b/src/Symfony/Component/Process/README.md
index b7ca5b4254942..afce5e45eee34 100644
--- a/src/Symfony/Component/Process/README.md
+++ b/src/Symfony/Component/Process/README.md
@@ -6,8 +6,8 @@ The Process component executes commands in sub-processes.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/process.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/process.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/PropertyAccess/README.md b/src/Symfony/Component/PropertyAccess/README.md
index f458b07c4e6e6..29cb233a010f3 100644
--- a/src/Symfony/Component/PropertyAccess/README.md
+++ b/src/Symfony/Component/PropertyAccess/README.md
@@ -7,8 +7,8 @@ object or array using a simple string notation.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/property_access.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/property_access.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
index 147be206ff673..6ca71798d9abe 100644
--- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
+++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
@@ -148,9 +148,6 @@ public function testGetValueThrowsExceptionIfUninitializedProperty()
$this->propertyAccessor->getValue(new UninitializedProperty(), 'uninitialized');
}
- /**
- * @requires PHP 7
- */
public function testGetValueThrowsExceptionIfUninitializedPropertyWithGetter()
{
$this->expectException(AccessException::class);
@@ -159,9 +156,6 @@ public function testGetValueThrowsExceptionIfUninitializedPropertyWithGetter()
$this->propertyAccessor->getValue(new UninitializedPrivateProperty(), 'uninitialized');
}
- /**
- * @requires PHP 7
- */
public function testGetValueThrowsExceptionIfUninitializedPropertyWithGetterOfAnonymousClass()
{
$this->expectException(AccessException::class);
@@ -179,9 +173,6 @@ public function getUninitialized(): array
$this->propertyAccessor->getValue($object, 'uninitialized');
}
- /**
- * @requires PHP 7
- */
public function testGetValueThrowsExceptionIfUninitializedPropertyWithGetterOfAnonymousStdClass()
{
$this->expectException(AccessException::class);
@@ -199,9 +190,6 @@ public function getUninitialized(): array
$this->propertyAccessor->getValue($object, 'uninitialized');
}
- /**
- * @requires PHP 7
- */
public function testGetValueThrowsExceptionIfUninitializedPropertyWithGetterOfAnonymousChildClass()
{
$this->expectException(AccessException::class);
diff --git a/src/Symfony/Component/PropertyInfo/README.md b/src/Symfony/Component/PropertyInfo/README.md
index 92e91772a2b24..da3514fc9d013 100644
--- a/src/Symfony/Component/PropertyInfo/README.md
+++ b/src/Symfony/Component/PropertyInfo/README.md
@@ -7,8 +7,8 @@ using metadata of popular sources.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/property_info.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/property_info.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Routing/CHANGELOG.md b/src/Symfony/Component/Routing/CHANGELOG.md
index 4eebca62065b0..5df4513566ccb 100644
--- a/src/Symfony/Component/Routing/CHANGELOG.md
+++ b/src/Symfony/Component/Routing/CHANGELOG.md
@@ -44,15 +44,15 @@ CHANGELOG
3.3.0
-----
- * [DEPRECATION] Class parameters have been deprecated and will be removed in 4.0.
- * router.options.generator_class
- * router.options.generator_base_class
- * router.options.generator_dumper_class
- * router.options.matcher_class
- * router.options.matcher_base_class
- * router.options.matcher_dumper_class
- * router.options.matcher.cache_class
- * router.options.generator.cache_class
+ * [DEPRECATION] Class parameters have been deprecated and will be removed in 4.0.
+ * router.options.generator_class
+ * router.options.generator_base_class
+ * router.options.generator_dumper_class
+ * router.options.matcher_class
+ * router.options.matcher_base_class
+ * router.options.matcher_dumper_class
+ * router.options.matcher.cache_class
+ * router.options.generator.cache_class
3.2.0
-----
diff --git a/src/Symfony/Component/Routing/README.md b/src/Symfony/Component/Routing/README.md
index 03b258ec8203b..ae8284f541faa 100644
--- a/src/Symfony/Component/Routing/README.md
+++ b/src/Symfony/Component/Routing/README.md
@@ -44,8 +44,8 @@ $url = $generator->generate('blog_show', [
Resources
---------
- * [Documentation](https://symfony.com/doc/current/routing.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/routing.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Security/Core/README.md b/src/Symfony/Component/Security/Core/README.md
index 70476d9e7f2b2..6b3e5c990107c 100644
--- a/src/Symfony/Component/Security/Core/README.md
+++ b/src/Symfony/Component/Security/Core/README.md
@@ -9,8 +9,8 @@ the Java Spring framework.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/security.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/security.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Security/Csrf/README.md b/src/Symfony/Component/Security/Csrf/README.md
index 15b9ace238fb9..8933061585ff9 100644
--- a/src/Symfony/Component/Security/Csrf/README.md
+++ b/src/Symfony/Component/Security/Csrf/README.md
@@ -7,8 +7,8 @@ The Security CSRF (cross-site request forgery) component provides a class
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/security.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/security.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Security/Guard/README.md b/src/Symfony/Component/Security/Guard/README.md
index 40083a48d7682..968558f79f86a 100644
--- a/src/Symfony/Component/Security/Guard/README.md
+++ b/src/Symfony/Component/Security/Guard/README.md
@@ -8,8 +8,8 @@ total control.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/security.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/security.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Security/Http/README.md b/src/Symfony/Component/Security/Http/README.md
index dbac8c659c112..e12d19fbeb697 100644
--- a/src/Symfony/Component/Security/Http/README.md
+++ b/src/Symfony/Component/Security/Http/README.md
@@ -9,8 +9,8 @@ the Java Spring framework.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/security.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/security.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Security/README.md b/src/Symfony/Component/Security/README.md
index 21f17f6458300..f696aeaff1a04 100644
--- a/src/Symfony/Component/Security/README.md
+++ b/src/Symfony/Component/Security/README.md
@@ -11,8 +11,8 @@ roles.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/security.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/security.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Serializer/README.md b/src/Symfony/Component/Serializer/README.md
index 357d024a23ddc..22b2262682d62 100644
--- a/src/Symfony/Component/Serializer/README.md
+++ b/src/Symfony/Component/Serializer/README.md
@@ -8,8 +8,8 @@ JSON.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/serializer.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/serializer.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Stopwatch/README.md b/src/Symfony/Component/Stopwatch/README.md
index 4c3cb7ecb3172..13a9dfa5f4f1f 100644
--- a/src/Symfony/Component/Stopwatch/README.md
+++ b/src/Symfony/Component/Stopwatch/README.md
@@ -36,7 +36,7 @@ $stopwatch->stopSection('phase_1');
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Templating/README.md b/src/Symfony/Component/Templating/README.md
index a4798fdaafdef..72204d7cf89cb 100644
--- a/src/Symfony/Component/Templating/README.md
+++ b/src/Symfony/Component/Templating/README.md
@@ -36,7 +36,7 @@ Hello, = $view->escape($firstname) ?>!
Resources
---------
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Translation/README.md b/src/Symfony/Component/Translation/README.md
index dc090df5b3317..720bee3b81086 100644
--- a/src/Symfony/Component/Translation/README.md
+++ b/src/Symfony/Component/Translation/README.md
@@ -26,8 +26,8 @@ echo $translator->trans('Hello World!'); // outputs « Bonjour ! »
Resources
---------
- * [Documentation](https://symfony.com/doc/current/translation.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/translation.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Validator/README.md b/src/Symfony/Component/Validator/README.md
index 410a4213eef07..8f3fd0efb2567 100644
--- a/src/Symfony/Component/Validator/README.md
+++ b/src/Symfony/Component/Validator/README.md
@@ -7,10 +7,10 @@ The Validator component provides tools to validate values following the
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/validator.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/validator.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
[1]: https://jcp.org/en/jsr/detail?id=303
diff --git a/src/Symfony/Component/VarDumper/README.md b/src/Symfony/Component/VarDumper/README.md
index 339f73eba3052..bdac24477a819 100644
--- a/src/Symfony/Component/VarDumper/README.md
+++ b/src/Symfony/Component/VarDumper/README.md
@@ -8,8 +8,8 @@ of `var_dump`.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php
index 24701be4119ef..ff308aaa0ccd2 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php
@@ -50,12 +50,12 @@ public function getCastFileInfoTests()
%A}
EOTXT
],
- ['https://example.com/about', <<<'EOTXT'
+ ['http://example.com/about', <<<'EOTXT'
SplFileInfo {
-%Apath: "https://example.com"
+%Apath: "http://example.com"
filename: "about"
basename: "about"
- pathname: "https://example.com/about"
+ pathname: "http://example.com/about"
extension: ""
realPath: false
%A}
diff --git a/src/Symfony/Component/VarExporter/README.md b/src/Symfony/Component/VarExporter/README.md
index bb13960e0d929..a34e4c23d725b 100644
--- a/src/Symfony/Component/VarExporter/README.md
+++ b/src/Symfony/Component/VarExporter/README.md
@@ -31,8 +31,8 @@ It also provides a few improvements over `var_export()`/`serialize()`:
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/var_exporter.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/var_exporter.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/WebLink/README.md b/src/Symfony/Component/WebLink/README.md
index 9daf39e8c1079..fe33a9c497f8e 100644
--- a/src/Symfony/Component/WebLink/README.md
+++ b/src/Symfony/Component/WebLink/README.md
@@ -35,8 +35,8 @@ echo 'Hello';
Resources
---------
- * [Documentation](https://symfony.com/doc/current/web_link.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/web_link.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Workflow/README.md b/src/Symfony/Component/Workflow/README.md
index b0f092eaf22a9..66fb6013a59ed 100644
--- a/src/Symfony/Component/Workflow/README.md
+++ b/src/Symfony/Component/Workflow/README.md
@@ -7,8 +7,8 @@ machine.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/workflow.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/workflow.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Yaml/Inline.php b/src/Symfony/Component/Yaml/Inline.php
index 935a7b5fc1d3c..a317bb0438e5f 100644
--- a/src/Symfony/Component/Yaml/Inline.php
+++ b/src/Symfony/Component/Yaml/Inline.php
@@ -674,17 +674,22 @@ private static function evaluateScalar(string $scalar, int $flags, array &$refer
case Parser::preg_match('/^(-|\+)?[0-9][0-9_]*(\.[0-9_]+)?$/', $scalar):
return (float) str_replace('_', '', $scalar);
case Parser::preg_match(self::getTimestampRegex(), $scalar):
+ // When no timezone is provided in the parsed date, YAML spec says we must assume UTC.
+ $time = new \DateTime($scalar, new \DateTimeZone('UTC'));
+
if (Yaml::PARSE_DATETIME & $flags) {
- // When no timezone is provided in the parsed date, YAML spec says we must assume UTC.
- return new \DateTime($scalar, new \DateTimeZone('UTC'));
+ return $time;
}
- $timeZone = date_default_timezone_get();
- date_default_timezone_set('UTC');
- $time = strtotime($scalar);
- date_default_timezone_set($timeZone);
+ try {
+ if (false !== $scalar = $time->getTimestamp()) {
+ return $scalar;
+ }
+ } catch (\ValueError $e) {
+ // no-op
+ }
- return $time;
+ return $time->format('U');
}
}
diff --git a/src/Symfony/Component/Yaml/README.md b/src/Symfony/Component/Yaml/README.md
index b914e7836c7a5..ac25024b63438 100644
--- a/src/Symfony/Component/Yaml/README.md
+++ b/src/Symfony/Component/Yaml/README.md
@@ -6,8 +6,8 @@ The Yaml component loads and dumps YAML files.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/yaml.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/yaml.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/src/Symfony/Component/Yaml/Tests/InlineTest.php b/src/Symfony/Component/Yaml/Tests/InlineTest.php
index ec0e1821747a1..b1f0206d547db 100644
--- a/src/Symfony/Component/Yaml/Tests/InlineTest.php
+++ b/src/Symfony/Component/Yaml/Tests/InlineTest.php
@@ -323,7 +323,7 @@ public function getTestsForParse()
['2007-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 2007)],
['2007-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 2007)],
['1960-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 1960)],
- ['1730-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 1730)],
+ ['1730-10-30T02:59:43Z', \PHP_INT_SIZE === 4 ? '-7547547617' : gmmktime(2, 59, 43, 10, 30, 1730)],
['"a \\"string\\" with \'quoted strings inside\'"', 'a "string" with \'quoted strings inside\''],
["'a \"string\" with ''quoted strings inside'''", 'a "string" with \'quoted strings inside\''],
@@ -394,7 +394,7 @@ public function getTestsForParseWithMapObjects()
['2007-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 2007)],
['2007-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 2007)],
['1960-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 1960)],
- ['1730-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 1730)],
+ ['1730-10-30T02:59:43Z', \PHP_INT_SIZE === 4 ? '-7547547617' : gmmktime(2, 59, 43, 10, 30, 1730)],
['"a \\"string\\" with \'quoted strings inside\'"', 'a "string" with \'quoted strings inside\''],
["'a \"string\" with ''quoted strings inside'''", 'a "string" with \'quoted strings inside\''],
diff --git a/src/Symfony/Contracts/README.md b/src/Symfony/Contracts/README.md
index 5beb497d7eab5..617a78f28ec74 100644
--- a/src/Symfony/Contracts/README.md
+++ b/src/Symfony/Contracts/README.md
@@ -47,8 +47,8 @@ the declared contracts will directly or indirectly contribute to the PHP-FIG.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/contracts.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/contracts.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)