Deployer PHP – Custom command task always failed

  command, php, task

in my Symfony 5.1 project I am trying to declare my own task which I would like to use when deploying. I created it like this:

task('update_database', function () {
        writeln('<info>Updating database</info>');
        run('{{bin/php}} {{bin/console}} d:d:c --if-not-exists');
        run('{{bin/php}} {{bin/console}} doctrine:schema:update --force');
})->desc('Make database updates');

The "cd" and the "writeln" work. But every time I try to run a command it always fails

enter image description here

I tried with just the command php bin/console instead of using {{bin/php}} {{bin/console}}.

I even tried a silly php bin/console cache:clear command to see, but same error.

Yet I am in the right directory.. I followed this tutorial

And I do the exact same thing though

Source: Ask PHP