Skip to content

Commit

Permalink
fix(symfony): config and DI
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Sep 25, 2024
1 parent 4f5f567 commit f932699
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->scalarNode('exists_parameter_name')->defaultValue('exists')->cannotBeEmpty()->info('The name of the query parameter to filter on nullable field values.')->end()
->scalarNode('order')->defaultValue('ASC')->info('The default order of results.')->end() // Default ORDER is required for postgresql and mysql >= 5.7 when using LIMIT/OFFSET request
->scalarNode('order_parameter_name')->defaultValue('order')->cannotBeEmpty()->info('The name of the query parameter to order results.')->end()
->enumNode('order_nulls_comparison')->defaultNull()->values(array_merge(array_keys(OrderFilterInterface::NULLS_DIRECTION_MAP), [null]))->info('The nulls comparison strategy.')->end()
->enumNode('order_nulls_comparison')->defaultNull()->values(interface_exists(OrderFilterInterface::class) ? array_merge(array_keys(OrderFilterInterface::NULLS_DIRECTION_MAP), [null]) : [null])->info('The nulls comparison strategy.')->end()
->arrayNode('pagination')
->canBeDisabled()
->addDefaultsIfNotSet()
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/Resources/config/validator/events.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</service>

<service id="api_platform.listener.view.validate_query_parameters" class="ApiPlatform\Symfony\EventListener\QueryParameterValidateListener" public="false">
<argument type="service" id="api_platform.state_provider.query_parameter_validate" />
<argument type="service" id="api_platform.state_provider.parameter_validator" />
<argument type="service" id="api_platform.metadata.resource.metadata_collection_factory" />

<tag name="kernel.event_listener" event="kernel.request" method="onKernelRequest" priority="16" />
Expand Down

0 comments on commit f932699

Please sign in to comment.