Skip to content

Stop using SonataAdmin config in doctrineORMAdmin#1427

Merged
VincentLanglet merged 2 commits into
sonata-project:3.xfrom
VincentLanglet:compiler
May 2, 2021
Merged

Stop using SonataAdmin config in doctrineORMAdmin#1427
VincentLanglet merged 2 commits into
sonata-project:3.xfrom
VincentLanglet:compiler

Conversation

@VincentLanglet
Copy link
Copy Markdown
Member

@VincentLanglet VincentLanglet commented Apr 27, 2021

Subject

I am targeting this branch, because BC.

Changelog

### Deprecated
- `templates.form` and `templates.filter` config

### Fixed
- Always merge `SonataDoctrineORMAdmin` form and filter templates.
- Using `sonata_admin` configuration.

@VincentLanglet
Copy link
Copy Markdown
Member Author

I need to wait for sonata-project/SonataAdminBundle#7127

And, @dmaicher, I need to this AFTER the AddDependencyCallsCompilerPass.php but before the AdminAddInitializeCallCompilerPass ; How do I do this ?

@dmaicher
Copy link
Copy Markdown
Contributor

And, @dmaicher, I need to this AFTER the AddDependencyCallsCompilerPass.php but before the AdminAddInitializeCallCompilerPass ; How do I do this ?

Then we should give https://github.com/sonata-project/SonataDoctrineORMAdminBundle/blob/3.x/src/SonataDoctrineORMAdminBundle.php#L30 a lower priority than 0 so it comes after https://github.com/sonata-project/SonataAdminBundle/blob/3.x/src/SonataAdminBundle.php#L55.

Like

$container->addCompilerPass(new AddTemplatesCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1);

@VincentLanglet
Copy link
Copy Markdown
Member Author

Need SonataAdmin 3.98.2

@VincentLanglet VincentLanglet added this to the 4.0 milestone May 1, 2021
@VincentLanglet VincentLanglet reopened this May 2, 2021
@VincentLanglet VincentLanglet marked this pull request as ready for review May 2, 2021 10:27
@VincentLanglet VincentLanglet requested a review from a team May 2, 2021 10:27
->end()
// NEXT_MAJOR: Remove this option.
->arrayNode('filter')
->setDeprecated('The "%node%" option is deprecated since sonata-project/admin-bundle 3.x.')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

package name should be changed to the orm bundle, same above

Comment thread src/DependencyInjection/Compiler/AddTemplatesCompilerPass.php
dmaicher
dmaicher previously approved these changes May 2, 2021
Copy link
Copy Markdown
Contributor

@dmaicher dmaicher left a comment

Choose a reason for hiding this comment

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

LGTM except for the deprecation message namings mentioned by @jordisala1991

And we need to release this soon as without it admin release 3.98.2 is a bit broken for ORM users

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