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 support for the model_class attribute & fix compiler pass argument error #1631

Merged
merged 2 commits into from
Feb 14, 2022
Merged

Add support for the model_class attribute & fix compiler pass argument error #1631

merged 2 commits into from
Feb 14, 2022

Conversation

nocive
Copy link
Contributor

@nocive nocive commented Feb 14, 2022

Subject

I am targeting this branch, because it's a backwards compatible change.

Fixes

In Definition.php line 321:
                                                                                               
  [Symfony\Component\DependencyInjection\Exception\OutOfBoundsException]                       
  The argument "1" doesn't exist in class "My\Sonata\AdminClass".  
                                                                                               

Exception trace:
  at /src/application/core/vendor/symfony/dependency-injection/Definition.php:321
 Symfony\Component\DependencyInjection\Definition->getArgument() at /src/application/core/vendor/sonata-project/doctrine-orm-admin-bundle/src/DependencyInjection/Compiler/AddAuditEntityCompilerPass.php:52
 Sonata\DoctrineORMAdminBundle\DependencyInjection\Compiler\AddAuditEntityCompilerPass->process() at /src/application/core/vendor/symfony/dependency-injection/Compiler/Compiler.php:82

When using the model_class tag attribute, rather than using explicit indexed arguments.

Changelog

### Fixed
- Support for the `model_class` attribute for sonata admin classes in `AddAuditEntityCompilerPass`.

@nocive nocive changed the title Add support for model_class attribute & fix compiler pass argument error Add support for the model_class attribute & fix compiler pass argument error Feb 14, 2022
@nocive
Copy link
Contributor Author

nocive commented Feb 14, 2022

cc @VincentLanglet

@VincentLanglet VincentLanglet marked this pull request as ready for review February 14, 2022 12:56
VincentLanglet
VincentLanglet previously approved these changes Feb 14, 2022
@VincentLanglet VincentLanglet requested a review from a team February 14, 2022 12:56
jordisala1991
jordisala1991 previously approved these changes Feb 14, 2022
Co-authored-by: Jordi Sala Morales <jordism91@gmail.com>
@nocive nocive dismissed stale reviews from jordisala1991 and VincentLanglet via a27e214 February 14, 2022 14:17
@VincentLanglet VincentLanglet merged commit 0435621 into sonata-project:4.x Feb 14, 2022
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