Skip to content

Commit

Permalink
minor #32263 [ErrorCatcher] Remove all deprecated code (fancyweb)
Browse files Browse the repository at this point in the history
This PR was merged into the 5.0-dev branch.

Discussion
----------

[ErrorCatcher] Remove all deprecated code

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32261 (comment)
| License       | MIT
| Doc PR        | -

Commits
-------

2891d3b [ErrorCatcher] Remove all deprecated code
  • Loading branch information
Tobion committed Jun 28, 2019
2 parents 58d61dc + 2891d3b commit c5715a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
5 changes: 5 additions & 0 deletions src/Symfony/Component/ErrorCatcher/CHANGELOG.md
@@ -1,6 +1,11 @@
CHANGELOG
=========

5.0.0
-----

* removed `FlattenException::setTraceFromException()` in favor of `setTraceFromThrowable()`

4.4.0
-----

Expand Down
5 changes: 0 additions & 5 deletions src/Symfony/Component/ErrorCatcher/ErrorHandler.php
Expand Up @@ -378,11 +378,6 @@ private function reRegister($prev)
*/
public function handleError(int $type, string $message, string $file, int $line): bool
{
// @deprecated to be removed in Symfony 5.0
if (\PHP_VERSION_ID >= 70300 && $message && '"' === $message[0] && 0 === strpos($message, '"continue') && preg_match('/^"continue(?: \d++)?" targeting switch is equivalent to "break(?: \d++)?"\. Did you mean to use "continue(?: \d++)?"\?$/', $message)) {
$type = E_DEPRECATED;
}

// Level is the current error reporting level to manage silent error.
$level = error_reporting();
$silenced = 0 === ($level & $type);
Expand Down
10 changes: 0 additions & 10 deletions src/Symfony/Component/ErrorCatcher/Exception/FlattenException.php
Expand Up @@ -244,16 +244,6 @@ public function getTrace()
return $this->trace;
}

/**
* @deprecated since 4.1, use {@see setTraceFromThrowable()} instead.
*/
public function setTraceFromException(\Exception $exception)
{
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use "setTraceFromThrowable()" instead.', __METHOD__), E_USER_DEPRECATED);

$this->setTraceFromThrowable($exception);
}

public function setTraceFromThrowable(\Throwable $throwable)
{
$this->traceAsString = $throwable->getTraceAsString();
Expand Down

0 comments on commit c5715a3

Please sign in to comment.