Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f4e1556

Browse filesBrowse files
committed
Merge branch '5.1' into 5.2
* 5.1: [Serializer] Fixed serialize and denormalize return types Run intl-data tests on resources change [FrameworkBundle] fix preserving some special chars in the query string when redirecting
2 parents 619d543 + dde0f3c commit f4e1556
Copy full SHA for f4e1556

File tree

Expand file treeCollapse file tree

4 files changed

+56
-6
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+56
-6
lines changed

‎.github/workflows/intl-data-tests.yml

Copy file name to clipboard
+47Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Intl data tests
2+
3+
on:
4+
push:
5+
paths:
6+
- 'src/Symfony/Component/Intl/Resources/data/**'
7+
pull_request:
8+
paths:
9+
- 'src/Symfony/Component/Intl/Resources/data/**'
10+
11+
jobs:
12+
13+
tests:
14+
name: Tests (intl-data)
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Define the ICU version
22+
run: |
23+
SYMFONY_ICU_VERSION=$(php -r 'require "src/Symfony/Component/Intl/Intl.php"; echo Symfony\Component\Intl\Intl::getIcuStubVersion();')
24+
echo "SYMFONY_ICU_VERSION=$SYMFONY_ICU_VERSION" >> $GITHUB_ENV
25+
26+
- name: Setup PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
coverage: "none"
30+
extensions: "zip,intl-${{env.SYMFONY_ICU_VERSION}}"
31+
ini-values: "memory_limit=-1"
32+
php-version: "7.4"
33+
34+
- name: Install dependencies
35+
run: |
36+
echo "::group::composer update"
37+
composer update --no-progress --no-suggest --ansi
38+
echo "::endgroup::"
39+
echo "::group::install phpunit"
40+
./phpunit install
41+
echo "::endgroup::"
42+
43+
- name: Report the ICU version
44+
run: icu-config --version && php -i | grep 'ICU version'
45+
46+
- name: Run intl-data tests
47+
run: ./phpunit --group intl-data -v

‎src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,16 +302,19 @@ public function testRedirectWithQuery()
302302
$baseUrl = '/base';
303303
$port = 80;
304304

305-
$request = $this->createRequestObject($scheme, $host, $port, $baseUrl, 'b.se=zaza');
305+
$request = $this->createRequestObject($scheme, $host, $port, $baseUrl, 'b.se=zaza&f[%2525][%26][%3D][p.c]=d');
306306
$request->attributes = new ParameterBag(['_route_params' => ['base2' => 'zaza']]);
307307
$urlGenerator = $this->getMockBuilder(UrlGeneratorInterface::class)->getMock();
308-
$urlGenerator->expects($this->exactly(2))->method('generate')->willReturn('/test?b.se=zaza&base2=zaza')->with('/test', ['b.se' => 'zaza', 'base2' => 'zaza'], UrlGeneratorInterface::ABSOLUTE_URL);
308+
$urlGenerator->expects($this->exactly(2))
309+
->method('generate')
310+
->willReturn('/test?b.se=zaza&base2=zaza&f[%2525][%26][%3D][p.c]=d')
311+
->with('/test', ['b.se' => 'zaza', 'base2' => 'zaza', 'f' => ['%25' => ['&' => ['=' => ['p.c' => 'd']]]]], UrlGeneratorInterface::ABSOLUTE_URL);
309312

310313
$controller = new RedirectController($urlGenerator);
311-
$this->assertRedirectUrl($controller->redirectAction($request, '/test', false, false, false, true), '/test?b.se=zaza&base2=zaza');
314+
$this->assertRedirectUrl($controller->redirectAction($request, '/test', false, false, false, true), '/test?b.se=zaza&base2=zaza&f[%2525][%26][%3D][p.c]=d');
312315

313316
$request->attributes->set('_route_params', ['base2' => 'zaza', 'route' => '/test', 'ignoreAttributes' => false, 'keepRequestMethod' => false, 'keepQueryParams' => true]);
314-
$this->assertRedirectUrl($controller($request), '/test?b.se=zaza&base2=zaza');
317+
$this->assertRedirectUrl($controller($request), '/test?b.se=zaza&base2=zaza&f[%2525][%26][%3D][p.c]=d');
315318
}
316319

317320
public function testRedirectWithQueryWithRouteParamsOveriding()

‎src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interface DenormalizerInterface
3232
* @param string $format Format the given data was extracted from
3333
* @param array $context Options available to the denormalizer
3434
*
35-
* @return object|array
35+
* @return mixed
3636
*
3737
* @throws BadMethodCallException Occurs when the normalizer is not called in an expected context
3838
* @throws InvalidArgumentException Occurs when the arguments are not coherent or not supported

‎src/Symfony/Component/Serializer/SerializerInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/SerializerInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function serialize($data, string $format, array $context = []);
3232
*
3333
* @param mixed $data
3434
*
35-
* @return object|array
35+
* @return mixed
3636
*/
3737
public function deserialize($data, string $type, string $format, array $context = []);
3838
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.