Skip to content

Commit 3e215a9

Browse files
committed
Merge branch '4.1'
* 4.1: [Messenger] Error in XML configuration ! prefix referencing templates [Messenger] Fix syntax of Return Type Declaration Small fix to syntax of Return Type Declaration remove changelog toctree entry removed the changelog file removed Romain as part of the core team Update deployment.rst Fixed underline Adding check for environments Added pre-deployment tasks and removed Assetic deployment Added reference to deploying assets
2 parents acca007 + 2ba4c73 commit 3e215a9

File tree

9 files changed

+53
-37
lines changed

9 files changed

+53
-37
lines changed

bundles/override.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,22 @@ template from the FOSUserBundle, create this template:
3535
If you add a template in a new location, you *may* need to clear your
3636
cache (``php bin/console cache:clear``), even if you are in debug mode.
3737

38+
Instead of overriding an entire template, you may just want to override one or
39+
more blocks. However, since you are overriding the template you want to extend
40+
from, you would end up in an infinite loop error. The solution is to use the
41+
special ``!`` prefix in the template name to tell Symfony that you want to
42+
extend from the original template, not from the overridden one:
43+
44+
.. code-block:: twig
45+
46+
{# templates/bundles/FOSUserBundle/Registration/confirmed.html.twig #}
47+
{# the special '!' prefix avoids errors when extending from an overridden template #}
48+
{% extends "@!FOSUserBundle/Registration/confirmed.html.twig" %}
49+
50+
{% block some_block %}
51+
...
52+
{% endblock %}
53+
3854
.. _templating-overriding-core-templates:
3955

4056
.. tip::

components/messenger.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ First, create your receiver::
237237
$this->filePath = $filePath;
238238
}
239239

240-
public function receive(callable $handler) : void
240+
public function receive(callable $handler): void
241241
{
242242
$ordersFromCsv = $this->serializer->deserialize(file_get_contents($this->filePath), 'csv');
243243

contributing/code/core_team.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ Active Core Members
6363
* **Tobias Schultze** (`Tobion`_) can merge into the Routing_,
6464
OptionsResolver_ and PropertyAccess_ components;
6565

66-
* **Romain Neutron** (`romainneutron`_) can merge into the
67-
Process_ component;
68-
6966
* **Nicolas Grekas** (`nicolas-grekas`_) can merge into the Cache_, Debug_,
7067
Process_, PropertyAccess_, VarDumper_ components, PhpUnitBridge_ and
7168
the DebugBundle_;
@@ -125,7 +122,8 @@ They are no longer part of the core team, but we are very grateful for all their
125122
Symfony contributions:
126123

127124
* **Bernhard Schussek** (`webmozart`_);
128-
* **Abdellatif AitBoudad** (`aitboudad`_).
125+
* **Abdellatif AitBoudad** (`aitboudad`_);
126+
* **Romain Neutron**.
129127

130128
Core Membership Application
131129
~~~~~~~~~~~~~~~~~~~~~~~~~~~

deployment.rst

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,25 +170,16 @@ Make sure you clear and warm-up your Symfony cache:
170170
171171
$ php bin/console cache:clear --env=prod --no-debug
172172
173-
E) Dump your Assetic Assets
174-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
175-
176-
If you're using Assetic, you'll also want to dump your assets:
177-
178-
.. code-block:: terminal
179-
180-
$ php bin/console assetic:dump --env=prod --no-debug
181-
182-
F) Other Things!
173+
E) Other Things!
183174
~~~~~~~~~~~~~~~~
184175

185176
There may be lots of other things that you need to do, depending on your
186177
setup:
187178

188179
* Running any database migrations
189180
* Clearing your APC cache
190-
* Running ``assets:install`` (already taken care of in ``composer install``)
191181
* Add/edit CRON jobs
182+
* ref:`Building and minifying your assets <how-do-i-deploy-my-encore-assets>` with Webpack Encore
192183
* Pushing assets to a CDN
193184
* ...
194185

frontend/encore/faq.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
FAQ and Common Issues
22
=====================
33

4+
.. _how-do-i-deploy-my-encore-assets:
5+
46
How do I deploy my Encore Assets?
57
---------------------------------
68

