Skip to content

Commit 72aa539

Browse files
Merge branch '4.3' into 4.4
* 4.3: [Mailer] Remove line breaks in email attachment content Update links to documentation [Validator] Add the missing translations for the Arabic (ar) locale ensure to expect no validation for the right reasons [PhpUnitBridge] Add test case for @expectedDeprecation annotation [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name [HttpClient] fix capturing SSL certificates with NativeHttpClient [TwigBridge][Form] Added missing help messages in form themes Update year in license files Update year in license files [HttpClient] fix typo [Console][FormatterHelper] Use helper strlen statically and remove duplicated code [Routing] Fix i18n routing when the url contains the locale Fix BC issue in phpDoc Reflection library [Translator] Performance improvement in MessageCatalogue and catalogue operations.
2 parents 7244971 + dbca0e9 commit 72aa539

6 files changed

+44
-25
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2019 Fabien Potencier
1+
Copyright (c) 2014-2020 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

Legacy/SymfonyTestsListenerForV5.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ public function startTest(\PHPUnit_Framework_Test $test)
4747
$this->trait->startTest($test);
4848
}
4949

50-
public function addWarning(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_Warning $e, $time)
51-
{
52-
$this->trait->addWarning($test, $e, $time);
53-
}
54-
5550
public function endTest(\PHPUnit_Framework_Test $test, $time)
5651
{
5752
$this->trait->endTest($test, $time);

Legacy/SymfonyTestsListenerForV6.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ public function startTest(Test $test)
5252
$this->trait->startTest($test);
5353
}
5454

55-
public function addWarning(Test $test, Warning $e, $time)
56-
{
57-
$this->trait->addWarning($test, $e, $time);
58-
}
59-
6055
public function endTest(Test $test, $time)
6156
{
6257
$this->trait->endTest($test, $time);

Legacy/SymfonyTestsListenerForV7.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ public function startTest(Test $test): void
5555
$this->trait->startTest($test);
5656
}
5757

58-
public function addWarning(Test $test, Warning $e, float $time): void
59-
{
60-
$this->trait->addWarning($test, $e, $time);
61-
}
62-
6358
public function endTest(Test $test, float $time): void
6459
{
6560
$this->trait->endTest($test, $time);

Legacy/SymfonyTestsListenerTrait.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class SymfonyTestsListenerTrait
4040
private $expectedDeprecations = array();
4141
private $gatheredDeprecations = array();
4242
private $previousErrorHandler;
43-
private $testsWithWarnings;
4443
private $reportUselessTests;
4544
private $error;
4645
private $runsInSeparateProcess = false;
@@ -112,7 +111,6 @@ public function globalListenerDisabled()
112111
public function startTestSuite($suite)
113112
{
114113
$suiteName = $suite->getName();
115-
$this->testsWithWarnings = array();
116114

117115
foreach ($suite->tests() as $test) {
118116
if (!($test instanceof \PHPUnit\Framework\TestCase || $test instanceof TestCase)) {
@@ -236,13 +234,6 @@ public function startTest($test)
236234
}
237235
}
238236

239-
public function addWarning($test, $e, $time)
240-
{
241-
if ($test instanceof \PHPUnit\Framework\TestCase || $test instanceof TestCase) {
242-
$this->testsWithWarnings[$test->getName()] = true;
243-
}
244-
}
245-
246237
public function endTest($test, $time)
247238
{
248239
if (class_exists(DebugClassLoader::class, false)) {
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Bridge\PhpUnit\Tests;
13+
14+
use PHPUnit\Framework\TestCase;
15+
16+
final class ExpectedDeprecationAnnotationTest extends TestCase
17+
{
18+
/**
19+
* Do not remove this test in the next major versions.
20+
*
21+
* @group legacy
22+
*
23+
* @expectedDeprecation foo
24+
*/
25+
public function testOne()
26+
{
27+
@trigger_error('foo', E_USER_DEPRECATED);
28+
}
29+
30+
/**
31+
* Do not remove this test in the next major versions.
32+
*
33+
* @group legacy
34+
*
35+
* @expectedDeprecation foo
36+
* @expectedDeprecation bar
37+
*/
38+
public function testMany()
39+
{
40+
@trigger_error('foo', E_USER_DEPRECATED);
41+
@trigger_error('bar', E_USER_DEPRECATED);
42+
}
43+
}

0 commit comments

Comments
 (0)