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

Add final annotation for AbstractAdmin method final in master #7266

Merged
merged 1 commit into from
Jun 21, 2021

Conversation

VincentLanglet
Copy link
Member

@VincentLanglet VincentLanglet commented Jun 17, 2021

Subject

Changelog

### Deprecated
- Overriding `AbstractAdmin::getDataSourceIterator()`
- Overriding `AbstractAdmin::create()`
- Overriding `AbstractAdmin::delete()`
- Overriding `AbstractAdmin::getFilterParameters()`
- Overriding `AbstractAdmin::getParentAssociationMapping()`
- Overriding `AbstractAdmin::getBaseRoutePattern()`
- Overriding `AbstractAdmin::getBaseRouteName()`
- Overriding `AbstractAdmin::getClass()`
- Overriding `AbstractAdmin::getSubClasses()`
- Overriding `AbstractAdmin::setSubClasses()`
- Overriding `AbstractAdmin::hasSubClass()`
- Overriding `AbstractAdmin::hasActiveSubClass()`
- Overriding `AbstractAdmin::getActiveSubClass()`
- Overriding `AbstractAdmin::getActiveSubclassCode()`
- Overriding `AbstractAdmin::getBatchActions()`
- Overriding `AbstractAdmin::getRoutes()`
- Overriding `AbstractAdmin::hasRoute()`
- Overriding `AbstractAdmin::isCurrentRoute()`
- Overriding `AbstractAdmin::generateObjectUrl()`
- Overriding `AbstractAdmin::generateUrl()`
- Overriding `AbstractAdmin::generateMenuUrl()`
- Overriding `AbstractAdmin::getFormBuilder()`
- Overriding `AbstractAdmin::defineFormBuilder()`
- Overriding `AbstractAdmin::attachAdminClass()`
- Overriding `AbstractAdmin::getForm()`
- Overriding `AbstractAdmin::getList()`
- Overriding `AbstractAdmin::getDatagrid()`
- Overriding `AbstractAdmin::getSideMenu()`
- Overriding `AbstractAdmin::getRootCode()`
- Overriding `AbstractAdmin::getRoot()`
- Overriding `AbstractAdmin::setBaseControllerName()`
- Overriding `AbstractAdmin::getBaseControllerName()`
- Overriding `AbstractAdmin::getMaxPerPage()`
- Overriding `AbstractAdmin::setMaxPageLinks()`
- Overriding `AbstractAdmin::getMaxPageLinks()`
- Overriding `AbstractAdmin::getFormGroups()`
- Overriding `AbstractAdmin::setFormGroups()`
- Overriding `AbstractAdmin::removeFieldFromFormGroup()`
- Overriding `AbstractAdmin::reorderFormGroup()`
- Overriding `AbstractAdmin::getFormTabs()`
- Overriding `AbstractAdmin::setFormTabs()`
- Overriding `AbstractAdmin::getShowTabs()`
- Overriding `AbstractAdmin::setShowTabs()`
- Overriding `AbstractAdmin::getShowGroups()`
- Overriding `AbstractAdmin::setShowGroups()`
- Overriding `AbstractAdmin::reorderShowGroup()`
- Overriding `AbstractAdmin::setParentFieldDescription()`
- Overriding `AbstractAdmin::getParentFieldDescription()`
- Overriding `AbstractAdmin::hasParentFieldDescription()`
- Overriding `AbstractAdmin::setSubject()`
- Overriding `AbstractAdmin::getSubject()`
- Overriding `AbstractAdmin::hasSubject()`
- Overriding `AbstractAdmin::getFormFieldDescriptions()`
- Overriding `AbstractAdmin::getFormFieldDescription()`
- Overriding `AbstractAdmin::hasFormFieldDescription()`
- Overriding `AbstractAdmin::addFormFieldDescription()`
- Overriding `AbstractAdmin::getShowFieldDescriptions()`
- Overriding `AbstractAdmin::getShowFieldDescription()`
- Overriding `AbstractAdmin::hasShowFieldDescription()`
- Overriding `AbstractAdmin::addShowFieldDescription()`
- Overriding `AbstractAdmin::removeShowFieldDescription()`
- Overriding `AbstractAdmin::getListFieldDescriptions()`
- Overriding `AbstractAdmin::hasListFieldDescription()`
- Overriding `AbstractAdmin::addListFieldDescription()`
- Overriding `AbstractAdmin::removeListFieldDescription()`
- Overriding `AbstractAdmin::getFilterFieldDescription()`
- Overriding `AbstractAdmin::hasFilterFieldDescription()`
- Overriding `AbstractAdmin::addFilterFieldDescription()`
- Overriding `AbstractAdmin::removeFilterFieldDescription()`
- Overriding `AbstractAdmin::getFilterFieldDescriptions()`
- Overriding `AbstractAdmin::addChild()`
- Overriding `AbstractAdmin::hasChild()`
- Overriding `AbstractAdmin::getChildren()`
- Overriding `AbstractAdmin::getChild()`
- Overriding `AbstractAdmin::isChild()`
- Overriding `AbstractAdmin::hasChildren()`
- Overriding `AbstractAdmin::setUniqid()`
- Overriding `AbstractAdmin::getUniqid()`
- Overriding `AbstractAdmin::getClassnameLabel()`
- Overriding `AbstractAdmin::getPersistentParameter()`
- Overriding `AbstractAdmin::setCurrentChild()`
- Overriding `AbstractAdmin::isCurrentChild()`
- Overriding `AbstractAdmin::getCurrentChildAdmin()`
- Overriding `AbstractAdmin::setTranslationDomain()`
- Overriding `AbstractAdmin::getTranslationDomain()`
- Overriding `AbstractAdmin::getTranslationLabel()`
- Overriding `AbstractAdmin::setRequest()`
- Overriding `AbstractAdmin::getRequest()`
- Overriding `AbstractAdmin::hasRequest()`
- Overriding `AbstractAdmin::getCode()`
- Overriding `AbstractAdmin::getBaseCodeRoute()`
- Overriding `AbstractAdmin::showIn()`
- Overriding `AbstractAdmin::createObjectSecurity()`
- Overriding `AbstractAdmin::isGranted()`
- Overriding `AbstractAdmin::getUrlSafeIdentifier()`
- Overriding `AbstractAdmin::getNormalizedIdentifier()`
- Overriding `AbstractAdmin::getShow()`
- Overriding `AbstractAdmin::setFormTheme()`
- Overriding `AbstractAdmin::getFormTheme()`
- Overriding `AbstractAdmin::setFilterTheme()`
- Overriding `AbstractAdmin::getFilterTheme()`
- Overriding `AbstractAdmin::addExtension()`
- Overriding `AbstractAdmin::getExtensions()`
- Overriding `AbstractAdmin::supportsPreviewMode()`
- Overriding `AbstractAdmin::determinedPerPageValue()`
- Overriding `AbstractAdmin::isAclEnabled()`
- Overriding `AbstractAdmin::setListMode()`
- Overriding `AbstractAdmin::getListMode()`
- Overriding `AbstractAdmin::getAccessMapping()`
- Overriding `AbstractAdmin::checkAccess()`
- Overriding `AbstractAdmin::hasAccess()`
- Overriding `AbstractAdmin::getActionButtons()`

@VincentLanglet VincentLanglet force-pushed the finalAdmin branch 3 times, most recently from 1b6d09b to 296fef3 Compare June 17, 2021 20:41
@VincentLanglet VincentLanglet marked this pull request as ready for review June 17, 2021 21:09
@VincentLanglet VincentLanglet requested a review from a team June 17, 2021 21:16
@VincentLanglet VincentLanglet added this to the 4.0 milestone Jun 17, 2021
Copy link
Member

@core23 core23 left a comment

Choose a reason for hiding this comment

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

👍

I'm sure that some of these methods are overridden by a few users.

@VincentLanglet
Copy link
Member Author

👍

I'm sure that some of these methods are overridden by a few users.

Yes, that's why I want to help them migrate or opening issue in order to see if we should stop making them final or proposing another extension point.

@jordisala1991 jordisala1991 merged commit 8103f8f into sonata-project:3.x Jun 21, 2021
@jordisala1991
Copy link
Member

Thanks @VincentLanglet

@tbyte80
Copy link

tbyte80 commented Aug 20, 2021

Hello,

I am overriding generateUrl to dynamically apply filter parameters in my Admin. What is the suggested replacement?

public function generateUrl($name, array $parameters = [], $absolute = RoutingUrlGeneratorInterface::ABSOLUTE_PATH)
{
    if($name == 'create') {
        $parameters = $this->getFilterParameters();
    }
    return parent::generateUrl($name, $parameters, $absolute);
}

@VincentLanglet
Copy link
Member Author

Hello,

I am overriding generateUrl to dynamically apply filter parameters in my Admin. What is the suggested replacement?

public function generateUrl($name, array $parameters = [], $absolute = RoutingUrlGeneratorInterface::ABSOLUTE_PATH)
{
    if($name == 'create') {
        $parameters = $this->getFilterParameters();
    }
    return parent::generateUrl($name, $parameters, $absolute);
}

I recommend you to create an issue explaning why you're doing this.

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.

4 participants