Skip to content

Instantly share code, notes, and snippets.

View afiocre's full-sized avatar

Alexandre Fiocre afiocre

View GitHub Profile
@afiocre
afiocre / Commandes GIT
Last active August 29, 2015 14:00
Commandes GIT
Aide en ligne: http://byte.kde.org/~zrusin/git/git-cheat-sheet-medium.png
*** Commandes de base ***
git checkout -b <branch> (change de branche en la copiant depuis origine)
git checkout <branch> (change de branche)
git checkout <fichier> (remet le fichier à l'état de la branche)
git branch -a (voir tles branches + les remotes local)
git merge <branch> (rebase la branche vers la branche en cours)
git rebase <branch> (rebase la branche vers la branche en cours)

##Chargement automatique d'un objet dans une action de controleur

Avant

/**
 * @Route("/{id}/edit", name="route_edit")
 */
public function editAction($id)
{

$em = $this->getDoctrine()->getManager();

** INSTALL / MAJ **
php composer.phar create-project symfony/framework-standard-edition symfony24
php composer.phar self-update
php composer.phar install
php composer.phar update
** VIDER LE CACHE **
php app/console cache:clear
** GENERATION DU BUNDLE **