PHP code example of silverstripe / upgrader
1. Go to this page and download the library: Download silverstripe/upgrader library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
silverstripe / upgrader example snippets
/** @skipUpgrade */
return Injector::inst()->get('MyService');
private static $has_one = [
'Image' => 'Image',
];
bash
upgrade-code add-namespace "My\Namespace" ./mysite/code/SomeCode.php --write -vvv
YML
doctorTasks:
SilverStripe\Dev\CleanupInstall: src/Dev/CleanupInstall.php