Windows setup
Base setup
Installation
The base setup consists in installing/updating Xampp for Windows, that contains Apache, PHP 7.x, and MariaDB (an alternative for MySQL).
Download link: https://www.apachefriends.org/fr/download.html
Path setup
Don't forget to add the path to PHP in your PATH system environment.
Use this documentation to find how to access it: https://www.computerhope.com/issues/ch000549.htm
...;C:\Xampp\php
Virtual Hosts
To add some VirtualHosts in your Apache configuration:
# C:\Xampp\apache\conf\extra\httpd-vhosts.conf
# At the end of the file
# Random project
<VirtualHost *:80>
ServerName website.dev
DocumentRoot C:/Xampp/www/website.dev
RewriteEngine on
<Directory C:/Xampp/www/website.dev>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog "logs/website.dev_error.log"
CustomLog "logs/website.dev_access.log" combined
</VirtualHost>
# Symfony 4 project
<VirtualHost *:80>
ServerName website.dev
DocumentRoot C:/Xampp/www/website.dev/public
<Directory C:/Xampp/www/website.dev/public>
AllowOverride None
Order Allow,Deny
Allow from All
Require all granted
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
</Directory>
<Directory C:/Xampp/www/website.dev/public/bundles>
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>
</Directory>
ErrorLog "logs/website.dev_error.log"
CustomLog "logs/website.dev_access.log" combined
</VirtualHost>
Then update your hosts file accordingly. The file must be updated using your favorite text editor (Notepad, Notepad++...) launched using the Admin rights.
# C:\Windows\System32\Drivers\etc\hosts
# At the end of the file
127.0.0.1 website.dev
Composer
Just install composer using this installer: https://getcomposer.org/Composer-Setup.exe
Cygwin
Download and run the correct installer 32 or 64-bit version, given your Windows version: https://cygwin.com/install.html
Don't forget to tick the checkbox for make during the install process.
NodeJS
Download and run the installer for "Current" (with latest features): https://nodejs.org/en/download/current/
Yarn
Install it using npm, or download and run the installer: https://classic.yarnpkg.com/en/docs/install#windows-stable
Please check your PATH system variable, if the yarn directory is correctly included.