- PHP 8.1
- RabbitMQ
- Redis
- Azure SQL database (for resources)
- MariaDB (for other data)
see documentation/development.md for information about setting up the project for development.
See documentation/production.md for information about setting up the project for production.
Before creating a PR make sure the code is ready. The following command will apply coding standards, run tests, normalize composer.json and update the openapi spec.
Please note that if there are changes to the API spec you must review them to make sure that they are not breaking changes. If breaking changes must be introduced in the API, the version number must be incremented.
docker compose exec phpfpm composer prepare-code
Resources are cached for the /v1/resources-all
endpoint. The resources are retrieved if the cache entry does not exist.
To update cache entries from a command:
docker compose exec phpfpm bin/console app:resource:cache --no-debug
Generate an ApiKey with the following command:
docker compose exec phpfpm bin/console app:auth:create-apikey
To authenticate with an ApiKey add the Authentication header to each request to the api in the following way:
Authorization: Apikey [THE API KEY]
In the swagger UI press the "Authorize" button in the top and enter
Apikey [THE API KEY]
CRUD of bookings are handled through a queue (RabbitMQ) to ensure they are correctly handled.
See https://symfony.com/doc/current/messenger.html for symfony messenger documentation.
When a booking request is received it is added to the queue, and handled when the queue consumes the message.
To consume messages run the following command
docker compose exec phpfpm composer queues
To debug the queue find the address to the rabbitmq container with
docker compose ps
and open it in a browser.
Exchange is the data owner of booking data. The communication is handled through Microsoft Graph.
See documentation/microsoft-graph.md for information about the use of Microsoft Graph.
Resources are retrieved from an Azure SQL service.
See documentation/azure-sql.md for a description of how this is set up.
The OpenAPI specification is committed to this repo as public/api-spec-v1.yaml
and as public/api-spec-v1.json
.
A CI check will compare the current API implementation to the spec. If they are different the check will fail.
If a PR makes planned changes to the spec, the committed file must be updated:
docker compose exec phpfpm composer update-api-spec
If these are breaking changes the API version must be changed accordingly.
Composer normalize is used for
formatting composer.json
docker compose exec phpfpm composer normalize
The following command let you test that the code follows the coding standard for the project.
- PHP files PHP Coding Standards Fixer
docker compose exec phpfpm composer coding-standards-check
To attempt to automatically fix coding style issues
docker compose exec phpfpm composer coding-standards-apply
Github Actions are used to run the test suite and code style checks on all PRs.
We use SemVer for versioning. For the versions available, see the tags on this repository.