8000 Merge branch '5.2' into 5.x · symfony/symfony@7617506 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7617506

Browse files
Merge branch '5.2' into 5.x
* 5.2: [Notifier] CS fix [VarDumper] dont hide any nodes until JS is proven to work
2 parents 75323bd + 29d62df commit 7617506

File tree

9 files changed

+31
-37
lines changed

9 files changed

+31
-37
lines changed

src/Symfony/Component/Notifier/Bridge/Infobip/Tests/InfobipTransportFactoryTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
final class InfobipTransportFactoryTest extends TestCase
2121
{
22-
public function testCreateWithDsn(): void
22+
public function testCreateWithDsn()
2323
{
2424
$factory = new InfobipTransportFactory();
2525

@@ -30,7 +30,7 @@ public function testCreateWithDsn(): void
3030
$this->assertSame('infobip://host.test?from=0611223344', (string) $transport);
3131
}
3232

33-
public function testCreateWithNoFromThrowsMalformed(): void
33+
public function testCreateWithNoFromThrowsMalformed()
3434
{
3535
$factory = new InfobipTransportFactory();
3636

@@ -40,7 +40,7 @@ public function testCreateWithNoFromThrowsMalformed(): void
4040
$factory->create(Dsn::fromString($dsnIncomplete));
4141
}
4242

43-
public function testSupportsInfobipScheme(): void
43+
public function testSupportsInfobipScheme()
4444
{
4545
$factory = new InfobipTransportFactory();
4646

@@ -51,7 +51,7 @@ public function testSupportsInfobipScheme(): void
5151
$this->assertFalse($factory->supports(Dsn::fromString($dsnUnsupported)));
5252
}
5353

54-
public function testNonInfobipSchemeThrows(): void
54+
public function testNonInfobipSchemeThrows()
5555
{
5656
$factory = new InfobipTransportFactory();
5757

src/Symfony/Component/Notifier/Bridge/Infobip/Tests/InfobipTransportTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@
2020

2121
final class InfobipTransportTest extends TestCase
2222
{
23-
public function testToStringContainsProperties(): void
23+
public function testToStringContainsProperties()
2424
{
2525
$transport = $this->getTransport();
2626

2727
$this->assertSame('infobip://host.test?from=0611223344', (string) $transport);
2828
}
2929

30-
public function testSupportsMessageInterface(): void
30+
public function testSupportsMessageInterface()
3131
{
3232
$transport = $this->getTransport();
3333

3434
$this->assertTrue($transport->supports(new SmsMessage('0611223344', 'Hello!')));
3535
$this->assertFalse($transport->supports($this->createMock(MessageInterface::class)));
3636
}
3737

38-
public function testSendNonSmsMessageThrowsException(): void
38+
public function testSendNonSmsMessageThrowsException()
3939
{
4040
$transport = $this->getTransport();
4141

src/Symfony/Component/Notifier/Bridge/LinkedIn/Tests/LinkedInTransportFactoryTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
final class LinkedInTransportFactoryTest extends TestCase
1212
{
13-
public function testCreateWithDsn(): void
13+
public function testCreateWithDsn()
1414
{
1515
$factory = new LinkedInTransportFactory();
1616

@@ -21,15 +21,15 @@ public function testCreateWithDsn(): void
2121
$this->assertSame('linkedin://testHost', (string) $transport);
2222
}
2323

24-
public function testSupportsLinkedinScheme(): void
24+
public function testSupportsLinkedinScheme()
2525
{
2626
$factory = new LinkedInTransportFactory();
2727

2828
$this->assertTrue($factory->supports(Dsn::fromString('linkedin://host/path')));
2929
$this->assertFalse($factory->supports(Dsn::fromString('somethingElse://host/path')));
3030
}
3131

32-
public function testNonLinkedinSchemeThrows(): void
32+
public function testNonLinkedinSchemeThrows()
3333
{
3434
$factory = new LinkedInTransportFactory();
3535

@@ -39,7 +39,7 @@ public function testNonLinkedinSchemeThrows(): void
3939
$factory->create(Dsn::fromString($dsn));
4040
}
4141

42-
public function testIncompleteDsnMissingUserThrows(): void
42+
public function testIncompleteDsnMissingUserThrows()
4343
{
4444
$factory = new LinkedInTransportFactory();
4545

src/Symfony/Component/Notifier/Bridge/LinkedIn/Tests/LinkedInTransportTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717

1818
final class LinkedInTransportTest extends TestCase
1919
{
20-
public function testToString(): void
20+
public function testToString()
2121
{
2222
$this->assertSame(sprintf('linkedin://host.test'), (string) $this->getTransport());
2323
}
2424

25-
public function testSupportsChatMessage(): void
25+
public function testSupportsChatMessage()
2626
{
2727
$transport = $this->getTransport();
2828

2929
$this->assertTrue($transport->supports(new ChatMessage('testChatMessage')));
3030
$this->assertFalse($transport->supports($this->createMock(MessageInterface::class)));
3131
}
3232

33-
public function testSendNonChatMessageThrows(): void
33+
public function testSendNonChatMessageThrows()
3434
{
3535
$transport = $this->getTransport();
3636

@@ -39,7 +39,7 @@ public function testSendNonChatMessageThrows(): void
3939
$transport->send($this->createMock(MessageInterface::class));
4040
}
4141

42-
public function testSendWithEmptyArrayResponseThrows(): void
42+
public function testSendWithEmptyArrayResponseThrows()
4343
{
4444
$this->expectException(TransportException::class);
4545

@@ -60,7 +60,7 @@ public function testSendWithEmptyArrayResponseThrows(): void
6060
$transport->send(new ChatMessage('testMessage'));
6161
}
6262

63-
public function testSendWithErrorResponseThrows(): void
63+
public function testSendWithErrorResponseThrows()
6464
{
6565
$this->expectException(TransportException::class);
6666
$this->expectExceptionMessage('testErrorCode');
@@ -83,7 +83,7 @@ public function testSendWithErrorResponseThrows(): void
8383
$transport->send(new ChatMessage('testMessage'));
8484
}
8585

86-
public function testSendWithOptions(): void
86+
public function testSendWithOptions()
8787
{
8888
$message = 'testMessage';
8989

@@ -127,7 +127,7 @@ public function testSendWithOptions(): void
127127
$transport->send(new ChatMessage($message));
128128
}
129129

130-
public function testSendWithNotification(): void
130+
public function testSendWithNotification()
131131
{
132132
$message = 'testMessage';
133133

@@ -175,7 +175,7 @@ public function testSendWithNotification(): void
175175
$transport->send($chatMessage);
176176
}
177177

178-
public function testSendWithInvalidOptions(): void
178+
public function testSendWithInvalidOptions()
179179
{
180180
$this->expectException(LogicException::class);
181181

src/Symfony/Component/Notifier/Bridge/Slack/Tests/Block/SlackActionsBlockTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
final class SlackActionsBlockTest extends TestCase
1818
{
19-
public function testCanBeInstantiated(): void
19+
public function testCanBeInstantiated()
2020
{
2121
$actions = new SlackActionsBlock();
2222
$actions->button('first button text', 'https://example.org')
@@ -47,7 +47,7 @@ public function testCanBeInstantiated(): void
4747
], $actions->toArray());
4848
}
4949

50-
public function testThrowsWhenFieldsLimitReached(): void
50+
public function testThrowsWhenFieldsLimitReached()
5151
{
5252
$section = new SlackActionsBlock();
5353
for ($i = 0; $i < 25; ++$i) {

src/Symfony/Component/Notifier/Bridge/Slack/Tests/Block/SlackContextBlockTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
final class SlackContextBlockTest extends TestCase
1818
{
19-
public function testCanBeInstantiated(): void
19+
public function testCanBeInstantiated()
2020
{
2121
$context = new SlackContextBlock();
2222
$context->text('context text without emoji', false, false);
@@ -47,7 +47,7 @@ public function testCanBeInstantiated(): void
4747
], $context->toArray());
4848
}
4949

50-
public function testThrowsWhenElementsLimitReached(): void
50+
public function testThrowsWhenElementsLimitReached()
5151
{
5252
$context = new SlackContextBlock();
5353
for ($i = 0; $i < 10; ++$i) {

src/Symfony/Component/Notifier/Bridge/Slack/Tests/Block/SlackHeaderBlockTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
final class SlackHeaderBlockTest extends TestCase
1919
{
20-
public function testCanBeInstantiated(): void
20+
public function testCanBeInstantiated()
2121
{
2222
$header = new SlackHeaderBlock('header text');
2323
$header->id('header_id');
@@ -32,15 +32,15 @@ public function testCanBeInstantiated(): void
3232
], $header->toArray());
3333
}
3434

35-
public function testThrowsWhenTextExceedsCharacterLimit(): void
35+
public function testThrowsWhenTextExceedsCharacterLimit()
3636
{
3737
$this->expectException(LogicException::class);
3838
$this->expectExceptionMessage('Maximum length for the text is 150 characters.');
3939

4040
new SlackHeaderBlock(str_repeat('h', 151));
4141
}
4242

43-
public function testThrowsWhenBlockIdExceedsCharacterLimit(): void
43+
public function testThrowsWhenBlockIdExceedsCharacterLimit()
4444
{
4545
$this->expectException(LogicException::class);
4646
$this->expectExceptionMessage('Maximum length for the block id is 255 characters.');

src/Symfony/Component/Notifier/Bridge/Slack/Tests/Block/SlackSectionBlockTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
final class SlackSectionBlockTest extends TestCase
1919
{
20-
public function testCanBeInstantiated(): void
20+
public function testCanBeInstantiated()
2121
{
2222
$section = new SlackSectionBlock();
2323
$section->text('section text');
@@ -44,7 +44,7 @@ public function testCanBeInstantiated(): void
4444
], $section->toArray());
4545
}
4646

47-
public function testThrowsWhenFieldsLimitReached(): void
47+
public function testThrowsWhenFieldsLimitReached()
4848
{
4949
$section = new SlackSectionBlock();
5050
for ($i = 0; $i < 10; ++$i) {

src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ protected function getDumpHeader()
171171
e.addEventListener(n, cb, false);
172172
};
173173
174+
refStyle.innerHTML = 'pre.sf-dump .sf-dump-compact, .sf-dump-str-collapse .sf-dump-str-collapse, .sf-dump-str-expand .sf-dump-str-expand { display: none; }';
175+
(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle);
176+
refStyle = doc.createElement('style');
174177
(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle);
175178
176179
if (!doc.addEventListener) {
@@ -665,9 +668,6 @@ function showCurrent(state)
665668
pre.sf-dump span {
666669
display: inline;
667670
}
668-
pre.sf-dump .sf-dump-compact {
669-
display: none;
670-
}
671671
pre.sf-dump a {
672672
text-decoration: none;
673673
cursor: pointer;
@@ -699,12 +699,6 @@ function showCurrent(state)
699699
padding:0;
700700
background:none;
701701
}
702-
.sf-dump-str-collapse .sf-dump-str-collapse {
703-
display: none;
704-
}
705-
.sf-dump-str-expand .sf-dump-str-expand {
706-
display: none;
707-
}
708702
.sf-dump-public.sf-dump-highlight,
709703
.sf-dump-protected.sf-dump-highlight,
710704
.sf-dump-private.sf-dump-highlight,

0 commit comments

Comments
 (0)
0