我试图添加
"scripts": {
"sym": "php bin/console",
}
在 composer.json 中,然后制作composer install
。
但是,如果我运行sym make:migration
而不是php bin/console make:migration
我有一个错误:
Command 'sym' not found, did you mean:
command 'sem' from deb parallel
command 'sm' from deb sm
command 'vym' from deb vym
command 'sys' from deb openafs-client
command 'sum' from deb coreutils
command 'syf' from deb alliance
command 'spm' from deb salt-common
command 'srm' from deb secure-delete
command 'scm' from deb scm
Try: sudo apt install <deb name>
我做错了什么吗?
您必须在命令前加上composer
. 所以,composer sym make:migration
将做的工作与作曲家。
为了使您的命令工作,您不需要 Composer。您必须创建一个可执行文件。创建一个sym
在项目根目录中命名的文件:
#!/bin/sh
php bin/console $1
使文件可执行chmod +x sym
。
./sym make:migration
将工作。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句