From c1bf2094628a53a9e30e437c62b3335abedd7725 Mon Sep 17 00:00:00 2001 From: Manuel Transfeld Date: Tue, 28 May 2019 18:19:00 +0200 Subject: [PATCH] Add support for Symfony Client Symfony has a new [Symfony Client](https://github.com/symfony/cli), which is a binary called `symfony`. You can use `symfony console` the same way as the old way with `php bin/console` with an incredible difference: It loads a local `php.ini`. [docs](https://symfony.com/doc/current/setup/symfony_server.html#overriding-php-config-options-per-project) --- plugins/symfony2/symfony2.plugin.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 1498e8d02..1c52008ee 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -1,7 +1,13 @@ # Symfony2 basic command completion _symfony_console () { - echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)" + if [ -x symfony ]; then + echo "./symfony console" + else if command -v symfony >/dev/null 2>&1; then + echo "$(command -v symfony) console" + else + echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)" + fi } _symfony2_get_command_list () {