From f8858223502d60a4ca72d8977c8d9af9a4f50252 Mon Sep 17 00:00:00 2001 From: Mathias Arlaud Date: Tue, 24 Mar 2020 18:11:05 +0100 Subject: [PATCH 01/29] Add french "at least" constraint translations --- .../Validator/Resources/translations/validators.fr.xlf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf index e54be35c15cca..c44ade69e0713 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -374,6 +374,14 @@ The number of elements in this collection should be a multiple of {{ compared_value }}. Le nombre d'éléments de cette collection doit être un multiple de {{ compared_value }}. + + This value should satisfy at least one of the following constraints: + Cette valeur doit satisfaire à au moins une des contraintes suivantes : + + + Each element of this collection should satisfy its own set of constraints. + Chaque élément de cette collection doit satisfaire à son propre jeu de contraintes. + From 4befb23c765279a315dcd211d85f3494da7f48c3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 25 Mar 2020 13:02:26 +0100 Subject: [PATCH 02/29] Fixed some typos --- .../FrameworkBundle/Console/Descriptor/XmlDescriptor.php | 4 ++-- .../SecurityBundle/Tests/Functional/SetAclCommandTest.php | 8 ++++---- .../Tests/Controller/ContainerControllerResolverTest.php | 2 +- .../Component/Routing/Matcher/Dumper/PhpMatcherDumper.php | 2 +- .../Routing/Tests/RouteCollectionBuilderTest.php | 2 +- .../Http/Tests/Firewall/SwitchUserListenerTest.php | 2 +- src/Symfony/Component/Yaml/Tests/ParserTest.php | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index 996ac11c7b3c3..02f71b98bd059 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -414,8 +414,8 @@ private function getArgumentNodes(array $arguments, \DOMDocument $dom) } elseif (\is_array($argument)) { $argumentXML->setAttribute('type', 'collection'); - foreach ($this->getArgumentNodes($argument, $dom) as $childArgumenXML) { - $argumentXML->appendChild($childArgumenXML); + foreach ($this->getArgumentNodes($argument, $dom) as $childArgumentXML) { + $argumentXML->appendChild($childArgumentXML); } } else { $argumentXML->appendChild(new \DOMText($argument)); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php index 5346e9b4c0be7..8eb70c09c1ed7 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php @@ -74,13 +74,13 @@ public function testSetAclUser() try { $acl->isGranted($permissionMap->getMasks('OWNER', null), [$securityIdentity1]); - $this->fail('NoAceFoundException not throwed'); + $this->fail('NoAceFoundException not thrown'); } catch (NoAceFoundException $e) { } try { $acl->isGranted($permissionMap->getMasks('OPERATOR', null), [$securityIdentity2]); - $this->fail('NoAceFoundException not throwed'); + $this->fail('NoAceFoundException not thrown'); } catch (NoAceFoundException $e) { } } @@ -117,13 +117,13 @@ public function testSetAclRole() try { $acl->isGranted($permissionMap->getMasks('VIEW', null), [$userSecurityIdentity]); - $this->fail('NoAceFoundException not throwed'); + $this->fail('NoAceFoundException not thrown'); } catch (NoAceFoundException $e) { } try { $acl->isGranted($permissionMap->getMasks('OPERATOR', null), [$userSecurityIdentity]); - $this->fail('NoAceFoundException not throwed'); + $this->fail('NoAceFoundException not thrown'); } catch (NoAceFoundException $e) { } } diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php index 97d21e95a44c8..b03169de93400 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php @@ -229,7 +229,7 @@ public function testExceptionWhenUsingControllerWithoutAnInvokeMethod() */ public function testGetControllerOnNonUndefinedFunction($controller, $exceptionName = null, $exceptionMessage = null) { - // All this logic needs to be duplicated, since calling parent::testGetControllerOnNonUndefinedFunction will override the expected excetion and not use the regex + // All this logic needs to be duplicated, since calling parent::testGetControllerOnNonUndefinedFunction will override the expected exception and not use the regex $resolver = $this->createControllerResolver(); $this->expectException($exceptionName); $this->expectExceptionMessageRegExp($exceptionMessage); diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index 0a830b64d575c..335d6507eda28 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -278,7 +278,7 @@ private function compileRoute(Route $route, $name, $supportsRedirections, $paren $gotoname = 'not_'.preg_replace('/[^A-Za-z0-9_]/', '', $name); - // the offset where the return value is appended below, with indendation + // the offset where the return value is appended below, with indentation $retOffset = 12 + \strlen($code); // optimize parameters array diff --git a/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php b/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php index f5042749e2ebb..395f4ab97add2 100644 --- a/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php @@ -256,7 +256,7 @@ public function providePrefixTests() // shows that a prefix will always be given the starting slash $tests[] = ['0', '/foo', '/0/foo']; - // spaces are ok, and double slahses at the end are cleaned + // spaces are ok, and double slashes at the end are cleaned $tests[] = ['/ /', '/foo', '/ /foo']; return $tests; diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php index ab77180e53c57..e15332650704d 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php @@ -315,7 +315,7 @@ public function testSwitchUserWithReplacedToken() $this->assertSame($replacedToken, $this->tokenStorage->getToken()); } - public function testSwitchtUserThrowsAuthenticationExceptionIfNoCurrentToken() + public function testSwitchUserThrowsAuthenticationExceptionIfNoCurrentToken() { $this->expectException('Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException'); $this->tokenStorage->setToken(null); diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index dc7c122d592c2..261028fc0ccf6 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -1794,7 +1794,7 @@ public function testUnsupportedTagWithScalar() $this->assertEquals('!iterator foo', $this->parser->parse('!iterator foo')); } - public function testExceptionWhenUsingUnsuportedBuiltInTags() + public function testExceptionWhenUsingUnsupportedBuiltInTags() { $this->expectException('Symfony\Component\Yaml\Exception\ParseException'); $this->expectExceptionMessage('The built-in tag "!!foo" is not implemented at line 1 (near "!!foo").'); From 861022002ece51133b51fb92ad72c74d04d40cc5 Mon Sep 17 00:00:00 2001 From: tadas Date: Thu, 26 Mar 2020 10:56:17 +0200 Subject: [PATCH 03/29] [Validator] Add missing Lithuanian translations --- .../Resources/translations/validators.lt.xlf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf index 2a079aacbf9b1..ccb58818c43c9 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf @@ -366,6 +366,22 @@ This value should be between {{ min }} and {{ max }}. Ši reikšmė turi būti tarp {{ min }} ir {{ max }}. + + This value is not a valid hostname. + Ši reikšmė nėra tinkamas svetainės adresas. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Šio sąrašo elementų skaičius turėtų būti skaičiaus {{ compared_value }} kartotinis. + + + This value should satisfy at least one of the following constraints: + Ši reikšmė turėtų atitikti bent vieną iš šių nurodymų: + + + Each element of this collection should satisfy its own set of constraints. + Kiekvienas šio sąrašo elementas turi atitikti savo nurodymų rinkinį. + From c9aa3a849aee04557e908eb9b4610b05469ee7a1 Mon Sep 17 00:00:00 2001 From: phucvo Date: Thu, 26 Mar 2020 14:21:27 +0700 Subject: [PATCH 04/29] bug #36157 [Validator] Assert Valid with many groups --- .../Tests/Validator/AbstractTest.php | 21 +++++++++++++++++++ .../RecursiveContextualValidator.php | 6 ++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php b/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php index 697be6edc63f7..cfd0de6eadd5d 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php @@ -701,4 +701,25 @@ public function testNestedObjectIsValidatedIfGroupInValidConstraintIsValidated() $this->assertCount(2, $violations); } + + public function testNestedObjectIsValidatedInMultipleGroupsIfGroupInValidConstraintIsValidated() + { + $entity = new Entity(); + $entity->firstName = null; + + $reference = new Reference(); + $reference->value = null; + + $entity->childA = $reference; + + $this->metadata->addPropertyConstraint('firstName', new NotBlank()); + $this->metadata->addPropertyConstraint('childA', new Valid(['groups' => ['group1', 'group2']])); + + $this->referenceMetadata->addPropertyConstraint('value', new NotBlank(['groups' => 'group1'])); + $this->referenceMetadata->addPropertyConstraint('value', new NotNull(['groups' => 'group2'])); + + $violations = $this->validator->validate($entity, null, ['Default', 'group1', 'group2']); + + $this->assertCount(3, $violations); + } } diff --git a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php index dc139c36d4254..87a9974c171e0 100644 --- a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php +++ b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php @@ -14,6 +14,7 @@ use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraints\Composite; use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\Valid; use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; use Symfony\Component\Validator\Context\ExecutionContext; use Symfony\Component\Validator\Context\ExecutionContextInterface; @@ -782,8 +783,9 @@ private function validateInGroup($value, $cacheKey, MetadataInterface $metadata, // that constraints belong to multiple validated groups if (null !== $cacheKey) { $constraintHash = spl_object_hash($constraint); - - if ($constraint instanceof Composite) { + // instanceof Valid: In case of using a Valid constraint with many groups + // it makes a reference object get validated by each group + if ($constraint instanceof Composite || $constraint instanceof Valid) { $constraintHash .= $group; } From b1fbff1a5b14611d9546e28a3469e3f707e34997 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 27 Mar 2020 09:32:13 +0100 Subject: [PATCH 05/29] Update CHANGELOG for 4.4.6 --- CHANGELOG-4.4.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/CHANGELOG-4.4.md b/CHANGELOG-4.4.md index 4de4989aabb01..70feb9ba3cab7 100644 --- a/CHANGELOG-4.4.md +++ b/CHANGELOG-4.4.md @@ -7,6 +7,44 @@ 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.6 (2020-03-27) + + * bug #36169 [HttpKernel] fix locking for PHP 7.4+ (nicolas-grekas) + * bug #36175 [Security/Http] Remember me: allow to set the samesite cookie flag (dunglas) + * bug #36173 [Http Foundation] Fix clear cookie samesite (guillbdx) + * bug #36176 [Security] Check if firewall is stateless before checking for session/previous session (koenreiniers) + * bug #36149 [Form] Support customized intl php.ini settings (jorrit) + * bug #36172 [Debug] fix for PHP 7.3.16+/7.4.4+ (nicolas-grekas) + * bug #36151 [Security] Fixed hardcoded value of SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE (lyrixx) + * bug #36141 Prevent warning in proc_open() (BenMorel) + * bug #36143 [FrameworkBundle] Fix Router Cache (guillbdx) + * bug #36103 [DI] fix preloading script generation (nicolas-grekas) + * bug #36118 [Security/Http] don't require the session to be started when tracking its id (nicolas-grekas) + * bug #36108 [DI] Fix CheckTypeDeclarationPass (guillbdx) + * bug #36121 [VarDumper] fix side-effect by not using mt_rand() (nicolas-grekas) + * bug #36073 [PropertyAccess][DX] Improved errors when reading uninitialized properties (HeahDude) + * bug #36063 [FrameworkBundle] start session on flashbag injection (William Arslett) + * bug #36031 [Console] Fallback to default answers when unable to read input (ostrolucky) + * bug #36083 [DI][Form] Fixed test suite (TimeType changes & unresolved merge conflict) (wouterj) + * bug #36026 [Mime] Fix boundary header (guillbdx) + * bug #36020 [Form] ignore microseconds submitted by Edge (xabbuh) + * bug #36038 [HttpClient] disable debug log with curl 7.64.0 (nicolas-grekas) + * bug #36041 fix import from config file using type: glob (Tobion) + * bug #35987 [DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type (fancyweb) + * bug #35949 [DI] Fix container lint command when a synthetic service is used in an expression (HypeMC) + * bug #36023 [HttpClient] fix requests to hosts that idn_to_ascii() cannot handle (nicolas-grekas) + * bug #35938 [Form] Handle false as empty value on expanded choices (fancyweb) + * bug #36030 [SecurityBundle] Minor fix in LDAP config tree builder (HeahDude) + * bug #35993 Remove int return type from FlattenException::getCode (wucdbm) + * bug #36004 [Yaml] fix dumping strings containing CRs (xabbuh) + * bug #35982 [DI] Fix XmlFileLoader bad error message (przemyslaw-bogusz) + * bug #35957 [DI] ignore extra tags added by autoconfiguration in PriorityTaggedServiceTrait (nicolas-grekas) + * bug #35937 Revert "bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form" (dmaicher) + * bug #35928 [Routing] Prevent localized routes _locale default & requirement from being overridden (fancyweb) + * bug #35912 [FrameworkBundle] register only existing transport factories (xabbuh) + * bug #35899 [DomCrawler] prevent deprecation being triggered from assertion (xabbuh) + * bug #35910 [SecurityBundle] Minor fixes in configuration tree builder (HeahDude) + * 4.4.5 (2020-02-29) * bug #35781 [Form] NumberToLocalizedStringTransformer return int if scale = 0 (VincentLanglet) From f43ceee1df790d76fc8f6ae91507869ee7dcfe61 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 27 Mar 2020 09:32:28 +0100 Subject: [PATCH 06/29] Update VERSION for 4.4.6 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 958e049bf06e7..a559f0728894d 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -76,12 +76,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private static $freshCache = []; - const VERSION = '4.4.6-DEV'; + const VERSION = '4.4.6'; const VERSION_ID = 40406; const MAJOR_VERSION = 4; const MINOR_VERSION = 4; const RELEASE_VERSION = 6; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2022'; const END_OF_LIFE = '11/2023'; From 4980dcaf70e9a188d71706cb561d77454eb60f3a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 27 Mar 2020 09:51:41 +0100 Subject: [PATCH 07/29] Bump Symfony version to 4.4.7 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index a559f0728894d..dfbd1c82c8977 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -76,12 +76,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private static $freshCache = []; - const VERSION = '4.4.6'; - const VERSION_ID = 40406; + const VERSION = '4.4.7-DEV'; + const VERSION_ID = 40407; const MAJOR_VERSION = 4; const MINOR_VERSION = 4; - const RELEASE_VERSION = 6; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 7; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2022'; const END_OF_LIFE = '11/2023'; From 12f897b0d34d506bd40ed851392c20c5e5b6bf21 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 27 Mar 2020 17:27:57 +0100 Subject: [PATCH 08/29] Bump Symfony version to 5.0.7 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 23a5e7625b98e..3671481df4787 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -68,12 +68,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private static $freshCache = []; - const VERSION = '5.0.6'; - const VERSION_ID = 50006; + const VERSION = '5.0.7-DEV'; + const VERSION_ID = 50007; const MAJOR_VERSION = 5; const MINOR_VERSION = 0; - const RELEASE_VERSION = 6; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 7; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '07/2020'; const END_OF_LIFE = '07/2020'; From 32d9a5298e7c3b9c478c47759cbdc1fc95fb42c0 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 25 Mar 2020 11:03:12 +0100 Subject: [PATCH 09/29] add German translations --- .../Validator/Resources/translations/validators.de.xlf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf index a546b86c78a9b..c5d1fe0cf1981 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf @@ -374,6 +374,14 @@ The number of elements in this collection should be a multiple of {{ compared_value }}. Die Anzahl an Elementen in dieser Sammlung sollte ein Vielfaches von {{ compared_value }} sein. + + This value should satisfy at least one of the following constraints: + Dieser Wert sollte eine der folgenden Bedingungen erfüllen: + + + Each element of this collection should satisfy its own set of constraints. + Jedes Element dieser Sammlung sollte seine eigene Menge an Bedingungen erfüllen. + From d4c052a2fa604e8105bf66933b14c089059699e5 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Wed, 25 Mar 2020 22:25:16 +0100 Subject: [PATCH 10/29] add missing gitattributes for phpunit-bridge --- src/Symfony/Bridge/Doctrine/.gitattributes | 1 + src/Symfony/Bridge/Monolog/.gitattributes | 1 + src/Symfony/Bridge/PhpUnit/.gitattributes | 4 ++++ src/Symfony/Bridge/ProxyManager/.gitattributes | 1 + src/Symfony/Bridge/Twig/.gitattributes | 1 + src/Symfony/Bundle/DebugBundle/.gitattributes | 1 + src/Symfony/Bundle/FrameworkBundle/.gitattributes | 1 + src/Symfony/Bundle/SecurityBundle/.gitattributes | 1 + src/Symfony/Bundle/TwigBundle/.gitattributes | 1 + src/Symfony/Bundle/WebProfilerBundle/.gitattributes | 1 + src/Symfony/Bundle/WebServerBundle/.gitattributes | 1 + src/Symfony/Component/Asset/.gitattributes | 1 + src/Symfony/Component/BrowserKit/.gitattributes | 1 + src/Symfony/Component/Cache/.gitattributes | 1 + src/Symfony/Component/Config/.gitattributes | 1 + src/Symfony/Component/Console/.gitattributes | 1 + src/Symfony/Component/CssSelector/.gitattributes | 1 + src/Symfony/Component/Debug/.gitattributes | 1 + src/Symfony/Component/DependencyInjection/.gitattributes | 1 + src/Symfony/Component/DomCrawler/.gitattributes | 1 + src/Symfony/Component/Dotenv/.gitattributes | 1 + src/Symfony/Component/ErrorHandler/.gitattributes | 1 + src/Symfony/Component/EventDispatcher/.gitattributes | 1 + src/Symfony/Component/ExpressionLanguage/.gitattributes | 1 + src/Symfony/Component/Filesystem/.gitattributes | 1 + src/Symfony/Component/Finder/.gitattributes | 1 + src/Symfony/Component/Form/.gitattributes | 1 + src/Symfony/Component/HttpClient/.gitattributes | 1 + src/Symfony/Component/HttpFoundation/.gitattributes | 1 + src/Symfony/Component/HttpKernel/.gitattributes | 1 + src/Symfony/Component/Inflector/.gitattributes | 1 + src/Symfony/Component/Intl/.gitattributes | 1 + src/Symfony/Component/Ldap/.gitattributes | 1 + src/Symfony/Component/Lock/.gitattributes | 1 + src/Symfony/Component/Mailer/.gitattributes | 1 + src/Symfony/Component/Mailer/Bridge/Amazon/.gitattributes | 1 + src/Symfony/Component/Mailer/Bridge/Google/.gitattributes | 1 + src/Symfony/Component/Mailer/Bridge/Mailchimp/.gitattributes | 1 + src/Symfony/Component/Mailer/Bridge/Mailgun/.gitattributes | 1 + src/Symfony/Component/Mailer/Bridge/Postmark/.gitattributes | 1 + src/Symfony/Component/Mailer/Bridge/Sendgrid/.gitattributes | 1 + src/Symfony/Component/Messenger/.gitattributes | 1 + src/Symfony/Component/Mime/.gitattributes | 1 + src/Symfony/Component/OptionsResolver/.gitattributes | 1 + src/Symfony/Component/Process/.gitattributes | 1 + src/Symfony/Component/PropertyAccess/.gitattributes | 1 + src/Symfony/Component/PropertyInfo/.gitattributes | 1 + src/Symfony/Component/Routing/.gitattributes | 1 + src/Symfony/Component/Security/Core/.gitattributes | 1 + src/Symfony/Component/Security/Csrf/.gitattributes | 1 + src/Symfony/Component/Security/Guard/.gitattributes | 1 + src/Symfony/Component/Security/Http/.gitattributes | 1 + src/Symfony/Component/Serializer/.gitattributes | 1 + src/Symfony/Component/Stopwatch/.gitattributes | 1 + src/Symfony/Component/Templating/.gitattributes | 1 + src/Symfony/Component/Translation/.gitattributes | 1 + src/Symfony/Component/Validator/.gitattributes | 1 + src/Symfony/Component/VarDumper/.gitattributes | 1 + src/Symfony/Component/VarExporter/.gitattributes | 1 + src/Symfony/Component/WebLink/.gitattributes | 1 + src/Symfony/Component/Workflow/.gitattributes | 1 + src/Symfony/Component/Yaml/.gitattributes | 1 + 62 files changed, 65 insertions(+) create mode 100644 src/Symfony/Bridge/PhpUnit/.gitattributes diff --git a/src/Symfony/Bridge/Doctrine/.gitattributes b/src/Symfony/Bridge/Doctrine/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Bridge/Doctrine/.gitattributes +++ b/src/Symfony/Bridge/Doctrine/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Bridge/Monolog/.gitattributes b/src/Symfony/Bridge/Monolog/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Bridge/Monolog/.gitattributes +++ b/src/Symfony/Bridge/Monolog/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Bridge/PhpUnit/.gitattributes b/src/Symfony/Bridge/PhpUnit/.gitattributes new file mode 100644 index 0000000000000..84c7add058fb5 --- /dev/null +++ b/src/Symfony/Bridge/PhpUnit/.gitattributes @@ -0,0 +1,4 @@ +/Tests export-ignore +/phpunit.xml.dist export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Bridge/ProxyManager/.gitattributes b/src/Symfony/Bridge/ProxyManager/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Bridge/ProxyManager/.gitattributes +++ b/src/Symfony/Bridge/ProxyManager/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Bridge/Twig/.gitattributes b/src/Symfony/Bridge/Twig/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Bridge/Twig/.gitattributes +++ b/src/Symfony/Bridge/Twig/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Bundle/DebugBundle/.gitattributes b/src/Symfony/Bundle/DebugBundle/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Bundle/DebugBundle/.gitattributes +++ b/src/Symfony/Bundle/DebugBundle/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Bundle/FrameworkBundle/.gitattributes b/src/Symfony/Bundle/FrameworkBundle/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/.gitattributes +++ b/src/Symfony/Bundle/FrameworkBundle/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Bundle/SecurityBundle/.gitattributes b/src/Symfony/Bundle/SecurityBundle/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Bundle/SecurityBundle/.gitattributes +++ b/src/Symfony/Bundle/SecurityBundle/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Bundle/TwigBundle/.gitattributes b/src/Symfony/Bundle/TwigBundle/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Bundle/TwigBundle/.gitattributes +++ b/src/Symfony/Bundle/TwigBundle/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Bundle/WebProfilerBundle/.gitattributes b/src/Symfony/Bundle/WebProfilerBundle/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/.gitattributes +++ b/src/Symfony/Bundle/WebProfilerBundle/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Bundle/WebServerBundle/.gitattributes b/src/Symfony/Bundle/WebServerBundle/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Bundle/WebServerBundle/.gitattributes +++ b/src/Symfony/Bundle/WebServerBundle/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Asset/.gitattributes b/src/Symfony/Component/Asset/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Asset/.gitattributes +++ b/src/Symfony/Component/Asset/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/BrowserKit/.gitattributes b/src/Symfony/Component/BrowserKit/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/BrowserKit/.gitattributes +++ b/src/Symfony/Component/BrowserKit/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Cache/.gitattributes b/src/Symfony/Component/Cache/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Cache/.gitattributes +++ b/src/Symfony/Component/Cache/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Config/.gitattributes b/src/Symfony/Component/Config/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Config/.gitattributes +++ b/src/Symfony/Component/Config/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Console/.gitattributes b/src/Symfony/Component/Console/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Console/.gitattributes +++ b/src/Symfony/Component/Console/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/CssSelector/.gitattributes b/src/Symfony/Component/CssSelector/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/CssSelector/.gitattributes +++ b/src/Symfony/Component/CssSelector/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Debug/.gitattributes b/src/Symfony/Component/Debug/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Debug/.gitattributes +++ b/src/Symfony/Component/Debug/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/DependencyInjection/.gitattributes b/src/Symfony/Component/DependencyInjection/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/DependencyInjection/.gitattributes +++ b/src/Symfony/Component/DependencyInjection/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/DomCrawler/.gitattributes b/src/Symfony/Component/DomCrawler/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/DomCrawler/.gitattributes +++ b/src/Symfony/Component/DomCrawler/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Dotenv/.gitattributes b/src/Symfony/Component/Dotenv/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Dotenv/.gitattributes +++ b/src/Symfony/Component/Dotenv/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/ErrorHandler/.gitattributes b/src/Symfony/Component/ErrorHandler/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/ErrorHandler/.gitattributes +++ b/src/Symfony/Component/ErrorHandler/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/EventDispatcher/.gitattributes b/src/Symfony/Component/EventDispatcher/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/EventDispatcher/.gitattributes +++ b/src/Symfony/Component/EventDispatcher/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/ExpressionLanguage/.gitattributes b/src/Symfony/Component/ExpressionLanguage/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/ExpressionLanguage/.gitattributes +++ b/src/Symfony/Component/ExpressionLanguage/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Filesystem/.gitattributes b/src/Symfony/Component/Filesystem/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Filesystem/.gitattributes +++ b/src/Symfony/Component/Filesystem/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Finder/.gitattributes b/src/Symfony/Component/Finder/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Finder/.gitattributes +++ b/src/Symfony/Component/Finder/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Form/.gitattributes b/src/Symfony/Component/Form/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Form/.gitattributes +++ b/src/Symfony/Component/Form/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/HttpClient/.gitattributes b/src/Symfony/Component/HttpClient/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/HttpClient/.gitattributes +++ b/src/Symfony/Component/HttpClient/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/HttpFoundation/.gitattributes b/src/Symfony/Component/HttpFoundation/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/HttpFoundation/.gitattributes +++ b/src/Symfony/Component/HttpFoundation/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/HttpKernel/.gitattributes b/src/Symfony/Component/HttpKernel/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/HttpKernel/.gitattributes +++ b/src/Symfony/Component/HttpKernel/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Inflector/.gitattributes b/src/Symfony/Component/Inflector/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Inflector/.gitattributes +++ b/src/Symfony/Component/Inflector/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Intl/.gitattributes b/src/Symfony/Component/Intl/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Intl/.gitattributes +++ b/src/Symfony/Component/Intl/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Ldap/.gitattributes b/src/Symfony/Component/Ldap/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Ldap/.gitattributes +++ b/src/Symfony/Component/Ldap/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Lock/.gitattributes b/src/Symfony/Component/Lock/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Lock/.gitattributes +++ b/src/Symfony/Component/Lock/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Mailer/.gitattributes b/src/Symfony/Component/Mailer/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Mailer/.gitattributes +++ b/src/Symfony/Component/Mailer/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Amazon/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/.gitattributes +++ b/src/Symfony/Component/Mailer/Bridge/Amazon/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Mailer/Bridge/Google/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Google/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Mailer/Bridge/Google/.gitattributes +++ b/src/Symfony/Component/Mailer/Bridge/Google/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Mailer/Bridge/Mailchimp/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Mailchimp/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/.gitattributes +++ b/src/Symfony/Component/Mailer/Bridge/Mailchimp/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Mailer/Bridge/Mailgun/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Mailgun/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailgun/.gitattributes +++ b/src/Symfony/Component/Mailer/Bridge/Mailgun/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Mailer/Bridge/Postmark/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Postmark/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Mailer/Bridge/Postmark/.gitattributes +++ b/src/Symfony/Component/Mailer/Bridge/Postmark/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Sendgrid/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/.gitattributes +++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Messenger/.gitattributes b/src/Symfony/Component/Messenger/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Messenger/.gitattributes +++ b/src/Symfony/Component/Messenger/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Mime/.gitattributes b/src/Symfony/Component/Mime/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Mime/.gitattributes +++ b/src/Symfony/Component/Mime/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/OptionsResolver/.gitattributes b/src/Symfony/Component/OptionsResolver/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/OptionsResolver/.gitattributes +++ b/src/Symfony/Component/OptionsResolver/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Process/.gitattributes b/src/Symfony/Component/Process/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Process/.gitattributes +++ b/src/Symfony/Component/Process/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/PropertyAccess/.gitattributes b/src/Symfony/Component/PropertyAccess/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/PropertyAccess/.gitattributes +++ b/src/Symfony/Component/PropertyAccess/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/PropertyInfo/.gitattributes b/src/Symfony/Component/PropertyInfo/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/PropertyInfo/.gitattributes +++ b/src/Symfony/Component/PropertyInfo/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Routing/.gitattributes b/src/Symfony/Component/Routing/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Routing/.gitattributes +++ b/src/Symfony/Component/Routing/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Security/Core/.gitattributes b/src/Symfony/Component/Security/Core/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Security/Core/.gitattributes +++ b/src/Symfony/Component/Security/Core/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Security/Csrf/.gitattributes b/src/Symfony/Component/Security/Csrf/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Security/Csrf/.gitattributes +++ b/src/Symfony/Component/Security/Csrf/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Security/Guard/.gitattributes b/src/Symfony/Component/Security/Guard/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Security/Guard/.gitattributes +++ b/src/Symfony/Component/Security/Guard/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Security/Http/.gitattributes b/src/Symfony/Component/Security/Http/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Security/Http/.gitattributes +++ b/src/Symfony/Component/Security/Http/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Serializer/.gitattributes b/src/Symfony/Component/Serializer/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Serializer/.gitattributes +++ b/src/Symfony/Component/Serializer/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Stopwatch/.gitattributes b/src/Symfony/Component/Stopwatch/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Stopwatch/.gitattributes +++ b/src/Symfony/Component/Stopwatch/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Templating/.gitattributes b/src/Symfony/Component/Templating/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Templating/.gitattributes +++ b/src/Symfony/Component/Templating/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Translation/.gitattributes b/src/Symfony/Component/Translation/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Translation/.gitattributes +++ b/src/Symfony/Component/Translation/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Validator/.gitattributes b/src/Symfony/Component/Validator/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Validator/.gitattributes +++ b/src/Symfony/Component/Validator/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/VarDumper/.gitattributes b/src/Symfony/Component/VarDumper/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/VarDumper/.gitattributes +++ b/src/Symfony/Component/VarDumper/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/VarExporter/.gitattributes b/src/Symfony/Component/VarExporter/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/VarExporter/.gitattributes +++ b/src/Symfony/Component/VarExporter/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/WebLink/.gitattributes b/src/Symfony/Component/WebLink/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/WebLink/.gitattributes +++ b/src/Symfony/Component/WebLink/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Workflow/.gitattributes b/src/Symfony/Component/Workflow/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Workflow/.gitattributes +++ b/src/Symfony/Component/Workflow/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore diff --git a/src/Symfony/Component/Yaml/.gitattributes b/src/Symfony/Component/Yaml/.gitattributes index ebb9287043dc4..84c7add058fb5 100644 --- a/src/Symfony/Component/Yaml/.gitattributes +++ b/src/Symfony/Component/Yaml/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore +/.gitattributes export-ignore /.gitignore export-ignore From b375f93ed75019ea788f395dd3d95d1334a84bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20P=C3=A9delagrabe?= Date: Thu, 26 Mar 2020 14:31:51 +0100 Subject: [PATCH 11/29] [Console] Fix OutputStream for PHP 7.4 --- src/Symfony/Component/Console/Output/StreamOutput.php | 6 +----- .../Console/Tests/Fixtures/stream_output_file.txt | 0 .../Component/Console/Tests/Output/StreamOutputTest.php | 8 ++++++++ 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 src/Symfony/Component/Console/Tests/Fixtures/stream_output_file.txt diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php index 7ff602763e9da..74b9b54e86331 100644 --- a/src/Symfony/Component/Console/Output/StreamOutput.php +++ b/src/Symfony/Component/Console/Output/StreamOutput.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Console\Output; use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Formatter\OutputFormatterInterface; /** @@ -74,10 +73,7 @@ protected function doWrite($message, $newline) $message .= PHP_EOL; } - if (false === @fwrite($this->stream, $message)) { - // should never happen - throw new RuntimeException('Unable to write output.'); - } + @fwrite($this->stream, $message); fflush($this->stream); } diff --git a/src/Symfony/Component/Console/Tests/Fixtures/stream_output_file.txt b/src/Symfony/Component/Console/Tests/Fixtures/stream_output_file.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php b/src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php index d843fa4a4559c..86d5038066235 100644 --- a/src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php +++ b/src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php @@ -56,4 +56,12 @@ public function testDoWrite() rewind($output->getStream()); $this->assertEquals('foo'.PHP_EOL, stream_get_contents($output->getStream()), '->doWrite() writes to the stream'); } + + public function testDoWriteOnFailure() + { + $resource = fopen(__DIR__.'/../Fixtures/stream_output_file.txt', 'r', false); + $output = new StreamOutput($resource); + rewind($output->getStream()); + $this->assertEquals('', stream_get_contents($output->getStream())); + } } From 25fdc8e5801de19d55eb96ff6e90fc0d61262441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4dlich?= Date: Fri, 27 Mar 2020 10:14:31 +0100 Subject: [PATCH 12/29] [Validator] Add missing vietnamese translations --- .../Validator/Resources/translations/validators.vi.xlf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf index 301d42f027c84..f4286d25ef44d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf @@ -374,6 +374,14 @@ The number of elements in this collection should be a multiple of {{ compared_value }}. Số lượng các phần tử trong bộ sưu tập này nên là bội số của {{ compared_value }}. + + This value should satisfy at least one of the following constraints: + Giá trị này nên thỏa mãn ít nhất một trong những ràng buộc sau: + + + Each element of this collection should satisfy its own set of constraints. + Mỗi phần tử trong bộ sưu tập này nên thỏa mãn những ràng buộc của nó. + From d3fa02a91884cdb2bbce3eec3fca75bbd66a1ad3 Mon Sep 17 00:00:00 2001 From: Ahmed Raafat Date: Thu, 26 Mar 2020 14:24:02 +0100 Subject: [PATCH 13/29] [Validator] Add the missing translations for the Arabic (ar) locale --- .../Validator/Resources/translations/validators.ar.xlf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf index 7c509b4822507..46a649848072a 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf @@ -374,6 +374,14 @@ The number of elements in this collection should be a multiple of {{ compared_value }}. يجب أن يكون عدد العناصر في هذه المجموعة مضاعف {{ compared_value }}. + + This value should satisfy at least one of the following constraints: + يجب أن تستوفي هذه القيمة واحدة من القيود التالية: + + + Each element of this collection should satisfy its own set of constraints. + يجب أن يفي كل عنصر من عناصر هذه المجموعة بمجموعة القيود الخاصة به. + From 9c1c9347c0df7edf0336e42d222211a44a751477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Egyed?= Date: Thu, 26 Mar 2020 23:08:17 +0100 Subject: [PATCH 14/29] [Validator] Add missing Hungarian translations --- .../Resources/translations/validators.hu.xlf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf index 96ae6fe54ea6a..23ca5618097c5 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf @@ -366,6 +366,22 @@ This value should be between {{ min }} and {{ max }}. Ennek az értéknek {{ min }} és {{ max }} között kell lennie. + + This value is not a valid hostname. + Ez az érték nem egy érvényes állomásnév (hosztnév). + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + A gyűjteményben lévő elemek számának oszthatónak kell lennie a következővel: {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Ennek az értéknek meg kell felelni legalább egynek a következő feltételek közül: + + + Each element of this collection should satisfy its own set of constraints. + A gyűjtemény minden elemének meg kell felelni a saját feltételeinek. + From 6231b040790de7d59ef18df4faafdc8aa333d4e5 Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Fri, 27 Mar 2020 17:55:41 +0100 Subject: [PATCH 15/29] update Italian translation --- .../Resources/translations/validators.it.xlf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf index 3ec620ad6d48b..9a5768c30ac52 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf @@ -366,6 +366,22 @@ This value should be between {{ min }} and {{ max }}. Questo valore dovrebbe essere compreso tra {{ min }} e {{ max }}. + + This value is not a valid hostname. + Questo valore non è un nome di host valido. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Il numero di elementi in questa collezione dovrebbe essere un multiplo di {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Questo valore dovrebbe soddisfare almeno uno dei vincoli seguenti: + + + Each element of this collection should satisfy its own set of constraints. + Ciascun elemento di questa collezione dovrebbe soddisfare il suo insieme di vincoli. + From 7abee62e573f2009fbdf4f41c04953343ba2b242 Mon Sep 17 00:00:00 2001 From: Mark Spink Date: Mon, 23 Mar 2020 14:34:58 +0000 Subject: [PATCH 16/29] [BrowserKit] fixed missing post request parameters in file uploads --- .../Component/BrowserKit/HttpBrowser.php | 2 +- .../BrowserKit/Tests/HttpBrowserTest.php | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/BrowserKit/HttpBrowser.php b/src/Symfony/Component/BrowserKit/HttpBrowser.php index a1e6dd9af0119..9c2b3fcf57e58 100644 --- a/src/Symfony/Component/BrowserKit/HttpBrowser.php +++ b/src/Symfony/Component/BrowserKit/HttpBrowser.php @@ -75,7 +75,7 @@ private function getBodyAndExtraHeaders(Request $request): array $fields = $request->getParameters(); if ($uploadedFiles = $this->getUploadedFiles($request->getFiles())) { - $part = new FormDataPart($uploadedFiles); + $part = new FormDataPart(array_merge($fields, $uploadedFiles)); return [$part->bodyToIterable(), $part->getPreparedHeaders()->toArray()]; } diff --git a/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php b/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php index fa3d531aa986d..77586f44e7744 100644 --- a/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php @@ -134,6 +134,28 @@ public function testMultiPartRequestWithInvalidItem() ]); } + public function testMultiPartRequestWithAdditionalParameters() + { + $client = $this->createMock(HttpClientInterface::class); + $this->expectClientToSendRequestWithFiles($client, ['file1_content', 'baz']); + + $browser = new HttpBrowser($client); + $browser->request('POST', 'http://example.com/', ['bar' => 'baz'], [ + 'file1' => $this->getUploadedFile('file1'), + ]); + } + + public function testMultiPartRequestWithAdditionalParametersOfTheSameName() + { + $client = $this->createMock(HttpClientInterface::class); + $this->expectClientToNotSendRequestWithFiles($client, ['baz']); + + $browser = new HttpBrowser($client); + $browser->request('POST', 'http://example.com/', ['file1' => 'baz'], [ + 'file1' => $this->getUploadedFile('file1'), + ]); + } + private function uploadFile(string $data): string { $path = tempnam(sys_get_temp_dir(), 'http'); @@ -167,4 +189,22 @@ protected function expectClientToSendRequestWithFiles(HttpClientInterface $clien })) ->willReturn($this->createMock(ResponseInterface::class)); } + + protected function expectClientToNotSendRequestWithFiles(HttpClientInterface $client, $fileContents) + { + $client + ->expects($this->once()) + ->method('request') + ->with('POST', 'http://example.com/', $this->callback(function ($options) use ($fileContents) { + $this->assertStringContainsString('Content-Type: multipart/form-data', implode('', $options['headers'])); + $this->assertInstanceOf('\Generator', $options['body']); + $body = implode('', iterator_to_array($options['body'], false)); + foreach ($fileContents as $content) { + $this->assertStringNotContainsString($content, $body); + } + + return true; + })) + ->willReturn($this->createMock(ResponseInterface::class)); + } } From 7af07c889e64b4eb34baa11e67d186c363a3df58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 29 Mar 2020 21:12:22 +0200 Subject: [PATCH 17/29] [DomCrawler] Fix BC break in assertions breaking Panther --- .../DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php | 2 +- .../DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php index c9d996175eab4..ffc6f5677cc5d 100644 --- a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php +++ b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php @@ -45,7 +45,7 @@ protected function matches($crawler): bool return false; } - return false !== mb_strpos($crawler->text(null, false), $this->expectedText); + return false !== mb_strpos($crawler->text(null, true), $this->expectedText); } /** diff --git a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php index 66adadd9d4ba8..551cdca8c3fae 100644 --- a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php +++ b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php @@ -45,7 +45,7 @@ protected function matches($crawler): bool return false; } - return $this->expectedText === trim($crawler->text(null, false)); + return $this->expectedText === trim($crawler->text(null, true)); } /** From 40031f202079773ee2c00bff7441e5913423bc5a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Mar 2020 08:24:11 +0200 Subject: [PATCH 18/29] updated CHANGELOG for 3.4.39 --- CHANGELOG-3.4.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG-3.4.md b/CHANGELOG-3.4.md index fc1d9aa398c2d..8e7a8406ff391 100644 --- a/CHANGELOG-3.4.md +++ b/CHANGELOG-3.4.md @@ -7,6 +7,28 @@ in 3.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/v3.4.0...v3.4.1 +* 3.4.39 (2020-03-30) + + * bug #36216 [Validator] Assert Valid with many groups (phucwan91) + * bug #36222 [Console] Fix OutputStream for PHP 7.4 (guillbdx) + * bug #36175 [Security/Http] Remember me: allow to set the samesite cookie flag (dunglas) + * bug #36173 [Http Foundation] Fix clear cookie samesite (guillbdx) + * bug #36176 [Security] Check if firewall is stateless before checking for session/previous session (koenreiniers) + * bug #36149 [Form] Support customized intl php.ini settings (jorrit) + * bug #36172 [Debug] fix for PHP 7.3.16+/7.4.4+ (nicolas-grekas) + * bug #36141 Prevent warning in proc_open() (BenMorel) + * bug #36121 [VarDumper] fix side-effect by not using mt_rand() (nicolas-grekas) + * bug #36073 [PropertyAccess][DX] Improved errors when reading uninitialized properties (HeahDude) + * bug #36063 [FrameworkBundle] start session on flashbag injection (William Arslett) + * bug #36020 [Form] ignore microseconds submitted by Edge (xabbuh) + * bug #36041 fix import from config file using type: glob (Tobion) + * bug #35987 [DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type (fancyweb) + * bug #35938 [Form] Handle false as empty value on expanded choices (fancyweb) + * bug #36004 [Yaml] fix dumping strings containing CRs (xabbuh) + * bug #35982 [DI] Fix XmlFileLoader bad error message (przemyslaw-bogusz) + * bug #35937 Revert "bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form" (dmaicher) + * bug #35910 [SecurityBundle] Minor fixes in configuration tree builder (HeahDude) + * 3.4.38 (2020-02-29) * bug #35781 [Form] NumberToLocalizedStringTransformer return int if scale = 0 (VincentLanglet) From 7da913baa97430a4d90cee48eb9e41ef41595447 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Mar 2020 08:25:10 +0200 Subject: [PATCH 19/29] update CONTRIBUTORS for 3.4.39 --- CONTRIBUTORS.md | 58 ++++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 468c90ad49d1d..53a2faec2f45f 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -16,27 +16,27 @@ Symfony is the result of the work of many people who made the code better - Victor Berchet (victor) - Maxime Steinhausser (ogizanagi) - Ryan Weaver (weaverryan) - - Javier Eguiluz (javier.eguiluz) - Grégoire Pineau (lyrixx) - - Jakub Zalas (jakubzalas) + - Javier Eguiluz (javier.eguiluz) - Roland Franssen (ro0) + - Jakub Zalas (jakubzalas) - Johannes S (johannes) - Kris Wallsmith (kriswallsmith) - Yonel Ceruto (yonelceruto) - Hugo Hamon (hhamon) - Abdellatif Ait boudad (aitboudad) - Samuel ROZE (sroze) - - Romain Neutron (romain) + - Thomas Calvet (fancyweb) - Wouter de Jong (wouterj) + - Romain Neutron (romain) - Pascal Borreli (pborreli) - - Thomas Calvet (fancyweb) - Joseph Bielawski (stloyd) - Alexander M. Turek (derrabus) - Karma Dordrak (drak) - Lukas Kahwe Smith (lsmith) - - Martin Hasoň (hason) - - Hamza Amrouche (simperfit) - Jules Pietri (heah) + - Hamza Amrouche (simperfit) + - Martin Hasoň (hason) - Jeremy Mikola (jmikola) - Jérémy DERUSSÉ (jderusse) - Jean-François Simon (jfsimon) @@ -66,17 +66,17 @@ Symfony is the result of the work of many people who made the code better - Saša Stamenković (umpirsky) - Peter Rehm (rpet) - Henrik Bjørnskov (henrikbjorn) - - Miha Vrhovnik - Gabriel Ostrolucký (gadelat) + - Miha Vrhovnik + - David Maicher (dmaicher) - Diego Saint Esteben (dii3g0) - Gábor Egyed (1ed) - Titouan Galopin (tgalopin) - - David Maicher (dmaicher) + - Jan Schädlich (jschaedl) - Konstantin Kudryashov (everzet) - Bilal Amarni (bamarni) - Mathieu Piot (mpiot) - Vladimir Reznichenko (kalessil) - - Jan Schädlich (jschaedl) - Florin Patan (florinpatan) - Jáchym Toušek (enumag) - Andrej Hudec (pulzarraider) @@ -136,6 +136,7 @@ Symfony is the result of the work of many people who made the code better - Joel Wurtz (brouznouf) - Fabien Pennequin (fabienpennequin) - Théo FIDRY (theofidry) + - Przemysław Bogusz (przemyslaw-bogusz) - Eric GELOEN (gelo) - Lars Strojny (lstrojny) - Jannik Zschiesche (apfelbox) @@ -155,6 +156,7 @@ Symfony is the result of the work of many people who made the code better - Sebastian Hörl (blogsh) - Daniel Gomes (danielcsgomes) - Hidenori Goto (hidenorigoto) + - Alessandro Chitolina (alekitto) - Andréia Bohner (andreia) - Yanick Witschi (toflar) - Arnaud Kleinpeter (nanocom) @@ -164,7 +166,6 @@ Symfony is the result of the work of many people who made the code better - Jérémie Augustin (jaugustin) - François-Xavier de Guillebon (de-gui_f) - Oleg Voronkovich - - Alessandro Chitolina (alekitto) - Philipp Wahala (hifi) - Rafael Dohms (rdohms) - jwdeitch @@ -239,8 +240,10 @@ Symfony is the result of the work of many people who made the code better - fivestar - Dominique Bongiraud - Jeremy Livingston (jeremylivingston) + - Laurent VOULLEMIER (lvo) - Michael Lee (zerustech) - Matthieu Auger (matthieuauger) + - Ahmed TAILOULOUTE (ahmedtai) - Leszek Prabucki (l3l0) - Fabien Bourigault (fbourigault) - François Zaninotto (fzaninotto) @@ -248,7 +251,6 @@ Symfony is the result of the work of many people who made the code better - jeff - John Kary (johnkary) - Jan Rosier (rosier) - - Przemysław Bogusz (przemyslaw-bogusz) - Justin Hileman (bobthecow) - Blanchon Vincent (blanchonvincent) - Michele Orselli (orso) @@ -280,7 +282,6 @@ Symfony is the result of the work of many people who made the code better - julien pauli (jpauli) - Lorenz Schori - Sébastien Lavoie (lavoiesl) - - Ahmed TAILOULOUTE (ahmedtai) - Dariusz - Saif (╯°□°)╯ (azjezz) - Dmitrii Poddubnyi (karser) @@ -306,6 +307,7 @@ Symfony is the result of the work of many people who made the code better - Arjen Brouwer (arjenjb) - Katsuhiro OGAWA - Patrick McDougle (patrick-mcdougle) + - Guillaume Pédelagrabe - Alif Rachmawadi - Anton Chernikov (anton_ch1989) - Kristen Gilden (kgilden) @@ -336,6 +338,7 @@ Symfony is the result of the work of many people who made the code better - Wodor Wodorski - Thomas Lallement (raziel057) - Colin O'Dell (colinodell) + - Mathias Arlaud (mtarld) - Giorgio Premi - renanbr - Alex Rock (pierstoval) @@ -398,13 +401,11 @@ Symfony is the result of the work of many people who made the code better - Emanuele Gaspari (inmarelibero) - Dariusz Rumiński - Berny Cantos (xphere81) - - Laurent VOULLEMIER (lvo) - Thierry Thuon (lepiaf) - Ricard Clau (ricardclau) - Mark Challoner (markchalloner) - Philippe Segatori - Gennady Telegin (gtelegin) - - Mathias Arlaud (mtarld) - Erin Millard - Artur Melo (restless) - Matthew Lewinski (lewinski) @@ -433,6 +434,7 @@ Symfony is the result of the work of many people who made the code better - Eric Masoero (eric-masoero) - Denis Brumann (dbrumann) - JhonnyL + - Haralan Dobrev (hkdobrev) - hossein zolfi (ocean) - Clément Gautier (clementgautier) - Bastien Jaillot (bastnic) @@ -486,6 +488,7 @@ Symfony is the result of the work of many people who made the code better - Xavier HAUSHERR - Albert Jessurum (ajessu) - Laszlo Korte + - Jesse Rushlow (geeshoe) - Miha Vrhovnik - Alessandro Desantis - hubert lecorche (hlecorche) @@ -561,6 +564,7 @@ Symfony is the result of the work of many people who made the code better - Gintautas Miselis - Rob Bast - Roberto Espinoza (respinoza) + - HypeMC - Soufian EZ-ZANTAR (soezz) - Zander Baldwin - Gocha Ossinkine (ossinkine) @@ -586,7 +590,6 @@ Symfony is the result of the work of many people who made the code better - Yoshio HANAWA - Jan van Thoor (janvt) - Gladhon - - Haralan Dobrev (hkdobrev) - Sebastian Bergmann - Miroslav Sustek - Pablo Díez (pablodip) @@ -716,6 +719,7 @@ Symfony is the result of the work of many people who made the code better - Stéphane Escandell (sescandell) - Konstantin S. M. Möllers (ksmmoellers) - James Johnston + - Noémi Salaün (noemi-salaun) - Sinan Eldem - BoShurik - Alexandre Dupuy (satchette) @@ -732,6 +736,7 @@ Symfony is the result of the work of many people who made the code better - Stefan Gehrig (sgehrig) - Hany el-Kerdany - Wang Jingyu + - Langlet Vincent (deviling) - Åsmund Garfors - Gunnstein Lye (glye) - Maxime Douailin @@ -802,7 +807,6 @@ Symfony is the result of the work of many people who made the code better - Simon Schick (simonsimcity) - redstar504 - Tristan Roussel - - HypeMC - Cameron Porter - Hossein Bukhamsin - Oliver Hoff @@ -835,6 +839,7 @@ Symfony is the result of the work of many people who made the code better - Richard Quadling - Raphaëll Roussel - Michael Lutz + - Koen Reiniers (koenre) - jochenvdv - Reedy - Arturas Smorgun (asarturas) @@ -883,6 +888,7 @@ Symfony is the result of the work of many people who made the code better - Dennis Hotson - Andrew Tchircoff (andrewtch) - michaelwilliams + - Martin Kirilov - 1emming - Nykopol (nykopol) - Tri Pham (phamuyentri) @@ -951,9 +957,11 @@ Symfony is the result of the work of many people who made the code better - Roy Klutman (royklutman) - Sofiane HADDAG (sofhad) - frost-nzcr4 + - arai - Laurent Bassin (lbassin) - andrey1s - Abhoryo + - Daniel STANCU - Fabian Vogler (fabian) - Korvin Szanto - soyuka @@ -1003,13 +1011,13 @@ Symfony is the result of the work of many people who made the code better - Shin Ohno (ganchiku) - Geert De Deckere (geertdd) - Jan Kramer (jankramer) + - Matthieu Mota (matthieumota) - abdul malik ikhsan (samsonasik) - Henry Snoek (snoek09) - Jérémy M (th3mouk) - Simone Di Maulo (toretto460) - Christian Morgan - Alexander Miehe (engerim) - - Jesse Rushlow (geeshoe) - Morgan Auchede (mauchede) - Sascha Dens (saschadens) - Don Pinkster @@ -1037,6 +1045,7 @@ Symfony is the result of the work of many people who made the code better - Marcos Gómez Vilches (markitosgv) - Matthew Davis (mdavis1982) - Markus S. (staabm) + - Benjamin Morel - Maks - Antoine LA - den @@ -1228,6 +1237,7 @@ Symfony is the result of the work of many people who made the code better - Benjamin Paap (benjaminpaap) - Claus Due (namelesscoder) - Christian + - William Arslett - Denis Golubovskiy (bukashk0zzz) - Sergii Smertin (nfx) - Mikkel Paulson @@ -1309,6 +1319,7 @@ Symfony is the result of the work of many people who made the code better - BRAMILLE Sébastien (oktapodia) - Artem Kolesnikov (tyomo4ka) - Gustavo Adrian + - Jorrit Schippers (jorrit) - Yannick - Vladimir Luchaninov (luchaninov) - spdionis @@ -1346,7 +1357,6 @@ Symfony is the result of the work of many people who made the code better - Oxan van Leeuwen - pkowalczyk - Soner Sayakci - - Koen Reiniers (koenre) - Max Voloshin (maxvoloshin) - Nicolas Fabre (nfabre) - Raul Rodriguez (raul782) @@ -1593,6 +1603,7 @@ Symfony is the result of the work of many people who made the code better - Felipy Tavares Amorim (felipyamorim) - Guillaume Loulier (guikingone) - Klaus Silveira (klaussilveira) + - Pierre Grimaud (pgrimaud) - Thomas Chmielowiec (chmielot) - Jānis Lukss - rkerner @@ -1645,7 +1656,9 @@ Symfony is the result of the work of many people who made the code better - Mephistofeles - Hoffmann András - LubenZA + - Victor Garcia - Olivier + - Denis Yuzhanin - knezmilos13 - Cyril PASCAL - Michael Bessolov @@ -1732,6 +1745,7 @@ Symfony is the result of the work of many people who made the code better - Stefan Hüsges (tronsha) - Jake Bishop (yakobeyak) - Dan Blows + - popnikos - Matt Wells - Sander van der Vlugt - Nicolas Appriou @@ -1828,6 +1842,7 @@ Symfony is the result of the work of many people who made the code better - Aarón Nieves Fernández - Mike Meier - Kirill Saksin + - Reda DAOUDI - Koalabaerchen - michalmarcinkowski - Warwick @@ -1873,7 +1888,6 @@ Symfony is the result of the work of many people who made the code better - ged15 - Daan van Renterghem - Nicole Cordes - - Martin Kirilov - Bálint Szekeres - amcastror - Alexander Li (aweelex) @@ -2174,7 +2188,6 @@ Symfony is the result of the work of many people who made the code better - Karolis - Myke79 - Brian Debuire - - Benjamin Morel - Eric Grimois - Piers Warmers - Sylvain Lorinet @@ -2240,7 +2253,6 @@ Symfony is the result of the work of many people who made the code better - James Michael DuPont - Kasperki - Tammy D - - Daniel STANCU - Ryan Rud - Ondrej Slinták - vlechemin @@ -2267,6 +2279,7 @@ Symfony is the result of the work of many people who made the code better - Abdulkadir N. A. - Adam Klvač - Bruno Nogueira Nascimento Wowk + - jonmldr - Yevgen Kovalienia - Lebnik - nsbx @@ -2385,6 +2398,7 @@ Symfony is the result of the work of many people who made the code better - Jose Manuel Gonzalez (jgonzalez) - Joachim Krempel (jkrempel) - Jorge Maiden (jorgemaiden) + - Joao Paulo V Martins (jpjoao) - Justin Rainbow (jrainbow) - Juan Luis (juanlugb) - JuntaTom (juntatom) @@ -2398,7 +2412,6 @@ Symfony is the result of the work of many people who made the code better - Luís Cobucci (lcobucci) - Jérémy (libertjeremy) - Mehdi Achour (machour) - - Matthieu Mota (matthieumota) - Matthieu Moquet (mattketmo) - Moritz Borgmann (mborgmann) - Michal Čihař (mcihar) @@ -2442,6 +2455,7 @@ Symfony is the result of the work of many people who made the code better - Markus Tacker (tacker) - Tom Newby (tomnewbyau) - Andrew Clark (tqt_andrew_clark) + - Aaron Piotrowski (trowski) - David Lumaye (tux1124) - Roman Tymoshyk (tymoshyk) - Tyler Stroud (tystr) From 70094979f215567c189abbb44bd9e04b3d2b4ac5 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Mar 2020 08:25:13 +0200 Subject: [PATCH 20/29] updated VERSION for 3.4.39 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 9d1d42eb19c20..7193c8b935b6d 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -67,12 +67,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '3.4.39-DEV'; + const VERSION = '3.4.39'; const VERSION_ID = 30439; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; const RELEASE_VERSION = 39; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021'; From 2555bfffa9f166d6589f31c5ccd711cd55267fc5 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Mar 2020 08:41:06 +0200 Subject: [PATCH 21/29] bumped Symfony version to 3.4.40 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 7193c8b935b6d..9422d90e9ee9b 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -67,12 +67,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '3.4.39'; - const VERSION_ID = 30439; + const VERSION = '3.4.40-DEV'; + const VERSION_ID = 30440; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; - const RELEASE_VERSION = 39; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 40; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021'; From 35644cf8dd4779820b0b3bf8dd8e1423d07bde17 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 30 Mar 2020 10:15:56 +0200 Subject: [PATCH 22/29] [FrameworkBundle] revert to legacy wiring of the session when circular refs are detected --- .../Compiler/SessionPass.php | 50 +++++++++++++++++++ .../FrameworkBundle/FrameworkBundle.php | 2 + .../Compiler/SessionPassTest.php | 44 ++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SessionPass.php create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SessionPassTest.php diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SessionPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SessionPass.php new file mode 100644 index 0000000000000..0f4950615fbce --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SessionPass.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * @internal to be removed in 6.0 + */ +class SessionPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('session')) { + return; + } + + $bags = [ + 'session.flash_bag' => $container->hasDefinition('session.flash_bag') ? $container->getDefinition('session.flash_bag') : null, + 'session.attribute_bag' => $container->hasDefinition('session.attribute_bag') ? $container->getDefinition('session.attribute_bag') : null, + ]; + + foreach ($container->getDefinition('session')->getArguments() as $v) { + if (!$v instanceof Reference || !isset($bags[$bag = (string) $v]) || !\is_array($factory = $bags[$bag]->getFactory())) { + continue; + } + + if ([0, 1] !== array_keys($factory) || !$factory[0] instanceof Reference || 'session' !== (string) $factory[0]) { + continue; + } + + if ('get'.ucfirst(substr($bag, 8, -4)).'Bag' !== $factory[1]) { + continue; + } + + $bags[$bag]->setFactory(null); + } + } +} diff --git a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php index b472275ff530a..f8bf78d859054 100644 --- a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php +++ b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php @@ -22,6 +22,7 @@ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SessionPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TemplatingPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\WorkflowGuardListenerPass; @@ -125,6 +126,7 @@ public function build(ContainerBuilder $container) $this->addCompilerPassIfExists($container, FormPass::class); $container->addCompilerPass(new WorkflowGuardListenerPass()); $container->addCompilerPass(new ResettableServicePass()); + $container->addCompilerPass(new SessionPass()); if ($container->getParameter('kernel.debug')) { $container->addCompilerPass(new AddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SessionPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SessionPassTest.php new file mode 100644 index 0000000000000..afc6f9b4b2577 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SessionPassTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SessionPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +class SessionPassTest extends TestCase +{ + public function testProcess() + { + $arguments = [ + new Reference('session.flash_bag'), + new Reference('session.attribute_bag'), + ]; + $container = new ContainerBuilder(); + $container + ->register('session') + ->setArguments($arguments); + $container + ->register('session.flash_bag') + ->setFactory([new Reference('session'), 'getFlashBag']); + $container + ->register('session.attribute_bag') + ->setFactory([new Reference('session'), 'getAttributeBag']); + + (new SessionPass())->process($container); + + $this->assertSame($arguments, $container->getDefinition('session')->getArguments()); + $this->assertNull($container->getDefinition('session.flash_bag')->getFactory()); + $this->assertNull($container->getDefinition('session.attribute_bag')->getFactory()); + } +} From f4dd3e70226d49fe3d5f3c78dbed1c07664e29ce Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 30 Mar 2020 11:45:21 +0200 Subject: [PATCH 23/29] [DI] fix generating TypedReference from PriorityTaggedServiceTrait --- .../Compiler/PriorityTaggedServiceTrait.php | 39 +++++++++++-------- .../PriorityTaggedServiceTraitTest.php | 7 ++-- .../ResolveTaggedIteratorArgumentPassTest.php | 3 +- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php b/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php index c24d5976b3ccb..caa2e03e71de6 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php @@ -15,6 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\TypedReference; /** * Trait that allows a generic method to find and sort service by priority option in the tag. @@ -55,41 +56,51 @@ private function findAndSortTaggedServices($tagName, ContainerBuilder $container foreach ($container->findTaggedServiceIds($tagName, true) as $serviceId => $attributes) { $defaultPriority = null; $defaultIndex = null; + $class = $container->getDefinition($serviceId)->getClass(); + $class = $container->getParameterBag()->resolveValue($class) ?: null; foreach ($attributes as $attribute) { $index = $priority = null; if (isset($attribute['priority'])) { $priority = $attribute['priority']; - } elseif (null === $defaultPriority && $defaultPriorityMethod) { - $defaultPriority = PriorityTaggedServiceUtil::getDefaultPriority($container, $serviceId, $defaultPriorityMethod, $tagName); + } elseif (null === $defaultPriority && $defaultPriorityMethod && $class) { + $defaultPriority = PriorityTaggedServiceUtil::getDefaultPriority($container, $serviceId, $class, $defaultPriorityMethod, $tagName); } $priority = $priority ?? $defaultPriority ?? $defaultPriority = 0; if (null === $indexAttribute && !$needsIndexes) { - $services[] = [$priority, ++$i, null, $serviceId]; + $services[] = [$priority, ++$i, null, $serviceId, null]; continue 2; } if (null !== $indexAttribute && isset($attribute[$indexAttribute])) { $index = $attribute[$indexAttribute]; - } elseif (null === $defaultIndex && $defaultIndexMethod) { - $defaultIndex = PriorityTaggedServiceUtil::getDefaultIndex($container, $serviceId, $defaultIndexMethod, $tagName, $indexAttribute); + } elseif (null === $defaultIndex && $defaultIndexMethod && $class) { + $defaultIndex = PriorityTaggedServiceUtil::getDefaultIndex($container, $serviceId, $class, $defaultIndexMethod, $tagName, $indexAttribute); } $index = $index ?? $defaultIndex ?? $defaultIndex = $serviceId; - $services[] = [$priority, ++$i, $index, $serviceId]; + $services[] = [$priority, ++$i, $index, $serviceId, $class]; } } uasort($services, static function ($a, $b) { return $b[0] <=> $a[0] ?: $a[1] <=> $b[1]; }); $refs = []; - foreach ($services as [, , $index, $serviceId]) { + foreach ($services as [, , $index, $serviceId, $class]) { + if (!$class) { + $reference = new Reference($serviceId); + } elseif ($index === $serviceId) { + $reference = new TypedReference($serviceId, $class); + } else { + $reference = new TypedReference($serviceId, $class, ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, $index); + } + if (null === $index) { - $refs[] = new Reference($serviceId); + $refs[] = $reference; } else { - $refs[$index] = new Reference($serviceId); + $refs[$index] = $reference; } } @@ -105,11 +116,8 @@ class PriorityTaggedServiceUtil /** * Gets the index defined by the default index method. */ - public static function getDefaultIndex(ContainerBuilder $container, string $serviceId, string $defaultIndexMethod, string $tagName, string $indexAttribute): ?string + public static function getDefaultIndex(ContainerBuilder $container, string $serviceId, string $class, string $defaultIndexMethod, string $tagName, string $indexAttribute): ?string { - $class = $container->getDefinition($serviceId)->getClass(); - $class = $container->getParameterBag()->resolveValue($class) ?: null; - if (!($r = $container->getReflectionClass($class)) || !$r->hasMethod($defaultIndexMethod)) { return null; } @@ -134,11 +142,8 @@ public static function getDefaultIndex(ContainerBuilder $container, string $serv /** * Gets the priority defined by the default priority method. */ - public static function getDefaultPriority(ContainerBuilder $container, string $serviceId, string $defaultPriorityMethod, string $tagName): ?int + public static function getDefaultPriority(ContainerBuilder $container, string $serviceId, string $class, string $defaultPriorityMethod, string $tagName): ?int { - $class = $container->getDefinition($serviceId)->getClass(); - $class = $container->getParameterBag()->resolveValue($class) ?: null; - if (!($r = $container->getReflectionClass($class)) || !$r->hasMethod($defaultPriorityMethod)) { return null; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php index 25ac597844520..3feafac3d3230 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php @@ -17,6 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Tests\Fixtures\BarTagClass; +use Symfony\Component\DependencyInjection\TypedReference; class PriorityTaggedServiceTraitTest extends TestCase { @@ -122,10 +123,10 @@ public function testOnlyTheIndexedTagsAreListed() $tag = new TaggedIteratorArgument('my_custom_tag', 'foo'); $expected = [ - 'bar_tag_class' => new Reference('service2'), - 'b' => new Reference('service2'), + 'bar_tag_class' => new TypedReference('service2', BarTagClass::class), + 'b' => new TypedReference('service2', BarTagClass::class), 'bar' => new Reference('service1'), - 'a' => new Reference('service2'), + 'a' => new TypedReference('service2', BarTagClass::class), ]; $services = $priorityTaggedServiceTraitImplementation->test($tag, $container); $this->assertSame(array_keys($expected), array_keys($services)); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php index 2a07f26178980..a62a585c6ef0c 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php @@ -16,6 +16,7 @@ use Symfony\Component\DependencyInjection\Compiler\ResolveTaggedIteratorArgumentPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\TypedReference; /** * @author Roland Franssen @@ -50,7 +51,7 @@ public function testProcessWithIndexes() $properties = $container->getDefinition('service_c')->getProperties(); $expected = new TaggedIteratorArgument('foo', 'key'); - $expected->setValues(['1' => new Reference('service_a'), '2' => new Reference('service_b')]); + $expected->setValues(['1' => new TypedReference('service_a', 'stdClass'), '2' => new TypedReference('service_b', 'stdClass')]); $this->assertEquals($expected, $properties['foos']); } } From a696d1f3afda2c1cf63218975ce1066a9c8a349c Mon Sep 17 00:00:00 2001 From: Wouter de Jong Date: Sat, 28 Mar 2020 17:27:16 +0100 Subject: [PATCH 24/29] [Security/Http] Allow setting cookie security settings for delete_cookies --- .../DependencyInjection/MainConfiguration.php | 2 ++ .../Security/Http/Logout/CookieClearingLogoutHandler.php | 2 +- .../Http/Tests/Logout/CookieClearingLogoutHandlerTest.php | 7 ++++++- src/Symfony/Component/Security/Http/composer.json | 2 +- src/Symfony/Component/Security/composer.json | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php index df96cf2db78f5..1020c86e8e583 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php @@ -273,6 +273,8 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto ->children() ->scalarNode('path')->defaultNull()->end() ->scalarNode('domain')->defaultNull()->end() + ->scalarNode('secure')->defaultFalse()->end() + ->scalarNode('samesite')->defaultNull()->end() ->end() ->end() ->end() diff --git a/src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php b/src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php index 2aa7c732b976a..9367a62b33bdf 100644 --- a/src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php +++ b/src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php @@ -38,7 +38,7 @@ public function __construct(array $cookies) public function logout(Request $request, Response $response, TokenInterface $token) { foreach ($this->cookies as $cookieName => $cookieData) { - $response->headers->clearCookie($cookieName, $cookieData['path'], $cookieData['domain']); + $response->headers->clearCookie($cookieName, $cookieData['path'], $cookieData['domain'], isset($cookieData['secure']) ? $cookieData['secure'] : false, true, isset($cookieData['samesite']) ? $cookieData['samesite'] : null); } } } diff --git a/src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php index 8dcc10338b768..f2407fcb3fdd5 100644 --- a/src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Security\Http\Tests\Logout; use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\ResponseHeaderBag; @@ -25,7 +26,7 @@ public function testLogout() $response = new Response(); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); - $handler = new CookieClearingLogoutHandler(['foo' => ['path' => '/foo', 'domain' => 'foo.foo'], 'foo2' => ['path' => null, 'domain' => null]]); + $handler = new CookieClearingLogoutHandler(['foo' => ['path' => '/foo', 'domain' => 'foo.foo', 'secure' => true, 'samesite' => Cookie::SAMESITE_STRICT], 'foo2' => ['path' => null, 'domain' => null]]); $cookies = $response->headers->getCookies(); $this->assertCount(0, $cookies); @@ -39,12 +40,16 @@ public function testLogout() $this->assertEquals('foo', $cookie->getName()); $this->assertEquals('/foo', $cookie->getPath()); $this->assertEquals('foo.foo', $cookie->getDomain()); + $this->assertEquals(Cookie::SAMESITE_STRICT, $cookie->getSameSite()); + $this->assertTrue($cookie->isSecure()); $this->assertTrue($cookie->isCleared()); $cookie = $cookies['']['/']['foo2']; $this->assertStringStartsWith('foo2', $cookie->getName()); $this->assertEquals('/', $cookie->getPath()); $this->assertNull($cookie->getDomain()); + $this->assertNull($cookie->getSameSite()); + $this->assertFalse($cookie->isSecure()); $this->assertTrue($cookie->isCleared()); } } diff --git a/src/Symfony/Component/Security/Http/composer.json b/src/Symfony/Component/Security/Http/composer.json index 9ede332facfa0..fcf018c54e511 100644 --- a/src/Symfony/Component/Security/Http/composer.json +++ b/src/Symfony/Component/Security/Http/composer.json @@ -19,7 +19,7 @@ "php": "^5.5.9|>=7.0.8", "symfony/security-core": "~3.2|~4.0", "symfony/event-dispatcher": "~2.8|~3.0|~4.0", - "symfony/http-foundation": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "~3.4.39|^4.4.6", "symfony/http-kernel": "~3.3|~4.0", "symfony/polyfill-php56": "~1.0", "symfony/polyfill-php70": "~1.0", diff --git a/src/Symfony/Component/Security/composer.json b/src/Symfony/Component/Security/composer.json index 5d50f82021292..a756b4aa4c776 100644 --- a/src/Symfony/Component/Security/composer.json +++ b/src/Symfony/Component/Security/composer.json @@ -18,7 +18,7 @@ "require": { "php": "^5.5.9|>=7.0.8", "symfony/event-dispatcher": "~2.8|~3.0|~4.0", - "symfony/http-foundation": "^2.8.31|~3.3.13|~3.4|~4.0", + "symfony/http-foundation": "~3.4.39|^4.4.6", "symfony/http-kernel": "~3.3|~4.0", "symfony/polyfill-php56": "~1.0", "symfony/polyfill-php70": "~1.0", From e1c48f3449edb4ccf7815757ad30506351f810cd Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Mar 2020 13:26:49 +0200 Subject: [PATCH 25/29] Fix versions --- src/Symfony/Component/Security/Http/composer.json | 2 +- src/Symfony/Component/Security/composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Security/Http/composer.json b/src/Symfony/Component/Security/Http/composer.json index fcf018c54e511..449e07ed8f680 100644 --- a/src/Symfony/Component/Security/Http/composer.json +++ b/src/Symfony/Component/Security/Http/composer.json @@ -19,7 +19,7 @@ "php": "^5.5.9|>=7.0.8", "symfony/security-core": "~3.2|~4.0", "symfony/event-dispatcher": "~2.8|~3.0|~4.0", - "symfony/http-foundation": "~3.4.39|^4.4.6", + "symfony/http-foundation": "~3.4.40|^4.4.7", "symfony/http-kernel": "~3.3|~4.0", "symfony/polyfill-php56": "~1.0", "symfony/polyfill-php70": "~1.0", diff --git a/src/Symfony/Component/Security/composer.json b/src/Symfony/Component/Security/composer.json index a756b4aa4c776..44eedcc9de12e 100644 --- a/src/Symfony/Component/Security/composer.json +++ b/src/Symfony/Component/Security/composer.json @@ -18,7 +18,7 @@ "require": { "php": "^5.5.9|>=7.0.8", "symfony/event-dispatcher": "~2.8|~3.0|~4.0", - "symfony/http-foundation": "~3.4.39|^4.4.6", + "symfony/http-foundation": "~3.4.40|^4.4.7", "symfony/http-kernel": "~3.3|~4.0", "symfony/polyfill-php56": "~1.0", "symfony/polyfill-php70": "~1.0", From 0f6a99936b0dd2afd0c4a091f5c42367adcfefe3 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Fri, 6 Mar 2020 14:55:51 +0100 Subject: [PATCH 26/29] [Security] Fix access_control behavior with unanimous decision strategy --- .../Authorization/AccessDecisionManager.php | 9 +++- .../Security/Http/Firewall/AccessListener.php | 10 +---- .../Tests/Firewall/AccessListenerTest.php | 41 +++++++++++++++++++ .../Component/Security/Http/composer.json | 2 +- 4 files changed, 50 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php index 3b55e7bffaa57..1a6c9cbb81f24 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php +++ b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php @@ -53,11 +53,16 @@ public function __construct(iterable $voters = [], string $strategy = self::STRA } /** + * @param bool $allowMultipleAttributes Whether to allow passing multiple values to the $attributes array + * * {@inheritdoc} */ - public function decide(TokenInterface $token, array $attributes, $object = null) + public function decide(TokenInterface $token, array $attributes, $object = null/*, bool $allowMultipleAttributes = false*/) { - if (\count($attributes) > 1) { + $allowMultipleAttributes = 3 < func_num_args() && func_get_arg(3); + + // Special case for AccessListener, do not remove the right side of the condition before 6.0 + if (\count($attributes) > 1 && !$allowMultipleAttributes) { @trigger_error(sprintf('Passing more than one Security attribute to "%s()" is deprecated since Symfony 4.4. Use multiple "decide()" calls or the expression language (e.g. "is_granted(...) or is_granted(...)") instead.', __METHOD__), E_USER_DEPRECATED); } diff --git a/src/Symfony/Component/Security/Http/Firewall/AccessListener.php b/src/Symfony/Component/Security/Http/Firewall/AccessListener.php index 00673f60aba2d..b294456853e85 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AccessListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AccessListener.php @@ -87,15 +87,7 @@ public function authenticate(RequestEvent $event) $this->tokenStorage->setToken($token); } - $granted = false; - foreach ($attributes as $key => $value) { - if ($this->accessDecisionManager->decide($token, [$key => $value], $request)) { - $granted = true; - break; - } - } - - if (!$granted) { + if (!$this->accessDecisionManager->decide($token, $attributes, $request, true)) { $exception = new AccessDeniedException(); $exception->setAttributes($attributes); $exception->setSubject($request); diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php index 168e25643705b..75798d055a385 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php @@ -16,6 +16,7 @@ use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface; use Symfony\Component\Security\Http\AccessMapInterface; @@ -227,4 +228,44 @@ public function testHandleWhenTheSecurityTokenStorageHasNoToken() $listener(new RequestEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MASTER_REQUEST)); } + + public function testHandleMWithultipleAttributesShouldBeHandledAsAnd() + { + $request = new Request(); + + $accessMap = $this->getMockBuilder('Symfony\Component\Security\Http\AccessMapInterface')->getMock(); + $accessMap + ->expects($this->any()) + ->method('getPatterns') + ->with($this->equalTo($request)) + ->willReturn([['foo' => 'bar', 'bar' => 'baz'], null]) + ; + + $authenticatedToken = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $authenticatedToken + ->expects($this->any()) + ->method('isAuthenticated') + ->willReturn(true) + ; + + $tokenStorage = new TokenStorage(); + $tokenStorage->setToken($authenticatedToken); + + $accessDecisionManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock(); + $accessDecisionManager + ->expects($this->once()) + ->method('decide') + ->with($this->equalTo($authenticatedToken), $this->equalTo(['foo' => 'bar', 'bar' => 'baz']), $this->equalTo($request), true) + ->willReturn(true) + ; + + $listener = new AccessListener( + $tokenStorage, + $accessDecisionManager, + $accessMap, + $this->createMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface') + ); + + $listener(new RequestEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MASTER_REQUEST)); + } } diff --git a/src/Symfony/Component/Security/Http/composer.json b/src/Symfony/Component/Security/Http/composer.json index 7c9cdb484f10c..699ffcf7032b3 100644 --- a/src/Symfony/Component/Security/Http/composer.json +++ b/src/Symfony/Component/Security/Http/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": "^7.1.3", - "symfony/security-core": "^4.4", + "symfony/security-core": "^4.4.7", "symfony/http-foundation": "^3.4.40|^4.4.7|^5.0.7", "symfony/http-kernel": "^4.4", "symfony/property-access": "^3.4|^4.0|^5.0" From 0050a4dafb18a5a616cc33fe5fc8027b03045158 Mon Sep 17 00:00:00 2001 From: Yonel Ceruto Date: Tue, 11 Feb 2020 09:34:35 -0500 Subject: [PATCH 27/29] [HttpFoundation] Do not set the default Content-Type based on the Accept header --- .../ErrorRenderer/SerializerErrorRenderer.php | 9 ++++++++- src/Symfony/Component/HttpFoundation/Request.php | 4 +++- src/Symfony/Component/HttpFoundation/Response.php | 2 +- .../HttpFoundation/Tests/ResponseTest.php | 15 ++++++++++++++- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/ErrorHandler/ErrorRenderer/SerializerErrorRenderer.php b/src/Symfony/Component/ErrorHandler/ErrorRenderer/SerializerErrorRenderer.php index d1dd652a64973..e0640850a691c 100644 --- a/src/Symfony/Component/ErrorHandler/ErrorRenderer/SerializerErrorRenderer.php +++ b/src/Symfony/Component/ErrorHandler/ErrorRenderer/SerializerErrorRenderer.php @@ -12,6 +12,7 @@ namespace Symfony\Component\ErrorHandler\ErrorRenderer; use Symfony\Component\ErrorHandler\Exception\FlattenException; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Serializer\Exception\NotEncodableValueException; use Symfony\Component\Serializer\SerializerInterface; @@ -30,6 +31,7 @@ class SerializerErrorRenderer implements ErrorRendererInterface /** * @param string|callable(FlattenException) $format The format as a string or a callable that should return it + * formats not supported by Request::getMimeTypes() should be given as mime types * @param bool|callable $debug The debugging mode as a boolean or a callable that should return it */ public function __construct(SerializerInterface $serializer, $format, ErrorRendererInterface $fallbackErrorRenderer = null, $debug = false) @@ -57,11 +59,16 @@ public function render(\Throwable $exception): FlattenException try { $format = \is_string($this->format) ? $this->format : ($this->format)($flattenException); + $headers = [ + 'Content-Type' => Request::getMimeTypes($format)[0] ?? $format, + 'Vary' => 'Accept', + ]; return $flattenException->setAsString($this->serializer->serialize($flattenException, $format, [ 'exception' => $exception, 'debug' => \is_bool($this->debug) ? $this->debug : ($this->debug)($exception), - ])); + ])) + ->setHeaders($flattenException->getHeaders() + $headers); } catch (NotEncodableValueException $e) { return $this->fallbackErrorRenderer->render($exception); } diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index a5e50eb795a5f..33f4efb5ed9e1 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1590,7 +1590,9 @@ public function isNoCache() * Gets the preferred format for the response by inspecting, in the following order: * * the request format set using setRequestFormat * * the values of the Accept HTTP header - * * the content type of the body of the request. + * + * Note that if you use this method, you should send the "Vary: Accept" header + * in the response to prevent any issues with intermediary HTTP caches. */ public function getPreferredFormat(?string $default = 'html'): ?string { diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 714109d53669b..b9177934a47ab 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -275,7 +275,7 @@ public function prepare(Request $request) } else { // Content-type based on the Request if (!$headers->has('Content-Type')) { - $format = $request->getPreferredFormat(null); + $format = $request->getRequestFormat(null); if (null !== $format && $mimeType = $request->getMimeType($format)) { $headers->set('Content-Type', $mimeType); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php index d5da59ad7e803..c766f88a294a8 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php @@ -497,12 +497,25 @@ public function testPrepareDoesNothingIfRequestFormatIsNotDefined() $this->assertEquals('text/html; charset=UTF-8', $response->headers->get('content-type')); } + /** + * Same URL cannot produce different Content-Type based on the value of the Accept header, + * unless explicitly stated in the response object. + */ + public function testPrepareDoesNotSetContentTypeBasedOnRequestAcceptHeader() + { + $response = new Response('foo'); + $request = Request::create('/'); + $request->headers->set('Accept', 'application/json'); + $response->prepare($request); + + $this->assertSame('text/html; charset=UTF-8', $response->headers->get('content-type')); + } + public function testPrepareSetContentType() { $response = new Response('foo'); $request = Request::create('/'); $request->setRequestFormat('json'); - $request->headers->remove('accept'); $response->prepare($request); From 471eba312974b11a1a4db7659c0ec1846cd0d891 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Mar 2020 17:04:54 +0200 Subject: [PATCH 28/29] updated CHANGELOG for 5.0.7 --- CHANGELOG-5.0.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG-5.0.md b/CHANGELOG-5.0.md index 7ecfa8a8c88e6..57e9065b0747c 100644 --- a/CHANGELOG-5.0.md +++ b/CHANGELOG-5.0.md @@ -7,6 +7,18 @@ in 5.0 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/v5.0.0...v5.0.1 +* 5.0.7 (2020-03-30) + + * security #cve-2020-5255 [HttpFoundation] Do not set the default Content-Type based on the Accept header (yceruto) + * security #cve-2020-5275 [Security] Fix access_control behavior with unanimous decision strategy (chalasr) + * bug #36262 [DI] fix generating TypedReference from PriorityTaggedServiceTrait (nicolas-grekas) + * bug #36252 [Security/Http] Allow setting cookie security settings for delete_cookies (wouterj) + * bug #36261 [FrameworkBundle] revert to legacy wiring of the session when circular refs are detected (nicolas-grekas) + * bug #36259 [DomCrawler] Fix BC break in assertions breaking Panther (dunglas) + * bug #36181 [BrowserKit] fixed missing post request parameters in file uploads (codebay) + * bug #36216 [Validator] Assert Valid with many groups (phucwan91) + * bug #36222 [Console] Fix OutputStream for PHP 7.4 (guillbdx) + * 5.0.6 (2020-03-27) * bug #36169 [HttpKernel] fix locking for PHP 7.4+ (nicolas-grekas) From 7dbd2e513dfec7dffff2c36b22c4251b83d941db Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Mar 2020 17:04:59 +0200 Subject: [PATCH 29/29] updated VERSION for 5.0.7 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 3671481df4787..d03d4e1d0ab10 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -68,12 +68,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private static $freshCache = []; - const VERSION = '5.0.7-DEV'; + const VERSION = '5.0.7'; const VERSION_ID = 50007; const MAJOR_VERSION = 5; const MINOR_VERSION = 0; const RELEASE_VERSION = 7; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '07/2020'; const END_OF_LIFE = '07/2020'; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy