Skip to content

Commit 9437ff7

Browse files
committed
Merge remote-tracking branch 'upstream/3.3' into 3.3
2 parents 71e4c97 + 0fe340d commit 9437ff7

File tree

17 files changed

+80
-55
lines changed

17 files changed

+80
-55
lines changed

_build/redirection_map

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@
290290
/components/config/introduction /components/config
291291
/components/config/index /components/config
292292
/components/console/helpers/tablehelper /components/console/helpers/table
293+
/components/console/helpers/progresshelper /components/console/helpers/progressbar
293294
/components/console/introduction /components/console
294295
/components/console/index /components/console
295296
/components/debug/class_loader /components/debug

best_practices/templates.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ scattered through lots of bundles.
5353

5454
Use lowercased snake_case for directory and template names.
5555

56+
.. best-practice::
57+
58+
Use a prefixed underscore for partial templates in template names.
59+
60+
You often want to reuse template code using the ``include`` function to avoid
61+
redundant code. To determine those partials easily in the filesystem you should
62+
prefix partials and any other template without HTML body or ``extends`` tag
63+
with a single underscore.
64+
5665
Twig Extensions
5766
---------------
5867

bundles.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,4 @@ Learn more
181181

182182
bundles/*
183183

184-
_`third-party bundles`: https://github.com/search?q=topic%3Asymfony-bundle&type=Repositories
184+
.. _`third-party bundles`: https://github.com/search?q=topic%3Asymfony-bundle&type=Repositories

components/asset.rst

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,13 @@ any versioning::
6363

6464
$package = new Package(new EmptyVersionStrategy());
6565

66+
// Absolute path
6667
echo $package->getUrl('/image.png');
6768
// result: /image.png
69+
70+
// Relative path
71+
echo $package->getUrl('image.png');
72+
// result: image.png
6873

6974
Packages implement :class:`Symfony\\Component\\Asset\\PackageInterface`,
7075
which defines the following two methods:
@@ -105,8 +110,13 @@ suffix to any asset path::
105110

106111
$package = new Package(new StaticVersionStrategy('v1'));
107112

113+
// Absolute path
108114
echo $package->getUrl('/image.png');
109115
// result: /image.png?v1
116+
117+
// Relative path
118+
echo $package->getUrl('image.png');
119+
// result: image.png?v1
110120

111121
In case you want to modify the version format, pass a sprintf-compatible format
112122
string as the second argument of the ``StaticVersionStrategy`` constructor::
@@ -122,6 +132,9 @@ string as the second argument of the ``StaticVersionStrategy`` constructor::
122132

123133
echo $package->getUrl('/image.png');
124134
// result: /v1/image.png
135+
136+
echo $package->getUrl('image.png');
137+
// result: v1/image.png
125138

126139
Custom Version Strategies
127140
.........................
@@ -168,8 +181,12 @@ that path over and over again::
168181

169182
$package = new PathPackage('/static/images', new StaticVersionStrategy('v1'));
170183

171-
echo $package->getUrl('/logo.png');
184+
echo $package->getUrl('logo.png');
172185
// result: /static/images/logo.png?v1
186+
187+
// Base path is ignored when using absolute paths
188+
echo $package->getUrl('/logo.png');
189+
// result: /logo.png?v1
173190

174191
Request Context Aware Assets
175192
............................

components/browser_kit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,4 +233,4 @@ Learn more
233233
* :doc:`/components/dom_crawler`
234234

235235
.. _`Packagist`: https://packagist.org/packages/symfony/browser-kit
236-
.. _`Goutte`: https://github.com/fabpot/Goutte
236+
.. _`Goutte`: https://github.com/FriendsOfPHP/Goutte

components/console/helpers/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ The Console Helpers
1111
formatterhelper
1212
processhelper
1313
progressbar
14-
progresshelper
1514
questionhelper
1615
table
1716
debug_formatter

components/console/helpers/progresshelper.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

components/serializer.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ the middle. This way, Encoders will only deal with turning specific
2121
**formats** into **arrays** and vice versa. The same way, Normalizers
2222
will deal with turning specific **objects** into **arrays** and vice versa.
2323

24-
Serialization is a complicated topic, and while this component may not work
25-
in all cases, it can be a useful tool while developing tools to serialize
26-
and deserialize your objects.
24+
Serialization is a complex topic. This component may not cover all your use cases out of the box,
25+
but it can be useful for developing tools to serialize and deserialize your objects.
2726

2827
Installation
2928
------------

contributing/code/standards.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,10 @@ Naming Conventions
190190

191191
* Use namespaces for all classes;
192192

193-
* Prefix abstract classes with ``Abstract``. Please note some early Symfony classes
194-
do not follow this convention and have not been renamed for backward compatibility
195-
reasons. However all new abstract classes must follow this naming convention;
193+
* Prefix all abstract classes with ``Abstract`` except PHPUnit ``*TestCase``.
194+
Please note some early Symfony classes do not follow this convention and
195+
have not been renamed for backward compatibility reasons. However all new
196+
abstract classes must follow this naming convention;
196197

197198
* Suffix interfaces with ``Interface``;
198199

doctrine/event_listeners_subscribers.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
single: Doctrine; Event listeners and subscribers
33

44
.. _doctrine-event-config:
5+
.. _how-to-register-event-listeners-and-subscribers:
56

6-
How to Register Event Listeners and Subscribers
7-
===============================================
7+
Doctrine Event Listeners and Subscribers
8+
========================================
89

910
Doctrine packages have a rich event system that fires events when almost anything
1011
happens inside the system. For you, this means that you can create arbitrary
@@ -188,15 +189,15 @@ For a full reference, see chapter `The Event System`_ in the Doctrine documentat
188189
Lazy loading for Event Listeners
189190
--------------------------------
190191

191-
One subtle difference between listeners and subscribers is that Symfony can load
192+
One subtle difference between listeners and subscribers is that Symfony can load
192193
entity listeners lazily. This means that your listener class will only be fetched
193194
from the service container (and thus be instantiated) once the event it is linked
194195
to actually fires.
195196

196-
Lazy loading might give you a slight performance improvement when your listener
197-
runs for events that rarely fire. Also, it can help you when you run into
197+
Lazy loading might give you a slight performance improvement when your listener
198+
runs for events that rarely fire. Also, it can help you when you run into
198199
*circular dependency issues* that may occur when your listener service in turn
199-
depends on the DBAL connection.
200+
depends on the DBAL connection.
200201

201202
To mark a listener service as lazily loaded, just add the ``lazy`` attribute
202203
to the tag like so:

0 commit comments

Comments
 (0)