Skip to content
Closed
Changes from all commits
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
7 changes: 7 additions & 0 deletions bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ recommended to define their mapping using XML files stored in
:doc:`standard Symfony mechanism to override bundle parts </bundles/override>`.
This is not possible when using annotations/attributes to define the mapping.

Also, include explicit ``name`` values in the configuration for database tables
and columns, to make sure your code is independent of the Doctrine naming strategy
in use. Otherwise, for example when referring to columns in plain SQL queries,
using different naming strategies may break your code. This may mean that the
database schema elements belonging to your bundle follow another convention than
the rest of the project.

.. caution::

The recommended bundle structure was changed in Symfony 5, read the
Expand Down