Closed mvar closed 8 years ago
Here, we could use
$bundle = $this->getApplication()->getKernel()->getBundle($input->getArgument('bundle'));
$path = $bundle->getPath();
$dir = dir($path);
to get the directory of the bundle basing directly on the bundle name instead of the full namespace.
@mvar @saimaz , how do you think?
And another question: here we should have an option to indicate it is a bundle name or namespace? (in case we support importing all translation files for both bundle name and namespace)
IMO we dont need to support full namespeces. It's useless. According symfony wide practices everybody uses a short notation which is BundleName
. e.g. for Translations it would be ONGRTranslationsBundle
. And that's it.
Yup, thanks @saimaz
Closes #64
Currently import command requires "full bundle namespace". It should support short form (e.g., ONGRTranslationsBundle).
Also whole import service should be reviewed. Probably it's overcomplicated. (Tip: see
Kernel::locateResource()
.)EDIT: it looks like configuration also ask full namespaces.