DEV Community

Cover image for Best PHP Micro Frameworks for 2024

Best PHP Micro Frameworks for 2024

n0nag0n on August 07, 2024

2024 Best Micro Frameworks for PHP Introduction Well it's August 2024 and it's time for another framework comparison! In the world of w...
Collapse
 
mrpercival profile image
Lawrence Cooke

I've tried Slim, Fat Free and Flight, Flight has been the one I felt most at home with. It takes care of the things I expect from a framework , without feeling like I am fighting against it to make it do what I need it to.

Collapse
 
n0nag0n profile image
n0nag0n

Thanks so much! I'm glad you're enjoying it! I've used it too and have really been enjoying my time with it!

Collapse
 
mexikode profile image
MexiKode ⚙ • Edited

we need better sans-laravel / yii / symfony solutions
so projects don't look like a JAVA applet

Collapse
 
denys_bochko profile image
Denys Bochko

Good article.

Are there any specific usecases those frameworks are best for? The reason I am asking is that I read Slim is the best API framework in php.

Collapse
 
n0nag0n profile image
n0nag0n

So it's interesting, all of these frameworks come with the bare bones that you can attach other things to. For slim, you can just do it for restful APIs, or you could build a full web app by attaching a container and adding different services. You could do the same with Flight and Fat-Free as well. Lumen is on it's way out to just being offered as Laravel only (following what Symfony did with Silex).

There are some core differences between how these frameworks approach to building a web app. That said, I would say Slim and Flight are your best bets for keeping it clean long term, and if I had to pick one over the other, I would pick Flight because it has no dependencies and just enough "extras" to still feel bare bones, but to have some added extras where you could get away with doing a simple API with no added packages. FatFree has a little more "built in" but it does have some dated practices like no real middleware, but there are workarounds to make it "seem" like it has middleware.

Collapse
 
shjordan profile image
Jordan Humberto de Souza

sadge...

No mention to Tempest

Collapse
 
n0nag0n profile image
n0nag0n

Ha yes Tempest is new to the game and brendt_gd is doing an awesome job with it! It’s still in beta and it’s geared towards a full stack framework whereas these are smaller “lite” frameworks.

Collapse
 
agilare profile image
Michel

Six years after its discontinuation it's hard to find recent activity and ressources concerning Silex, except some old forks.
What are the "the community support and resources are still available through Symfony channels" you are talking about ?

Collapse
 
n0nag0n profile image
n0nag0n

Just meaning through forums and such you can still ask questions and get heckled, but still get some help.

Collapse
 
maurobonfietti profile image
Mauro Bonfietti

Hey Hi.
I discovered Slim PHP in 2017. We use it a lot at work, and I like it. 🤗
Are you the author/maintainer of Flight? Congrats!
I'll take a look later and give it a try...

Collapse
 
n0nag0n profile image
n0nag0n

I'm not the original author of Flight but yes I've taken the torch so to speak. Put a lot of work into getting it to where it is now. It's helped a few other devs I know learn some really practical lessons with PHP and taken their PHP code to the next level. I hope it can help others in a similar way.

I discovered Slim around the same time. Slim v3 was great but Slim v4 was not a great transition. I really really REALLY didn't like the direction it too. It looks like from some github issues I've seen that Slim v5 is hopefully a step back to simplicity? I hope so.

Collapse
 
maurobonfietti profile image
Mauro Bonfietti

Yeah, last night, I kept reading and learned more about Flight PHP.

Nice Work! 👏👏👏

Collapse
 
pdoren profile image
Pedro Doren

Great content!
I am just in the process of deciding between F3 and Flight.
Thanks

Collapse
 
n0nag0n profile image
n0nag0n

There is a chat room for Flight on matrix and you an ask any questions you want. Several of us have programmed several projects in both Flight and F3. matrix.to/#/#flight-php-framework:...