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

Restrict param type of AdminInterface identifiers methods #6311

Merged
merged 2 commits into from
Sep 2, 2020

Conversation

VincentLanglet
Copy link
Member

Subject

I am targeting this branch, because BC.

I'm introducing deprecation related to this PR: #6304

Changelog

### Deprecated
- Passing another type than `object` to `AbstractAdmin::toString`
- Passing `null` to `AbstractAdmin::getUrlSafeIdentifier`, `AbstractAdmin::getNormalizedIdentifier`, `AbstractAdmin::getId`
- Using `GetShortObjectDescriptionAction` with an empty objectId. 

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.

The deprecation path seems right to me. We need to fix the QA checks.

@VincentLanglet
Copy link
Member Author

The deprecation path seems right to me. We need to fix the QA checks.

I have two solutions:

  • Removing the deprecations since the interface does not allow null
  • Changing the interface type to allow null

Theorically null is not allowed but all our storages was allowing null, so I don't know what is the best choice.

src/Admin/AbstractAdmin.php Outdated Show resolved Hide resolved
src/Admin/AbstractAdmin.php Outdated Show resolved Hide resolved
src/Admin/AbstractAdmin.php Outdated Show resolved Hide resolved
@SonataCI
Copy link
Collaborator

Could you please rebase your PR and fix merge conflicts?

@VincentLanglet VincentLanglet merged commit 272b177 into sonata-project:3.x Sep 2, 2020
@VincentLanglet VincentLanglet deleted the addDeprecation branch September 2, 2020 09:41
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.

None yet

5 participants