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

Replace PageableManagerInterface in favor for PageableInterface #1916

Closed
wants to merge 7 commits into from

Conversation

wbloszyk
Copy link
Member

Subject

I am targeting this branch, because this change should be done here. They provide little BC-break.

Closes #1871.

Changelog

### Changed
- Change using `Sonata\Doctrine\Model\PageableManagerInterface` in favor of `Sonata\DatagridBundle\Pager\PageableInterface`
### Removed
- Removed support for `sonata-project/datagrid-bundle` < 3.0

@wbloszyk wbloszyk requested a review from a team February 17, 2021 15:34
Copy link
Member

@VincentLanglet VincentLanglet left a comment

Choose a reason for hiding this comment

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

Can you explain why the typehint are added/needed ?

@wbloszyk
Copy link
Member Author

Can you explain why the typehint are added/needed ?

Becouse *Managers are implementing Sonata\Doctrine\Model\PageableManagerInterface for pager which is deprecated in favor of Sonata\DatagridBundle\Pager\PageableInterface. In DatagridBundle 2.x all will be work. BC-break is present to allow bump DatagridBundle to v3. Otherwise update some sonata bundles will be impossible. (This which currently support only DatagridBundle v3).

@VincentLanglet
Copy link
Member

sonata-project/datagrid-bundle: ^3 was already allowed by the composer.json.
Do you mean it was not possible to install it ?

@wbloszyk
Copy link
Member Author

sonata-project/datagrid-bundle: ^3 was already allowed by the composer.json.
Do you mean it was not possible to install it ?

Sonata\Doctrine\Model\PageableManagerInterface::getPager() will allow for both DatagridBundle version (^2.0 || ^3.0)
Sonata\DatagridBundle\Pager\PageableInterface::getPager() is without type hints is in 2.x
Sonata\DatagridBundle\Pager\PageableInterface::getPager() is with type hints is in 3.x

When we change using Sonata\Doctrine\Model\PageableManagerInterface in favor of Sonata\DatagridBundle\Pager\PageableInterface we have to drop support for DatagridBundle 2.x.

UPGRADE-3.x.md Outdated Show resolved Hide resolved
UPGRADE-3.x.md Outdated Show resolved Hide resolved
UPGRADE-3.x.md Outdated Show resolved Hide resolved
@wbloszyk wbloszyk requested review from VincentLanglet, phansys and a team February 20, 2021 09:15
UPGRADE-3.x.md Outdated Show resolved Hide resolved
UPGRADE-3.x.md Outdated Show resolved Hide resolved
wbloszyk and others added 2 commits February 20, 2021 12:52
Co-authored-by: Javier Spagnoletti <[email protected]>
Co-authored-by: Javier Spagnoletti <[email protected]>
@wbloszyk wbloszyk requested review from phansys and a team February 20, 2021 11:53
Copy link
Member

@phansys phansys left a comment

Choose a reason for hiding this comment

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

IMO, breaking the signature of public methods is considered a BC break.
Is there a strong reason to introduce this break in 3.x?

@wbloszyk
Copy link
Member Author

IMO, breaking the signature of public methods is considered a BC break.
Is there a strong reason to introduce this break in 3.x?

Probably of overriding these mehods are very low. I want to reduce deprecation. I can also move this PR to master and do not display deprecations if people do not override it.

@VincentLanglet
Copy link
Member

If this is a blocking point for some needed support/fixing something. We could think about it.
If this is only for a deprecation it would be better on master indeed.

@wbloszyk wbloszyk closed this Mar 8, 2021
@wbloszyk wbloszyk deleted the update_pageable branch March 8, 2021 17:26
@wbloszyk
Copy link
Member Author

wbloszyk commented Mar 8, 2021

Close in favor of #1925

@wbloszyk wbloszyk restored the update_pageable branch March 8, 2021 21:17
@wbloszyk wbloszyk reopened this Mar 8, 2021
@wbloszyk wbloszyk closed this Mar 8, 2021
@wbloszyk wbloszyk mentioned this pull request Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants