Skip to content
Open
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
4 changes: 4 additions & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public function getConfigTreeBuilder(): TreeBuilder
->info('If true, `groups` passed to @Model annotations will be used to limit validation constraints')
->defaultFalse()
->end()
->booleanNode('api_platform_support')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
->booleanNode('api_platform_support')
->booleanNode('api_platform')

->info('If false, the service declaration that support ApiPlatform will not be loaded even if ApiPlatform is detected in your installation')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
->info('If false, the service declaration that support ApiPlatform will not be loaded even if ApiPlatform is detected in your installation')
->info('Enable API Platform integration'')

->defaultTrue()
->end()
->arrayNode('cache')
->validate()
->ifTrue(function ($v) { return null !== $v['item_id'] && null === $v['pool']; })
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/NelmioApiDocExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function load(array $configs, ContainerBuilder $container): void
}

// ApiPlatform support
if (isset($bundles['ApiPlatformBundle']) && class_exists('ApiPlatform\Documentation\Documentation')) {
if ($config['api_platform_support'] && isset($bundles['ApiPlatformBundle']) && class_exists('ApiPlatform\Documentation\Documentation')) {
$loader->load('api_platform.xml');
}

Expand Down