Skip to content

Commit 9c67a3b

Browse files
Merge branch '7.3' into 7.4
* 7.3: Fix remaining SplObjectStorage deprecation Remove calls to no-op functions, deprecated in PHP 8.5 Remove deprecated calls to deprecated methods of SplObjectStorage [Messenger] Show package installation hint also for amqps [TypeInfo] Fix converting list to string
2 parents f9a607a + ae61792 commit 9c67a3b

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer;
1313

1414
use PHPUnit\Framework\Attributes\DataProvider;
15+
use PHPUnit\Framework\Attributes\RequiresPhp;
1516
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
1617
use Symfony\Component\Form\Exception\InvalidArgumentException;
1718
use Symfony\Component\Form\Exception\TransformationFailedException;
@@ -37,7 +38,6 @@ protected function setUp(): void
3738
// Normalize intl. configuration settings.
3839
if (\extension_loaded('intl')) {
3940
$this->initialTestCaseUseException = ini_set('intl.use_exceptions', 0);
40-
$this->initialTestCaseErrorLevel = ini_set('intl.error_level', 0);
4141
}
4242

4343
// Since we test against "de_AT", we need the full implementation
@@ -58,7 +58,6 @@ protected function tearDown(): void
5858

5959
if (\extension_loaded('intl')) {
6060
ini_set('intl.use_exceptions', $this->initialTestCaseUseException);
61-
ini_set('intl.error_level', $this->initialTestCaseErrorLevel);
6261
}
6362
}
6463

@@ -344,6 +343,7 @@ public function testReverseTransformFiveDigitYearsWithTimestamp()
344343
}
345344

346345
#[RequiresPhpExtension('intl')]
346+
#[RequiresPhp('< 8.5')]
347347
public function testReverseTransformWrapsIntlErrorsWithErrorLevel()
348348
{
349349
$errorLevel = ini_set('intl.error_level', \E_WARNING);
@@ -372,6 +372,7 @@ public function testReverseTransformWrapsIntlErrorsWithExceptions()
372372
}
373373

374374
#[RequiresPhpExtension('intl')]
375+
#[RequiresPhp('< 8.5')]
375376
public function testReverseTransformWrapsIntlErrorsWithExceptionsAndErrorLevel()
376377
{
377378
$initialUseExceptions = ini_set('intl.use_exceptions', 1);

Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer;
1313

1414
use PHPUnit\Framework\Attributes\DataProvider;
15+
use PHPUnit\Framework\Attributes\RequiresPhp;
1516
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
1617
use PHPUnit\Framework\TestCase;
1718
use Symfony\Component\Form\Exception\TransformationFailedException;
@@ -23,14 +24,12 @@ class NumberToLocalizedStringTransformerTest extends TestCase
2324
private string $defaultLocale;
2425

2526
private $initialTestCaseUseException;
26-
private $initialTestCaseErrorLevel;
2727

2828
protected function setUp(): void
2929
{
3030
// Normalize intl. configuration settings.
3131
if (\extension_loaded('intl')) {
3232
$this->initialTestCaseUseException = ini_set('intl.use_exceptions', 0);
33-
$this->initialTestCaseErrorLevel = ini_set('intl.error_level', 0);
3433
}
3534

3635
$this->defaultLocale = \Locale::getDefault();
@@ -43,7 +42,6 @@ protected function tearDown(): void
4342

4443
if (\extension_loaded('intl')) {
4544
ini_set('intl.use_exceptions', $this->initialTestCaseUseException);
46-
ini_set('intl.error_level', $this->initialTestCaseErrorLevel);
4745
}
4846
}
4947

@@ -650,6 +648,7 @@ public function testReverseTransformENotation($output, $input)
650648
}
651649

652650
#[RequiresPhpExtension('intl')]
651+
#[RequiresPhp('< 8.5')]
653652
public function testReverseTransformWrapsIntlErrorsWithErrorLevel()
654653
{
655654
$errorLevel = ini_set('intl.error_level', \E_WARNING);
@@ -678,6 +677,7 @@ public function testReverseTransformWrapsIntlErrorsWithExceptions()
678677
}
679678

680679
#[RequiresPhpExtension('intl')]
680+
#[RequiresPhp('< 8.5')]
681681
public function testReverseTransformWrapsIntlErrorsWithExceptionsAndErrorLevel()
682682
{
683683
$initialUseExceptions = ini_set('intl.use_exceptions', 1);

Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer;
1313

1414
use PHPUnit\Framework\Attributes\DataProvider;
15+
use PHPUnit\Framework\Attributes\RequiresPhp;
1516
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
1617
use PHPUnit\Framework\TestCase;
1718
use Symfony\Component\Form\Exception\TransformationFailedException;
@@ -23,14 +24,12 @@ class PercentToLocalizedStringTransformerTest extends TestCase
2324
private string $defaultLocale;
2425

2526
private $initialTestCaseUseException;
26-
private $initialTestCaseErrorLevel;
2727

2828
protected function setUp(): void
2929
{
3030
// Normalize intl. configuration settings.
3131
if (\extension_loaded('intl')) {
3232
$this->initialTestCaseUseException = ini_set('intl.use_exceptions', 0);
33-
$this->initialTestCaseErrorLevel = ini_set('intl.error_level', 0);
3433
}
3534

3635
$this->defaultLocale = \Locale::getDefault();
@@ -43,7 +42,6 @@ protected function tearDown(): void
4342

4443
if (\extension_loaded('intl')) {
4544
ini_set('intl.use_exceptions', $this->initialTestCaseUseException);
46-
ini_set('intl.error_level', $this->initialTestCaseErrorLevel);
4745
}
4846
}
4947

@@ -487,6 +485,7 @@ public function testReverseTransformForHtml5FormatWithScale()
487485
}
488486

489487
#[RequiresPhpExtension('intl')]
488+
#[RequiresPhp('< 8.5')]
490489
public function testReverseTransformWrapsIntlErrorsWithErrorLevel()
491490
{
492491
$errorLevel = ini_set('intl.error_level', \E_WARNING);
@@ -515,6 +514,7 @@ public function testReverseTransformWrapsIntlErrorsWithExceptions()
515514
}
516515

517516
#[RequiresPhpExtension('intl')]
517+
#[RequiresPhp('< 8.5')]
518518
public function testReverseTransformWrapsIntlErrorsWithExceptionsAndErrorLevel()
519519
{
520520
$initialUseExceptions = ini_set('intl.use_exceptions', 1);

0 commit comments

Comments
 (0)