-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Removed deprecated features and notices #8622
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
Changes from 2 commits
0266046
597b75b
47a224a
eb53f14
02c676a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ How to Override any Part of a Bundle | |
==================================== | ||
|
||
This document is a quick reference for how to override different parts of | ||
third-party bundles without using :doc:`/bundles/inheritance`, which is | ||
deprecated since Symfony 3.4. | ||
third-party bundles without using :doc:`/bundles/inheritance`, which was | ||
removed in Symfony 4.0. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's make this description generic to not require any more updates in later versions (and thus merge conflicts), e.g:
|
||
|
||
.. tip:: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,27 +83,24 @@ C/C++ standard.:: | |
} | ||
}); | ||
|
||
The ``ConsoleEvents::EXCEPTION`` Event | ||
-------------------------------------- | ||
|
||
.. versionadded:: 3.3 | ||
The ``ConsoleEvents::EXCEPTION`` event was deprecated in Symfony 3.3. Use | ||
the ``ConsoleEvents::ERROR`` event instead. | ||
The ``ConsoleEvents::ERROR`` Event | ||
---------------------------------- | ||
|
||
**Typical Purposes**: Handle exceptions thrown during the execution of a | ||
command. | ||
|
||
Whenever an exception is thrown by a command, the ``ConsoleEvents::EXCEPTION`` | ||
event is dispatched. A listener can wrap or change the exception or do | ||
anything useful before the exception is thrown by the application. | ||
Whenever an exception is thrown by a command, including those triggered from | ||
event listeners, the ``ConsoleEvents::ERROR`` event is dispatched. A listener | ||
can wrap or change the exception or do anything useful before the exception is | ||
thrown by the application. | ||
|
||
Listeners receive a | ||
:class:`Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent` event:: | ||
|
||
use Symfony\Component\Console\Event\ConsoleExceptionEvent; | ||
use Symfony\Component\Console\ConsoleEvents; | ||
|
||
$dispatcher->addListener(ConsoleEvents::EXCEPTION, function (ConsoleExceptionEvent $event) { | ||
$dispatcher->addListener(ConsoleEvents::ERROR, function (ConsoleExceptionEvent $event) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typehint should be |
||
$output = $event->getOutput(); | ||
|
||
$command = $event->getCommand(); | ||
|
@@ -117,19 +114,6 @@ Listeners receive a | |
$event->setException(new \LogicException('Caught exception', $exitCode, $event->getException())); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
}); | ||
|
||
The ``ConsoleEvents::ERROR`` Event | ||
---------------------------------- | ||
|
||
.. versionadded:: 3.3 | ||
The ``ConsoleEvents::ERROR`` event was introduced in Symfony 3.3. | ||
|
||
**Typical Purposes**: Handle exceptions thrown during the execution of a | ||
command. | ||
|
||
This event is an improved version of the ``ConsoleEvents::EXCEPTION`` event, | ||
because it can handle every exception thrown during the execution of a command, | ||
including those triggered from event listeners. | ||
|
||
The ``ConsoleEvents::TERMINATE`` Event | ||
-------------------------------------- | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I'm wrong, this versionadded says "Don't use what's descriped below." (so it's more a
.. caution::
than versionadded). This means the article should be removed (as the feature got removed in Symfony 4).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though the same ... but only
addClassesToCompile()
is deprecated/removed.addAnnotatedClassesToCompile()
is still valid and used in Sf4.