Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Routing] Document the Route attribute #14230

Merged
merged 1 commit into from
Oct 11, 2020
Merged
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
1 change: 1 addition & 0 deletions _build/conf.py
Original file line number Diff line number Diff line change
@@ -111,6 +111,7 @@
lexers['markdown'] = TextLexer()
lexers['php'] = PhpLexer(startinline=True)
lexers['php-annotations'] = PhpLexer(startinline=True)
lexers['php-attributes'] = PhpLexer(startinline=True)
lexers['php-standalone'] = PhpLexer(startinline=True)
lexers['php-symfony'] = PhpLexer(startinline=True)
lexers['rst'] = RstLexer()
11 changes: 6 additions & 5 deletions best_practices.rst
Original file line number Diff line number Diff line change
@@ -223,12 +223,13 @@ important parts of your application.

.. _best-practice-controller-annotations:

Use Annotations to Configure Routing, Caching and Security
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Use Attributes or Annotations to Configure Routing, Caching and Security
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Using annotations for routing, caching and security simplifies configuration.
You don't need to browse several files created with different formats (YAML, XML,
PHP): all the configuration is just where you need it and it only uses one format.
Using attributes or annotations for routing, caching and security simplifies
configuration. You don't need to browse several files created with different
formats (YAML, XML, PHP): all the configuration is just where you need it and
it only uses one format.

Don't Use Annotations to Configure the Controller Template
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 change: 1 addition & 0 deletions contributing/documentation/format.rst
Original file line number Diff line number Diff line change
@@ -104,6 +104,7 @@ Markup Format Use It to Display
``html+php`` PHP code blended with HTML
``ini`` INI
``php-annotations`` PHP Annotations
``php-attributes`` PHP Attributes
=================== ======================================

Adding Links
Loading