drop hard dependency on the Stopwatch component
This commit is contained in:
parent
63ecc9c60b
commit
8d70ca0ff4
@ -16,6 +16,8 @@ Finder
|
||||
FrameworkBundle
|
||||
---------------
|
||||
|
||||
* The `symfony/stopwatch` dependency has been removed, require it via `composer
|
||||
require symfony/stopwatch` in your `dev` environment.
|
||||
* Using the `KERNEL_DIR` environment variable or the automatic guessing based
|
||||
on the `phpunit.xml` / `phpunit.xml.dist` file location is deprecated since 3.4.
|
||||
Set the `KERNEL_CLASS` environment variable to the fully-qualified class name
|
||||
|
@ -4,6 +4,8 @@ CHANGELOG
|
||||
3.4.0
|
||||
-----
|
||||
|
||||
* The `symfony/stopwatch` dependency has been removed, require it via `composer
|
||||
require symfony/stopwatch` in your `dev` environment.
|
||||
* Deprecated using the `KERNEL_DIR` environment variable with `KernelTestCase::getKernelClass()`.
|
||||
* Deprecated the `KernelTestCase::getPhpUnitXmlDir()` and `KernelTestCase::getPhpUnitCliConfigArgument()` methods.
|
||||
|
||||
|
@ -61,6 +61,7 @@ use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
use Symfony\Component\Stopwatch\Stopwatch;
|
||||
use Symfony\Component\Validator\ConstraintValidatorInterface;
|
||||
use Symfony\Component\Validator\ObjectInitializerInterface;
|
||||
use Symfony\Component\WebLink\HttpHeaderSerializer;
|
||||
@ -639,9 +640,14 @@ class FrameworkExtension extends Extension
|
||||
{
|
||||
$loader->load('debug_prod.xml');
|
||||
|
||||
if (class_exists(Stopwatch::class)) {
|
||||
$container->register('debug.stopwatch', Stopwatch::class);
|
||||
$container->setAlias(Stopwatch::class, 'debug.stopwatch');
|
||||
}
|
||||
|
||||
$debug = $container->getParameter('kernel.debug');
|
||||
|
||||
if ($debug) {
|
||||
if ($debug && class_exists(Stopwatch::class)) {
|
||||
$loader->load('debug.xml');
|
||||
}
|
||||
|
||||
@ -881,7 +887,7 @@ class FrameworkExtension extends Extension
|
||||
|
||||
$container->setParameter('templating.helper.form.resources', $config['form']['resources']);
|
||||
|
||||
if ($container->getParameter('kernel.debug')) {
|
||||
if ($container->getParameter('kernel.debug') && class_exists(Stopwatch::class)) {
|
||||
$loader->load('templating_debug.xml');
|
||||
|
||||
$container->setDefinition('templating.engine.php', $container->findDefinition('debug.templating.engine.php'));
|
||||
|
@ -23,9 +23,6 @@
|
||||
<argument>true</argument>
|
||||
</service>
|
||||
|
||||
<service id="debug.stopwatch" class="Symfony\Component\Stopwatch\Stopwatch" public="true" />
|
||||
<service id="Symfony\Component\Stopwatch\Stopwatch" alias="debug.stopwatch" />
|
||||
|
||||
<service id="debug.file_link_formatter" class="Symfony\Component\HttpKernel\Debug\FileLinkFormatter">
|
||||
<argument>%debug.file_link_format%</argument>
|
||||
</service>
|
||||
|
@ -29,7 +29,6 @@
|
||||
"symfony/filesystem": "~2.8|~3.0|~4.0",
|
||||
"symfony/finder": "~2.8|~3.0|~4.0",
|
||||
"symfony/routing": "~3.4|~4.0",
|
||||
"symfony/stopwatch": "~2.8|~3.0|~4.0",
|
||||
"doctrine/cache": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@ -47,6 +46,7 @@
|
||||
"symfony/security-core": "~3.2|~4.0",
|
||||
"symfony/security-csrf": "~2.8|~3.0|~4.0",
|
||||
"symfony/serializer": "~3.3|~4.0",
|
||||
"symfony/stopwatch": "~2.8|~3.0|~4.0",
|
||||
"symfony/translation": "~3.2|~4.0",
|
||||
"symfony/templating": "~2.8|~3.0|~4.0",
|
||||
"symfony/validator": "~3.3|~4.0",
|
||||
|
Reference in New Issue
Block a user