To run this project, make sure you have the following tools installed on your system:
- PHP version 8.2 or higher
- Composer
- MySQL version 8
Clone the project to your local system:
git clone <repository-url>
cd <project-directory>Navigate to the project's root directory and install dependencies:
composer installEnsure that the database connection details are correctly configured in the .env and .env.test files. These files should include the following key:
DATABASE_URL=
Update the values according to your local setup.
Create the database schema:
php bin/console doctrine:schema:create
php bin/console doctrine:schema:create --env=testTo run the tests, make sure the test database is configured (as specified in .env.test), and then execute:
php ./vendor/bin/phpunitThe project has been implemented in a simplified form. Several intermediary layers between modules are missing (e.g. application/domain services or facades), which in a complete implementation would be responsible for isolating and orchestrating communication across contexts.
The database queries operating on dates use simplified comparisons (<, =) and ignore the time component. As a result, results may be inaccurate in edge cases (e.g. invoices paid on the same day but at different hours). A complete version should handle time precision more carefully or leverage proper database functions.
The project currently implements only a basic report of the number of newly generated warnings. Requirements regarding sustained or closed warnings are missing. Given the 3-hour timeframe for the task, there was not enough time to implement these features, so this area remains incomplete.
Instead of fixtures, a functional test was created to verify the key application scenarios: overdue invoices, contractors with high debt, and budgets with negative balances. However, the test is still not exhaustive and would need to be extended in a production-ready solution.