http_cache/esi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ First, to use ESI, be sure to enable it in your application configuration:
7171
7272
<!-- config/packages/framework.xml -->
7373
<?xml version="1.0" encoding="UTF-8" ?>
74-
<container xmlns="http://symfony.com/schema/dic/symfony"
74+
<container xmlns="http://symfony.com/schema/dic/services"
7575
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7676
xmlns:framework="http://symfony.com/schema/dic/symfony"
7777
xsi:schemaLocation="http://symfony.com/schema/dic/services

messenger.rst

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ the messenger component, the following configuration should have been created:
129129
130130
<!-- config/packages/messenger.xml -->
131131
<?xml version="1.0" encoding="UTF-8" ?>
132-
<container xmlns="http://symfony.com/schema/dic/symfony"
132+
<container xmlns="http://symfony.com/schema/dic/services"
133133
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
134134
xmlns:framework="http://symfony.com/schema/dic/symfony"
135135
xsi:schemaLocation="http://symfony.com/schema/dic/services
@@ -199,7 +199,7 @@ configuration:
199199
200200
<!-- config/packages/messenger.xml -->
201201
<?xml version="1.0" encoding="UTF-8" ?>
202-
<container xmlns="http://symfony.com/schema/dic/symfony"
202+
<container xmlns="http://symfony.com/schema/dic/services"
203203
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
204204
xmlns:framework="http://symfony.com/schema/dic/symfony"
205205
xsi:schemaLocation="http://symfony.com/schema/dic/services
@@ -248,7 +248,7 @@ instead of a class name:
248248
249249
<!-- config/packages/messenger.xml -->
250250
<?xml version="1.0" encoding="UTF-8" ?>
251-
<container xmlns="http://symfony.com/schema/dic/symfony"
251+
<container xmlns="http://symfony.com/schema/dic/services"
252252
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
253253
xmlns:framework="http://symfony.com/schema/dic/symfony"
254254
xsi:schemaLocation="http://symfony.com/schema/dic/services
@@ -295,7 +295,8 @@ A class of messages can also be routed to multiple senders by specifying a list:
295295
.. code-block:: xml
296296
297297
<!-- config/packages/messenger.xml -->
298-
<container xmlns="http://symfony.com/schema/dic/symfony"
298+
<?xml version="1.0" encoding="UTF-8" ?>
299+
<container xmlns="http://symfony.com/schema/dic/services"
299300
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
300301
xmlns:framework="http://symfony.com/schema/dic/symfony"
301302
xsi:schemaLocation="http://symfony.com/schema/dic/services
@@ -340,7 +341,8 @@ while still having them passed to their respective handler:
340341
.. code-block:: xml
341342
342343
<!-- config/packages/messenger.xml -->
343-
<container xmlns="http://symfony.com/schema/dic/symfony"
344+
<?xml version="1.0" encoding="UTF-8" ?>
345+
<container xmlns="http://symfony.com/schema/dic/services"
344346
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
345347
xmlns:framework="http://symfony.com/schema/dic/symfony"
346348
xsi:schemaLocation="http://symfony.com/schema/dic/services
@@ -410,7 +412,8 @@ this:
410412
.. code-block:: xml
411413
412414
<!-- config/packages/messenger.xml -->
413-
<container xmlns="http://symfony.com/schema/dic/symfony"
415+
<?xml version="1.0" encoding="UTF-8" ?>
416+
<container xmlns="http://symfony.com/schema/dic/services"
414417
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
415418
xmlns:framework="http://symfony.com/schema/dic/symfony"
416419
xsi:schemaLocation="http://symfony.com/schema/dic/services
@@ -522,7 +525,8 @@ within the buses to add some extra capabilities like this:
522525
.. code-block:: xml
523526
524527
<!-- config/packages/messenger.xml -->
525-
<container xmlns="http://symfony.com/schema/dic/symfony"
528+
<?xml version="1.0" encoding="UTF-8" ?>
529+
<container xmlns="http://symfony.com/schema/dic/services"
526530
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
527531
xmlns:framework="http://symfony.com/schema/dic/symfony"
528532
xsi:schemaLocation="http://symfony.com/schema/dic/services
@@ -579,7 +583,8 @@ you can disable them like this:
579583
.. code-block:: xml
580584
581585
<!-- config/packages/messenger.xml -->
582-
<container xmlns="http://symfony.com/schema/dic/symfony"
586+
<?xml version="1.0" encoding="UTF-8" ?>
587+
<container xmlns="http://symfony.com/schema/dic/services"
583588
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
584589
xmlns:framework="http://symfony.com/schema/dic/symfony"
585590
xsi:schemaLocation="http://symfony.com/schema/dic/services
@@ -717,7 +722,8 @@ Then you can reference and configure the
717722
.. code-block:: xml
718723
719724
<!-- config/packages/messenger.xml -->
720-
<container xmlns="http://symfony.com/schema/dic/symfony"
725+
<?xml version="1.0" encoding="UTF-8" ?>
726+
<container xmlns="http://symfony.com/schema/dic/services"
721727
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
722728
xmlns:framework="http://symfony.com/schema/dic/symfony"
723729
xsi:schemaLocation="http://symfony.com/schema/dic/services
@@ -809,17 +815,17 @@ the ``SenderInterface`` and ``ReceiverInterface``). It will look like this::
809815

