/** * Create the application. * * @return Application */ public function createApplication() { $configurationLoader = $this->createConfigurationLoader(); $extensionManager = $this->createExtensionManager(); $eventDispatcher = $this->createEventDispatcher(); $eventDispatcher->addSubscriber(new WorkingDirectoryListener($configurationLoader)); $application = new Application(self::NAME, self::VERSION, $configurationLoader, $extensionManager); $application->addCommands($this->getDefaultCommands()); $application->setDispatcher($eventDispatcher); return $application; }