In this project, I aimed to link the Google Calendar API with a PHP application to enable Create, Read, and Delete operations on users' calendars, as instructed by Intuji in the initial email. Initially, I attempted the integration without using Composer libraries, but found multiple issues, necessitating a day-long troubleshooting effort. Finally, I switched to Composer, which speeded up the process.
At first, I attempted to integrate the Google Calendar API straight into the PHP program without using Composer modules. Despite extensive investigation and attempts, I discovered numerous mistakes, ranging from namespace issues to dependency conflicts. These challenges proved time-consuming and eventually resulted in a dead end.
Realizing the complexities and limitations of the manual integration approach, I switched to Composer for managing dependencies. This decision facilitated seamless integration of the Google API Client library (google/apiclient: 2.16
) and other essential packages such as vlucas/phpdotenv
for handling environment variables.
- google/apiclient: 2.16: Google's official API client library for PHP, crucial for interacting with the Google Calendar API.
- vlucas/phpdotenv: 5.6: Used to manage environment variables stored in a
.env
file, enhancing security and configurability. - Bootstrap: ^5: Used for frontend UI styling, ensuring a visually appealing and user-friendly interface.
Despite encountering initial setbacks, transitioning to Composer enabled a more efficient and effective integration process. By leveraging Composer's dependency management capabilities and incorporating essential libraries, I successfully implemented CR(U)D operations on users' Google calendars within the PHP application.