810816
class YourTransport implements TransportInterface
811817
{
812-
public function send($message) : void
818+
public function send($message): void
813819
{
814820
// ...
815821
}
816822

817-
public function receive(callable $handler) : void
823+
public function receive(callable $handler): void
818824
{
819825
// ...
820826
}
821827

822-
public function stop() : void
828+
public function stop(): void
823829
{
824830
// ...
825831
}
@@ -881,7 +887,7 @@ named transport using your own DSN:
881887
882888
<!-- config/packages/messenger.xml -->
883889
<?xml version="1.0" encoding="UTF-8" ?>
884-
<container xmlns="http://symfony.com/schema/dic/symfony"
890+
<container xmlns="http://symfony.com/schema/dic/services"
885891
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
886892
xmlns:framework="http://symfony.com/schema/dic/symfony"
887893
xsi:schemaLocation="http://symfony.com/schema/dic/services

profiler/matchers.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ class in your controllers to manage the profiler programmatically::
2121
{
2222
// ...
2323

24-
public function someMethod(Profiler $profiler)
24+
public function someMethod(?Profiler $profiler)
2525
{
26-
// for this particular controller action, the profiler is disabled
27-
$profiler->disable();
26+
// $profiler won't be set if your environment doesn't have the profiler (like prod, by default)
27+
if (null !== $profiler) {
28+
// if it exists, disable the profiler for this particular controller action
29+
$profiler->disable();
30+
}
2831

2932
// ...
3033
}
@@ -37,13 +40,13 @@ create an alias pointing to the existing ``profiler`` service:
3740

3841
.. code-block:: yaml
3942
40-
# config/services.yaml
43+
# config/services_dev.yaml
4144
services:
4245
Symfony\Component\HttpKernel\Profiler\Profiler: '@profiler'
4346
4447
.. code-block:: xml
4548
46-
<!-- config/services.xml -->
49+
<!-- config/services_dev.xml -->
4750
<?xml version="1.0" encoding="UTF-8" ?>
4851
<container xmlns="http://symfony.com/schema/dic/services"
4952
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -57,7 +60,7 @@ create an alias pointing to the existing ``profiler`` service:
5760
5861
.. code-block:: php
5962
60-
// config/services.php
63+
// config/services_dev.php
6164
use Symfony\Component\HttpKernel\Profiler\Profiler;
6265
6366
$container->setAlias(Profiler::class, 'profiler');

reference/dic_tags.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ If your custom authentication factory extends
710710
:class:`Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\AbstractFactory`
711711
and your custom authentication listener extends
712712
:class:`Symfony\\Component\\Security\\Http\\Firewall\\AbstractAuthenticationListener`,
713-
then your custom authentication listener will automatically have this tagged
713+
then your custom authentication listener will automatically have this tag
714714
applied and it will function automatically.
715715

716716
security.voter

0 commit comments

Comments
 (0)