Skip to content

Commit e08cac0

Browse files
committed
Merge branch '4.1'
* 4.1: Update 3.3-di-changes.rst Fix typo and add weblink in core_team.rst use latest version in example Fix link for webpack encore Missing root node in yaml example Fix a typo in security/impersonating_user.rst [FrameworkBundle] Improve the DX of TemplateController
2 parents 2539e24 + 37aef52 commit e08cac0

File tree

7 files changed

+38
-26
lines changed

7 files changed

+38
-26
lines changed

components/config/definition.rst

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,21 @@ be a boolean value"):
1818

1919
.. code-block:: yaml
2020
21-
auto_connect: true
22-
default_connection: mysql
23-
connections:
24-
mysql:
25-
host: localhost
26-
driver: mysql
27-
username: user
28-
password: pass
29-
sqlite:
30-
host: localhost
31-
driver: sqlite
32-
memory: true
33-
username: user
34-
password: pass
21+
database:
22+
auto_connect: true
23+
default_connection: mysql
24+
connections:
25+
mysql:
26+
host: localhost
27+
driver: mysql
28+
username: user
29+
password: pass
30+
sqlite:
31+
host: localhost
32+
driver: sqlite
33+
memory: true
34+
username: user
35+
password: pass
3536
3637
When loading multiple configuration files, it should be possible to merge
3738
and overwrite some values. Other values should not be merged and stay as

contributing/code/core_team.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ Active Core Members
7070
* **Christophe Coevoet** (`stof`_) can merge into all components, bridges and
7171
bundles;
7272

73-
* **Kévin Dunglas** (`dunglas`_) can merge into the PropertyInfo_ and the Serializer_
74-
component;
73+
* **Kévin Dunglas** (`dunglas`_) can merge into the PropertyInfo_, the Serializer_
74+
and the WebLink_ components;
7575

7676
* **Jakub Zalas** (`jakzal`_) can merge into the DomCrawler_ and Intl_
7777
components;
@@ -235,6 +235,7 @@ discretion of the **Project Leader**.
235235
.. _Workflow: https://github.com/symfony/workflow
236236
.. _Yaml: https://github.com/symfony/yaml
237237
.. _WebProfilerBundle: https://github.com/symfony/web-profiler-bundle
238+
.. _WebLink: https://github.com/symfony/weblink
238239
.. _`symfony-docs repository`: https://github.com/symfony/symfony-docs
239240
.. _`fabpot`: https://github.com/fabpot/
240241
.. _`webmozart`: https://github.com/webmozart/

deployment.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ setup:
179179
* Running any database migrations
180180
* Clearing your APC cache
181181
* Add/edit CRON jobs
182-
* ref:`Building and minifying your assets <how-do-i-deploy-my-encore-assets>` with Webpack Encore
182+
* :ref:`Building and minifying your assets <how-do-i-deploy-my-encore-assets>` with Webpack Encore
183183
* Pushing assets to a CDN
184184
* ...
185185

security/impersonating_user.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ to show a link to exit impersonation:
9191

9292
In some cases you may need to get the object that represents the impersonator
9393
user rather than the impersonated user. Use the following snippet to iterate
94-
over the user's roles until you find one that a ``SwitchUserRole`` object::
94+
over the user's roles until you find one that is a ``SwitchUserRole`` object::
9595

9696
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
9797
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;

service_container/3.3-di-changes.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,14 @@ Start by updating the service ids to class names:
578578
Furthermore it is always recommended to check for definition existence
579579
using ``has()`` function.
580580

581+
.. note::
582+
583+
If you get rid of deprecations and make your controllers extend from
584+
``AbstractController`` instead of ``Controller``, you can skip the rest of
585+
this step because ``AbstractController`` doesn't provide a container where
586+
you can get the services from. All services need to be injected as explained
587+
in the :ref:`step 5 of this article <step-5>`.
588+
581589
But, this change will break our app! The old service ids (e.g. ``app.github_notifier``)
582590
no longer exist. The simplest way to fix this is to find all your old service ids
583591
and update them to the new class id: ``app.github_notifier`` to ``App\Service\GitHubNotifier``.
@@ -708,6 +716,8 @@ will be used. If you *don't* have this, the auto-registration feature will try t
708716
register a third ``ApiClient`` service and use that for autowiring (which will fail,
709717
because the class has a non-autowireable argument).
710718

719+
.. _step-5:
720+
711721
Step 5) Cleanup!
712722
~~~~~~~~~~~~~~~~
713723

setup/flex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Symfony application by executing the following command:
111111

112112
.. code-block:: terminal
113113
114-
$ composer create-project symfony/skeleton:3.4.* my-project
114+
$ composer create-project symfony/skeleton:4.1.* my-project
115115
116116
.. note::
117117

templating/render_without_controller.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Usually, when you need to create a page, you need to create a controller
88
and render a template from within that controller. But if you're rendering
99
a simple template that doesn't need any data passed into it, you can avoid
1010
creating the controller entirely, by using the built-in
11-
``Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction``
11+
:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController`
1212
controller.
1313

1414
For example, suppose you want to render a ``static/privacy.html.twig``
@@ -22,7 +22,7 @@ can do this without creating a controller:
2222
# config/routes.yaml
2323
acme_privacy:
2424
path: /privacy
25-
controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction
25+
controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController
2626
defaults:
2727
template: static/privacy.html.twig
2828
@@ -35,7 +35,7 @@ can do this without creating a controller:
3535
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
3636
3737
<route id="acme_privacy" path="/privacy">
38-
<default key="_controller">Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction</default>
38+
<default key="_controller">Symfony\Bundle\FrameworkBundle\Controller\TemplateController</default>
3939
<default key="template">static/privacy.html.twig</default>
4040
</route>
4141
</routes>
@@ -48,7 +48,7 @@ can do this without creating a controller:
4848
4949
$routes = new RouteCollection();
5050
$routes->add('acme_privacy', new Route('/privacy', array(
51-
'_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction',
51+
'_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController',
5252
'template' => 'static/privacy.html.twig',
5353
)));
5454
@@ -83,7 +83,7 @@ other variables in your route, you can control exactly how your page is cached:
8383
# config/routes.yaml
8484
acme_privacy:
8585
path: /privacy
86-
controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction
86+
controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController
8787
defaults:
8888
template: 'static/privacy.html.twig'
8989
maxAge: 86400
@@ -98,7 +98,7 @@ other variables in your route, you can control exactly how your page is cached:
9898
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
9999
100100
<route id="acme_privacy" path="/privacy">
101-
<default key="_controller">Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction</default>
101+
<default key="_controller">Symfony\Bundle\FrameworkBundle\Controller\TemplateController</default>
102102
<default key="template">static/privacy.html.twig</default>
103103
<default key="maxAge">86400</default>
104104
<default key="sharedAge">86400</default>
@@ -113,7 +113,7 @@ other variables in your route, you can control exactly how your page is cached:
113113
114114
$routes = new RouteCollection();
115115
$routes->add('acme_privacy', new Route('/privacy', array(
116-
'_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction',
116+
'_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController',
117117
'template' => 'static/privacy.html.twig',
118118
'maxAge' => 86400,
119119
'sharedAge' => 86400,

0 commit comments

Comments
 (0)