1

I use symfony2. In AppKernel.php, I writed like this:

class AppKernel extends Kernel {

    public function __construct ($environment, $debug) {
        parent::__construct($environment, $debug);
        echo "ok";
    }
}

in the page, it shows "ok" once in prod environment, but shows twice in dev environment. it seems the AppKernel is instantiated twice? I don't know why. Any ideas?

1 Answer 1

2

In dev environment, symfony2 provides the "web debug toolbar", which is loaded asynchronouly. This means that a second kernel is booted to load the bar.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. but I have closed "web debug toolbar". Is that in app/config/config_dev.yml? web_profiler: toolbar: false intercept_redirects: false

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.