Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream debugbar twig extensions #632

Merged
merged 1 commit into from
Mar 20, 2024
Merged

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Mar 20, 2024

@barryvdh what do you think about upstream twig extensions?

// enable {% measure 'foo' %} {% endmeasure %} tags for time measure on templates
$twig->addExtension(new DebugBar\Bridge\Twig\MeasureTwigExtension($timeDataCollector ?? null));

// enable {{ dump('foo') }} function on templates
$twig->addExtension(new DebugBar\Bridge\Twig\DumpTwigExtension());

// enable {{ debug('foo') }} function on templates
$twig->enableDebug();
$twig->addExtension(new DebugBar\Bridge\Twig\DebugTwigExtension($messagesCollector ?? null));

image

@barryvdh
Copy link
Collaborator

What do you mean upstream?

@erikn69
Copy link
Contributor Author

erikn69 commented Mar 20, 2024

This extensions are already on laravel/debugbar, but not on php-debugbar
Maybe later the same code could be extended

@erikn69 erikn69 marked this pull request as draft March 20, 2024 15:56
@erikn69 erikn69 marked this pull request as ready for review March 20, 2024 16:22
@barryvdh barryvdh merged commit 3adb1e4 into maximebf:master Mar 20, 2024
7 checks passed
@barryvdh
Copy link
Collaborator

Ah yes I thought it looked familiar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants