bug #28735 [FWBundle] Automatically enable PropertyInfo when using Flex (dunglas)

This PR was merged into the 3.4 branch.

Discussion
----------

[FWBundle] Automatically enable PropertyInfo when using Flex

| Q             | A
| ------------- | ---
| Branch?       | 3.4
 Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Automatically enabling PropertyInfo when using Flex and when the component is installed has been forgotten when releasing 3.4.

It makes it very hard to debug why some features of the serializer are sometimes not working properly.

Commits
-------

0683f0ac82 [FWBundle] Automatically enable PropertyInfo when using Flex
This commit is contained in:
Fabien Potencier 2018-10-08 07:55:30 +02:00
commit dd56372fc0
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Form\Form;
use Symfony\Component\Lock\Lock;
use Symfony\Component\Lock\Store\SemaphoreStore;
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Translation\Translator;
@ -823,7 +824,7 @@ class Configuration implements ConfigurationInterface
->children()
->arrayNode('property_info')
->info('Property info configuration')
->canBeEnabled()
->{!class_exists(FullStack::class) && class_exists(PropertyInfoExtractor::class) ? 'canBeDisabled' : 'canBeEnabled'}()
->end()
->end()
;