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

Commit a8bd75f

Browse filesBrowse files
committed
Merge branch '3.4' into 4.1
* 3.4: remove Symfony 2.8 versionadded directive Removed a small article about console logging Describe things more precisely
2 parents 3a3aa74 + 7b3a625 commit a8bd75f
Copy full SHA for a8bd75f

File tree

Expand file treeCollapse file tree

4 files changed

+19
-5
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+19
-5
lines changed

‎_build/redirection_map

Copy file name to clipboardExpand all lines: _build/redirection_map
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
/cookbook/console/commands_as_services /console/commands_as_services
120120
/cookbook/console/console_command /console
121121
/cookbook/console/index /console
122-
/cookbook/console/logging /console/logging
122+
/cookbook/console/logging /console
123123
/cookbook/console/request_context /console/request_context
124124
/cookbook/console/style /console/style
125125
/cookbook/console/usage /console
@@ -402,3 +402,4 @@
402402
/components/weblink /components/web_link
403403
/frontend/encore/installation-no-flex /frontend/encore/installation
404404
/http_cache/form_csrf_caching /security/csrf
405+
/console/logging /console

‎components/console/events.rst

Copy file name to clipboardExpand all lines: components/console/events.rst
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ Listeners receive a
114114
$event->setError(new \LogicException('Caught exception', $exitCode, $event->getError()));
115115
});
116116

117+
.. _console-events-terminate:
118+
117119
The ``ConsoleEvents::TERMINATE`` Event
118120
--------------------------------------
119121

‎console.rst

Copy file name to clipboardExpand all lines: console.rst
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ want a command to create a user::
3737
{
3838
// the name of the command (the part after "bin/console")
3939
protected static $defaultName = 'app:create-user';
40-
40+
4141
protected function configure()
4242
{
4343
// ...
@@ -373,6 +373,15 @@ console::
373373
:class:`Symfony\\Component\\Console\\Application <Symfony\\Component\\Console\\Application>`
374374
and extend the normal ``\PHPUnit\Framework\TestCase``.
375375

376+
Logging Command Errors
377+
----------------------
378+
379+
Whenever an exception is thrown while running commands, Symfony adds a log
380+
message for it including the entire failing command. In addition, Symfony
381+
registers an :doc:`event subscriber </event_dispatcher>` to listen to the
382+
:ref:`ConsoleEvents::TERMINATE event <console-events-terminate>` and adds a log
383+
message whenever a command doesn't finish with the ``0`` exit status.
384+
376385
Learn More
377386
----------
378387

‎service_container/autowiring.rst

Copy file name to clipboardExpand all lines: service_container/autowiring.rst
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,10 @@ dealing with the ``TransformerInterface``.
338338

339339
.. tip::
340340

341-
As long as there is only one class implementing the interface and that class
342-
is part of the same namespace configuring the alias is not mandatory and Symfony
343-
will automatically create one.
341+
When using a `service definition prototype`_, if only one service is
342+
discovered that implements an interface, and that interface is also
343+
discovered at the same time, configuring the alias is not mandatory
344+
and Symfony will automatically create one.
344345

345346
Dealing with Multiple Implementations of the Same Type
346347
------------------------------------------------------
@@ -500,3 +501,4 @@ Public bundles should explicitly configure their services and not rely on autowi
500501

501502
.. _Rapid Application Development: https://en.wikipedia.org/wiki/Rapid_application_development
502503
.. _ROT13: https://en.wikipedia.org/wiki/ROT13
504+
.. _service definition prototype: https://symfony.com/blog/new-in-symfony-3-3-psr-4-based-service-discovery

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.