Symfony Peeve: Inconsistent Namespace References

One thing that peeves me about Symfony is that it’s inconsistent in how it expects the user to refer to what’s seemingly the same thing.

For instance, if you want to create a bundle with the command-line tool, you would do something like this.

php app/console generate:bundle --namespace=Acme/Bundle/BlogBundle

That’s fine, but then when you want to create a controller in this bundle, you do this.

php app/console generate:controller --controller=AcmeBundleBlogBundle:Post

I’m sure there’s some totally legit reason for referencing the namespace (Acme/Bundle/BlogBundle) with slashes in one instance and without in the other, but it’s annoying to have to always be asking yourself, “Is it with the slashes or without when I create a controller?”

It’s probably just me, but whenever I guess, I’m invariably wrong 50 percent of the time.

Share Button