Symfony 2/3 profiler extension, to change the Carbon php date in the whole project.
Install the package with composer.
composer require dem3trio/carbon-profiler-bundle
As the package adds a new panel in the Symfony profiler, you should add the bundle under
the dev
section.
// app/AppKernel.php
public function registerBundles()
{
$bundles = [
// ... prod bundles
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
// ... dev bundles
if ('dev' === $this->getEnvironment()) {
$bundles[] = new Dem3trio\Bundle\CarbonProfilerBundle\CarbonProfilerBundle();
}
}
}
//
Add the routing file under the routing_dev.yml file
# app/config/routing_dev.yml
_time_machine:
resource: '@CarbonProfilerBundle:Resources/config/routing.yml'
prefix: /_time_machine