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');

Tests/Data/Provider/AbstractLanguageDataProviderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ abstract class AbstractLanguageDataProviderTest extends AbstractDataProviderTest
832832
protected $dataProvider;
833833
private $defaultLocale;
834834

835-
protected function setUp()
835+
protected function setUp(): void
836836
{
837837
parent::setUp();
838838

@@ -844,7 +844,7 @@ protected function setUp()
844844
$this->defaultLocale = \Locale::getDefault();
845845
}
846846

847-
protected function tearDown()
847+
protected function tearDown(): void
848848
{
849849
parent::tearDown();
850850

Tests/Data/Provider/AbstractLocaleDataProviderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ abstract class AbstractLocaleDataProviderTest extends AbstractDataProviderTest
2727
protected $dataProvider;
2828
private $defaultLocale;
2929

30-
protected function setUp()
30+
protected function setUp(): void
3131
{
3232
parent::setUp();
3333

@@ -39,7 +39,7 @@ protected function setUp()
3939
$this->defaultLocale = \Locale::getDefault();
4040
}
4141

42-
protected function tearDown()
42+
protected function tearDown(): void
4343
{
4444
\Locale::setDefault($this->defaultLocale);
4545
}

Tests/Data/Provider/AbstractRegionDataProviderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ abstract class AbstractRegionDataProviderTest extends AbstractDataProviderTest
281281
protected $dataProvider;
282282
private $defaultLocale;
283283

284-
protected function setUp()
284+
protected function setUp(): void
285285
{
286286
parent::setUp();
287287

@@ -293,7 +293,7 @@ protected function setUp()
293293
$this->defaultLocale = \Locale::getDefault();
294294
}
295295

296-
protected function tearDown()
296+
protected function tearDown(): void
297297
{
298298
parent::tearDown();
299299

Tests/Data/Provider/AbstractScriptDataProviderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ abstract class AbstractScriptDataProviderTest extends AbstractDataProviderTest
221221
protected $dataProvider;
222222
private $defaultLocale;
223223

224-
protected function setUp()
224+
protected function setUp(): void
225225
{
226226
parent::setUp();
227227

@@ -233,7 +233,7 @@ protected function setUp()
233233
$this->defaultLocale = \Locale::getDefault();
234234
}
235235

236-
protected function tearDown()
236+
protected function tearDown(): void
237237
{
238238
parent::tearDown();
239239

Tests/Data/Util/LocaleScannerTest.php

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

35-
protected function setUp()
35+
protected function setUp(): void
3636
{
3737
$this->directory = sys_get_temp_dir().'/LocaleScannerTest/'.mt_rand(1000, 9999);
3838
$this->filesystem = new Filesystem();
@@ -62,7 +62,7 @@ protected function setUp()
6262
file_put_contents($this->directory.'/fr_child.txt', 'en_GB{%%Parent{"fr"}}');
6363
}
6464

65-
protected function tearDown()
65+
protected function tearDown(): void
6666
{
6767
$this->filesystem->remove($this->directory);
6868
}

Tests/Data/Util/RingBufferTest.php

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

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

Tests/DateFormatter/AbstractIntlDateFormatterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ abstract class AbstractIntlDateFormatterTest extends TestCase
2626
{
2727
private $defaultLocale;
2828

29-
protected function setUp()
29+
protected function setUp(): void
3030
{
3131
parent::setUp();
3232

3333
$this->defaultLocale = \Locale::getDefault();
3434
\Locale::setDefault('en');
3535
}
3636

37-
protected function tearDown()
37+
protected function tearDown(): void
3838
{
3939
parent::tearDown();
4040

Tests/DateFormatter/Verification/IntlDateFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
class IntlDateFormatterTest extends AbstractIntlDateFormatterTest
2525
{
26-
protected function setUp()
26+
protected function setUp(): void
2727
{
2828
IntlTestHelper::requireFullIntl($this, false);
2929

Tests/Globals/Verification/IntlGlobalsTest.php

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

Tests/IntlTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ class IntlTest extends TestCase
1818
{
1919
private $defaultLocale;
2020

21-
protected function setUp()
21+
protected function setUp(): void
2222
{
2323
parent::setUp();
2424

2525
$this->defaultLocale = \Locale::getDefault();
2626
}
2727

28-
protected function tearDown()
28+
protected function tearDown(): void
2929
{
3030
parent::tearDown();
3131

Tests/Locale/Verification/LocaleTest.php

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

Tests/NumberFormatter/Verification/NumberFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class NumberFormatterTest extends AbstractNumberFormatterTest
2222
{
23-
protected function setUp()
23+
protected function setUp(): void
2424
{
2525
IntlTestHelper::requireFullIntl($this, '55.1');
2626

Tests/ResourceBundleTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ abstract class ResourceBundleTestCase extends TestCase
696696

697697
private static $rootLocales;
698698

699-
protected function setUp()
699+
protected function setUp(): void
700700
{
701701
Locale::setDefault('en');
702702
Locale::setDefaultFallback('en');

0 commit comments

Comments
 (0)