Notes PHP symphony

Point à vérifier si MEP (Mise En Production)

http://www.symfony2-checklist.com/fr

symfony1 :

https://github.com/LExpress/symfony1

#composer require lexpress/symfony1 "1.5.*" composer create-project lexpress/symfony1 sf1 composer create-project symfony/framework-standard-edition sf2

Notes composer

#mkdir $HOME/htdocs/bin/ #export COMPOSER_HOME=$HOME/htdocs/bin/ cd /usr/local/bin/ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');" mv composer.phar composer

Voir https://getcomposer.org/download/

Exemple :

composer.json

{ "require": { "monolog/monolog": "1.0.*" } }

Vider le cache

Une façon comme une autre

rm -rf /var/www/MonApp/cache/*

Pb PHP Symphony cache app.php

https://openclassrooms.com/forum/sujet/symfony2-app-php-ne-marche-pas-76345

Vider le cache sur Symphony 2

cd /var/www/MonApp php app/console cache:clear --env=prod chown -R apache: ./app/cache

Vider le cache sur Symphony 1

su - apache cd /var/www/MonApp php symfony cc exit

Autre

(Symfony 1)

symfony plugin:publish-assets