As you can retrieve PHP version with PHP_VERSION, SYMFONY_VERSION seems the best compromise.
If we want a class constant, the only possibility is sfCoreAutoload::VERSION as this is the very first class to be loaded. sfContext is loaded much later and maybe not loaded at all if you just create a configuration object. Fabien -- Fabien Potencier Sensio CEO - symfony lead developer http://www.sensiolabs.com/ http://www.symfony-project.com/ Sensio Labs Tél: +33 1 40 99 80 80 Matthias N. wrote: > On 5 Feb., 15:17, Fabien POTENCIER <[EMAIL PROTECTED] > project.com> wrote: >> Hi all, >> >> The sfConfiguration refactoring is almost finished. It takes times but a >> lot of problems arose during the refactoring. >> >> I still have some design decisions to take and to begin with, I need >> your advice on the way to get the current symfony version. >> >> In symfony 1.0, to get the current symfony version, you had the >> sfCore::VERSION constant. >> >> In symfony 1.1, sfCore will disappear and things will be dispatched >> between sfContext, sfProjectConfiguration, and sfApplicationConfiguration. >> >> So, the question is, where to put this information? >> >> The first thing you manipulate in symfony 1.1 is the configuration and >> the autoloader, so we can have >> >> sfCoreAutoload::VERSION >> sfProjectConfiguration::VERSION >> sfCoreAutoload::SYMFONY_VERSION. >> >> But it doesn't feel right, does it? >> >> Perhaps we can have a simple global constant >> >> SYMFONY_VERSION >> >> As always, all comments are very welcomed. > > A global constant doesn't feel good these days.. > > sfCoreAutoload::VERSION -- looks ugly but as it is loaded very early > it seems to be the best one > > What about sfContext::VERSION ? > > Regards, > Matthias > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
