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 missing method to AbstractAdminExtension #6911

Merged
merged 1 commit into from
Mar 5, 2021

Conversation

core23
Copy link
Member

@core23 core23 commented Mar 5, 2021

Subject

I am targeting this branch, because this is a patch.

Fixes #6873

Changelog

### Added
- Added `AbstractAdminExtension::configurePersistentParameters()` method stub

@core23 core23 added the patch label Mar 5, 2021
@core23 core23 requested a review from a team March 5, 2021 08:20
@VincentLanglet
Copy link
Member

This is a BC break: #6897 (comment)

But a solution could be

public function configurePersistentParameters(AdminInterface $admin, array $parameters): array
{
    // NEXT_MAJOR: Return $parameters instead.
    return array_merge($parameters, $this->getPersistentParameters($admin));
}

@core23 core23 force-pushed the fix-configure branch 2 times, most recently from 8a761a3 to fbffa34 Compare March 5, 2021 08:59
@VincentLanglet
Copy link
Member

I think the static analysis come from the fact there is no phpdoc for this method:

* @method array configurePersistentParameters(AdminInterface $admin, array $parameters)

So we have to add

/**
 * NEXT_MAJOR: Remove this phpdoc.
 *
 * @phpstan-param AdminInterface<T>
 */

@VincentLanglet VincentLanglet requested a review from a team March 5, 2021 09:32
@wbloszyk wbloszyk requested a review from a team March 5, 2021 11:26
@core23 core23 merged commit b67a89c into sonata-project:3.x Mar 5, 2021
@core23 core23 deleted the fix-configure branch March 5, 2021 15:52
@SonataCI
Copy link
Collaborator

SonataCI commented Mar 5, 2021

Ok @core23,

I requested a new release for SonataAdminBundle via Slack in #releases channel 👍

If you want to get notified about new releases, make sure to follow SonataNews on Twitter!

@sonata-project sonata-project deleted a comment from core23 Mar 5, 2021
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