Skip to content

Commit ebe8fc6

Browse files
committed
feature #24159 Remove the profiler.matcher configuration (fabpot)
This PR was squashed before being merged into the 4.0-dev branch (closes #24159). Discussion ---------- Remove the profiler.matcher configuration | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | to be done I've not removed (nor deprecated) the `ProfilerListener` constructor argument that allows to set a request matcher. That way, if someone really want to do that, it's still possible. WDTY? Commits ------- 5b77d99 fixed CS 8092dc6 removed the profiler.matcher configuration
2 parents b05fce2 + 5b77d99 commit ebe8fc6

File tree

4 files changed

+3
-45
lines changed

4 files changed

+3
-45
lines changed

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -185,23 +185,6 @@ private function addProfilerSection(ArrayNodeDefinition $rootNode)
185185
->booleanNode('only_exceptions')->defaultFalse()->end()
186186
->booleanNode('only_master_requests')->defaultFalse()->end()
187187
->scalarNode('dsn')->defaultValue('file:%kernel.cache_dir%/profiler')->end()
188-
->arrayNode('matcher')
189-
->setDeprecated('The "profiler.matcher" configuration key has been deprecated in Symfony 3.4 and it will be removed in 4.0.')
190-
->canBeEnabled()
191-
->performNoDeepMerging()
192-
->fixXmlConfig('ip')
193-
->children()
194-
->scalarNode('path')
195-
->info('use the urldecoded format')
196-
->example('^/path to resource/')
197-
->end()
198-
->scalarNode('service')->end()
199-
->arrayNode('ips')
200-
->beforeNormalization()->ifString()->then(function ($v) { return array($v); })->end()
201-
->prototype('scalar')->end()
202-
->end()
203-
->end()
204-
->end()
205188
->end()
206189
->end()
207190
->end()

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

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -445,27 +445,6 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $
445445

446446
$container->setParameter('profiler.storage.dsn', $config['dsn']);
447447

448-
if ($this->isConfigEnabled($container, $config['matcher'])) {
449-
if (isset($config['matcher']['service'])) {
450-
$container->setAlias('profiler.request_matcher', $config['matcher']['service'])->setPrivate(true);
451-
} elseif (isset($config['matcher']['ip']) || isset($config['matcher']['path']) || isset($config['matcher']['ips'])) {
452-
$definition = $container->register('profiler.request_matcher', 'Symfony\\Component\\HttpFoundation\\RequestMatcher');
453-
$definition->setPublic(false);
454-
455-
if (isset($config['matcher']['ip'])) {
456-
$definition->addMethodCall('matchIp', array($config['matcher']['ip']));
457-
}
458-
459-
if (isset($config['matcher']['ips'])) {
460-
$definition->addMethodCall('matchIps', array($config['matcher']['ips']));
461-
}
462-
463-
if (isset($config['matcher']['path'])) {
464-
$definition->addMethodCall('matchPath', array($config['matcher']['path']));
465-
}
466-
}
467-
}
468-
469448
if (!$config['collect']) {
470449
$container->getDefinition('profiler')->addMethodCall('disable', array());
471450
}
@@ -501,9 +480,9 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
501480

502481
$transitions = array();
503482
foreach ($workflow['transitions'] as $transition) {
504-
if ($type === 'workflow') {
483+
if ('workflow' === $type) {
505484
$transitions[] = new Definition(Workflow\Transition::class, array($transition['name'], $transition['from'], $transition['to']));
506-
} elseif ($type === 'state_machine') {
485+
} elseif ('state_machine' === $type) {
507486
foreach ($transition['from'] as $from) {
508487
foreach ($transition['to'] as $to) {
509488
$transitions[] = new Definition(Workflow\Transition::class, array($transition['name'], $from, $to));

src/Symfony/Bundle/FrameworkBundle/Resources/config/profiling.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<tag name="kernel.event_subscriber" />
2222
<argument type="service" id="profiler" />
2323
<argument type="service" id="request_stack" />
24-
<argument type="service" id="profiler.request_matcher" on-invalid="null" />
24+
<argument>null</argument>
2525
<argument>%profiler_listener.only_exceptions%</argument>
2626
<argument>%profiler_listener.only_master_requests%</argument>
2727
</service>

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ protected static function getBundleDefaultConfig()
148148
'only_master_requests' => false,
149149
'dsn' => 'file:%kernel.cache_dir%/profiler',
150150
'collect' => true,
151-
'matcher' => array(
152-
'enabled' => false,
153-
'ips' => array(),
154-
),
155151
),
156152
'translator' => array(
157153
'enabled' => !class_exists(FullStack::class),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy