Re: [photon.users] Dévelopement avec photon
- Loic d'Anterroches
- 2011-03-17 @ 17:14
> Today, i start a project with photon, and they have something annoying
> during the dev.
> Photon load each class only one time, not at every request as mod_php
> with apache.
> so, when you are debugging, you must stop/start the photon server to
> force the reload of your class.
This is the purpose of Photon, to not load each time the classes. The
PHP "VM" is not stopping between requests and allows you to have great
> A nice option will be, in debug mode, unload all class loaded during
> the request after the end of it.
> Maybe we can do it by adding a middleware class to the project. It's
> will be smart that killing "hnu testserver"
This is not possible. You need to restart the server if you want to
reload the classes as PHP does not support hot replacing of your code.
One way to do it would be to have an inotify handler to kill/restart the
children when changes in the project dir are detected.
> They have a liitle trap for mongrel2 noob like me
> In the photon doc, section Anchoring A Photon Project In A Larger URL Space
> You spell about serve only a folder, like the /demo folder. They have
> 2 things to do, not only one :
> - configure photon -> "base_urls"
> - configure mongrel -> routes
Yes, you always need to have a working route in Mongrel2. I will add
that to the doc.
Indefero - Project management and code hosting - http://www.indefero.net
Photon - High Performance PHP Framework - http://photon-project.com
Céondo Ltd - Web + Science = Fun - http://www.ceondo.com