r/PHPhelp • • May 11 '23

Looking for forgoten PHP Framework

Ten years ago, i'd worked with framework that had "special" controller.In short - there was config only one simple config.ini - to cookies, db, session, paths, templates etc. and only one starter function ex. "App::run()".Controller was looking to specified directory and if name in URI was same as class name it run it.For example http://domain.ex/{className}/{method}/{params}.If method was not specified it runned ClassName::className() or ClassName::err404 (or similar if existed - don't remember correct name). So no router, no additional configs, just runme.Framework was is single small PHAR file (less than 300kb), and application data was in APP or PRIV folder.No composer, deps, just paste/config and run. CodeIgniter or Kohana excluded. Do you remember something? Or do you have something similar? Sadly i've lost contact with old company.

Edit: It had also simple AOP, but don't remember usage.

8 Upvotes

12 comments sorted by

6

u/[deleted] May 11 '23

There is a good probability that this was just some internal development of that company, and that you wont find anything about it...

What are you trying to achieve? If you want to use it for some new software, then you shouldn't. This sounds like it ignores every good practice and the probability is high that (even if you find it somewhere) it's abandoned and doesn't work on modern PHP Version (or will break in foreseeable future).

Modern technologies like composer (which might seem a bit unfamiliar at start) aren't there to make things more harder, but to make things easier... (And if you understand composer, then you will never want to work without it).

4

u/motylo May 11 '23

Maybe it was internal. I don't want anything to achive, just it reminded me something.

I understand composer. I've been working with Prado, CI, Kohana; and now with Laravel and Symfony. Funny thing is that, sometimes i require small frameworks without composer (like Fat-Free) - just copy, run and forget ;)

And sadly i must say that sometimes composer with all deps is annoying (just like current state of JS) for very small projects.

2

u/ddruganov May 11 '23

Try slim

1

u/MateusAzevedo May 11 '23

sometimes i require small frameworks without composer (like Fat-Free) - just copy, run and forget

With or without Composer, the workflow is pretty similar. Instead of copying a zip file (or a PHAR), you run a single Composer command at the start to install the framework/app skeleton. From there, Composer isn't needed anymore. You can simply write your code and copy everything to a server. I can't see myself writing require statements everywhere, so the autoloader provided by Composer is also very useful. My point is that Composer don't add any complexity and I don't see any reason not to use it nowadays.

About the "small framework": Slim could be useful here. Symfony can also be installed as a micro framework. Sure it's still "configuration over conventions", so not that simple to get started, but will be more "fat free".

1

u/phpworm May 11 '23

What you're describing sounds an awful lot like a front controller, which reminds me of these articles (roughly 10 years old)

1

u/motylo May 11 '23

I don't thinks so, that front controller is awful ;)

Currently using Router reminds me PHP3 and "switch(action)..."

2

u/rifts May 11 '23

I know it’s probably not the same but flightphp is a micro framework I use a lot, sounds close

1

u/amarukhan May 12 '23

Is it still being maintained? Last GitHub commit was in 2021...

1

u/rifts May 12 '23

Idk but it’s very small and simple, there probably isn’t much to maintain. I use it almost everyday

1

u/kAlvaro May 11 '23

Regarding the something similar part, CakePHP always emphasises its Conventions Over Configuration approach. But it's by no means simple.

1

u/Pen-y-Fan May 11 '23

There is a Youtube video by Laracasts which demonstrates how to create a router similar to this PHP for Beginners (2023 Edition)

-3

u/32gbsd May 11 '23

Write it yourself. You could probably write everything in 2 months