/carbon-profiler-bundle

Symfony 2/3 profiler extension, to change the Carbon date in the whole project.

Primary LanguagePHPMIT LicenseMIT

Carbon Profiler Bundle

SensioLabsInsight

Symfony 2/3 profiler extension, to change the Carbon php date in the whole project.

Instalation

Install the package with composer.

composer require dem3trio/carbon-profiler-bundle

Configuration

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