/** * Performs a diff with the target * * @param string $target * @param string $version */ public function diff($target, $version) { $version = $this->getRepository()->getVersion($version); $this->assertTargetExists($target, $this->getConfig()->getConfig()); $transporter = $this->getTransporter($target); $repository = $this->getRepository(); $io = $this->getIO(); $remoteInfoFile = $this->container->getParameter('conveyor.remoteinfofile'); $strategy = $this->getStrategy($transporter); $context = new Context(); $context->setVersion($version)->setTarget($target)->setStrategy($strategy); $manager = new StageManager($context, $this->container->get('dispatcher')); $manager->addStage('get.remote.version', new Stage\RetrieveRemoteVersionInfoStage($transporter, $repository, $io, $remoteInfoFile, array('getRemoteVersion')))->addStage('diff', new Stage\DiffStage($repository, $io))->execute(); }