Permalink
Browse files

feature #27429 [PropertyInfo] Auto-enable PropertyInfo component (sroze)

This PR was squashed before being merged into the 4.2-dev branch (closes #27429).

Discussion
----------

[PropertyInfo] Auto-enable PropertyInfo component

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ø
| License       | MIT
| Doc PR        | ø

The PropertyInfo component (used by the Serializer to provide more insights from PhpDocs, etc...) is disabled by default, not sure why. This enables it by default when the component is installed.

Commits
-------

06ea72e [PropertyInfo] Auto-enable PropertyInfo component
  • Loading branch information...
fabpot committed May 31, 2018
2 parents f603672 + 06ea72e commit c8ce780b9cbcaacc5666901fcec8de1ab5a25255
@@ -21,6 +21,7 @@
use Symfony\Component\Form\Form;
use Symfony\Component\Lock\Lock;
use Symfony\Component\Lock\Store\SemaphoreStore;
use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
use Symfony\Component\Messenger\MessageBusInterface;
use Symfony\Component\Serializer\Serializer;
@@ -833,7 +834,7 @@ private function addPropertyInfoSection(ArrayNodeDefinition $rootNode)
->children()
->arrayNode('property_info')
->info('Property info configuration')
->canBeEnabled()
->{!class_exists(FullStack::class) && interface_exists(PropertyInfoExtractorInterface::class) ? 'canBeDisabled' : 'canBeEnabled'}()
->end()
->end()
;
@@ -219,7 +219,7 @@ protected static function getBundleDefaultConfig()
'throw_exception_on_invalid_index' => false,
),
'property_info' => array(
'enabled' => false,
'enabled' => !class_exists(FullStack::class),
),
'router' => array(
'enabled' => false,
@@ -1153,12 +1153,6 @@ public function testSerializerServiceIsNotRegisteredWhenDisabled()
$this->assertFalse($container->hasDefinition('serializer'));
}
public function testPropertyInfoDisabled()
{
$container = $this->createContainerFromFile('default_config');
$this->assertFalse($container->has('property_info'));
}
public function testPropertyInfoEnabled()
{
$container = $this->createContainerFromFile('property_info');

0 comments on commit c8ce780

Please sign in to comment.