This is the repository with the exercise for the ma-residence interview.
Read the contents of this README.md carefully as it will help you to set up this exercise.
In this exercise, you will have to code a micro API using Symfony 4
This project uses all the classic stack tools needed for a SF4 project so you'll need
- a web server with PHP enabled
- a SQL database (for example MySQL)
- a git client to clone the sources
- the composer tool
- the PHPUnit testing tool
This repository uses git, you should clone it on your machine through a git clone.
The project is set up to be installed through the composer tool.
The root of the project contains a composer.json file with minimum requirement configured. You can use composer ton install all dependency you need, you should use the power of Symfony4 with recipe.
After having set up your project, confirm that your .env
has the correct parameters.
The most important parameters are the database related parameters.
Be sure that you have created the correct database for your project.
Now read the INSTRUCTIONS.md file located at the root of the project. It contains all the instructions and hints for the project.
To submit your solution, you can simply push your work with a pull request.
A bunch of tests have been written under the tests
Those tests are functional tests. They will test your API endpoints, the responses etc...
This folder contains a unit test which will test the final result using a test dataset
- We will clone your sources
- We will set up the Symfony project
- We will import the database structure with the doctrine tool
./bin/console doctrine:schema:update --force
- We will launch the tests with PHP Unit
./bin/phpunit
The results are important but there is no unique solution, there are various way to pass the tests successfully.
Don't forget that you will have to explain and justify your choices during an interview. This exercise is mainly a way to provide discussion material for it.