- php8.2-zip
- php8.2-gd
- php8.2-sqlite3
- php8.2-xml
- php8.2-mbstring
- php8.2-intl
Build docker image
yarn docker:build
Set up docker image
yarn docker:setup
Run commands in docker image:
yarn docker:run <CMD>
yarn setup
Start server on http://localhost:8000
yarn start
symfony serve -port 8000
(requires Symfony CLI)
yarn docker:run
When adding new images or other non-code files, you can run:
yarn build
so that the files are put in the correct places. (this is automatically
done when doing yarn start
)
Position | Username | Password | Role |
---|---|---|---|
Assistent | assistent | 1234 | ROLE_USER |
Teammedlem | teammember | 1234 | ROLE_TEAM_MEMBER |
Teamleder | teamleader | 1234 | ROLE_TEAM_LEADER |
Admin | admin | 1234 | ROLE_ADMIN |
yarn db:update
Load db-schema:
php bin/console doctrine:schema:update --force --complete
Load fixtures:
php bin/console doctrine:fixtures:load
Code Style: PHP-CS-Fixer
Install:
mkdir -p tools/php-cs-fixer
composer require --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer --dev
Then Run:
tools/php-cs-fixer/vendor/bin/php-cs-fixer fix src
Run all tests:
php bin/phpunit
Run individual test:
php bin/phpunit "path/to/test/TestName.php"
To generate SSL keys:
php bin/console lexik:jwt:generate-keypair
To get JWT token:
curl -X POST -H "Content-Type: application/json" http://localhost:8000/api/login -d '{"username":"<username>","password":"<password>"}'
Pass the token in subsequent api calls. Example shown using Postman:
https://localhost:8000/api/doc.json