Jorge Castro
1 min readAug 22, 2019

First, Laravel is fine; I don’t have problems with Laravel. However, it is also bloated so it won’t work for some projects.

Now. How I know that Laravel contains so many classes?. It’s simple, I created a new project, and it creates more than 700 PHP files (*), and practically all of them are classes or interfaces.

(*) I use PHPStorm, and it has a plugin called statistics, it says (the standard project of a blog system: 5837 PHP files) but not all PHP files are classes.

Some classes are pretty simple, 3 or 4 methods, and nothing more. So, it’s easy to understand and modify those classes. However, it is different if you need to deal with +600 classes. Usually, PHP programmers don’t touch the code of Laravel (or any other external library).

One of the problems is the Composer’s Autocomplete. If you optimize it, it will generate the file autoload_classmap.php with all the classes of PHP.

And it contains the next code:

return array(
'App\\Console\\Kernel' => $baseDir . '/app/Console/Kernel.php',

(and it is repeated x3000 times, one per class). This creation of a new array is called per call; it uses memory and resources per every call.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Responses (1)

Write a response

Thank you for the clarification.

--