Live data from Hacker News

A Docker-inspired Heroku clone in 100 lines of PHP

gist.github.com

31–34 of 34 posts

Re: A Docker-inspired Heroku clone in 100 lines of PHP

#32
post #24

Earlier quoted context omitted.

Silex is hardly a "micro framework", it's basically Symfony without the configuration files. So it's a LOT of code. I like it by the way, always hated the Spring like insanity of Symfony, but let's not pretend Silex + all Symfony libs the framework has to import are small. The irony is that for this very project, Both Silex and Symfony\Process are completely redundant, especially with PHP bloated core APIs.

That's not correct. Silex replaces the Symfony DI (or service locator, if you will) component with something much simpler called Pimple. You can read the code within a few minutes. The only other required libraries for Silex to function are the event dispatcher, routing (which you can swap out for something like nikic/FastRoute), and the request/response stuff. I'm not sure if you think that's a "lot" of code, but if…

> That's not correct. Silex replaces the Symfony DI (or service locator, if you will) component with something much simpler called Pimple. You can read the code within a few minutes.

That's exactly what I said, what is the point of your message? With Silex there is no configuration through XML or YAML. What is not correct?

Re: A Docker-inspired Heroku clone in 100 lines of PHP

#33
Am I the only one who noticed `php -S` is used, which is a debug server, not intended even for testing purposes?

One cannot seriously consider this for anything except a proof that basic utilities like zip, netcat, supervisord and php can be scripted with a higher-level language to hack together something that somehow works.

That being said, I like this cool hack.

Re: A Docker-inspired Heroku clone in 100 lines of PHP

#34
post #32

Earlier quoted context omitted.

That's not correct. Silex replaces the Symfony DI (or service locator, if you will) component with something much simpler called Pimple. You can read the code within a few minutes. The only other required libraries for Silex to function are the event dispatcher, routing (which you can swap out for something like nikic/FastRoute), and the request/response stuff. I'm not sure if you think that's a "lot" of code, but if…

> That's not correct. Silex replaces the Symfony DI (or service locator, if you will) component with something much simpler called Pimple. You can read the code within a few minutes. That's exactly what I said, what is the point of your message? With Silex there is no configuration through XML or YAML. What is not correct?

You ranted about it being a "lot" of code. The default Silex installation doesn't even bring in the Security component, which is probably what prompted your comparison to Spring.

Event dispatching + kernel (basically a handler) + request/response isn't particularly complex, is it?

Post reply on HN