r/PHP • u/nicks3123 • 6d ago
Pop PHP - The PHP framework that you probably never heard of.
Meet Pop. Before anyone rolls their eyes and exclaims "Oh no, not another PHP framework," it's actually been around in some form since 2009. It officially got the name "Pop PHP" in 2012.
The entire time, it's had zero marketing or promotion behind it simply because I just did not have the time or the resources for it. I built it, started using it and really haven't looked up from my desk. Along the way it, has evolved quite a bit to try and keep pace with the demands of the PHP ecosystem. And here were are – this month, version 7 was just released with arguably the biggest upgrade and modernization of the framework in quite some time.
The reason for its existence is very similar to the concerns that have been voiced here over the years:
- Framework A is too magic
- Framework B is too complicated
It seems reading through some recent threads here, those same issues continue to come to the forefront. My own bias aside, I like it because I feel it strikes the right balance between being transparent - without too much "magic" - and abstracting away the things that make sense. At least that's been the goal all this time.
Anyway, here it is. Check it out. Or don't – lol. I know it's a cluttered field. Thanks.
6
u/felipedomf 6d ago
Links please
5
u/nicks3123 6d ago
Sure
Docs: https://docs.popphp.org/
Github: https://github.com/popphp/
Discord: https://discord.gg/TZjgT74U7E
6
18
u/Specialist_Abies_231 6d ago
In that time I use https://cakephp.org
8
u/Omnipresent_Walrus 5d ago
I'm currently trying to migrate our projects away from Cake. It's a nightmare. What do you like about it that isn't done better elsewhere?
6
u/Specialist_Abies_231 5d ago
In that time server side rendering was the common, Symfony looks complicated and there is no Laravel. Today (I check the project) is not a good choice.
4
19
u/PetahNZ 6d ago
"No magic"
https://github.com/popphp/pop-db/blob/master/src/Record/AbstractRecord.php#L793-L817
But yes magic methods.
12
1
u/adampatterson 3d ago
That's just OOP, it's not using something like reflection, then parsing the method name to dynamically load another class or method passing values to it.
0
10
u/mythix_dnb 5d ago
any framework is either "magic", or "complicated". if neither it's not a comprehensive framework and probably closer to a library.
"complicated" in this sense is just a synonym for "I havent learned how it works yet"
2
u/dan_d_martin 4d ago
This is right. The only question is whether you want the complexity where you can see it or not.
Symfony can look complicated, but it's just a lot of simple things stitched together with (most of) the wiring visible and traceable.
Laravel can look simple, but it's the same thing with all the wiring hidden away in complex framework classes. It's hard to see what's going on when execution moves into framework code.
9
u/voteyesatonefive 5d ago
The real answer is always use Symfony.
-1
u/TheRealSectimus 5d ago
Symfony / Cake / Laravel - I really don't see value in needing or using any other frameworks tbh.
2
u/lucidmodules 5d ago
Have you considered modules as composer packages? Sometimes a module is dependent on specific library (bcmath, imgmagick, etc), another module. Even wrong versions may break things:
"require": {
"php": "~8.4.0",
"ext-bcmath": "*",
"vendor/module": "1.2.3"
},
2
u/sneakinsnake 4d ago
This looks great for 2009. I hate to say it, but things have changed since then.
2
u/SaltTM 4d ago
tough crowd lol, you make it past this comment section and you'll be alright glhf
You know what I find funny lol - the usual suspects that have no plans on ever changing their framework are always coming in threads about a new framework lol - I find it fascinating. I bet you $20 if you ask them their framework stack they've used in the last 5 years it'll be the exact same shit lol. They don't have shit better to do so don't worry about the critics too much, just keep making it better until they ain't got shit to say lol
1
u/Simazine 5d ago
Some nice bits in your docs. I have no use for this right now, but full credit for some material
1
u/pekz0r 5d ago
So a very old framework without any community, and with a very uninteresting pitch or story.
Sorry, but you really need to present/sell it better to get any form of traction. Why should I choose your framework and for what kind of applications is it suited? Now there is close to zero interest to even click the link to know more.
The framework might be fantastic, but no one will ever know unless you can present it.
1
u/Timely-Barnacle7378 5d ago
That’s a long lifetime .. here was mine
https://github.com/alex-barylski/LegacyMVC
This is one that I started around 2007 maybe 2006 I used it in a few projects and then I used it on my previous employers ERP
By 2018 I had strangled out the old MVC and replaced it with Symfony full stack
Best decision I ever made :D
1
1
u/EGreg 4d ago
Reminds me of my first PHP framework I made in 2009, called PHP on Pie. The acronym was PoP. (Like RoR). At first I had all my prefixes be “Pop”, and then I changed them to “Pie”. Anyway because I did search-and-replace, we ended up with funny results like “pieular” instead if “popular” in the README.
1
u/obstreperous_troll 4d ago edited 4d ago
Forgetting to use
\bdelimiters in search-and-replace is a clbuttic mistake. Even then, you still end up with methods likeStack::pie();)
1
u/SparePartsHere 5d ago
Hey, isn't that the framework that got its author astroturfed to PSR committee by cheating? That was a wild story :D looking at the github it's probably not this one. Anyone remembers the name?
7
u/brendt_gd 5d ago
That was PHPixie by Dracony: https://www.reddit.com/r/PHP/comments/4iju97/95_of_phpixie_installs_on_packagist_are_fraudulent/
1
1
1
u/TehranTuring 5d ago
Coule you tell me what problems are going to solve this framework particularly?
1
u/__NadirZenith__ 5d ago
Do you have free weekends when you don't know what to do? With pop that's going to end
-5
u/Radiant-Somewhere-97 5d ago
Oh no! It's crazy that we have 158 competing frameworks - let's create one framework that combines all their best features!
Oh no! It's crazy that we have 159 competing frameworks...
-18
11
u/equilni 5d ago edited 5d ago
Why Pop? I see you had a micro framework called Popcorn, which had a better name that won't be confused with things like array_pop, PHP DS pop methods, Pop OS, to name a few...
Regardless, I see types, tests, some organization, older abstract base classes & separate controller/action routing, good docs, etc, good.
Some of the examples on the other hand...
new Pop\View\View(__DIR__ . '/../../../view/orders.phtml');...Big issue
https://github.com/popphp/pop-view#filters
https://docs.popphp.org/basics/views#filters-and-escaping
Lots of code and security here isn't a forefront? Hope this is easily swappable...
https://docs.popphp.org/basics/sessions#see-also
https://docs.popphp.org/toolkit/authentication
Session has a link to Auth with notes to regenerate the ID, but Auth page doesn't note this...
Gripes:
https://docs.popphp.org/basics/forms#building-a-form
With named parameters, couldn't we use classes vs arrays?
https://docs.popphp.org/database/records#connections-per-table-class
Ideally, the connection is set and this step shouldn't have to be done. I don't get this workflow, perhaps you can go into this more. Hoping this is easily swappable too
*Edit - fixed word & formatting