While working with switchTo() I noticed an odd behavior. For the following code:
echo sfContext::getInstance()->getConfiguration()->getApplication().'-'.
sfProjectConfiguration::getActive()->getApplication() . PHP_EOL;
sfContext::switchTo('frontend');
echo sfContext::getInstance()->getConfiguration()->getApplication().'-'.
sfProjectConfiguration::getActive()->getApplication() . PHP_EOL;
sfContext::switchTo('backend');
echo sfContext::getInstance()->getConfiguration()->getApplication().'-'.
sfProjectConfiguration::getActive()->getApplication() . PHP_EOL;
The output is:
backend-backend
frontend-frontend
backend-frontend <- relevant bit
I'm aware that there are many caveats on using sfContext::switchTo(), but I'm wondering if this is expected or if it's a bug?