Symfony setting up PhpStorm with Xdebug, Docker, PhpUnit (configuration)
Installation
Clone Repository
git clone git@github.com:SanderV1992/Symfony-4.2-skeleton-with-fully-configured-Docker-PHPSTORM-Xdebug-PHPUnit.git my-project
Build Docker
- cd ./docker
- docker build .
Run Docker-Compose
- cd ./docker
- docker-compose up
Composer (Dependency Manager for PHP)
- docker exec -it phpcli7.1_symfony_container /bin/bash
- composer install
Install PHPUnit
- composer require symfony/maker-bundle --dev
- composer require symfony/phpunit-bridge --dev
- composer require symfony/profiler-pack --dev
- composer remove phpunit/phpunit --dev
- composer require --dev phpunit
- copy new file phpunit.xml.dist -> phpunit.xml
PHPSTORM
Current Project Interpreter
Select CLI Interpreter
- Select: From Docker, Vagrant, VM, Remote
- Remote: Docker Compose
- Server: docker-compose
- Configuration file: ./docker/docker-compose.yml
- Service: phpcli7.1_symfony_container