Source of file DoctorTask.php
Size: 1,504 Bytes - Last Modified: 2020-07-03T12:08:09+00:00
/var/www/docs.ssmods.com/process/src/src/Tasks/IndividualTasks/DoctorTask.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 | <?php namespace Sunnysideup\UpgradeToSilverstripe4\Tasks\IndividualTasks; use Sunnysideup\UpgradeToSilverstripe4\Tasks\Task; /** * Runs the silverstripe/upgrade task "environment". See: * https://github.com/silverstripe/silverstripe-upgrader#environment. * You can use this command to migrate an SilverStripe 3 _ss_environment.php * file to the .env format used by SilverStripe 4.' */ class DoctorTask extends Task { protected $taskStep = 's30'; protected $param1 = ''; protected $param2 = ''; protected $rootDirForCommand = ''; public function getTitle() { return 'Fix up .htaccess and index.html'; } public function getDescription() { return ' Runs the silverstripe/upgrade task "doctor". See: https://github.com/silverstripe/silverstripe-upgrader#doctor. CAREFUL: will remove any customisations!'; } public function runActualTask($params = []) { if ($this->mu()->getIsModuleUpgrade()) { //do nothing ... } else { $this->runSilverstripeUpgradeTask( 'doctor', $this->param1, $this->param2, $this->rootDirForCommand ); $this->setCommitMessage('MAJOR: changing environment file(s)'); } } protected function hasCommitAndPush() { if ($this->mu()->getIsModuleUpgrade()) { return false; } return true; } } |