Save time and reduce typing errors on working in console
$ nano /usr/local/bin/sf if [ -z "$1" ]; then echo "Missing parameters." echo "Usage: $0 --midiff, --mi or --buall" exit 0 fi case "$1" in "--cc" ) php symfony cc ;; "--midiff" ) php symfony doctrine:generate-migrations-diff ;; "--mi" ) php symfony doctrine:migrate ;; "--buall" ) php symfony doctrine:build --all-classes ;; "--busql" ) php symfony doctrine:build-sql ;; "--inssql" ) php symfony doctrine:insert-sql ;; "--puass" ) php symfony plugin:publish-assets ;; esac exit 0
Usage:
For example: you need modify your schema, migrate, rebuild all classes and clear cache.
$ sf --midiff $ sf --mi $ sf --buall $ sf --cc