Sonataadminbundle: Controllers Should Not Be Referenced With Single Colon Syntax

Created on 10 Sep 2018  路  3Comments  路  Source: sonata-project/SonataAdminBundle

Feature Request

Symfony 4.1 deprecates bundle notation (e.g. SonataAdminBundle:CRUS:export) - https://symfony.com/blog/new-in-symfony-4-1-deprecated-the-bundle-notation. The change causes a lot of E_USER_DEPRECATED:
image

While it doesn't break anything it will be good to fix this by simply replacing : with :: when controllers are references.
This is a similar issue to e.g. https://github.com/FriendsOfSymfony/FOSRestBundle/issues/1897

I'm not that famillar with Sonata codebase, but I see this syntax is really only used in https://github.com/sonata-project/SonataAdminBundle/blob/312593909ca0b21cf723e07660b966a15a385916/src/DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php#L63-L65

Easy Pick

Most helpful comment

I'm all about those easy picks.

All 3 comments

Can you try changing it directly in your vendor files and running the command again, to confirm your hypothesis?

@greg0ire Yes, in terms of AdminBundle it fixes the problem, now we need a separate issue for MediaBundle:

image

I'm all about those easy picks.

Was this page helpful?
0 / 5 - 0 ratings