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

Avoid error when no model managers are available #8082

Merged
merged 2 commits into from
Jul 22, 2023

Conversation

jordisala1991
Copy link
Member

Subject

When there are no model managers, you can end up with an error because of an undefined abstract argument on a service.
This PR fixes that error.

I am targeting this branch, because this is BC.

Closes #8081.

Changelog

### Fixed
- Installing SonataAdminBundle without any persistence does not throw missing abstract argument definition

@jordisala1991
Copy link
Member Author

@rhidja @bartoszstrzala can you check if it fixes the error (even if you fixed it installing a persistence bundle)

@jordisala1991
Copy link
Member Author

There error with PHPStan is due to this: phpstan/phpstan#9567

So is a problem with the types on Twig side...

@VincentLanglet
Copy link
Member

We should see if an issue exist on twig side or open one and then ignore the error on our side

@VincentLanglet
Copy link
Member

We should see if an issue exist on twig side or open one and then ignore the error on our side

I opened twigphp/Twig#3856

@VincentLanglet VincentLanglet merged commit 6ce22eb into 4.x Jul 22, 2023
22 of 23 checks passed
@VincentLanglet VincentLanglet deleted the jordisala1991-patch-1 branch July 22, 2023 13:33
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.

Argument 2 of service "sonata.admin.maker" is abstract: available model managers
2 participants