Skip to content

Commit 0ff098b

Browse files
authored
Merge pull request #2173 from greg0ire/document-command-remapping
Document command remapping
2 parents ff26443 + c8980d0 commit 0ff098b

2 files changed

Lines changed: 79 additions & 0 deletions

File tree

docs/en/doctrine-console.rst

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Doctrine Console
2+
================
3+
4+
Some Doctrine packages such as ``doctrine/dbal`` and ``doctrine/orm``
5+
provide useful console commands to interact with your database and your
6+
entities:
7+
8+
- `Doctrine DBAL Commands
9+
<https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/cli-tools.html#cli-tools>`_
10+
- `Doctrine ORM Commands
11+
<https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/tools.html#doctrine-console>`_
12+
13+
This bundle automatically registers those commands, but it renames them
14+
in the process so as to group them under the ``doctrine:`` namespace.
15+
16+
Note that the bundle also provide some additional commands that are not
17+
part of the aforementioned packages.
18+
19+
Command Name Mapping
20+
--------------------
21+
22+
The following table shows the mapping between the original Doctrine command
23+
names and the names used by this bundle:
24+
25+
+--------------------------------------------+---------------------------------------+
26+
| Bundle Command Name | Original Doctrine Command Name |
27+
+============================================+=======================================+
28+
| ``doctrine:query:sql`` | ``dbal:run-sql`` |
29+
+--------------------------------------------+---------------------------------------+
30+
| ``doctrine:cache:clear-metadata`` | ``orm:clear-cache:metadata`` |
31+
+--------------------------------------------+---------------------------------------+
32+
| ``doctrine:cache:clear-query`` | ``orm:clear-cache:query`` |
33+
+--------------------------------------------+---------------------------------------+
34+
| ``doctrine:cache:clear-result`` | ``orm:clear-cache:result`` |
35+
+--------------------------------------------+---------------------------------------+
36+
| ``doctrine:cache:clear-collection-region`` | ``orm:clear-cache:region:collection`` |
37+
+--------------------------------------------+---------------------------------------+
38+
| ``doctrine:cache:clear-entity-region`` | ``orm:clear-cache:region:entity`` |
39+
+--------------------------------------------+---------------------------------------+
40+
| ``doctrine:cache:clear-query-region`` | ``orm:clear-cache:region:query`` |
41+
+--------------------------------------------+---------------------------------------+
42+
| ``doctrine:mapping:convert`` | ``orm:convert-mapping`` |
43+
+--------------------------------------------+---------------------------------------+
44+
| ``doctrine:schema:create`` | ``orm:schema-tool:create`` |
45+
+--------------------------------------------+---------------------------------------+
46+
| ``doctrine:schema:drop`` | ``orm:schema-tool:drop`` |
47+
+--------------------------------------------+---------------------------------------+
48+
| ``doctrine:schema:update`` | ``orm:schema-tool:update`` |
49+
+--------------------------------------------+---------------------------------------+
50+
| ``doctrine:ensure-production-settings`` | ``orm:ensure-production-settings`` |
51+
+--------------------------------------------+---------------------------------------+
52+
| ``doctrine:mapping:info`` | ``orm:info`` |
53+
+--------------------------------------------+---------------------------------------+
54+
| ``doctrine:mapping:describe`` | ``orm:mapping:describe`` |
55+
+--------------------------------------------+---------------------------------------+
56+
| ``doctrine:query:dql`` | ``orm:run-dql`` |
57+
+--------------------------------------------+---------------------------------------+
58+
| ``doctrine:schema:validate`` | ``orm:validate-schema`` |
59+
+--------------------------------------------+---------------------------------------+
60+
61+
Additionally, the bundle provides the following commands:
62+
63+
- ``doctrine:database:create``
64+
- ``doctrine:database:drop``
65+
- ``doctrine:mapping:import``
66+
67+
To get a list of all available Doctrine commands, run:
68+
69+
.. code-block:: console
70+
71+
php bin/console list doctrine
72+
73+
It is possible to get help on any specific command. For example,
74+
to get help on the ``doctrine:schema:update`` command, run:
75+
76+
.. code-block:: console
77+
78+
php bin/console doctrine:schema:update --help

docs/en/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ configuration options, console commands and even a web debug toolbar collector.
77
.. toctree::
88

99
installation
10+
doctrine-console
1011
entity-listeners
1112
event-listeners
1213
custom-id-generators

0 commit comments

Comments
 (0)