for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SilverStripe\Addons\Tasks;
use SilverStripe\Dev\BuildTask;
use SilverStripe\Addons\Services\AddonUpdater;
/**
* Runs the add-on updater.
*/
class UpdateAddonsTask extends BuildTask
{
protected $title = 'Update Add-ons';
protected $description = 'Updates add-ons from Packagist';
private $updater;
public function __construct(AddonUpdater $updater)
$this->updater = $updater;
}
public function run($request)
$this->updater->update(
(bool)$request->getVar('clear'),
$request->getVar('addons') ? explode(',', $request->getVar('addons')) : null
);