Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cc2363f

Browse filesBrowse files
committed
feature #23148 [FrameworkBundle] drop hard dependency on the Stopwatch component (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- [FrameworkBundle] drop hard dependency on the Stopwatch component | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | related to symfony/flex#14 | License | MIT | Doc PR | Commits ------- 8d70ca0 drop hard dependency on the Stopwatch component
2 parents 18ecbd7 + 8d70ca0 commit cc2363f
Copy full SHA for cc2363f

File tree

5 files changed

+21
-11
lines changed
Filter options

5 files changed

+21
-11
lines changed

‎UPGRADE-3.4.md

Copy file name to clipboardExpand all lines: UPGRADE-3.4.md
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ FrameworkBundle
2121

2222
* The `validator.mapping.cache.doctrine.apc` service has been deprecated.
2323

24+
* The `symfony/stopwatch` dependency has been removed, require it via `composer
25+
require symfony/stopwatch` in your `dev` environment.
26+
2427
* Using the `KERNEL_DIR` environment variable or the automatic guessing based
2528
on the `phpunit.xml` / `phpunit.xml.dist` file location is deprecated since 3.4.
2629
Set the `KERNEL_CLASS` environment variable to the fully-qualified class name

‎src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ CHANGELOG
44
3.4.0
55
-----
66

7-
* Removed `doctrine/cache` from the list of required dependencies in `composer.json`
8-
* Deprecated `validator.mapping.cache.doctrine.apc` service
9-
* Deprecated using the `KERNEL_DIR` environment variable with `KernelTestCase::getKernelClass()`.
10-
* Deprecated the `KernelTestCase::getPhpUnitXmlDir()` and `KernelTestCase::getPhpUnitCliConfigArgument()` methods.
7+
* Removed `doctrine/cache` from the list of required dependencies in `composer.json`
8+
* Deprecated `validator.mapping.cache.doctrine.apc` service
9+
* Deprecated using the `KERNEL_DIR` environment variable with `KernelTestCase::getKernelClass()`.
10+
* Deprecated the `KernelTestCase::getPhpUnitXmlDir()` and `KernelTestCase::getPhpUnitCliConfigArgument()` methods.
11+
* The `symfony/stopwatch` dependency has been removed, require it via `composer
12+
require symfony/stopwatch` in your `dev` environment.
13+
* Deprecated using the `KERNEL_DIR` environment variable with `KernelTestCase::getKernelClass()`.
14+
* Deprecated the `KernelTestCase::getPhpUnitXmlDir()` and `KernelTestCase::getPhpUnitCliConfigArgument()` methods.
1115

1216
3.3.0
1317
-----

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
6262
use Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer;
6363
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
64+
use Symfony\Component\Stopwatch\Stopwatch;
6465
use Symfony\Component\Validator\ConstraintValidatorInterface;
6566
use Symfony\Component\Validator\ObjectInitializerInterface;
6667
use Symfony\Component\WebLink\HttpHeaderSerializer;
@@ -639,9 +640,14 @@ private function registerDebugConfiguration(array $config, ContainerBuilder $con
639640
{
640641
$loader->load('debug_prod.xml');
641642

643+
if (class_exists(Stopwatch::class)) {
644+
$container->register('debug.stopwatch', Stopwatch::class);
645+
$container->setAlias(Stopwatch::class, 'debug.stopwatch');
646+
}
647+
642648
$debug = $container->getParameter('kernel.debug');
643649

644-
if ($debug) {
650+
if ($debug && class_exists(Stopwatch::class)) {
645651
$loader->load('debug.xml');
646652
}
647653

@@ -881,7 +887,7 @@ private function registerTemplatingConfiguration(array $config, ContainerBuilder
881887

882888
$container->setParameter('templating.helper.form.resources', $config['form']['resources']);
883889

884-
if ($container->getParameter('kernel.debug')) {
890+
if ($container->getParameter('kernel.debug') && class_exists(Stopwatch::class)) {
885891
$loader->load('templating_debug.xml');
886892

887893
$container->setDefinition('templating.engine.php', $container->findDefinition('debug.templating.engine.php'));

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.xml
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
<argument>true</argument>
2424
</service>
2525

26-
<service id="debug.stopwatch" class="Symfony\Component\Stopwatch\Stopwatch" public="true" />
27-
<service id="Symfony\Component\Stopwatch\Stopwatch" alias="debug.stopwatch" />
28-
2926
<service id="debug.file_link_formatter" class="Symfony\Component\HttpKernel\Debug\FileLinkFormatter">
3027
<argument>%debug.file_link_format%</argument>
3128
</service>

‎src/Symfony/Bundle/FrameworkBundle/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/composer.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
"symfony/polyfill-mbstring": "~1.0",
2929
"symfony/filesystem": "~2.8|~3.0|~4.0",
3030
"symfony/finder": "~2.8|~3.0|~4.0",
31-
"symfony/routing": "~3.4|~4.0",
32-
"symfony/stopwatch": "~2.8|~3.0|~4.0"
31+
"symfony/routing": "~3.4|~4.0"
3332
},
3433
"require-dev": {
3534
"doctrine/cache": "~1.0",
@@ -47,6 +46,7 @@
4746
"symfony/security-core": "~3.2|~4.0",
4847
"symfony/security-csrf": "~2.8|~3.0|~4.0",
4948
"symfony/serializer": "~3.3|~4.0",
49+
"symfony/stopwatch": "~2.8|~3.0|~4.0",
5050
"symfony/translation": "~3.2|~4.0",
5151
"symfony/templating": "~2.8|~3.0|~4.0",
5252
"symfony/validator": "~3.3|~4.0",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.