https://github.com/dunglas/symfony-docker
A Docker-based installer and runtime for the Symfony web framework, with full HTTP/2, HTTP/3 and HTTPS support.
- If not already done, install Docker Compose
- Run
docker compose build --pull --no-cache
to build fresh images - Run
docker compose up
(the logs will be displayed in the current shell) - Open
https://localhost
in your favorite web browser and accept the auto-generated TLS certificate - Run
docker compose down --remove-orphans
to stop the Docker containers. - Run
docker exec -it patona-test-php-1 sh
to open shell prompt - Run
composer install
to install all dependency packages - Run
php bin/phpunit
to run Tests - Run
XDEBUG_MODE=coverage php -dxdebug.mode=coverage bin/phpunit --coverage-clover='reports/coverage/coverage.xml' --coverage-html='reports/coverage'
to generate code coverage report - Run
./vendor/bin/phpcs src
validating php coding standards - Run
./vendor/bin/phpstan analyse -l 3 src tests
analysing the code quality
- Kept same features which provided by the repo default.
- Coding challenge implementation done on top of default feature.
- Requesting to reviewer follow the set up of this repo, if the recommended commands won't works.
- Used following additional package to full fill the requirements
- nesbot/carbon - to handle date formatting
- stolt/json-lines - to handle parsing of JsonLine file contents
- friendsofphp/php-cs-fixer - to handle code standard fixing
- phpstan/phpstan - to handle code quality analyser
- squizlabs/php_codesniffer - to handle coding standards