[`$bundleInstance->getPath()`](http://api.symfony.com/2.3/Symfony/Component/HttpKernel/Bundle/BundleInterface.html#method_getPath) would be probably better than `dirname($reflection->getFilename())`.