r/PHP 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.

https://www.popphp.org/

77 Upvotes

39 comments sorted by

11

u/equilni 5d ago edited 5d ago

It officially got the name "Pop PHP" in 2012.

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

Neither template kind escapes anything for you.

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

6

u/felipedomf 6d ago

Links please

5

u/nicks3123 6d ago

6

u/felipedomf 6d ago

The first paragraphs could be from Symfony documentation.
That’s a compliment!

5

u/mpmont 5d ago

Discord really is the cancer of todays open source stuff.

Remember when people used forums to discuss stuff that were indexed and people could actually find those discussions online?

Yeah, today we have discord.

6

u/hixdale 5d ago

Although I don't know much (indeed) about your framework, scanning the docs I like how it looks.

But let's put the big question: who do you recommend this framework for, and why? I'm curious. 🙂

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

u/rafabayona 5d ago

Codeigniter is about that age and it’s still alive

19

u/PetahNZ 6d ago

12

u/BafSi 5d ago

900 lines in an abstract class, active record, thanks but I'll continue with doctrine

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.

1

u/PetahNZ 3d ago

I prefer explicitly defined class properties. 

0

u/DrDam8584 5d ago

I always love this

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.

2

u/jkoudys 5d ago

Or nothing

-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"
},

https://docs.popphp.org/basics/modules

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

u/Powerful-Tomatillo77 4d ago

Maybe if you try Go you'll find what you tried to do with Pop PHP.

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 \b delimiters in search-and-replace is a clbuttic mistake. Even then, you still end up with methods like Stack::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

1

u/SparePartsHere 5d ago

Oh hell yeah, that's the one! Thanks! :D

3

u/brendt_gd 5d ago

Wild story indeed. I wonder what happened to him.

1

u/aequasi08 5d ago

Pixie?

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

u/dominikzogg 6d ago

Based on what you described:

  • No Magic
  • Not complicated
  • Fully PSR 15 compliant

https://github.com/chubbyphp/chubbyphp-framework