1. Go to this page and download the library: Download yii2tech/selfupdate 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/ */
return [
// list of email addresses, which should be used to send execution reports
'emails' => [
'[email protected]',
],
// Mailer component to be used
'mailer' => 'mailer',
// Mutex component to be used
'mutex' => 'mutex',
// path to project root directory (VCS root directory)
'projectRootPath' => '@app',
// web path stubs configuration
'webPaths' => [
[
'path' => '@app/web',
'link' => '@app/httpdocs',
'stub' => '@app/webstub',
],
],
// cache components to be flushed
'cache' => [
'cache'
],
// temporary directories, which should be cleared after project update
'tmpDirectories' => [
'@app/web/assets',
'@runtime/URI',
'@runtime/HTML',
'@runtime/debug',
],
// list of shell commands, which should be executed after project update
'afterUpdateCommands' => [
'php ' . escapeshellarg($_SERVER['SCRIPT_FILENAME']) . ' migrate/up --interactive=0',
],
];