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 355d689

Browse filesBrowse files
committed
[FrameworkBundle][5.4] Remove fileLinkFormat property from DebugHandlersListener
1 parent c1c973c commit 355d689
Copy full SHA for 355d689

File tree

3 files changed

+7
-6
lines changed
Filter options

3 files changed

+7
-6
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
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'),
2928
param('kernel.debug'),
3029
service('monolog.logger.deprecation')->nullOnInvalid(),
30+
service('debug.file_link_formatter'),
3131
])
3232
->tag('kernel.event_subscriber')
3333
->tag('monolog.logger', ['channel' => 'php'])

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class DebugHandlersListener implements EventSubscriberInterface
3939
private $levels;
4040
private $throwAt;
4141
private $scream;
42-
private $fileLinkFormat;
4342
private $scope;
4443
private $firstCall = true;
4544
private $hasTerminatedWithException;
@@ -49,11 +48,14 @@ class DebugHandlersListener implements EventSubscriberInterface
4948
* @param array|int $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants
5049
* @param int|null $throwAt Thrown errors in a bit field of E_* constants, or null to keep the current value
5150
* @param bool $scream Enables/disables screaming mode, where even silenced errors are logged
52-
* @param string|FileLinkFormatter|null $fileLinkFormat The format for links to source files
5351
* @param bool $scope Enables/disables scoping mode
5452
*/
55-
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)
53+
public function __construct(callable $exceptionHandler = null, LoggerInterface $logger = null, $levels = \E_ALL, ?int $throwAt = \E_ALL, bool $scream = true, $scope = true, $deprecationLogger = null)
5654
{
55+
if (!is_bool($scope)) {
56+
trigger_deprecation('symfony/http-kernel', '5.4', 'Passing a $fileLinkFormat is deprecated.');
57+
}
58+
5759
$handler = set_exception_handler('var_dump');
5860
$this->earlyHandler = \is_array($handler) ? $handler[0] : null;
5961
restore_exception_handler();
@@ -63,7 +65,6 @@ public function __construct(callable $exceptionHandler = null, LoggerInterface $
6365
$this->levels = $levels ?? \E_ALL;
6466
$this->throwAt = \is_int($throwAt) ? $throwAt : (null === $throwAt ? null : ($throwAt ? \E_ALL : null));
6567
$this->scream = $scream;
66-
$this->fileLinkFormat = $fileLinkFormat;
6768
$this->scope = $scope;
6869
$this->deprecationLogger = $deprecationLogger;
6970
}

‎src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public function testLevelsAssignedToLoggers(bool $hasLogger, bool $hasDeprecatio
219219
->method('setDefaultLogger')
220220
->withConsecutive(...$expectedCalls);
221221

222-
$sut = new DebugHandlersListener(null, $logger, $levels, null, true, null, true, $deprecationLogger);
222+
$sut = new DebugHandlersListener(null, $logger, $levels, null, true, true, $deprecationLogger);
223223
$prevHander = set_exception_handler([$handler, 'handleError']);
224224

225225
try {

0 commit comments

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