assets/web | ||
config | ||
docs | ||
web/sites | ||
.gitignore | ||
.php-version | ||
composer.json | ||
docker-compose.yaml | ||
php.ini | ||
README.md |
Testing the Symfony Local Server with Drupal
An example of running Drupal 8.8 on Symfony’s local web server.
Usage
- Install the Symfony CLI from https://symfony.com/download.
- Clone this repository
git clone https://github.com/opdavies/symfony-server-drupal-test.git cd symfony-server-drupal-test
- Run
composer install
to download all of the project’s dependencies (Drupal core, Examples module etc). - Run
docker-compose up -d
to start the Docker container for MySQL. (You can rundocker-compose ps
afterwards to confirm that it’s running). - Run
symfony server:start
to start the web server. - Use Drush to install Drupal, prefixed by
symfony php
to allow access to the environment variables needed insettings.php
:cd web symfony php ../vendor/bin/drush site:install --no-interaction
- Go to http://127.0.0.1:8000 to view the site.
- To run tests, PHPUnit also needs to be prefixed with
symfony php
:cd web symfony php ../vendor/bin/phpunit -c core core/modules/action
- Run
symfony server:stop
to stop the web server.