Executing command (CWD): MyVendor\MyCommand sh: MyVendorMyCommand not found #11266
-
Hello, I tried to follow docs https://getcomposer.org/doc/articles/scripts.md#writing-custom-commands But seems it ends up on sh not found, I already run the -vvv here is the result :
I copy paste it and follow the docs as it's, if I call the execute() function, it do recognize the class, just it can't call the function/method of the class, because it's not static, but... if I put a static class, there with \Composer\Script\Event param then it will be called as it's... The project is a laravel based project, if it's worth mentioning. For sample project that doesn't use laravel, but plain cli composer project is https://github.com/benyaminl/broken-composer-cli, resulting in same behavior. I hope some pointer to check why it's not working, and I also already put the MyVendor location in composer.json, so it is not the issue, as it recognized the class... Any help appreciated, thank you 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
NVM.. seems I do mistake.. there are phrase on the docs said : To be detected as symfony/console commands the class name must end with Command and extend symfony's Command class. Sadly it's neither bold or italic... :/ well.. I hope it being bold, It's my bad, or my wrong doing not to read it thoroughly... Thank you |
Beta Was this translation helpful? Give feedback.
NVM.. seems I do mistake.. there are phrase on the docs said :
Sadly it's neither bold or italic... :/ well.. I hope it being bold, It's my bad, or my wrong doing not to read it thoroughly... Thank you