Skip to content

Commit

Permalink
feature #24158 deprecated profiler.matcher configuration (fabpot)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 3.4 branch (closes #24158).

Discussion
----------

deprecated profiler.matcher configuration

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | closes #24077, would also close #21944, #22484
| License       | MIT
| Doc PR        | not yet

The profiler matcher configuration was added at a time where we thought that having the profiler in production could make sense (and so being able to enable it conditionally made sense). That's not the case anymore. Nobody should ever enable it in production.

With that in mind, I propose to deprecate this setting in 3.4 and remove it in 4.0.

Commits
-------

6eff3e5 deprecated profiler.matcher configuration
2c62ba8 fixed CS
  • Loading branch information
fabpot committed Sep 11, 2017
2 parents b1b6860 + 6eff3e5 commit 8c303de
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions UPGRADE-3.4.md
Expand Up @@ -210,6 +210,11 @@ Process
* The `Symfony\Component\Process\ProcessBuilder` class has been deprecated,
use the `Symfony\Component\Process\Process` class directly instead.

Profiler
--------

* The `profiler.matcher` option has been deprecated.

SecurityBundle
--------------

Expand Down
5 changes: 5 additions & 0 deletions UPGRADE-4.0.md
Expand Up @@ -583,6 +583,11 @@ Process

* The `getEnhanceWindowsCompatibility()` and `setEnhanceWindowsCompatibility()` methods of the `Process` class have been removed.

Profiler
--------

* The `profiler.matcher` option has been removed.

ProxyManager
------------

Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
3.4.0
-----

* Deprecated `profiler.matcher` option
* Added support for `EventSubscriberInterface` on `MicroKernelTrait`
* Removed `doctrine/cache` from the list of required dependencies in `composer.json`
* Deprecated `validator.mapping.cache.doctrine.apc` service
Expand Down
Expand Up @@ -219,6 +219,7 @@ private function addProfilerSection(ArrayNodeDefinition $rootNode)
->booleanNode('only_master_requests')->defaultFalse()->end()
->scalarNode('dsn')->defaultValue('file:%kernel.cache_dir%/profiler')->end()
->arrayNode('matcher')
->setDeprecated('The "profiler.matcher" configuration key has been deprecated in Symfony 3.4 and it will be removed in 4.0.')
->canBeEnabled()
->performNoDeepMerging()
->fixXmlConfig('ip')
Expand Down Expand Up @@ -253,7 +254,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
$workflows = $v;
unset($workflows['enabled']);

if (count($workflows) === 1 && isset($workflows[0]['enabled'])) {
if (1 === count($workflows) && isset($workflows[0]['enabled'])) {
$workflows = array();
}

Expand Down

0 comments on commit 8c303de

Please sign in to comment.