Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-32105: Deprecated obsolete pagination search limit configuration setting #1644

Merged
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 @@ -40,7 +40,10 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder)
->arrayNode('pagination')
->info('System pagination configuration')
->children()
->scalarNode('search_limit')->isRequired()->end()
->scalarNode('search_limit')
->isRequired()
->setDeprecated('ezsystems/ezplatform-admin-ui', '2.1', 'The child node "%node%" at path "%path%" is deprecated. Use "search.pagination.limit" instead.')
Copy link
Contributor

@Steveb-p Steveb-p Oct 27, 2020

Choose a reason for hiding this comment

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

This will trigger an error in Symfony 5.0 installations, because this method was extended in 5.1

EDIT: Well, not really an error (at least on prod), since we will provide additional, undeclared arguments, but the error message will be cryptic at best.

See:
https://github.com/symfony/symfony/blob/5.0/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php#L167

I know it triggers a deprecation notice in 5.1, but our composer files still mark 5.0 as valid.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good observation, thanks!
@lserwatka / @adamwojs should I adapt it to make it valid for Symfony 5.0 (as @Steveb-p said it will trigger deprecation notice on Symfony 5.1 though)?

->end()
->scalarNode('trash_limit')->isRequired()->end()
->scalarNode('section_limit')->isRequired()->end()
->scalarNode('language_limit')->isRequired()->end()
Expand Down