64 lines
1.5 KiB
Markdown
64 lines
1.5 KiB
Markdown
# Practice Symfony
|
|
|
|
<http://symfony.com/>
|
|
|
|
## Prérequis
|
|
|
|
### Apache
|
|
|
|
Symfony contient des fichiers `.htaccess` avec des directives DirectoryIndex, Options -MultiViews, Rewrite*, Deny.
|
|
|
|
La configuration Apache du VirtualHost doit donc contenir au minimum :
|
|
|
|
~~~{.apache}
|
|
AllowOverride Limit FileInfo Indexes Options=All,MultiViews
|
|
~~~
|
|
|
|
### PHP
|
|
|
|
<http://symfony.com/doc/current/reference/requirements.html>
|
|
|
|
Le paquet **php5-json** doit être installé.
|
|
|
|
Il faut indiquer le paramètre `date.timezone = "Europe/Paris"` dans les fichiers de configuration PHP :
|
|
|
|
- `/etc/php5/apache2/php.ini`
|
|
- `/etc/php5/cli/php.ini`
|
|
|
|
## Installation
|
|
|
|
~~~
|
|
$ echo '{"require": {{"symfony/framework-standard-edition": "~3.3"}}' > composer.json
|
|
$ composer update
|
|
Loading composer repositories with package information
|
|
[...]
|
|
|
|
$ cd vendor/symfony/framework-standard-edition
|
|
|
|
$ composer install
|
|
Loading composer repositories with package information
|
|
Installing dependencies (including require-dev) from lock file
|
|
- Installing doctrine/lexer (v1.0.1)
|
|
Loading from cache
|
|
[...]
|
|
~~~
|
|
|
|
Pour tester la configuration, des tests peuvent être lancés ainsi :
|
|
|
|
~~~
|
|
$ cd vendor/symfony/framework-standard-edition
|
|
$ php bin/symfony_requirements
|
|
|
|
Symfony Requirements Checker
|
|
|
|
> PHP is using the following php.ini file:
|
|
/etc/php/7.0/cli/php.ini
|
|
|
|
> Checking Symfony requirements:
|
|
................................W........
|
|
|
|
[OK]
|
|
Your system is ready to run Symfony projects
|
|
[...]
|
|
~~~
|