My First Pull Request to Laravel Framework — Part 1

Series - My First Pull Request to Laravel Framework

Check this article on Medium: @ngodingbang/my-first-pull-request-to-laravel-framework-part-1-46a671e26c

You may want to read this article in Bahasa Indonesia version: Pull Request Pertama Saya di Laravel Framework — Part 1

My Pull Request on GitHub, directyly approved by Taylor Otwell 🚀 (Source: https://github.com/laravel/framework/pull/42244).
My Pull Request on GitHub, directyly approved by Taylor Otwell 🚀 (Source: https://github.com/laravel/framework/pull/42244).

In this article, I will let you know about my beginning experience into the Laravel Framework. If you just want to know about the pull request topic, just scroll to the link I’ve included at the bottom of this article. Enjoy!

I’ve been using Laravel since 2018, although my first acquintation with this framework actually happened in 2017 when I was completing my final project to graduate with my associate degree at Bali State Polytechnic.

As final-year students, we must create a real application using coding skills as the requirement to finish our associate degree. It can be replaced by creating an information system audit, but it can become more complicated since we must use a framework such as COBIT, etc. Instead of avoiding the distress of coding, what really happens is that it adds more stress to the work of students by making a final project report with a very long analysis and description.

In that year Laravel was starting its hype among the programmers and began to compete with Codeigniter which existed before, but somehow many friends of mine at college weren’t encouraged to use Laravel. It probably happen because Laravel is still new and requires a more advanced understanding of programming, this can be seen from the installation method of Laravel which is more complicated than Codeigniter. Those of you who are students or new programmers in 2017 may feel unfamiliar with the command below.

bash

composer create-project laravel/laravel example-app

or with this command.

bash

php artisan

and so many others. Much more complicated than Codeigniter, which we just download and extract into our computers.

At the end of the day, almost all of us — if I can’t say everyone — gave up with that complexity and rather used Codeigniter to make their application in the final report. They only care to finish the application, although some of them don’t even understand their own coding (if you know what I mean, lol).

As someone who likes a challenge and likes to go against the current trend a.k.a anti-mainstream guy, I dared by trying to use Laravel at the time. A huge fatal decision that finally made me have to stay up all night for two months non-stop, even I still had to code until d-10 minutes for the final trial because there were still some features that weren’t ready yet 😂.

My friends who stayed together in the struggle to get our associate degrees. Could you guess which one is me? (Source: https://www.instagram.com/p/BZfHSv0DaeY)
My friends who stayed together in the struggle to get our associate degrees. Could you guess which one is me? (Source: https://www.instagram.com/p/BZfHSv0DaeY)

From that moment, I finally fell in love with Laravel. Even though my skills at that time weren’t quite enough to understand all the features provided by Laravel, I believe that Laravel will become the main framework for all PHP programmers in the future. I really felt the purpose of Laravel as they said is PHP Framework for Web Artisans while I use this framework. From its standardization of the code which is very clean, the usage of OOP architecture on their framework, also the structured and easy-to-understand documentation, and much more. It is very different from Codeigniter, in which their code is still messy and the way of coding is still based on the programmer’s opinion or in other words is without clear standards. But remember, this is the experience I felt in 2017 or 5 years ago. Maybe this opinion is no longer relevant, especially since then I have never used Codeigniter again until now.

Until Then …

After 5 years of making a living with this framework, I came across a project that requires the HTTP Client feature provided by Laravel.

💡 As I believed when I first tried Laravel, I believe that will become the main framework for all PHP programmers in the future. But it turned out that I was wrong.

Yes, more precisely, I was wrong when guessing that Laravel will be the main framework for all PHP programmers in the future. Not only as a standalone “framework”, Taylor Otwell as the founder of Laravel is able to make Laravel complex and sophisticated. Even though it is built as a framework, at the same time all the features in the framework are built separately or modularly. We as programmers are free to take one of these modules and use it in our own applications or libraries. So in my opinion, Laravel is a framework for creating web applications that consist of a large collection of modules compiled into one. We can check the collection of modules on their GitHub Repository in laravel/framework, while the framework is on laravel/laravel.

Back to the project that I mentioned earlier. It turns out that I found a bug in the HTTP Client feature in the Laravel Framework. The bug certainly has a huge impact on the features that I’m developing in the project. Uniquely, I only found this bug after the feature test was finished and I tried to run it. If only I didn’t make the feature test, maybe I wouldn’t find this bug. After all, the features that I made run fine. From here, I realized how important it is for us as a programmer to make unit/feature tests on features or programs we create so that we can detect bugs as early as possible before we deliver the results of the program to the user.

💡 Disclaimer: This following article will be a little more technical because I will attach a lot of source code and my analysis as a programmer. For those of you who are not programmers or maybe too confused to read the explanation, please skip to the end. Let’s go!

What Exactly Was the Bug I Found?

Because the explanation of this bug is very long, I decided to make as a separate article. For those of you who are curious about my experience on solving the bug, I have included the link below.

My First Pull Request to Laravel Framework — Part 2

Thanks for reading and see you in the next part! Arigatou 🙏

For those of you who still enthusiastic to read until this section, thank you so much :)
For those of you who still enthusiastic to read until this section, thank you so much :)

Related Content