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 7d4960d

Browse filesBrowse files
committed
Adding a note about the backup file created by doctrine:generate:entities
1 parent 2067a87 commit 7d4960d
Copy full SHA for 7d4960d

File tree

Expand file treeCollapse file tree

1 file changed

+15
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+15
-10
lines changed

‎book/doctrine.rst

Copy file name to clipboardExpand all lines: book/doctrine.rst
+15-10Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -283,23 +283,28 @@ for the ``Product`` class. This is a safe command - you can run it over and
283283
over again: it only generates getters and setters that don't exist (i.e. it
284284
doesn't replace your existing methods).
285285

286+
.. caution::
287+
288+
The ``doctrine:generate:entities`` command saves a backup of the original
289+
``Product.php`` named ``Product.php~``. In some cases, the presence of
290+
this file can cause a "Cannot redeclare class" error. It can be safely
291+
removed.
292+
293+
You can also generate all known entities (i.e. any PHP class with Doctrine
294+
mapping information) of a bundle or an entire namespace:
295+
296+
.. code-block:: bash
297+
298+
php app/console doctrine:generate:entities AcmeStoreBundle
299+
php app/console doctrine:generate:entities Acme
300+
286301
.. note::
287302

288303
Doctrine doesn't care whether your properties are ``protected`` or ``private``,
289304
or whether or not you have a getter or setter function for a property.
290305
The getters and setters are generated here only because you'll need them
291306
to interact with your PHP object.
292307

293-
.. tip::
294-
295-
You can also generate all known entities (i.e. any PHP class with Doctrine
296-
mapping information) of a bundle or an entire namespace:
297-
298-
.. code-block:: bash
299-
300-
php app/console doctrine:generate:entities AcmeStoreBundle
301-
php app/console doctrine:generate:entities Acme
302-
303308
Creating the Database Tables/Schema
304309
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
305310

0 commit comments

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