8000 Removed deprecated features and notices by javiereguiluz · Pull Request #8622 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 5 commits into from
Nov 12, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fixed ater Wouter's review
  • Loading branch information
javiereguiluz committed Nov 12, 2017
commit 47a224a9e5d6e38ac4976c2fcfc19cddb3211ce4
6 changes: 3 additions & 3 deletions bundles/override.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
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 was
removed in Symfony 4.0.
When using a third-party bundle, you might want to customize or override some of
its features. This document describes ways of overriding the most common
features of a bundle.

.. tip::

Expand Down
6 changes: 3 additions & 3 deletions components/console/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ thrown by the application.
Listeners receive a
:class:`Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent` event::

use Symfony\Component\Console\Event\ConsoleExceptionEvent;
use Symfony\Component\Console\Event\ConsoleErrorEvent;
use Symfony\Component\Console\ConsoleEvents;

$dispatcher->addListener(ConsoleEvents::ERROR, function (ConsoleExceptionEvent $event) {
$dispatcher->addListener(ConsoleEvents::ERROR, function (ConsoleErrorEvent $event) {
$output = $event->getOutput();

$command = $event->getCommand();
Expand All @@ -111,7 +111,7 @@ Listeners receive a
$exitCode = $event->getExitCode();

// change the exception to another one
$event->setException(new \LogicException('Caught exception', $exitCode, $event->getException()));
$event->setException(new \LogicException('Caught exception', $exitCode, $event->getError()));
});

The ``ConsoleEvents::TERMINATE`` Event
Expand Down
21 changes: 21 additions & 0 deletions profiler/matchers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,24 @@ How to Use Matchers to Enable the Profiler Conditionally

The possibility to use a matcher to enable the profiler conditionally was
removed in Symfony 4.0.
Copy link
Member
@wouterj wouterj < 8457 a href="#r150407847" id="discussion_r150407847-permalink" class="Link--secondary js-timestamp">Nov 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add information about doing $profiler->disable() in your controller explicitly if you need this functionality.


Symfony Profiler cannot be enabled/disabled conditionally using matchers, because
that feature was removed in Symfony 4.0. However, you can use the ``enable()``
and ``disable()`` methods of the :class:`Symfony\\Component\\HttpKernel\\Profiler\\Profiler`
class in your controllers to manage the profiler programmatically::

use Symfony\Component\HttpKernel\Profiler\Profiler;
// ...

class DefaultController
{
// ...

public function someMethod(Profiler $profiler)
{
// for this particular controller action, the profiler is disabled
$profiler->disable();

// ...
}
}
0