for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of `Composer as a service`.
*
* (c) Pascal Borreli <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Ayaline\Bundle\ComposerBundle\Consumer\Step;
use Sonata\NotificationBundle\Consumer\ConsumerEvent;
/**
* @author Hubert Moutot <[email protected]>
class DumpFileStep extends AbstractStep
{
* {@inheritdoc}
public function execute(ConsumerEvent $event, $directory)
$this->triggerNewStep($event, ['message' => 'Starting async job']);
$this->filesystem->mkdir($this->workingTempPath.'/'.$directory);
$this->filesystem->dumpFile(
sprintf('%s/%s/composer.json', $this->workingTempPath, $directory),
$event->getMessage()->getValue('body')
);
return 0;
}