Skip to content

Unifying wording to "configuration parameter" #15328

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

Merged
merged 1 commit into from
May 17, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Use Constants to Define Options that Rarely Change
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Configuration options like the number of items to display in some listing rarely
change. Instead of defining them as :ref:`service container parameters <configuration-parameters>`,
change. Instead of defining them as :ref:`configuration parameters <configuration-parameters>`,
define them as PHP constants in the related classes. Example::

// src/Entity/Post.php
Expand Down
12 changes: 6 additions & 6 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ arbitrary matching logic:
* condition="context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') matches '/firefox/i'"
* )
*
* expressions can also include config parameters:
* expressions can also include configuration parameters:
* condition: "request.headers.get('User-Agent') matches '%app.allowed_browsers%'"
*/
public function contact(): Response
Expand All @@ -285,7 +285,7 @@ arbitrary matching logic:
path: /contact
controller: 'App\Controller\DefaultController::contact'
condition: "context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') matches '/firefox/i'"
# expressions can also include config parameters:
# expressions can also include configuration parameters:
# condition: "request.headers.get('User-Agent') matches '%app.allowed_browsers%'"

.. code-block:: xml
Expand All @@ -299,7 +299,7 @@ arbitrary matching logic:

<route id="contact" path="/contact" controller="App\Controller\DefaultController::contact">
<condition>context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') matches '/firefox/i'</condition>
<!-- expressions can also include config parameters: -->
<!-- expressions can also include configuration parameters: -->
<!-- <condition>request.headers.get('User-Agent') matches '%app.allowed_browsers%'</condition> -->
</route>
</routes>
Expand All @@ -314,7 +314,7 @@ arbitrary matching logic:
$routes->add('contact', '/contact')
->controller([DefaultController::class, 'contact'])
->condition('context.getMethod() in ["GET", "HEAD"] and request.headers.get("User-Agent") matches "/firefox/i"')
// expressions can also include config parameters:
// expressions can also include configuration parameters:
// 'request.headers.get("User-Agent") matches "%app.allowed_browsers%"'
;
};
Expand Down Expand Up @@ -575,7 +575,7 @@ URL Route Parameters
.. tip::

Route requirements (and route paths too) can include
:ref:`container parameters <configuration-parameters>`, which is useful to
:ref:`configuration parameters <configuration-parameters>`, which is useful to
define complex regular expressions once and reuse them in multiple routes.

.. tip::
Expand Down Expand Up @@ -1681,7 +1681,7 @@ these routes.
[],
[],
['HTTP_HOST' => 'm.example.com']
// or get the value from some container parameter:
// or get the value from some configuration parameter:
// ['HTTP_HOST' => 'm.' . $client->getContainer()->getParameter('domain')]
);

Expand Down