Skip to content

Commit 5184c00

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: Remove semicolon marking previous end of statement Reword [Console] Added documentation about command profiling
2 parents 57f7840 + 78dd8bc commit 5184c00

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ reusable configuration value. By convention, parameters are defined under the
259259
260260
// PHP constants as parameter values
261261
->set('app.some_constant', GLOBAL_CONSTANT)
262-
->set('app.another_constant', BlogPost::MAX_ITEMS);
262+
->set('app.another_constant', BlogPost::MAX_ITEMS)
263263
264264
// Enum case as parameter values
265265
->set('app.some_enum', PostState::Published);

console.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,32 @@ Using Events And Handling Signals
589589
When a command is running, many events are dispatched, one of them allows to
590590
react to signals, read more in :doc:`this section </components/console/events>`.
591591

592+
Profiling Commands
593+
------------------
594+
595+
Symfony allows to profile the execution of any command, including yours. First,
596+
make sure that the :ref:`debug mode <debug-mode>` and the :doc:`profiler </profiler>`
597+
are enabled. Then, add the ``--profile`` option when running the command:
598+
599+
.. code-block:: terminal
600+
601+
$ php bin/console --profile app:my-command
602+
603+
Symfony will now collect data about the command execution, which is helpful to
604+
debug errors or check other issues. When the command execution is over, the
605+
profile is accessible through the web page of the profiler.
606+
607+
.. tip::
608+
609+
If you run the command in verbose mode (adding the ``-v`` option), Symfony
610+
will display in the output a clickable link to the command profile (if your
611+
terminal supports links). If you run it in debug verbosity (``-vvv``) you'll
612+
also see the time and memory consumed by the command.
613+
614+
.. versionadded:: 6.4
615+
616+
The ``--profile`` option was introduced in Symfony 6.4.
617+
592618
Learn More
593619
----------
594620

0 commit comments

Comments
 (0)