Skip to content

Instantly share code, notes, and snippets.

@alecs
Created December 5, 2024 16:45
Show Gist options
  • Save alecs/4bde29ba8a28f82c02cd78a7423f2052 to your computer and use it in GitHub Desktop.
Save alecs/4bde29ba8a28f82c02cd78a7423f2052 to your computer and use it in GitHub Desktop.
symfony v2 dump all params
<?php
use Symfony\Component\HttpFoundation\Request;
// Bootstrap the Symfony environment
require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__.'/../app/AppKernel.php';
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$kernel->boot();
// Get the container
$container = $kernel->getContainer();
// Get all parameters
$parameters = $container->getParameterBag()->all();
// Display the parameters
echo "<pre>";
print_r($parameters);
echo "</pre>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment