8000 enhancement: Improve deprecation logging · SymfonyTest/symfony-bundle-test@bc6c33e · GitHub
[go: up one dir, main page]

Skip to content

Commit bc6c33e

Browse files
committed
enhancement: Improve deprecation logging
1 parent fe6e9c5 commit bc6c33e

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"require": {
1313
"php": "^5.5 || ^7.0 || ^8.0",
1414
"symfony/dependency-injection": "^3.4 || ^4.3 || ^5.0 || ^6.0",
15-
"symfony/deprecation-contracts": "^2.4",
1615
"symfony/framework-bundle": "^3.4.24 || ^4.3 || ^5.0 || ^6.0",
1716
"symfony/http-kernel": "^3.4 || ^4.3 || ^5.0 || ^6.0",
1817
"symfony/yaml": "^3.4 || ^4.3 || ^5.0 || ^6.0"

src/AppKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(/*string $environment, bool $debug*/)
5353
$args = \func_get_args();
5454

5555
if (1 === \func_num_args()) {
56-
trigger_deprecation('nyholm/symfony-bundle-test', '1.9', 'The signature of the "%s($cachePrefix)" constructor is deprecated, use the constructor with 2 arguments: "string $environment, bool $debug".', self::class);
56+
printf('The signature of the method "%s($cachePrefix)" is deprecated since 1.9 and will be removed in 2.0, use with 2 arguments instead: "string $environment, bool $debug".', __METHOD__);
5757

5858
parent::__construct($args[0], true);
5959
} elseif (2 === \func_num_args()) {

src/BaseBundleTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Symfony\Component\DependencyInjection\ResettableContainerInterface;
99
use Symfony\Component\HttpKernel\Kernel;
1010

11-
trigger_deprecation('nyholm/symfony-bundle-test', '1.9', 'Deprecated since 1.9 and will be removed in 2.0, use %s instead.', KernelTestCase::class);
11+
printf('%s is deprecated since 1.9 and will be removed in 2.0, use "%s" instead.', BaseBundleTestCase::class, KernelTestCase::class);
1212

1313
/**
1414
* @author Tobias Nyholm <tobias.nyholm@gmail.com>

0 commit comments

Comments
 (0)
0