Skip to content

Commit 0976600

Browse files
minor #33042 Disable typehint patch on PHPUnit (jderusse)
This PR was merged into the 4.3 branch. Discussion ---------- Disable typehint patch on PHPUnit | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32844 | License | MIT | Doc PR | NA This PR removes the `SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT` patch and adds a `: void` typehint on `setup` and `tearDown` methods in order to be compatible with PHPUnit 8 Commits ------- a5af6c4cd7 Disable phpunit typehint patch on 4.3 branch
2 parents 1928aa1 + 4995e75 commit 0976600

23 files changed

+34
-34
lines changed

Tests/Collator/Verification/CollatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
class CollatorTest extends AbstractCollatorTest
2424
{
25-
protected function setUp()
25+
protected function setUp(): void
2626
{
2727
IntlTestHelper::requireFullIntl($this, false);
2828

Tests/Data/Bundle/Reader/BundleEntryReaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class BundleEntryReaderTest extends TestCase
6262
'Foo' => 'Bar',
6363
];
6464

65-
protected function setUp()
65+
protected function setUp(): void
6666
{
6767
$this->readerImpl = $this->getMockBuilder('Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface')->getMock();
6868
$this->reader = new BundleEntryReader($this->readerImpl);

Tests/Data/Bundle/Reader/IntlBundleReaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class IntlBundleReaderTest extends TestCase
2525
*/
2626
private $reader;
2727

28-
protected function setUp()
28+
protected function setUp(): void
2929
{
3030
$this->reader = new IntlBundleReader();
3131
}

Tests/Data/Bundle/Reader/JsonBundleReaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class JsonBundleReaderTest extends TestCase
2424
*/
2525
private $reader;
2626

27-
protected function setUp()
27+
protected function setUp(): void
2828
{
2929
$this->reader = new JsonBundleReader();
3030
}

Tests/Data/Bundle/Reader/PhpBundleReaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class PhpBundleReaderTest extends TestCase
2424
*/
2525
private $reader;
2626

27-
protected function setUp()
27+
protected function setUp(): void
2828
{
2929
$this->reader = new PhpBundleReader();
3030
}

Tests/Data/Bundle/Writer/JsonBundleWriterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class JsonBundleWriterTest extends TestCase
3232
*/
3333
private $filesystem;
3434

35-
protected function setUp()
35+
protected function setUp(): void
3636
{
3737
$this->writer = new JsonBundleWriter();
3838
$this->directory = sys_get_temp_dir().'/JsonBundleWriterTest/'.mt_rand(1000, 9999);
@@ -41,7 +41,7 @@ protected function setUp()
4141
$this->filesystem->mkdir($this->directory);
4242
}
4343

44-
protected function tearDown()
44+
protected function tearDown(): void
4545
{
4646
$this->filesystem->remove($this->directory);
4747
}

Tests/Data/Bundle/Writer/PhpBundleWriterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class PhpBundleWriterTest extends TestCase
3232
*/
3333
private $filesystem;
3434

35-
protected function setUp()
35+
protected function setUp(): void
3636
{
3737
$this->writer = new PhpBundleWriter();
3838
$this->directory = sys_get_temp_dir().'/PhpBundleWriterTest/'.mt_rand(1000, 9999);
@@ -41,7 +41,7 @@ protected function setUp()
4141
$this->filesystem->mkdir($this->directory);
4242
}
4343

44-
protected function tearDown()
44+
protected function tearDown(): void
4545
{
4646
$this->filesystem->remove($this->directory);
4747
}

Tests/Data/Bundle/Writer/TextBundleWriterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class TextBundleWriterTest extends TestCase
3434
*/
3535
private $filesystem;
3636

37-
protected function setUp()
37+
protected function setUp(): void
3838
{
3939
$this->writer = new TextBundleWriter();
4040
$this->directory = sys_get_temp_dir().'/TextBundleWriterTest/'.mt_rand(1000, 9999);
@@ -43,7 +43,7 @@ protected function setUp()
4343
$this->filesystem->mkdir($this->directory);
4444
}
4545

46-
protected function tearDown()
46+
protected function tearDown(): void
4747
{
4848
$this->filesystem->remove($this->directory);
4949
}

Tests/Data/Provider/AbstractCurrencyDataProviderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
593593
protected $dataProvider;
594594
private $defaultLocale;
595595

596-
protected function setUp()
596+
protected function setUp(): void
597597
{
598598
parent::setUp();
599599

@@ -605,7 +605,7 @@ protected function setUp()
605605
$this->defaultLocale = \Locale::getDefault();
606606
}
607607

608-
protected function tearDown()
608+
protected function tearDown(): void
609609
{
610610
parent::tearDown();
611611

Tests/Data/Provider/AbstractDataProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ abstract class AbstractDataProviderTest extends TestCase
703703

704704
private static $rootLocales;
705705

706-
protected function setUp()
706+
protected function setUp(): void
707707
{
708708
\Locale::setDefault('en');
709709
Locale::setDefaultFallback('en');

0 commit comments

Comments
 (0)