Skip to content

Commit f81095b

Browse files
committed
Merge remote-tracking branch 'upstream/2.7' into 2.7
2 parents 76b5a21 + 8e7f0a1 commit f81095b

35 files changed

+187
-82
lines changed

_build/redirection_map

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@
255255
/cookbook/upgrade/minor_version /setup/upgrade_major
256256
/cookbook/upgrade/patch_version /upgrade/bundles
257257
/cookbook/validation/custom_constraint /validation/custom_constraint
258-
/cookbook/validation/group_service_resolver /validation/group_service_resolver
258+
/cookbook/validation/group_service_resolver /form/validation_group_service_resolver
259259
/cookbook/validation/index /validation
260260
/cookbook/validation/severity /validation/severity
261261
/cookbook/web_server/built_in /setup/built_in_web_server
@@ -326,3 +326,4 @@
326326
/install/bundles /setup/bundles
327327
/form /forms
328328
/testing/simulating_authentication /testing/http_authentication
329+
/validation/group_service_resolver /form/validation_group_service_resolver

components/console/logger.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The Console component comes with a standalone logger complying with the
99
be sent to the :class:`Symfony\\Component\\Console\\Output\\OutputInterface`
1010
instance passed as a parameter to the constructor.
1111

12-
The logger does not have any external dependency except ``php-fig/log``.
12+
The logger does not have any external dependency except ``psr/log``.
1313
This is useful for console applications and commands needing a lightweight
1414
PSR-3 compliant logger::
1515

components/filesystem.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ On POSIX filesystems, directories are created with a default mode value
6868

6969
This function ignores already existing directories.
7070

71+
.. note::
72+
73+
The directory permissions are affected by the current `umask`_.
74+
Set the umask for your webserver, use PHP's :phpfunction:`umask`
75+
function or use the :phpfunction:`chmod` function after the
76+
directory has been created.
77+
7178
exists
7279
~~~~~~
7380

@@ -278,3 +285,4 @@ Learn More
278285
filesystem/*
279286

280287
.. _`Packagist`: https://packagist.org/packages/symfony/filesystem
288+
.. _`umask`: https://en.wikipedia.org/wiki/Umask

components/serializer.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ class extending :class:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNorm
395395
including :class:`Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer`
396396
and :class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`::
397397

398-
use Symfony\Component\Serializer\Encoder\JsonEncoder
398+
use Symfony\Component\Serializer\Encoder\JsonEncoder;
399399
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
400400
use Symfony\Component\Serializer\Serializer;
401401

@@ -408,9 +408,9 @@ and :class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`::
408408
$obj->name = 'Acme Inc.';
409409
$obj->address = '123 Main Street, Big City';
410410

411-
$json = $serializer->serialize($obj);
411+
$json = $serializer->serialize($obj, 'json');
412412
// {"org_name": "Acme Inc.", "org_address": "123 Main Street, Big City"}
413-
$objCopy = $serializer->deserialize($json);
413+
$objCopy = $serializer->deserialize($json, Company::class, 'json');
414414
// Same data as $obj
415415

416416
.. _using-camelized-method-names-for-underscored-attributes:

components/validator/resources.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,14 @@ Using a Custom MetadataFactory
179179
------------------------------
180180

181181
All the loaders and the cache are passed to an instance of
182-
:class:`Symfony\\Component\\Validator\\Mapping\\ClassMetadataFactory`. This
183-
class is responsible for creating a ``ClassMetadata`` instance from all the
182+
:class:`Symfony\\Component\\Validator\\Mapping\\Factory\\LazyLoadingMetadataFactory`.
183+
This class is responsible for creating a ``ClassMetadata`` instance from all the
184184
configured resources.
185185

186186
You can also use a custom metadata factory implementation by creating a class
187187
which implements
188-
:class:`Symfony\\Component\\Validator\\MetadataFactoryInterface`. You can set
189-
this custom implementation using
188+
:class:`Symfony\\Component\\Validator\\Mapping\\Factory\\MetadataFactoryInterface`.
189+
You can set this custom implementation using
190190
:method:`Symfony\\Component\\Validator\\ValidatorBuilder::setMetadataFactory`::
191191

192192
use Acme\Validation\CustomMetadataFactory;

components/var_dumper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Choosing between both is mostly a matter of personal taste, still:
104104
be suited to your use case (e.g. you shouldn't use it in an HTML
105105
attribute or a ``<script>`` tag).
106106

107-
This behavior can be changed by configuring the ``dump.dump_destination``
107+
This behavior can be changed by configuring the ``debug.dump_destination``
108108
option. Read more about this and other options in
109109
:doc:`the DebugBundle configuration reference </reference/configuration/debug>`.
110110

controller/upload_file.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ automatically upload the file when persisting the entity::
332332
class BrochureUploadListener
333333
{
334334
private $uploader;
335+
private $fileName;
335336

336337
public function __construct(FileUploader $uploader)
337338
{
@@ -362,11 +363,10 @@ automatically upload the file when persisting the entity::
362363
$file = $entity->getBrochure();
363364

364365
// only upload new files
365-
if (!$file instanceof UploadedFile) {
366-
return;
366+
if ($file instanceof UploadedFile) {
367+
$fileName = $this->uploader->upload($file);
367368
}
368369

369-
$fileName = $this->uploader->upload($file);
370370
$entity->setBrochure($fileName);
371371
}
372372
}

debug/debugging.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ that can help you visualize and find the information.
7474
``debug:config``
7575
Shows all configured bundles, their class and their alias.
7676

77+
``debug:event-dispatcher``
78+
Displays information about all the registered listeners in the event dispatcher.
79+
7780
``debug:router``
7881
Displays information about all configured routes in the application as a
7982
table with the name, method, scheme, host and path for each route.

deployment/platformsh.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,14 @@ following file (it's your role to add this file to your code base)::
126126
# Store session into /tmp.
127127
ini_set('session.save_path', '/tmp/sessions');
128128

129-
Make sure this file is listed in your *imports*:
129+
Make sure this file is listed in your *imports* (after the default ``parameters.yml``
130+
file):
130131

131132
.. code-block:: yaml
132133
133134
# app/config/config.yml
134135
imports:
136+
- { resource: parameters.yml }
135137
- { resource: parameters_platform.php }
136138
137139
Deploy your Application

doctrine/associations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ When you need to fetch associated objects, your workflow looks just like it
273273
did before. First, fetch a ``$product`` object and then access its related
274274
``Category`` object::
275275

276-
use AppBundle\Entity\Post;
276+
use AppBundle\Entity\Product;
277277
// ...
278278

279279
public function showAction($productId)

0 commit comments

Comments
 (0)