fabpot/Twig — pull request #611 by m0ppers (2012-01-24 17:07:47+00:00)
Title: Remove optimization (covered by Optimization VAR_ACCESS anyway)

I have an own template class implementing getContext() and this one drove me completely mad after a twig upgrade.

After compilation the resulting templates have:

isset($context['bla'])

vs.

$this->getContext('bla')

Changing the Name Node however didn't have any effect and i saw that due to the optimizations by the SetTemp class twig doesn't even reach the Name Node. In fact SetTemp has the isset optimization hardcoded (which is ok).

I could simply fix my issue by setting optimizations to -9 (all optimizations except VAR_ACCESS). However the issue will reappear immediately when using PHP 5.4. Please remove the isset stuff from the non optimized node and let the optimization handler handle it (which i would disable in my case)