Development Environment
Requirements
NPM for front end asset serving and bundling
Docker and Docker Compose for running the local development container
Git for version control
Instructions
Clone Directory Lister to a local repository
git clone {{ REPOSITORY_URL }}Switch to the Directory Lister directory
cd /path/to/DirectoryListerInstall and build PHP and JavaScript dependencies
composer install npm install npm run devRun the local Docker container
docker-compose up -dAdd a host name entry to
/etc/hosts(optional)127.0.0.1 directory-lister.local
You should now be able to access your local Directory Lister installation at http://localhost (or http://directory-lister.local if you added a host name entry)
Common Development Commands
Many common development actions have been defined in the Makefile and can be run with make command.
Clear the application cache
make clear-cacherm --recursive --force app/cache/*Build dependencies and assets (for production)
make productioncomposer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
npm install --no-save
npm run build
npm prune --productionClear built assets
make clear-assetsrm --recursive --force app/assets/*Run test suite
make testscomposer exec phpunitapp/vendor/bin/phpunitCheck or fix coding standards
make coding-standardscomposer exec php-cs-fixer fix [--diff] [--dry-run]app/vendor/bin/php-cs-fixer fix [--diff] [--dry-run]Perform static analysis
make static-analysiscomposer exec phpstan analyzeapp/vendor/bin/phpstan analyzeGenerate code coverage report
make coverageXDEBUG_MODE=coverage composer exec phpunit --coverage-html .coverageXDEBUG_MODE=coverage app/vendor/bin/phpunit --coverage-html .coverageLast updated
Was this helpful?