sonata-project / SonataClassificationBundle

Symfony SonataClassificationBundle
https://docs.sonata-project.org/projects/SonataClassificationBundle
MIT License
89 stars 114 forks source link

[5.x] Admin routes are "ugly" after upgade to SonataAdmin 4 #874

Closed haivala closed 1 year ago

haivala commented 1 year ago

Does this even belong here?

This actually effects many sonata bundles like PageBundle and MediaBundle

Routes are now:

Before they were neat like this

I'm just pointing this out. Not sure If there is something we need to do about it, but in a perfect world everything would be perfect :D

jordisala1991 commented 1 year ago

This normally depends on your full classname of YOUR entities created on your code. Can you show the full classname to confirm it?

haivala commented 1 year ago

Okay! I did not know that. I have src/Entity/Sonata/SonataClassificationContext.php Which resolves to App\Entity\Sonata\SonataClassificationContext and that is in line with you comment.

What should I do to get those urls? add autoload {'Sonata\': "src/Entity/Sonata} and move the class to src/Entity/Sonata/Classification/Context.php ?

jordisala1991 commented 1 year ago

I don't think we have anything to do here. The url will depend on the name of your entity. You can call if Context instead of SonataClassificationContext (the example assumes you don't want collisions with your other entities).