Différences

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

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
prog:symfony:installer_symfony [15/09/2019 15:55]
thierry ↷ Page déplacée de prog:php:symfony:installer_symfony à prog:symfony:installer_symfony
prog:symfony:installer_symfony [30/09/2019 18:49] (Version actuelle)
thierry
Ligne 1: Ligne 1:
 ====== Installer Symfony ====== ====== Installer Symfony ======
-Dans un premier temps il faut que [[technos:​php:​composer#​installation_de_composer|Composer ​soit installé]] sur votre système.+<note important>​Sur cette page est décrite une ancienne façon d'​installer Symfony grâce à ''​Composer''​.
  
-Ensuite rendez-vous dans le répértoire contenant votre composer.phar et executez:+Maintenant il existe Symfony CLI 
 + 
 +[[prog:​symfony:​installer_symfony_cli]]</​note>​ 
 +Dans un premier temps il faut que [[prog:​php:​composer:​installation#​installation_de_composer|Composer soit installé]] sur votre système. 
 + 
 +Ensuite ​sous LINUX : rendez-vous dans le répértoire contenant votre composer.phar et executez:
 <​code>​php composer.phar create-project symfony/​website-skeleton mon-projet <​code>​php composer.phar create-project symfony/​website-skeleton mon-projet
 </​code>​ </​code>​
 Là composer installe le projet dans le répértoire ''​mon-projet''​. Là composer installe le projet dans le répértoire ''​mon-projet''​.
 +
 +Sous WINDOWS : Rendez vous dans le répértoire de base qui contiendra le répertoire de travail de votre projet et tapez :
 +<code php>
 +composer create-project symfony/​website-skeleton nom-du-repertoire-du-projet
 +</​code>​
 +''​nom-du-repertoire-du-projet''​ est le nom du répertoire qui va etre créé par Composer dans le répertoire courant.
  
 Si il donne des erreurs, réglez les. C'est souvent un manque d'​extension PHP. Si il donne des erreurs, réglez les. C'est souvent un manque d'​extension PHP.
  
 Résultat: Résultat:
-<​code>​ +<​code ​php>D:​\webprojects>​composer create-project symfony/​website-skeleton test-api-project 
-Installing symfony/​website-skeleton (v4.1.6.2+Installing symfony/​website-skeleton (v4.3.99
-  - Installing symfony/​website-skeleton (v4.1.6.2): Loading from cache +  - Installing symfony/​website-skeleton (v4.3.99): Downloading (100%) 
-Created project in protic-sadmin+Created project in test-api-project
 Loading composer repositories with package information Loading composer repositories with package information
-Installing ​dependencies (including require-dev) ​from lock file +Updating ​dependencies (including require-dev) 
-Package operations: ​94 installs, 0 updates, 0 removals +Package operations: ​1 install, 0 updates, 0 removals 
-  - Installing ​ocramius/package-versions ​(1.3.0): Downloading (100%) +  - Installing ​symfony/flex (v1.4.6): Downloading (100%
-  - Installing ​symfony/​flex (v1.1.1): Downloading ​(100%)+Symfony operations: 1 recipe (0216ef10f1722e46db96c3cadf9b7a02
 +  - Configuring ​symfony/​flex (>=1.0): From github.com/​symfony/​recipes:​master 
 +Loading composer repositories with package information 
 +Updating dependencies ​(including require-dev) 
 +Restricting packages listed in "​symfony/​symfony"​ to "​4.3.*"​
  
-Prefetching ​91 packages ​🎶 💨+Prefetching ​103 packages ​
   - Downloading (100%)   - Downloading (100%)
  
-  ​- Installing ​symfony/polyfill-mbstring ​(v1.9.0): Loading from cache +Package operations: 103 installs, 0 updates, 0 removals 
-  - Installing doctrine/​lexer (v1.0.1): Loading from cache +  ​- Installing ​ocramius/package-versions ​(1.5.1): Loading from cache 
-  - Installing doctrine/​annotations (v1.6.0): Loading from cache+  - Installing doctrine/​lexer (1.1.0): Loading from cache 
 +  - Installing doctrine/​annotations (v1.7.0): Loading from cache
   - Installing doctrine/​reflection (v1.0.0): Loading from cache   - Installing doctrine/​reflection (v1.0.0): Loading from cache
   - Installing doctrine/​event-manager (v1.0.0): Loading from cache   - Installing doctrine/​event-manager (v1.0.0): Loading from cache
-  - Installing doctrine/​collections (v1.5.0): Loading from cache+  - Installing doctrine/​collections (v1.6.2): Loading from cache
   - Installing doctrine/​cache (v1.8.0): Loading from cache   - Installing doctrine/​cache (v1.8.0): Loading from cache
-  - Installing doctrine/​persistence (v1.0.1): Loading from cache +  - Installing doctrine/​persistence ​(1.1.1): Loading from cache 
-  - Installing ​doctrine/inflector ​(v1.3.0): Loading from cache +  - Installing symfony/​polyfill-php73 ​(v1.12.0): Loading from cache 
-  - Installing ​doctrine/common ​(v2.9.0): Loading from cache +  - Installing symfony/​polyfill-mbstring (v1.12.0): Loading from cache 
-  - Installing symfony/doctrine-bridge ​(v4.1.6): Loading from cache +  - Installing ​symfony/polyfill-php72 ​(v1.12.0): Loading from cache 
-  - Installing ​doctrine/doctrine-cache-bundle ​(1.3.3): Loading from cache +  - Installing symfony/​polyfill-intl-idn (v1.12.0): Loading from cache 
-  - Installing ​doctrine/instantiator ​(1.1.0): Loading from cache +  - Installing symfony/​mime (v4.3.4): Loading from cache 
-  - Installing symfony/console ​(v4.1.6): Loading from cache+  - Installing symfony/​http-foundation (v4.3.4): Loading from cache 
 +  - Installing symfony/​event-dispatcher-contracts (v1.1.5): Loading from cache 
 +  - Installing psr/​container (1.0.0): Loading from cache 
 +  - Installing ​psr/cache (1.0.1): Loading from cache 
 +  - Installing symfony/​event-dispatcher (v4.3.4): Loading from cache 
 +  - Installing psr/log (1.1.0): Loading from cache 
 +  - Installing symfony/debug (v4.3.4): Loading from cache 
 +  ​Installing symfony/​http-kernel ​(v4.3.4): Loading from cache 
 +  - Installing symfony/​service-contracts (v1.1.6): Loading from cache 
 +  - Installing ​symfony/dependency-injection (v4.3.4): Loading from cache 
 +  ​Installing symfony/​routing ​(v4.3.4): Loading from cache 
 +  - Installing symfony/​finder (v4.3.4): Loading from cache 
 +  - Installing ​symfony/filesystem ​(v4.3.4): Loading from cache 
 +  - Installing symfony/​config (v4.3.4): Loading from cache 
 +  - Installing symfony/​var-exporter (v4.3.4): Loading from cache 
 +  - Installing symfony/​cache-contracts (v1.1.5): Loading from cache 
 +  - Installing symfony/​cache (v4.3.4): Loading from cache 
 +  - Installing symfony/​framework-bundle (v4.3.4): Loading from cache 
 +  - Installing sensio/​framework-extra-bundle (v5.4.1): Loading from cache 
 +  - Installing symfony/​asset (v4.3.4): Loading from cache 
 +  - Installing symfony/​dotenv (v4.3.4): Loading from cache 
 +  - Installing symfony/​expression-language (v4.3.4): Loading from cache 
 +  - Installing symfony/​inflector (v4.3.4): Loading from cache 
 +  - Installing symfony/​property-access (v4.3.4): Loading from cache 
 +  - Installing symfony/​options-resolver (v4.3.4): Loading from cache 
 +  - Installing symfony/​intl (v4.3.4): Loading from cache 
 +  - Installing symfony/​polyfill-intl-icu (v1.12.0): Loading from cache 
 +  - Installing symfony/form (v4.3.4): Loading from cache 
 +  - Installing symfony/​http-client-contracts (v1.1.6): Loading from cache 
 +  - Installing symfony/​http-client (v4.3.4): Loading from cache 
 +  - Installing symfony/​stopwatch (v4.3.4): Loading from cache 
 +  - Installing symfony/​console (v4.3.4): Loading from cache
   - Installing zendframework/​zend-eventmanager (3.2.1): Loading from cache   - Installing zendframework/​zend-eventmanager (3.2.1): Loading from cache
-  - Installing zendframework/​zend-code (3.3.1): Loading from cache +  - Installing zendframework/​zend-code (3.3.2): Loading from cache 
-  - Installing ocramius/​proxy-manager (2.1.1): Loading from cache +  - Installing ocramius/​proxy-manager (2.2.3): Loading from cache 
-  - Installing doctrine/​dbal (v2.8.0): Loading from cache +  - Installing doctrine/​dbal (v2.9.2): Loading from cache 
-  - Installing doctrine/​migrations (v1.8.1): Loading from cache +  - Installing doctrine/​inflector (v1.3.0): Loading from cache 
-  - Installing ​egulias/email-validator ​(2.1.6): Loading from cache+  - Installing doctrine/​common (v2.11.0): Loading from cache 
 +  - Installing doctrine/​migrations (2.1.1): Loading from cache 
 +  - Installing ​symfony/doctrine-bridge ​(v4.3.4): Loading from cache 
 +  - Installing doctrine/​doctrine-cache-bundle (1.3.5): Loading from cache 
 +  - Installing symfony/​security-core (v4.3.4): Loading from cache
   - Installing jdorn/​sql-formatter (v1.2.17): Loading from cache   - Installing jdorn/​sql-formatter (v1.2.17): Loading from cache
-  - Installing ​phpdocumentor/reflection-common ​(1.0.1): Loading from cache +  - Installing ​doctrine/doctrine-bundle ​(1.11.2): Loading from cache 
-  - Installing ​phpdocumentor/type-resolver (0.4.0): Loading from cache +  - Installing ​doctrine/doctrine-migrations-bundle ​(v2.0.0): Loading from cache 
-  ​Installing psr/​cache ​(1.0.1): Loading from cache +  - Installing symfony/yaml (v4.3.4): Loading from cache 
-  - Installing psr/​container (1.0.0): Loading from cache +  - Installing ​doctrine/instantiator ​(1.2.0): Loading from cache 
-  - Installing psr/​simple-cache (1.0.1): Loading from cache +  - Installing ​doctrine/orm (v2.6.4): Loading from cache 
-  - Installing symfony/http-foundation ​(v4.1.6): Loading from cache +  - Installing symfony/orm-pack (v1.0.6): Loading from cache 
-  - Installing ​symfony/event-dispatcher ​(v4.1.6): Loading from cache +  - Installing symfony/security-http (v4.3.4): Loading from cache 
-  - Installing psr/log (1.0.2): Loading from cache +  - Installing symfony/security-guard (v4.3.4): Loading from cache 
-  - Installing ​symfony/debug (v4.1.6): Loading from cache +  - Installing symfony/security-csrf (v4.3.4): Loading from cache 
-  - Installing symfony/http-kernel ​(v4.1.6): Loading from cache +  - Installing symfony/security-bundle (v4.3.4): Loading from cache 
-  - Installing symfony/routing (v4.1.6): Loading from cache +  - Installing symfony/serializer ​(v4.3.4): Loading from cache 
-  ​Installing symfony/​finder ​(v4.1.6): Loading from cache +  - Installing symfony/​property-info (v4.3.4): Loading from cache 
-  - Installing symfony/filesystem (v4.1.6): Loading from cache +  - Installing ​webmozart/assert ​(1.5.0): Loading from cache 
-  - Installing symfony/​dependency-injection ​(v4.1.6): Loading from cache +  - Installing ​phpdocumentor/reflection-common ​(2.0.0): Loading from cache 
-  - Installing symfony/config (v4.1.6): Loading from cache +  - Installing ​phpdocumentor/type-resolver ​(1.0.1): Loading from cache 
-  ​Installing symfony/​cache ​(v4.1.6): Loading from cache +  - Installing ​phpdocumentor/reflection-docblock ​(4.3.2): Loading from cache 
-  - Installing symfony/framework-bundle (v4.1.6): Loading from cache +  - Installing symfony/serializer-pack (v1.0.2): Loading from cache 
-  - Installing sensio/​framework-extra-bundle (v5.2.1): Loading from cache +  - Installing ​egulias/email-validator ​(2.1.11): Loading from cache 
-  - Installing symfony/asset (v4.1.6): Loading from cache +  - Installing ​swiftmailer/swiftmailer ​(v6.2.1): Loading from cache 
-  - Installing symfony/​expression-language (v4.1.6): Loading from cache +  - Installing symfony/swiftmailer-bundle ​(v3.2.8): Loading from cache 
-  - Installing symfony/​inflector (v4.1.6): Loading from cache +  - Installing symfony/translation-contracts ​(v1.1.6): Loading from cache 
-  - Installing symfony/​property-access ​(v4.1.6): Loading from cache +  - Installing symfony/​translation (v4.3.4): Loading from cache 
-  - Installing ​symfony/options-resolver ​(v4.1.6): Loading from cache +  - Installing symfony/​validator (v4.3.4): Loading from cache
-  - Installing symfony/​intl (v4.1.6): Loading from cache +
-  - Installing ​symfony/polyfill-intl-icu ​(v1.9.0): Loading from cache +
-  - Installing ​symfony/form (v4.1.6): Loading from cache +
-  ​Installing monolog/​monolog ​(1.23.0): Loading from cache +
-  - Installing symfony/​monolog-bridge (v4.1.6): Loading from cache +
-  - Installing ​doctrine/orm (v2.6.2): Loading from cache +
-  ​Installing doctrine/​doctrine-bundle ​(1.9.1): Loading from cache +
-  - Installing doctrine/​doctrine-migrations-bundle (v1.3.1): Loading from cache +
-  - Installing symfony/orm-pack (v1.0.5): Loading from cache +
-  - Installing ​symfony/security ​(v4.1.6): Loading from cache +
-  - Installing ​symfony/security-bundle ​(v4.1.6): Loading from cache +
-  - Installing symfony/​serializer (v4.1.6): Loading from cache +
-  - Installing symfony/property-info (v4.1.6): Loading from cache +
-  - Installing webmozart/​assert (1.3.0): Loading from cache +
-  - Installing phpdocumentor/​reflection-docblock (4.3.0): Loading from cache +
-  - Installing symfony/serializer-pack (v1.0.1): Loading from cache +
-  - Installing swiftmailer/​swiftmailer (v6.1.3): Loading from cache +
-  - Installing symfony/​swiftmailer-bundle (v3.2.3): Loading from cache +
-  - Installing symfony/​translation (v4.1.6): Loading from cache +
-  - Installing symfony/​validator (v4.1.6): Loading from cache+
   - Installing psr/link (1.0.0): Loading from cache   - Installing psr/link (1.0.0): Loading from cache
   - Installing fig/​link-util (1.0.0): Loading from cache   - Installing fig/​link-util (1.0.0): Loading from cache
-  - Installing symfony/​web-link (v4.1.6): Loading from cache +  - Installing symfony/​web-link (v4.3.4): Loading from cache 
-  - Installing symfony/​yaml (v4.1.6): Loading from cache +  - Installing symfony/​var-dumper (v4.3.4): Loading from cache 
-  - Installing symfony/​process (v4.1.6): Loading from cache +  - Installing twig/twig (v2.11.3): Loading from cache 
-  - Installing facebook/​webdriver (1.6.0): Loading from cache +  - Installing symfony/​twig-bridge (v4.3.4): Loading from cache 
-  - Installing symfony/​polyfill-php72 (v1.9.0): Loading from cache +  - Installing symfony/twig-bundle (v4.3.4): Loading from cache 
-  - Installing symfony/​var-dumper (v4.1.6): Loading from cache +  - Installing symfony/web-profiler-bundle (v4.3.4): Loading from cache 
-  - Installing twig/twig (v2.5.0): Loading from cache +  - Installing symfony/​profiler-pack (v1.0.4): Loading from cache 
-  - Installing symfony/​twig-bridge (v4.1.6): Loading from cache +  - Installing ​monolog/monolog (1.25.1): Loading from cache
-  - Installing symfony/web-profiler-bundle (v4.1.6): Loading from cache +
-  - Installing symfony/twig-bundle (v4.1.6): Loading from cache +
-  - Installing symfony/​stopwatch (v4.1.6): Loading from cache +
-  - Installing symfony/​profiler-pack (v1.0.3): Loading from cache +
-  - Installing ​symfony/monolog-bundle ​(v3.3.0): Loading from cache +
-  - Installing symfony/​debug-bundle (v4.1.6): Loading from cache+
   - Installing easycorp/​easy-log-handler (v1.0.7): Loading from cache   - Installing easycorp/​easy-log-handler (v1.0.7): Loading from cache
-  - Installing symfony/debug-pack (v1.0.6): Loading from cache +  - Installing symfony/monolog-bridge ​(v4.3.4): Loading from cache 
-  - Installing symfony/dom-crawler ​(v4.1.6): Loading from cache +  - Installing symfony/monolog-bundle ​(v3.4.0): Loading from cache 
-  - Installing symfony/dotenv ​(v4.1.6): Loading from cache +  - Installing symfony/debug-bundle ​(v4.3.4): Loading from cache 
-  - Installing nikic/​php-parser (v4.1.0): Loading from cache +  - Installing symfony/​debug-pack (v1.0.7): Loading from cache 
-  - Installing symfony/​maker-bundle (v1.7.0): Loading from cache +  - Installing nikic/​php-parser (v4.2.4): Loading from cache 
-  - Installing symfony/​phpunit-bridge (v4.1.6): Loading from cache +  - Installing symfony/​maker-bundle (v1.13.0): Loading from cache 
-  - Installing symfony/browser-kit (v4.1.6): Loading from cache +  - Installing symfony/​phpunit-bridge (v4.3.4): Loading from cache 
-  - Installing symfony/panther ​(v0.2.0): Loading from cache +  - Installing symfony/css-selector ​(v4.3.4): Loading from cache 
-  - Installing symfony/css-selector ​(v4.1.6): Loading from cache +  - Installing symfony/dom-crawler ​(v4.3.4): Loading from cache 
-  - Installing symfony/​test-pack (v1.0.4): Loading from cache +  - Installing symfony/browser-kit (v4.3.4): Loading from cache 
-  - Installing symfony/​web-server-bundle (v4.1.6): Loading from cache+  - Installing symfony/​test-pack (v1.0.6): Loading from cache 
 +  - Installing symfony/​process (v4.3.4): Loading from cache 
 +  - Installing symfony/​web-server-bundle (v4.3.4): Loading from cache 
 +Writing lock file
 Generating autoload files Generating autoload files
-ocramius/​package-versions: ​ Generating version class...+ocramius/​package-versions:​ Generating version class...
 ocramius/​package-versions:​ ...done generating version class ocramius/​package-versions:​ ...done generating version class
-Symfony operations: ​21 recipes (15f6d846c418b919b22fc7bc3a311bb3) +Symfony operations: ​20 recipes (0216ef10f1722e46db96c3cadf9b7a02
-  - Configuring symfony/​flex (>=1.0): From github.com/​symfony/​recipes:​master +  - Configuring symfony/​framework-bundle (>=4.2): From github.com/​symfony/​recipes:​master
-  - Configuring symfony/​framework-bundle (>=3.3): From github.com/​symfony/​recipes:​master+
   - Configuring doctrine/​annotations (>=1.0): From github.com/​symfony/​recipes:​master   - Configuring doctrine/​annotations (>=1.0): From github.com/​symfony/​recipes:​master
-  ​- Configuring doctrine/​doctrine-cache-bundle (>​=1.3.3):​ From auto-generated recipe +  - Configuring symfony/​routing (>=4.2): From github.com/​symfony/​recipes:​master
-  - Configuring symfony/​console (>=3.3): From github.com/​symfony/​recipes:​master +
-  ​- Configuring symfony/​routing (>=4.0): From github.com/​symfony/​recipes:​master+
   - Configuring sensio/​framework-extra-bundle (>=5.2): From github.com/​symfony/​recipes:​master   - Configuring sensio/​framework-extra-bundle (>=5.2): From github.com/​symfony/​recipes:​master
 +  - Configuring symfony/​console (>=3.3): From github.com/​symfony/​recipes:​master
 +  - Configuring doctrine/​doctrine-cache-bundle (>​=1.3.5):​ From auto-generated recipe
   - Configuring doctrine/​doctrine-bundle (>=1.6): From github.com/​symfony/​recipes:​master   - Configuring doctrine/​doctrine-bundle (>=1.6): From github.com/​symfony/​recipes:​master
   - Configuring doctrine/​doctrine-migrations-bundle (>=1.2): From github.com/​symfony/​recipes:​master   - Configuring doctrine/​doctrine-migrations-bundle (>=1.2): From github.com/​symfony/​recipes:​master
Ligne 131: Ligne 158:
   - Configuring symfony/​swiftmailer-bundle (>=2.5): From github.com/​symfony/​recipes:​master   - Configuring symfony/​swiftmailer-bundle (>=2.5): From github.com/​symfony/​recipes:​master
   - Configuring symfony/​translation (>=3.3): From github.com/​symfony/​recipes:​master   - Configuring symfony/​translation (>=3.3): From github.com/​symfony/​recipes:​master
-  - Configuring symfony/​validator (>=4.1): From github.com/​symfony/​recipes:​master +  - Configuring symfony/​validator (>=4.3): From github.com/​symfony/​recipes:​master
-  - Configuring symfony/​web-profiler-bundle (>=3.3): From github.com/​symfony/​recipes:​master+
   - Configuring symfony/​twig-bundle (>=3.3): From github.com/​symfony/​recipes:​master   - Configuring symfony/​twig-bundle (>=3.3): From github.com/​symfony/​recipes:​master
-  - Configuring symfony/monolog-bundle (>=3.1): From github.com/​symfony/​recipes:​master +  - Configuring symfony/web-profiler-bundle (>=3.3): From github.com/​symfony/​recipes:​master
-  - Configuring symfony/​debug-bundle (>=4.1): From github.com/​symfony/​recipes:​master+
   - Configuring easycorp/​easy-log-handler (>=1.0): From github.com/​symfony/​recipes:​master   - Configuring easycorp/​easy-log-handler (>=1.0): From github.com/​symfony/​recipes:​master
 +  - Configuring symfony/​monolog-bundle (>=3.3): From github.com/​symfony/​recipes:​master
 +  - Configuring symfony/​debug-bundle (>=4.1): From github.com/​symfony/​recipes:​master
   - Configuring symfony/​maker-bundle (>=1.0): From github.com/​symfony/​recipes:​master   - Configuring symfony/​maker-bundle (>=1.0): From github.com/​symfony/​recipes:​master
-  - Configuring symfony/​phpunit-bridge (>=4.1): From github.com/​symfony/​recipes:​master+  - Configuring symfony/​phpunit-bridge (>=4.3): From github.com/​symfony/​recipes:​master
   - Configuring symfony/​web-server-bundle (>=3.3): From github.com/​symfony/​recipes:​master   - Configuring symfony/​web-server-bundle (>=3.3): From github.com/​symfony/​recipes:​master
 Executing script cache:clear [OK] Executing script cache:clear [OK]
Ligne 146: Ligne 173:
 Please review, edit and commit them: these files are yours. Please review, edit and commit them: these files are yours.
  
 +Some files may have been created or updated to configure your new packages.
 +Please review, edit and commit them: these files are yours.
  
- What's next?+ 
 + What's next? 
  
  
   * Run your application:​   * Run your application:​
-    1. Change ​to the project directory+    1. Go to the project directory
     2. Create your code repository with the git init command     2. Create your code repository with the git init command
-    3. Execute ​the php -S 127.0.0.1:​8000 -t public command +    3. Download ​the Symfony CLI at https://symfony.com/download to install ​development ​web server
-    4. Browse to the http://localhost:​8000URL. +
- +
-       Quit the server with CTRL-C. +
-       Run composer require server --dev for better ​web server.+
  
   * Read the documentation at https://​symfony.com/​doc   * Read the documentation at https://​symfony.com/​doc
  
  
- ​Database Configuration+ ​Database Configuration ​
  
  
Ligne 171: Ligne 197:
  
  
- How to test?+ How to test?