Closed cmuench closed 11 years ago
Oh okay, cool. Ya for phar mode we don't even need to check for it. People who are using the phar aren't going to care about this anyways.
Actually I just ran across this symfony component yesterday: https://github.com/symfony/Finder#finder-component
We could do:
$iterator = $finder
->files()
->name('n98-magerun.yaml')
->depth(2)
->in(__DIR__ . '/vendor');
Bam :)
Yes, we are actually using the compontent to scan for various files. It a depth of 2 always enough? If yes, i will implement it in the next n98-magerun release. So everyone can use composer to provide n98-magerun commands.
Yes, because the module will always be under this. So I guess it's a depth of 3. Although I'm pretty sure that component will look for all files up to and including that depth. It would be even faster for us because we only need to search at the specific depth of 3.
vendor/
namespace/
modulename/
n98-magerun.yaml
It's running. Added support for that.
Please try develop branch version.
Worked perfectly. Now I can remove the manual command config steps from my install readme!
Thanks!!!
@kalenjordan The phar file makes it easy to start with n98-magerun. One problem of the vendor folder is that every package can provide a deep folder stucture. So we must scan many levels inside the vendor folder. I think it could be possible to check if we are running the phar version. If not we can inject a config loader which checks the vendor folder. The "Application" class has a method "isPharMode".