Outils pour utilisateurs

Outils du site


tech:notes_php_symphony

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
tech:notes_php_symphony [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:notes_php_symphony [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon Php Web}}
 +
 +# Notes PHP symphony
 +
 +Point à vérifier si MEP (Mise En Production)
 +* http://www.symfony2-checklist.com/fr
 +
 +symfony1 :
 +* https://github.com/LExpress/symfony1
 +
 +~~~bash
 +#composer require lexpress/symfony1 "1.5.*"
 +composer create-project lexpress/symfony1 sf1
 +composer create-project symfony/framework-standard-edition sf2
 +~~~
 +
 +
 +## Notes composer 
 +
 +
 +~~~bash
 +#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`
 +~~~javascript
 +{
 +    "require": {
 +        "monolog/monolog": "1.0.*"
 +    }
 +}
 +~~~
 +
 +
 +## Vider le cache
 +
 +Une façon comme une autre
 +
 +~~~bash
 +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
 +~~~bash
 +cd /var/www/MonApp
 +php app/console cache:clear --env=prod
 +chown -R apache: ./app/cache
 +~~~
 +
 +Vider le cache sur Symphony 1
 +~~~bash
 +su - apache
 +cd /var/www/MonApp
 +php symfony cc
 +exit
 +~~~
 +
 +
 +### Autre
 +
 +(Symfony 1)
 +~~~bash
 +symfony plugin:publish-assets
 +~~~
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki