Skip to content

Commit 91aa6de

Browse files
committed
Merge branch '3.3' into 3.4
* 3.3: Fixed the priority of the sticky locale example Fixed a minor syntax issue in a VarDumper article Fixed the types of some options in Collection constraint Update finder.rst Handler formatter example was using wrong defined service Update doctrine.rst Add example for Finder::exclude Update form_csrf_caching.rst do never fetch private services from the container
2 parents 483a301 + 88b7768 commit 91aa6de

File tree

8 files changed

+34
-29
lines changed

8 files changed

+34
-29
lines changed

components/finder.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Each pattern has to resolve to at least one directory path.
108108
Exclude directories from matching with the
109109
:method:`Symfony\\Component\\Finder\\Finder::exclude` method::
110110

111+
// directories passed as argument must be relative to the ones defined with the in() method
111112
$finder->in(__DIR__)->exclude('ruby');
112113

113114
It's also possible to ignore directories that you don't have permission to read::

components/var_dumper/advanced.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -383,23 +383,23 @@ thus to dumpers. To help you do this (see the source code for how it works),
383383
the component comes with a set of wrappers for common additional semantics. You
384384
can use:
385385

386-
* :class:`Symfony\\Component\\VarDumper\\Caster\\ConstStub` to wrap a value that is
387-
best represented by a PHP constant;
388-
* :class:`Symfony\\Component\\VarDumper\\Caster\\ClassStub` to wrap a PHP identifier
389-
(*i.e.* a class name, a method name, an interface, *etc.*);
390-
* :class:`Symfony\\Component\\VarDumper\\Caster\\CutStub` to replace big noisy
391-
objects/strings/*etc.* by ellipses;
392-
* :class:`Symfony\\Component\\VarDumper\\Caster\\CutArrayStub` to keep only some
393-
useful keys of an array;
394-
* :class:`Symfony\\Component\\VarDumper\\Caster\\EnumStub` to wrap a set of virtual
395-
values (*i.e.* values that do not exist as properties in the original PHP data
396-
structure, but are worth listing alongside with real ones);
397-
* :class:`Symfony\\Component\\VarDumper\\Caster\\LinkStub` to wrap strings that can
398-
be turned into links by dumpers;
399-
* :class:`Symfony\\Component\\VarDumper\\Caster\\TraceStub` and their
400-
* :class:`Symfony\\Component\\VarDumper\\Caster\\FrameStub` and
401-
* :class:`Symfony\\Component\\VarDumper\\Caster\\ArgsStub` relatives to wrap PHP
402-
traces (used by :class:`Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster`).
386+
* :class:`Symfony\\Component\\VarDumper\\Caster\\ConstStub` to wrap a value that is
387+
best represented by a PHP constant;
388+
* :class:`Symfony\\Component\\VarDumper\\Caster\\ClassStub` to wrap a PHP identifier
389+
(*i.e.* a class name, a method name, an interface, *etc.*);
390+
* :class:`Symfony\\Component\\VarDumper\\Caster\\CutStub` to replace big noisy
391+
objects/strings/*etc.* by ellipses;
392+
* :class:`Symfony\\Component\\VarDumper\\Caster\\CutArrayStub` to keep only some
393+
useful keys of an array;
394+
* :class:`Symfony\\Component\\VarDumper\\Caster\\EnumStub` to wrap a set of virtual
395+
values (*i.e.* values that do not exist as properties in the original PHP data
396+
structure, but are worth listing alongside with real ones);
397+
* :class:`Symfony\\Component\\VarDumper\\Caster\\LinkStub` to wrap strings that can
398+
be turned into links by dumpers;
399+
* :class:`Symfony\\Component\\VarDumper\\Caster\\TraceStub` and their
400+
* :class:`Symfony\\Component\\VarDumper\\Caster\\FrameStub` and
401+
* :class:`Symfony\\Component\\VarDumper\\Caster\\ArgsStub` relatives to wrap PHP
402+
traces (used by :class:`Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster`).
403403

404404
For example, if you know that your ``Product`` objects have a ``brochure`` property
405405
that holds a file name or a URL, you can wrap them in a ``LinkStub`` to tell

http_cache/form_csrf_caching.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ Another option would be to load the form via an uncached AJAX request, but
3636
cache the rest of the HTML response.
3737

3838
Or you can even load just the CSRF token with an AJAX request and replace the
39-
form field value with it.
39+
form field value with it. Take a look at :doc:`hinclude.js </templating/hinclude>`
40+
for a nice solution.
4041

4142
.. _`Cross-site request forgery`: http://en.wikipedia.org/wiki/Cross-site_request_forgery
4243
.. _`Security CSRF Component`: https://github.com/symfony/security-csrf

logging/processors.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Finally, set the formatter to be used on whatever handler you want:
139139
type="stream"
140140
path="%kernel.logs_dir%/%kernel.environment%.log"
141141
level="debug"
142-
formatter="app.logger.session_request_processor"
142+
formatter="monolog.formatter.session_request"
143143
/>
144144
</monolog:config>
145145
</container>
@@ -153,7 +153,7 @@ Finally, set the formatter to be used on whatever handler you want:
153153
'type' => 'stream',
154154
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
155155
'level' => 'debug',
156-
'formatter' => 'app.logger.session_request_processor',
156+
'formatter' => 'monolog.formatter.session_request',
157157
),
158158
),
159159
));

reference/configuration/doctrine.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ Full Default Configuration
3131
port: ~
3232
user: root
3333
password: ~
34+
# charset of the database
3435
charset: ~
36+
# charset and collation of the tables. Not inherited from database
37+
default_table_options:
38+
charset: ~
39+
collate: ~
3540
path: ~
3641
memory: ~
3742

reference/constraints/Collection.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ error will be returned. If set to ``true``, extra fields are ok.
310310
extraFieldsMessage
311311
~~~~~~~~~~~~~~~~~~
312312

313-
**type**: ``boolean`` **default**: ``This field was not expected.``
313+
**type**: ``string`` **default**: ``This field was not expected.``
314314

315315
The message shown if `allowExtraFields`_ is false and an extra field is
316316
detected.
@@ -328,7 +328,7 @@ option are not present in the underlying collection.
328328
missingFieldsMessage
329329
~~~~~~~~~~~~~~~~~~~~
330330

331-
**type**: ``boolean`` **default**: ``This field is missing.``
331+
**type**: ``string`` **default**: ``This field is missing.``
332332

333333
The message shown if `allowMissingFields`_ is false and one or more fields
334334
are missing from the underlying collection.

service_container/alias_private.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,15 @@ gives you better errors: if you try to reference a non-existent service, you wil
6565
get a clear error when you refresh *any* page, even if the problematic code would
6666
not have run on that page.
6767

68-
Now that the service is private, you *should not* fetch the service directly
68+
Now that the service is private, you *must not* fetch the service directly
6969
from the container::
7070

7171
use AppBundle\Service\Foo;
7272

7373
$container->get(Foo::class);
7474

75-
This *may or may not work*, depending on how the container has optimized the
76-
service instantiation and, even in the cases where it works, this possibility is
77-
deprecated. Simply said: A service should be marked as private if you do not want
78-
to access it directly from your code.
75+
Simply said: A service can be marked as private if you do not want to access
76+
it directly from your code.
7977

8078
However, if a service has been marked as private, you can still alias it
8179
(see below) to access this service (via the alias).

session/locale_sticky_session.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ correct locale however you want::
5252
public static function getSubscribedEvents()
5353
{
5454
return array(
55-
// must be registered after the default Locale listener
56-
KernelEvents::REQUEST => array(array('onKernelRequest', 15)),
55+
// must be registered before (i.e. with a higher priority than) the default Locale listener
56+
KernelEvents::REQUEST => array(array('onKernelRequest', 20)),
5757
);
5858
}
5959
}

0 commit comments

Comments
 (0)