=== HELLCAT's Symfony Var-Dumper for WordPress ===
Contributors: hellcat, smyrkingfloof
Tags: development, tool
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.4
Stable tag: 0.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

== Description ==

A small plugin that pulls the Symfony Var-Dumper into WordPress to enable the dump() PHP command and optionally the "|dump" Twig filter.

All dumps are collected in the background, never directly printed out to the site frontend, there is then an admin page under Tools => Dumps that lists all requests for which dumps where collected and where the collected dumps can then be browsed and viewed.

= Enabling the Twig dump filter =

If you're using Twig in your theme or plugin, add this to functions.php or the plugin main php file:

```
add_filter( 'vardumper_collect_twig_instances', function( $twigs ) {
    $twigs[] = wp_service('twig');
    return $twigs;
});
```

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/hcsf-vardumper`,
   or install directly through the WordPress plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.

= Usage =

In PHP code, just call `dump($variable)`.

If the Twig filter is enabled, inside a Twig template just use it like `{{ some-variable|dump }}`

Then go to WP-Admin => Tools => Dumps, click on the requests entry in the list to view all collected dumps for that request.

== Changelog ==

= 0.0.1 =
* Initial release

== Credits ==

(c) HELLCAT // released under GPL2 or newer
