Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -995,9 +995,7 @@ private function registerArgumentResolverConfiguration(PhpFileLoader $loader): v

private function registerLinkSecurityConfiguration(PhpFileLoader $loader, array $config): void
{
if ($config['enable_link_security']) {
$loader->load('link_security.php');
}
$loader->load('link_security.php');
}

private function registerJsonStreamerConfiguration(ContainerBuilder $container, PhpFileLoader $loader, array $formats, array $config): void
Expand Down
6 changes: 5 additions & 1 deletion src/Symfony/Bundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ public function getConfigTreeBuilder(): TreeBuilder
->booleanNode('enable_docs')->defaultTrue()->info('Enable the docs')->end()
->booleanNode('enable_profiler')->defaultTrue()->info('Enable the data collector and the WebProfilerBundle integration.')->end()
->booleanNode('enable_phpdoc_parser')->defaultTrue()->info('Enable resource metadata collector using PHPStan PhpDocParser.')->end()
->booleanNode('enable_link_security')->defaultFalse()->info('Enable security for Links (sub resources)')->end()
->booleanNode('enable_link_security')
->defaultTrue()
->info('Enable security for Links (sub resources).')
->setDeprecated('api-platform/symfony', '4.2', 'This option is always enabled and will be removed in API Platform 5.0.')
->end()
->arrayNode('collection')
->addDefaultsIfNotSet()
->children()
Expand Down
1 change: 1 addition & 0 deletions tests/Fixtures/app/config/config_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ api_platform:
http_cache:
invalidation:
enabled: true
# TODO: remove in 5.0
enable_link_security: true
# see also defaults in AppKernel
doctrine_mongodb_odm: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ private function runDefaultConfigTests(array $doctrineIntegrationsToLoad = ['orm
],
'use_symfony_listeners' => false,
'handle_symfony_errors' => false,
'enable_link_security' => false,
// TODO: remove in 5.0
'enable_link_security' => true,
'serializer' => [
'hydra_prefix' => null,
],
Expand Down
Loading