ARCHITECTURE ADVANCED

Why I Don't Use Frameworks

I get asked this question in almost every interview or consultation: "Why don't you use Laravel? Why not Symfony?" It's a fair question. Frameworks provide structure, community, and a lot of pre-built tools. But they also come with a cost that most developers ignore until it's too late: Technical Debt.

1. The Dependency Trap

When you `composer require` a massive framework, you aren't just downloading code; you are signing a contract. You are agreeing to maintain compatibility with that framework's update cycle forever. If a core method is deprecated in an update, you have a bad week ahead of you.

Dependencies break. Maintainers lose interest. Security vulnerabilities are found in sub-sub-dependencies. By sticking to Vanilla PHP (Standard Library), my dependency list is usually zero. My code written in PHP 5.6 often still runs in 8.2 with minor tweaks.

2. Performance Overhead

Let's look at a simple "Hello World" router. In a framework, the request goes through an HTTP kernel, middleware stacks, service providers, and event listeners before it echoes a string. In Vanilla PHP, it looks like this:

// Simple, fast, secure routing $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); switch ($uri) { case '/': require 'views/home.php'; break; case '/contact': require 'views/contact.php'; break; default: http_response_code(404); require 'views/404.php'; break; }

That code executes in microseconds. It uses almost no memory. It is easy to debug. There is no "magic" happening behind the scenes.

3. You Stop Learning How Things Work

Frameworks abstract away the HTTP protocol. They hide the database interaction behind ORMs. If you only know Eloquent, you don't know SQL. If you only know Blade, you don't know PHP output buffering.

To be a Senior Developer, you need to understand the metal. You need to know what a session actually is (a file on the disk), not just how to call `Session::get()`.

Conclusion

I'm not saying frameworks are useless. For teams of 50 developers, they provide necessary guardrails. But for the projects I build—high-performance, long-lifespan business logic—I prefer the control and stability of raw PHP code.

Write code that lasts. Keep your dependencies low. Trust the standard library.

Share this article