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

Skip to content

Commit a760037

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: fix code style [Uid] Hardcode UuidV3 & UuidV5 TYPE conditional constants [Uid] Use the Uuid constructor when reconstructing an Ulid from its RFC-4122 version stop using void in test files parse cookie values containing the equal sign make some time dependent tests more resilient fix code style Remove full head content in HTML to text converter do not break when loading schemas from network paths on Windows apply the sort callback on the whole search result
2 parents 80bde1e + d3739d4 commit a760037

File tree

69 files changed

+225
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+225
-132
lines changed

src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class HttpCodeActivationStrategyTest extends TestCase
2424
/**
2525
* @group legacy
2626
*/
27-
public function testExclusionsWithoutCodeLegacy(): void
27+
public function testExclusionsWithoutCodeLegacy()
2828
{
2929
$this->expectException('LogicException');
3030
new HttpCodeActivationStrategy(new RequestStack(), [['urls' => []]], Logger::WARNING);
@@ -33,7 +33,7 @@ public function testExclusionsWithoutCodeLegacy(): void
3333
/**
3434
* @group legacy
3535
*/
36-
public function testExclusionsWithoutUrlsLegacy(): void
36+
public function testExclusionsWithoutUrlsLegacy()
3737
{
3838
$this->expectException('LogicException');
3939
new HttpCodeActivationStrategy(new RequestStack(), [['code' => 404]], Logger::WARNING);
@@ -44,7 +44,7 @@ public function testExclusionsWithoutUrlsLegacy(): void
4444
*
4545
* @group legacy
4646
*/
47-
public function testIsActivatedLegacy($url, $record, $expected): void
47+
public function testIsActivatedLegacy($url, $record, $expected)
4848
{
4949
$requestStack = new RequestStack();
5050
$requestStack->push(Request::create($url));
@@ -63,13 +63,13 @@ public function testIsActivatedLegacy($url, $record, $expected): void
6363
self::assertEquals($expected, $strategy->isHandlerActivated($record));
6464
}
6565

66-
public function testExclusionsWithoutCode(): void
66+
public function testExclusionsWithoutCode()
6767
{
6868
$this->expectException('LogicException');
6969
new HttpCodeActivationStrategy(new RequestStack(), [['urls' => []]], new ErrorLevelActivationStrategy(Logger::WARNING));
7070
}
7171

72-
public function testExclusionsWithoutUrls(): void
72+
public function testExclusionsWithoutUrls()
7373
{
7474
$this->expectException('LogicException');
7575
new HttpCodeActivationStrategy(new RequestStack(), [['code' => 404]], new ErrorLevelActivationStrategy(Logger::WARNING));

src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class NotFoundActivationStrategyTest extends TestCase
2626
*
2727
* @group legacy
2828
*/
29-
public function testIsActivatedLegacy(string $url, array $record, bool $expected): void
29+
public function testIsActivatedLegacy(string $url, array $record, bool $expected)
3030
{
3131
$requestStack = new RequestStack();
3232
$requestStack->push(Request::create($url));
@@ -39,7 +39,7 @@ public function testIsActivatedLegacy(string $url, array $record, bool $expected
3939
/**
4040
* @dataProvider isActivatedProvider
4141
*/
42-
public function testIsActivated(string $url, array $record, bool $expected): void
42+
public function testIsActivated(string $url, array $record, bool $expected)
4343
{
4444
$requestStack = new RequestStack();
4545
$requestStack->push(Request::create($url));

src/Symfony/Bridge/Twig/Mime/BodyRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ private function convertHtmlToText(string $html): string
7474
return $this->converter->convert($html);
7575
}
7676

77-
return strip_tags(preg_replace('{<(head|style)\b.*?</\1>}i', '', $html));
77+
return strip_tags(preg_replace('{<(head|style)\b.*?</\1>}is', '', $html));
7878
}
7979
}

src/Symfony/Bridge/Twig/Tests/Mime/BodyRendererTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ public function testRenderHtmlOnly()
3737
$this->assertEquals(str_replace('=', '=3D', $html), $body->getParts()[1]->bodyToString());
3838
}
3939

40+
public function testRenderMultiLineHtmlOnly()
41+
{
42+
$html = <<<HTML
43+
<head>
44+
<style type="text/css">
45+
css
46+
</style>
47+
</head>
48+
<b>HTML</b>
49+
HTML;
50+
$email = $this->prepareEmail(null, $html);
51+
$body = $email->getBody();
52+
$this->assertInstanceOf(AlternativePart::class, $body);
53+
$this->assertEquals('HTML', str_replace(["\r", "\n"], '', $body->getParts()[0]->bodyToString()));
54+
$this->assertEquals(str_replace(['=', "\n"], ['=3D', "\r\n"], $html), $body->getParts()[1]->bodyToString());
55+
}
56+
4057
public function testRenderHtmlOnlyWithTextSet()
4158
{
4259
$email = $this->prepareEmail(null, '<b>HTML</b>');

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
'fallback' => 'fr',
5252
'paths' => ['%kernel.project_dir%/Fixtures/translations'],
5353
'cache_dir' => '%kernel.cache_dir%/translations',
54-
'enabled_locales' => ['fr', 'en']
54+
'enabled_locales' => ['fr', 'en'],
5555
],
5656
'validation' => [
5757
'enabled' => true,

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_retry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'multiplier' => 2,
1212
'max_delay' => 0,
1313
'jitter' => 0.3,
14-
]
14+
],
1515
],
1616
'scoped_clients' => [
1717
'foo' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_no_events_to_dispatch.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
'type' => 'state_machine',
99
'marking_store' => [
1010
'type' => 'method',
11-
'property' => 'state'
11+
'property' => 'state',
1212
],
1313
'supports' => [
1414
FrameworkExtensionTest::class,
@@ -33,9 +33,9 @@
3333
'two',
3434
],
3535
'to' => [
36-
'three'
37-
]
38-
]
36+
'three',
37+
],
38+
],
3939
],
4040
],
4141
],

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_specified_events_to_dispatch.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
'type' => 'state_machine',
99
'marking_store' => [
1010
'type' => 'method',
11-
'property' => 'state'
11+
'property' => 'state',
1212
],
1313
'supports' => [
1414
FrameworkExtensionTest::class,
@@ -36,9 +36,9 @@
3636
'two',
3737
],
3838
'to' => [
39-
'three'
40-
]
41-
]
39+
'three',
40+
],
41+
],
4242
],
4343
],
4444
],

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@ public function testCachePoolServices()
13931393
$this->assertEquals($expected, $chain->getArguments());
13941394
}
13951395

1396-
public function testRedisTagAwareAdapter(): void
1396+
public function testRedisTagAwareAdapter()
13971397
{
13981398
$container = $this->createContainerFromFile('cache', [], true);
13991399

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ public function provideUserCheckerConfig()
629629
yield [['user_checker' => TestUserChecker::class], TestUserChecker::class];
630630
}
631631

632-
public function testConfigureCustomFirewallListener(): void
632+
public function testConfigureCustomFirewallListener()
633633
{
634634
$container = $this->getRawContainer();
635635
/** @var SecurityExtension $extension */

0 commit comments

Comments
 (0)