/** * {@inheritdoc} */ public function boot() { // it is a quick way to check if loader was enabled $wasDebugEnabled = class_exists('\\Symfony\\Component\\Debug\\DebugClassLoader', false); if ($wasDebugEnabled) { // disable temporary to apply AOP loader first DebugClassLoader::disable(); } $this->container->get('goaop.aspect.container'); if (!AopComposerLoader::wasInitialized()) { throw new \RuntimeException("Initialization of AOP loader was failed, probably due to Debug::enable()"); } if ($wasDebugEnabled) { DebugClassLoader::enable(); } }