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

Conversation

kmadejski
Copy link
Member

@kmadejski kmadejski commented Oct 27, 2020

Question Answer
Tickets EZP-32105
Bug fix? yes
New feature? no
BC breaks? yes/no
Tests pass? yes
Doc needed? no
License GPL-2.0

As requested in ezsystems/ezplatform-search#12

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

->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)?

@lserwatka lserwatka merged commit 88e2786 into 2.1 Oct 28, 2020
@lserwatka lserwatka deleted the EZP-32105_Deprecated_obsolete_pagination_search_limit_configuration_setting branch October 28, 2020 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants