0

I have tried to add

"scripts": {
    "sym": "php bin/console", 
    }

in composer.json and made composer install after that.

However if I run sym make:migration instead of php bin/console make:migration I have an error:

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>

Did I make something wrong?

1 Answer 1

4

You have to prefix your command with composer. So composer sym make:migration will do the job with Composer.

To make your command work you don't need Composer. You have to create an executable. Create a file named sym in your project root:

#!/bin/sh
php bin/console $1

Make the file executable chmod +x sym.

./sym make:migration will work.

1
  • Thank you for wider a solution. You have helped me a lot!
    – szerz
    May 20, 2019 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.