Skip to content

Commit

Permalink
minor #52426 [HttpKernel] the debug log processor must be a callable …
Browse files Browse the repository at this point in the history
…(xabbuh)

This PR was merged into the 6.4 branch.

Discussion
----------

[HttpKernel] the debug log processor must be a callable

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

A Monolog processor must be a callable, but a `DebugLoggerInterface` implementation is not necessarily a callable.

Commits
-------

df37834 the debug log processor must be a callable
  • Loading branch information
nicolas-grekas committed Nov 7, 2023
2 parents 35703d1 + df37834 commit fbc44f2
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -18,12 +18,12 @@
*/
class DebugLoggerConfigurator
{
private ?DebugLoggerInterface $processor = null;
private ?\Closure $processor = null;

public function __construct(DebugLoggerInterface $processor, bool $enable = null)
public function __construct(callable $processor, bool $enable = null)
{
if ($enable ?? !\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
$this->processor = $processor;
$this->processor = $processor(...);
}
}

Expand Down

0 comments on commit fbc44f2

Please sign in to comment.