8000 [FrameworkBundle] Deprecate setting the `collect_serializer_data` to … · symfony/symfony@5cf77b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5cf77b8

Browse files
committed
[FrameworkBundle] Deprecate setting the collect_serializer_data to false
1 parent f1e169e commit 5cf77b8

File tree

7 files changed

+16
-4
lines changed

7 files changed

+16
-4
lines changed

UPGRADE-7.3.md

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ FrameworkBundle
5656
because its default value will change in version 8.0
5757
* Deprecate the `--show-arguments` option of the `container:debug` command, as arguments are now always shown
5858
* Deprecate the `framework.validation.cache` config option
59+
* Deprecate setting the `framework.profiler.collect_serializer_data` config option to `false`
5960

6061
Ldap
6162
----

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ CHANGELOG
1919
* Add DI alias from `ServicesResetterInterface` to `services_resetter`
2020
* Add `methods` argument in `#[IsCsrfTokenValid]` attribute
2121
* Allow configuring the logging channel per type of exceptions
22+
* Deprecate setting the `framework.profiler.collect_serializer_data` config option to `false`
2223

2324
7.2
2425
---

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ public function load(array $configs, ContainerBuilder $container): void
429429
}
430430
$loggers[$exception['log_channel']] = new Reference('monolog.logger.'.$exception['log_channel'], ContainerInterface::NULL_ON_INVALID_REFERENCE);
431431
}
432-
432+
433433
$exceptionListener
434434
->replaceArgument(3, $config['exceptions'])
435435
->setArgument(4, $loggers)
@@ -984,6 +984,10 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $
984984
$loader->load('notifier_debug.php');
985985
}
986986

987+
if (false === $config['collect_serializer_data']) {
988+
trigger_deprecation('symfony/framework-bundle', '7.3', 'Setting the "framework.profiler.collect_serializer_data" config option to "false" is deprecated.');
989+
}
990+
987991
if ($this->isInitializedConfigEnabled('serializer') && $config['collect_serializer_data']) {
988992
$loader->load('serializer_debug.php');
989993
}

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/framework.yml

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ framework:
1818
cookie_samesite: lax
1919
php_errors:
2020
log: true
21+
profiler:
22+
collect_serializer_data: true
2123

2224
services:
2325
logger: { class: Psr\Log\NullLogger }

src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/config.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ framework:
1717
cookie_samesite: lax
1818
php_errors:
1919
log: true
20-
profiler: { only_exceptions: false }
20+
profiler:
21+
only_exceptions: false
22+
collect_serializer_data: true
2123

2224
services:
2325
logger: { class: Psr\Log\NullLogger }

src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/framework.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ framework:
1818
cookie_samesite: lax
1919
php_errors:
2020
log: true
21-
profiler: { only_exceptions: false }
21+
profiler:
22+
only_exceptions: false
23+
collect_serializer_data: true
2224

2325
services:
2426
logger: { class: Psr\Log\NullLogger }

src/Symfony/Bundle/WebProfilerBundle/Tests/Functional/WebProfilerBundleKernel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
5555
'http_method_override' => false,
5656
'php_errors' => ['log' => true],
5757
'secret' => 'foo-secret',
58-
'profiler' => ['only_exceptions' => false],
58+
'profiler' => ['only_exceptions' => false, 'collect_serializer_data' => true],
5959
'session' => ['handler_id' => null, 'storage_factory_id' => 'session.storage.factory.mock_file', 'cookie-secure' => 'auto', 'cookie-samesite' => 'lax'],
6060
'router' => ['utf8' => true],
6161
];

0 commit comments

Comments
 (0)