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

[MonologBridge][EventDispatcher][HttpKernel] remove deprecated features #24503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 src/Symfony/Bridge/Monolog/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function countErrors()
*/
public function clear()
{
if (($logger = $this->getDebugLogger()) && method_exists($logger, 'clear')) {
if ($logger = $this->getDebugLogger()) {
$logger->clear();
}
}
Expand Down
1 change: 1 addition & 0 deletions 1 src/Symfony/Component/EventDispatcher/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CHANGELOG
-----

* removed the `ContainerAwareEventDispatcher` class
* added the `reset()` method to the `TraceableEventDispatcherInterface`

3.4.0
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @method reset() Resets the trace.
*/
interface TraceableEventDispatcherInterface extends EventDispatcherInterface
{
Expand All @@ -33,4 +31,9 @@ public function getCalledListeners();
* @return array An array of not called listeners
*/
public function getNotCalledListeners();

/**
* Resets the trace.
*/
public function reset();
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
* DataCollectorInterface.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @method reset() Resets this data collector to its initial state.
*/
interface DataCollectorInterface
{
Expand All @@ -38,4 +36,9 @@ public function collect(Request $request, Response $response, \Exception $except
* @return string The collector name
*/
public function getName();

/**
* Resets this data collector to its initial state.
*/
public function reset();
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class EventDataCollector extends DataCollector implements LateDataCollectorInter

public function __construct(EventDispatcherInterface $dispatcher = null)
{
if ($dispatcher instanceof TraceableEventDispatcherInterface && !method_exists($dispatcher, 'reset')) {
@trigger_error(sprintf('Implementing "%s" without the "reset()" method is deprecated since version 3.4 and will be unsupported in 4.0 for class "%s".', TraceableEventDispatcherInterface::class, \get_class($dispatcher)), E_USER_DEPRECATED);
}
$this->dispatcher = $dispatcher;
}

Expand All @@ -49,10 +46,6 @@ public function reset()
$this->data = array();

if ($this->dispatcher instanceof TraceableEventDispatcherInterface) {
if (!method_exists($this->dispatcher, 'reset')) {
return; // @deprecated
}

$this->dispatcher->reset();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte
public function __construct($logger = null, $containerPathPrefix = null)
{
if (null !== $logger && $logger instanceof DebugLoggerInterface) {
if (!method_exists($logger, 'clear')) {
@trigger_error(sprintf('Implementing "%s" without the "clear()" method is deprecated since version 3.4 and will be unsupported in 4.0 for class "%s".', DebugLoggerInterface::class, \get_class($logger)), E_USER_DEPRECATED);
}

$this->logger = $logger;
}

Expand All @@ -52,7 +48,7 @@ public function collect(Request $request, Response $response, \Exception $except
*/
public function reset()
{
if ($this->logger && method_exists($this->logger, 'clear')) {
if ($this->logger instanceof DebugLoggerInterface) {
$this->logger->clear();
}
$this->data = array();
Expand Down
7 changes: 5 additions & 2 deletions 7 src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* DebugLoggerInterface.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @method clear() Removes all log records.
*/
interface DebugLoggerInterface
{
Expand All @@ -37,4 +35,9 @@ public function getLogs();
* @return int The number of errors
*/
public function countErrors();

/**
* Removes all log records.
*/
public function clear();
}
8 changes: 0 additions & 8 deletions 8 src/Symfony/Component/HttpKernel/Profiler/Profiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,6 @@ public function collect(Request $request, Response $response, \Exception $except
public function reset()
{
foreach ($this->collectors as $collector) {
if (!method_exists($collector, 'reset')) {
continue;
}

$collector->reset();
}
$this->enabled = $this->initiallyEnabled;
Expand Down Expand Up @@ -237,10 +233,6 @@ public function set(array $collectors = array())
*/
public function add(DataCollectorInterface $collector)
{
if (!method_exists($collector, 'reset')) {
@trigger_error(sprintf('Implementing "%s" without the "reset()" method is deprecated since version 3.4 and will be unsupported in 4.0 for class "%s".', DataCollectorInterface::class, \get_class($collector)), E_USER_DEPRECATED);
}

$this->collectors[$collector->getName()] = $collector;
}

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.