Enabling twig dump if DEBUG is defined

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
roufneck
Registered User
Posts: 7
Joined: Sat Oct 11, 2014 10:34 am

Enabling twig dump if DEBUG is defined

Post by roufneck »

I'm not sure how to do requests or ask for a feature yet. Since this is fairly simple, I'll just post it here and I'll find out how to do this next time.

It would be handy to enable the twig dump function when DEBUG is defined. The debug setting is already passed through to the twig environment but it doesn't activate the dump function.

If you add this to ./phpbb/template/twig/twig.php near line 110:

Code: Select all

if (defined('DEBUG')) {
	$this->twig->addExtension(new \Twig_Extension_Debug());
}
It enables this function: http://twig.sensiolabs.org/doc/functions/dump.html

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: Enabling twig dump if DEBUG is defined

Post by Nicofuma »

Can you create a ticket on the tracker for that please?
Member of the phpBB Development-Team
No Support via PM

roufneck
Registered User
Posts: 7
Joined: Sat Oct 11, 2014 10:34 am

Re: Enabling twig dump if DEBUG is defined

Post by roufneck »


Post Reply