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

Mark classes as final #437

Merged
merged 1 commit into from
Oct 9, 2020
Merged

Conversation

franmomu
Copy link
Member

@franmomu franmomu commented Oct 3, 2020

Subject

Similar to sonata-project/SonataDoctrineORMAdminBundle#1127

I am targeting this branch, because these changes are BC.

Changelog

### Changed
- Mark some classes as final.

@franmomu franmomu added the minor label Oct 3, 2020
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.

I didn't take attention to https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1127/files#diff-5932af620464f5fdaec84991e9c2f0faR43

But in my personal project I override the ModelManager,

  • I override the getDataSourceIterator to use my own SourceIterator

And I think that someone could just want to override some config methods like

getDefaultSortValues
getDefaultPerPageOptions
...

How to do this if the ModelManager is final ?
cc @core23 (and @sonata-project/contributors), we may have to revert this final annotation.

@core23
Copy link
Member

core23 commented Oct 4, 2020

We decided that we make everything final by default unless someone give a good reason why they can't use service decoration.

We should decide it on an individual basis.

@VincentLanglet
Copy link
Member

We decided that we make everything final by default unless someone give a good reason why they can't use service decoration.

We should decide it on an individual basis.

Yes, that's why I gave reasons. And I was looking for confirmation that it was good reasons ^^

@VincentLanglet
Copy link
Member

Let's go with this. I'll make a new release after this merge.

@VincentLanglet VincentLanglet requested a review from a team October 8, 2020 21:28
@VincentLanglet VincentLanglet merged commit b087b4b into sonata-project:3.x Oct 9, 2020
@VincentLanglet
Copy link
Member

Thanks @franmomu

@franmomu franmomu deleted the add_php_doc branch October 9, 2020 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants