Last active
December 25, 2015 18:09
-
-
Save mgirouard/7018217 to your computer and use it in GitHub Desktop.
Symfony Helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Devify your Symfony install. | |
# | |
# Clears the cache, deploys symlinks of the public assets. | |
## | |
php app/console cache:clear &&\ | |
php app/console assets:install --symlink |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Prodify your Symfony install. | |
# | |
# Clears the cache, deploys hard copies of the public assets, and dumps | |
# assetic files to the web directory. | |
## | |
php app/console cache:clear --env=prod &&\ | |
php app/console assets:install --env=prod &&\ | |
php app/console assetic:dump --env=prod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Wipes and reloads all application data | |
## | |
php app/console doctrine:schema:drop --force &&\ | |
php app/console doctrine:schema:create &&\ | |
php app/console doctrine:fixtures:load |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Fetches a parameter from a symfony configuration | |
# Useful when you need to automate things and hand off symfony configuration | |
## | |
[[ $1 && $2 ]] || { | |
echo "Usage: yml-param <term> <file>" | |
exit 1 | |
} | |
grep $1 $2 | sed 's/^\s\+'$1':\s\+\?//' | head -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment