Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect dependencies on console commands #33

Open
norgeindian opened this issue Oct 13, 2022 · 3 comments
Open

Detect dependencies on console commands #33

norgeindian opened this issue Oct 13, 2022 · 3 comments

Comments

@norgeindian
Copy link

I know, this surely not easy to implement, but it would be awesome, if usages of console commands could be detected.
So for example, we have a module, which calls the regenerate:category:path from https://github.com/elgentos/magento2-regenerate-catalog-urls/blob/master/src/Console/Command/RegenerateCategoryPathCommand.php.

Nothing else from Elgentos_RegenerateCatalogUrls is used, only this console command.
So we definitely have a dependency here, which is not detected.
If there would be any way to solve that, it would be really appreciated.

@sprankhub
Copy link
Contributor

The code pretty much looks like this:

$urlPathRegenerateCommand = $application->find('regenerate:category:path');
$input                    = new ArrayInput(['cids' => $categoryIds, '--store' => 'all']);
$output                   = new NullOutput();
$urlPathRegenerateCommand->run($input, $output);

@jissereitsma
Copy link
Contributor

I've picked this up in version 2.2.2 which should now be able to detect CLI dependencies (scanning for find()).

@sprankhub
Copy link
Contributor

Nice - I guess we can close this, then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants