10000 [HttpKernel] Deprecated passing a `fileLinkFormat` to `DebugHandlersL… · symfony/symfony@05d0686 · GitHub
[go: up one dir, main page]

Skip to content

Commit 05d0686

Browse files
chalasrlyrixx
authored andcommitted
[HttpKernel] Deprecated passing a fileLinkFormat to DebugHandlersListener::__construct()
1 parent 2c39acd commit 05d0686

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

UPGRADE-5.2.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ HttpFoundation
4545
* Deprecated not passing a `Closure` together with `FILTER_CALLBACK` to `ParameterBag::filter()`; wrap your filter in a closure instead.
4646
* Deprecated the `Request::HEADER_X_FORWARDED_ALL` constant, use either `Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO` or `Request::HEADER_X_FORWARDED_AWS_ELB` or `Request::HEADER_X_FORWARDED_TRAEFIK`constants instead.
4747

48+
HttpKernel
49+
----------
50+
51+
* Deprecated passing a `fileLinkFormat` to `DebugHandlersListener::__construct()`.
52+
4853
Lock
4954
----
5055

UPGRADE-6.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ HttpKernel
7474

7575
* Made `WarmableInterface::warmUp()` return a list of classes or files to preload on PHP 7.4+
7676
* Removed support for `service:action` syntax to reference controllers. Use `serviceOrFqcn::method` instead.
77+
* Removed `fileLinkFormat` argument of `DebugHandlersListener::__construct()`.
7778

7879
Inflector
7980
---------

src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
null, // Log levels map for enabled error levels
2626
param('debug.error_handler.throw_at'),
2727
param('kernel.debug'),
28-
service('debug.file_link_formatter'),
28+
null,
2929
param('kernel.debug'),
3030
service('monolog.logger.deprecation')->nullOnInvalid(),
3131
])

src/Symfony/Component/HttpKernel/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ CHANGELOG
1414
* kernels implementing the `ExtensionInterface` will now be auto-registered to the container
1515
* added parameter `kernel.runtime_environment`, defined as `%env(default:kernel.environment:APP_RUNTIME_ENV)%`
1616
* do not set a default `Accept` HTTP header when using `HttpKernelBrowser`
17+
* Deprecated passing a `fileLinkFormat` to `DebugHandlersListener::__construct()`
1718

1819
5.1.0
1920
-----

src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Symfony\Component\Console\Output\ConsoleOutputInterface;
1818
use Symfony\Component\ErrorHandler\ErrorHandler;
1919
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
20-
use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
2120
use Symfony\Component\HttpKernel\Event\KernelEvent;
2221
use Symfony\Component\HttpKernel\KernelEvents;
2322

@@ -36,18 +35,16 @@ class DebugHandlersListener implements EventSubscriberInterface
3635
private $levels;
3736
private $throwAt;
3837
private $scream;
39-
private $fileLinkFormat;
4038
private $scope;
4139
private $firstCall = true;
4240
private $hasTerminatedWithException;
4341

4442
/**
45-
* @param callable|null $exceptionHandler A handler that must support \Throwable instances that will be called on Exception
46-
* @param array|int $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants
47-
* @param int|null $throwAt Thrown errors in a bit field of E_* constants, or null to keep the current value
48-
* @param bool $scream Enables/disables screaming mode, where even silenced errors are logged
49-
* @param string|FileLinkFormatter|null $fileLinkFormat The format for links to source files
50-
* @param bool $scope Enables/disables scoping mode
43+
* @param callable|null $exceptionHandler A handler that must support \Throwable instances that will be called on Exception
44+
* @param array|int $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants
45+
* @param int|null $throwAt Thrown errors in a bit field of E_* constants, or null to keep the current value
46+
* @param bool $scream Enables/disables screaming mode, where even silenced errors are logged
47+
* @param bool $scope Enables/disables scoping mode
5148
*/
5249
public function __construct(callable $exceptionHandler = null, LoggerInterface $logger = null, $levels = \E_ALL, ?int $throwAt = \E_ALL, bool $scream = true, $fileLinkFormat = null, bool $scope = true, LoggerInterface $deprecationLogger = null)
5350
{
@@ -56,9 +53,12 @@ public function __construct(callable $exceptionHandler = null, LoggerInterface $
5653
$this->levels = null === $levels ? \E_ALL : $levels;
5754
$this->throwAt = \is_int($throwAt) ? $throwAt : (null === $throwAt ? null : ($throwAt ? \E_ALL : null));
5855
$this->scream = $scream;
59-
$this->fileLinkFormat = $fileLinkFormat;
6056
$this->scope = $scope;
6157
$this->deprecationLogger = $deprecationLogger;
58+
59+
if (null !== $fileLinkFormat) {
60+
trigger_deprecation('symfony/http-kernel', '5.2', sprintf('Passing a fileLinkFormat as 6th argument of "%s" is deprecated and will be removed in 6.0.', __METHOD__));
61+
}
6262
}
6363

6464
/**

0 commit comments

Comments
 (0)
0