Test task
Assignment:
Install composer (package manager). Using composer, install the Guzzle library. Connect autoloader through composer. Write a script using OOP principles that will store all Tickets (provided you have more than 10,000 tickets) using an API (use the Guzzle library) from the Zendesk API, as well as their main entities. The result should be the recording of these tickets in a csv fil
Done:
- Configured (and successfully started) 2 Docker containers:
- php. Inside the container, php8.1-fpm (using the image), the package manager composer, the version control system git, and the code debugging tool xDebug were installed.
- nginx. Installed nginx using the nginx:latest image from DockerHub
- Installed Guzzle library in php container using composer package manager and configured autoload in composer.json file.
- In the src directory, according to OOP principles, all the necessary classes and their methods have been created to perform the assigned task.
- In the file
index.php
,autoload.php
is imported and the main class App is initialized. With the help of its method, the execution of all the necessary actions to generate and download a csv file with the necessary data begins.
To execute the script, you need to raise the containers and go to the link http://localhost/index.php. After executing the script, the file tickets.csv will be automatically downloaded, which will contain the result of its execution.