Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae390e7

Browse files
Merge branch '6.2' into 6.3
* 6.2: [HttpClient] Encode "," in query strings
2 parents cd3b51c + a716613 commit ae390e7

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/Symfony/Component/HttpClient/HttpClientTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,6 @@ private static function mergeQueryString(?string $queryString, array $queryArray
626626
'%28' => '(',
627627
'%29' => ')',
628628
'%2A' => '*',
629-
'%2C' => ',',
630629
'%2F' => '/',
631630
'%3A' => ':',
632631
'%3B' => ';',

src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public static function provideParseUrl(): iterable
176176
yield [['http:', null, null, null, null], 'http:'];
177177
yield [['http:', null, 'bar', null, null], 'http:bar'];
178178
yield [[null, null, 'bar', '?a=1&c=c', null], 'bar?a=a&b=b', ['b' => null, 'c' => 'c', 'a' => 1]];
179-
yield [[null, null, 'bar', '?a=b+c&b=b-._~!$%26/%27()[]*%2B,;%3D:@%25\\^`{|}', null], 'bar?a=b+c', ['b' => 'b-._~!$&/\'()[]*+,;=:@%\\^`{|}']];
179+
yield [[null, null, 'bar', '?a=b+c&b=b-._~!$%26/%27()[]*%2B%2C;%3D:@%25\\^`{|}', null], 'bar?a=b+c', ['b' => 'b-._~!$&/\'()[]*+,;=:@%\\^`{|}']];
180180
yield [[null, null, 'bar', '?a=b%2B%20c', null], 'bar?a=b+c', ['a' => 'b+ c']];
181181
yield [[null, null, 'bar', '?a[b]=c', null], 'bar', ['a' => ['b' => 'c']]];
182182
yield [[null, null, 'bar', '?a[b[c]=d', null], 'bar?a[b[c]=d', []];

src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ public function testReadWithLastModified(array $locales, array $domains, array $
782782
foreach ($domains as $domain) {
783783
$responses[] = function (string $method, string $url, array $options = []) use ($responseContents, $lastModifieds, $locale, $domain): ResponseInterface {
784784
$this->assertSame('GET', $method);
785-
$this->assertSame('https://localise.biz/api/export/locale/'.$locale.'.xlf?filter='.$domain.'&status=translated,blank-translation', $url);
785+
$this->assertSame('https://localise.biz/api/export/locale/'.$locale.'.xlf?filter='.rawurlencode($domain).'&status=translated%2Cblank-translation', $url);
786786
$this->assertSame(['filter' => $domain, 'status' => 'translated,blank-translation'], $options['query']);
787787
$this->assertSame(['Accept: */*'], $options['headers']);
788788

@@ -819,7 +819,7 @@ public function testReadWithLastModified(array $locales, array $domains, array $
819819
foreach ($domains as $domain) {
820820
$responses[] = function (string $method, string $url, array $options = []) use ($responseContents, $lastModifieds, $locale, $domain): ResponseInterface {
821821
$this->assertSame('GET', $method);
822-
$this->assertSame('https://localise.biz/api/export/locale/'.$locale.'.xlf?filter='.$domain.'&status=translated,blank-translation', $url);
822+
$this->assertSame('https://localise.biz/api/export/locale/'.$locale.'.xlf?filter='.rawurlencode($domain).'&status=translated%2Cblank-translation', $url);
823823
$this->assertSame(['filter' => $domain, 'status' => 'translated,blank-translation'], $options['query']);
824824
$this->assertSame(['If-Modified-Since: '.$lastModifieds[$locale], 'Accept: */*'], $options['headers']);
825825

0 commit comments

Comments
 (0)