Skip to content

Commit 1deb271

Browse files
Merge branch '7.4' into 8.0
* 7.4: (28 commits) [Console] Rename `#[Input]` to `#[MapInput]` [FrameworkBundle] Fix support of dumping workflow when workflow is decorated by TraceableWorkflow [JsonStreamer] Fix documentation link in README [Meta] Better exception when symfony link cannot read a JSON [Form] Add new `active_at`, `not_active_at` and `legal_tender` options to `CurrencyType` [Intl] Support time in generated data in currencies validity [Validator] Improve and complete Japanese translations [HtmlSanitizer] Remove redundant assignment to promoted property $config in constructor [Validator] Fix Polish translation for word count validation message [DependencyInjection][Routing] Deprecate XML configuration format [Validator] Review and fix Czech translation [DependencyInjection][Routing] Handle declaring services and routes using PHP arrays that follow the same shape as corresponding yaml files [Mailer][MailJet] Fix forbidden headers case-sensitive comparison [DependencyInjection][Config][Routing] Deprecate using `$this` or the internal scope of the loader from PHP config files [Config] Add array-shapes to generated config builders [DependencyInjection] Handle returning arrays and config-builders from config files [WebProfilerBundle] Simplify toolbar CSS do not use deprecated PHPUnit features replace PHPUnit annotation with attribute [Serializer] xml empty array encoding ...
2 parents 10ce391 + f943689 commit 1deb271

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

SymfonyExtension.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bridge\PhpUnit;
1313

14+
use Doctrine\Deprecations\Deprecation;
1415
use PHPUnit\Event\Code\Test;
1516
use PHPUnit\Event\Code\TestMethod;
1617
use PHPUnit\Event\Test\BeforeTestMethodErrored;
@@ -42,6 +43,10 @@ public function bootstrap(Configuration $configuration, Facade $facade, Paramete
4243
DebugClassLoader::enable();
4344
}
4445

46+
if (class_exists(Deprecation::class)) {
47+
Deprecation::withoutDeduplication();
48+
}
49+
4550
$reader = new AttributeReader();
4651

4752
if ($parameters->has('clock-mock-namespaces')) {

bootstrap.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
use Doctrine\Deprecations\Deprecation;
1313
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler;
1414

15+
// Skip if we're using PHPUnit >=10
16+
if (class_exists(PHPUnit\Metadata\Metadata::class, false)) {
17+
return;
18+
}
19+
1520
// Detect if we need to serialize deprecations to a file.
16-
if (
17-
// Skip if we're using PHPUnit >=10
18-
!class_exists(PHPUnit\Metadata\Metadata::class)
19-
&& in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && $file = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')
20-
) {
21+
if (in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && $file = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')) {
2122
DeprecationErrorHandler::collectDeprecations($file);
2223

2324
return;
@@ -36,10 +37,6 @@
3637
Deprecation::withoutDeduplication();
3738
}
3839

39-
if (
40-
// Skip if we're using PHPUnit >=10
41-
!class_exists(PHPUnit\Metadata\Metadata::class, false)
42-
&& 'disabled' !== getenv('SYMFONY_DEPRECATIONS_HELPER')
43-
) {
40+
if ('disabled' !== getenv('SYMFONY_DEPRECATIONS_HELPER')) {
4441
DeprecationErrorHandler::register(getenv('SYMFONY_DEPRECATIONS_HELPER'));
4542
}

0 commit comments

Comments
 (0)