Sunnysideup\UpgradeToSilverstripe4\ModuleUpgrader

Synopsis

class ModuleUpgrader extends ModuleUpgraderBaseWithVariables {
  • // Inherited methods from GettersAndSetters
  • public void __call()
  • // Inherited methods from Creator
  • public void destroy()
  • public static mixed create()
}

Hierarchy

Members

protected

  • $aboveWebRootDirLocation — string
    location of web root above module
  • $argv
  • $arrayOfModules — array
    specified like this: [ 'VendorName' => 'A', 'VendorNamespace' => 'A', 'PackageName' => 'Package1', 'PackageNamespace' => 'Package1', 'GitLink' => 'git@github.com:foor/bar-1.git', 'UpgradeAsFork' => false, 'NameOfBranchForBaseCode' => 'develop', ], [ 'VendorName' => 'A', 'VendorNamespace' => 'A', 'PackageName' => 'Package2', 'PackageNamespace' => 'Package2', 'GitLink' => 'git@github.com:foor/bar-2.git', 'UpgradeAsFork' => false, 'NameOfBranchForBaseCode' => 'master', ], required are: - VendorName - PacakageName The rest can be deduced (theoretically)
  • $availableRecipes — array
    list of recipes available
  • $commandLineExecSunnysideup\UpgradeToSilverstripe4\PHP2CommandLineSingleton|null
    Reference to the commandline printer that outputs everything to the command line
  • $composerEnvironmentVars — string
    e.g. COMPOSER_HOME="/home/UserName"
  • $currentlyRunning — string
    command that is currently running
  • $customVariablesForTasks — array
    records variables for tasks, like this: [ 'TaskName' => [ 'VariableName' => 'VariableValue', ], ]
  • $defaultNamespaceForTasks — string
    The default namespace for all tasks
  • $endWith — string
    end the upgrade sequence after a particular task
  • $frameworkComposerRestraint — string
    e.g. ^4.4
  • $gitLinkAsHTTPS — string
    git link for the module in https form e.g. https://github.com/sunnysideup/silverstripe-dynamiccache/
  • $gitLinkAsRawHTTPS — string
    git link for the module in raw https form e.g. https://raw.githubusercontent.com/sunnysideup/silverstripe-dynamiccache/
  • $isModuleUpgradeSunnysideup\UpgradeToSilverstripe4\bool
    are we upgrading a module or a whole project?
  • $lastMethodHasBeenRunSunnysideup\UpgradeToSilverstripe4\bool
    Is this the last TASK we are running?
  • $listOfTasks — array
    An array of all the 'taskName's of the tasks that you wish to run during the execution of this upgrader task.
  • $locationOfSSUpgradeModule — string
    //e.g. 'upgrade-code' //e.g. '~/.composer/vendor/bin/upgrade-code' //e.g. '/var/www/silverstripe-upgrade_to_silverstripe_4/vendor/silverstripe/upgrader/bin/upgrade-code'
  • $locationOfThisUpgrader — string
    //e.g. 'upgrade-code' //e.g. '~/.composer/vendor/bin/upgrade-code' //e.g. '/var/www/silverstripe-upgrade_to_silverstripe_4/vendor/silverstripe/upgrader/bin/upgrade-code'
  • $logFileLocation — string
  • $logFolderDirLocation — string
    The folder for storing the log file in used in setting the php2 command line printer up
  • $makeKeyNotesSunnysideup\UpgradeToSilverstripe4\bool
    does the exec output Key Notes?
  • $moduleDirLocations — array
    Directory that holds the module or project.
  • $nameOfBranchForBaseCode — string
    name of the branch that exists as the starting point for upgrade
  • $nameOfTempBranch — string
    name of the branch created to do the upgrade
  • $nameOfUpgradeStarterBranch — string
    name of the branch to be created that we use a starter branch for upgrade
  • $onlyRun — string
    only run this task ...
  • $originComposerFileLocation — string
  • $outOfOrderTaskSunnysideup\UpgradeToSilverstripe4\bool
    is this out of order - i.e. no influence on next task
  • $packageFolderNameForInstall — string
    e.g. install folder for package in SS3.
  • $packageName — string
    Package name for the module
  • $packageNamespace — string
    Name space for the modules package
  • $parentProjectForModule — string
    e.g. git@github.com:sunnysideup/silverstripe-ecommerce_test.git
  • $parentProjectForModuleBranchOrTag — string
    e.g. master or 4.2.2
  • $recipe — string
  • $restartSessionSunnysideup\UpgradeToSilverstripe4\bool
    Should the session details be deleted before we start?
  • $runInteractivelySunnysideup\UpgradeToSilverstripe4\bool
    if set to true it will run each step and then stop.
  • $runIrreversiblySunnysideup\UpgradeToSilverstripe4\bool
    finish the run with a merge into master.
  • $runLastOneAgainSunnysideup\UpgradeToSilverstripe4\bool
    Do we run the last step again?
  • $sessionFileName — string
  • $sessionManagerSunnysideup\UpgradeToSilverstripe4\SessionManagementInterface|null
    Reference to the commandline printer that outputs everything to the command line
  • $singleton — mixed
    Holds the only instance of me
  • $startFrom — string
    start the upgrade sequence at a particular task
  • $taskSteps — array
    A list of task groups this will be set from recipe - so we need this!
  • $themeDirLocation — string
    Combination of the web dir root name and the aboveWebRootDirLocation
  • $upgradeAsForkSunnysideup\UpgradeToSilverstripe4\bool
    Should the upgrade to this module create a fork
  • $vendorAndPackageFolderNameForInstall — string
    e.g. sunnysideup/my-cool-module
  • $vendorName — string
    Name of module vendor
  • $vendorNamespace — string
    module vendors namespace
  • $verboseSunnysideup\UpgradeToSilverstripe4\bool
    Show ALL the information or just a little bit.
  • $webRootDirLocation — string
    Combination of the web dir root name and the aboveWebRootDirLocation
  • $webRootName — string

Methods

protected

public

  • applyRecipe()
  • colourPrint() — Executes given operations on the PHP2CommandLineSingleton instance Documentation for this can be found in the PHP2CommandLineSingleton module
  • execMe() — Executes given operations on the PHP2CommandLineSingleton instance Documentation for this can be found in the PHP2CommandLineSingleton module
  • getLastMethodRun()
  • run() — Starts the command line output and prints some opening information to the output also initalises various environment variables

Inherited from Sunnysideup\UpgradeToSilverstripe4\ModuleUpgraderBaseWithVariables

protected

public

Inherited from Sunnysideup\UpgradeToSilverstripe4\Traits\GettersAndSetters

public

  • __call() — creates magic getters and setters if you call $this->getFooBar() then it will get the variable FooBar even if the method getFooBar does not exist.

Inherited from Sunnysideup\UpgradeToSilverstripe4\Traits\Misc

protected

public

Inherited from Sunnysideup\UpgradeToSilverstripe4\Traits\Creator

public