Skip to content

Commit 2738461

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: [Serializer] Remove redundant @internal tags from traceable classes Fix conversion of partitioned cookies in the PSR-7 bridge [Validator] added Polish translation for units 116-119 Revert stateless check [Console] Fix side-effects from running bash completions skip transient Redis integration tests on AppVeyor
2 parents c1b8837 + 51c4ca7 commit 2738461

File tree

9 files changed

+15
-88
lines changed

9 files changed

+15
-88
lines changed

src/Symfony/Bridge/PsrHttpMessage/Factory/HttpFoundationFactory.php

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -132,89 +132,12 @@ public function createResponse(ResponseInterface $psrResponse, bool $streamed =
132132
$response->setProtocolVersion($psrResponse->getProtocolVersion());
133133

134134
foreach ($cookies as $cookie) {
135-
$response->headers->setCookie($this->createCookie($cookie));
135+
$response->headers->setCookie(Cookie::fromString($cookie));
136136
}
137137

138138
return $response;
139139
}
140140

141-
/**
142-
* Creates a Cookie instance from a cookie string.
143-
*
144-
* Some snippets have been taken from the Guzzle project: https://github.com/guzzle/guzzle/blob/5.3/src/Cookie/SetCookie.php#L34
145-
*
146-
* @throws \InvalidArgumentException
147-
*/
148-
private function createCookie(string $cookie): Cookie
149-
{
150-
foreach (explode(';', $cookie) as $part) {
151-
$part = trim($part);
152-
153-
$data = explode('=', $part, 2);
154-
$name = $data[0];
155-
$value = isset($data[1]) ? trim($data[1], " \n\r\t\0\x0B\"") : null;
156-
157-
if (!isset($cookieName)) {
158-
$cookieName = $name;
159-
$cookieValue = $value;
160-
161-
continue;
162-
}
163-
164-
if ('expires' === strtolower($name) && null !== $value) {
165-
$cookieExpire = new \DateTime($value);
166-
167-
continue;
168-
}
169-
170-
if ('path' === strtolower($name) && null !== $value) {
171-
$cookiePath = $value;
172-
173-
continue;
174-
}
175-
176-
if ('domain' === strtolower($name) && null !== $value) {
177-
$cookieDomain = $value;
178-
179-
continue;
180-
}
181-
182-
if ('secure' === strtolower($name)) {
183-
$cookieSecure = true;
184-
185-
continue;
186-
}
187-
188-
if ('httponly' === strtolower($name)) {
189-
$cookieHttpOnly = true;
190-
191-
continue;
192-
}
193-
194-
if ('samesite' === strtolower($name) && null !== $value) {
195-
$samesite = $value;
196-
197-
continue;
198-
}
199-
}
200-
201-
if (!isset($cookieName)) {
202-
throw new \InvalidArgumentException('The value of the Set-Cookie header is malformed.');
203-
}
204-
205-
return new Cookie(
206-
$cookieName,
207-
$cookieValue,
208-
$cookieExpire ?? 0,
209-
$cookiePath ?? '/',
210-
$cookieDomain ?? null,
211-
isset($cookieSecure),
212-
isset($cookieHttpOnly),
213-
true,
214-
$samesite ?? null
215-
);
216-
}
217-
218141
private function createStreamedResponseCallback(StreamInterface $body): callable
219142
{
220143
return function () use ($body) {

src/Symfony/Component/Console/Resources/completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ _sf_{{ COMMAND_NAME }}() {
1717
done
1818

1919
# Use newline as only separator to allow space in completion values
20-
IFS=$'\n'
20+
local IFS=$'\n'
2121
local sf_cmd="${COMP_WORDS[0]}"
2222

2323
# for an alias, get the real script behind it

src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisExtIntegrationTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,9 @@ public function testGetNonBlocking()
372372
}
373373
}
374374

375+
/**
376+
* @group transient-on-windows
377+
*/
375378
public function testGetAfterReject()
376379
{
377380
$redis = $this->createRedisClient();

src/Symfony/Component/Security/Http/Firewall/ContextListener.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ public function authenticate(RequestEvent $event): void
8787
}
8888

8989
$request = $event->getRequest();
90-
$session = !$request->attributes->getBoolean('_stateless') && $request->hasPreviousSession() ? $request->getSession() : null;
90+
$session = $request->hasPreviousSession() ? $request->getSession() : null;
91+
9192

9293
$request->attributes->set('_security_firewall_run', $this->sessionKey);
9394

src/Symfony/Component/Serializer/DataCollector/SerializerDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
2323
*
24-
* @internal
24+
* @final
2525
*/
2626
class SerializerDataCollector extends DataCollector implements LateDataCollectorInterface
2727
{

src/Symfony/Component/Serializer/Debug/TraceableEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
2525
*
26-
* @internal
26+
* @final
2727
*/
2828
class TraceableEncoder implements EncoderInterface, DecoderInterface, SerializerAwareInterface
2929
{

src/Symfony/Component/Serializer/Debug/TraceableNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
2626
*
27-
* @internal
27+
* @final
2828
*/
2929
class TraceableNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface, NormalizerAwareInterface, DenormalizerAwareInterface
3030
{

src/Symfony/Component/Serializer/Debug/TraceableSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
2525
*
26-
* @internal
26+
* @final
2727
*/
2828
class TraceableSerializer implements SerializerInterface, NormalizerInterface, DenormalizerInterface, EncoderInterface, DecoderInterface
2929
{

src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,19 +452,19 @@
452452
</trans-unit>
453453
<trans-unit id="116">
454454
<source>This value does not represent a valid week in the ISO 8601 format.</source>
455-
<target state="needs-translation">This value does not represent a valid week in the ISO 8601 format.</target>
455+
<target>Podana wartość nie jest poprawnym oznaczeniem tygodnia w formacie ISO 8601.</target>
456456
</trans-unit>
457457
<trans-unit id="117">
458458
<source>This value is not a valid week.</source>
459-
<target state="needs-translation">This value is not a valid week.</target>
459+
<target>Podana wartość nie jest poprawnym oznaczeniem tygodnia.</target>
460460
</trans-unit>
461461
<trans-unit id="118">
462462
<source>This value should not be before week "{{ min }}".</source>
463-
<target state="needs-translation">This value should not be before week "{{ min }}".</target>
463+
<target>Podana wartość nie powinna być przed tygodniem "{{ min }}".</target>
464464
</trans-unit>
465465
<trans-unit id="119">
466466
<source>This value should not be after week "{{ max }}".</source>
467-
<target state="needs-translation">This value should not be after week "{{ max }}".</target>
467+
<target>Podana wartość nie powinna być po tygodniu "{{ max }}".</target>
468468
</trans-unit>
469469
</body>
470470
</file>

0 commit comments

Comments
 (0)