Merge branch 'release/1.7.3'

This commit is contained in:
Andy Miller 2021-01-21 15:19:11 -07:00
commit 1b6e4d4300
No known key found for this signature in database
GPG Key ID: 2B07A47E470BCFDE
7 changed files with 21 additions and 42 deletions

View File

@ -1,4 +1,4 @@
# v1.7.2
# v1.7.3
## 01/21/2021
1. [](#improved)
@ -12,6 +12,12 @@
* Fixed Clockwork debugger in sub-folder multi-site setups
* Fixed `Unsupported option "curl" passed to "Symfony\Component\HttpClient\CurlHttpClient"` in `bin/gpm selfupgrade` [#3165](https://github.com/getgrav/grav/issues/3165)
# v1.7.2
## 01/21/2021
1. [](#improved)
* This release was pulled due to a bug in the installer, 1.7.3 replaces it.
# v1.7.1
## 01/20/2021

View File

@ -8,8 +8,8 @@
// Some standard defines
define('GRAV', true);
define('GRAV_VERSION', '1.7.2');
define('GRAV_SCHEMA', '1.7.2_2021-01-21_1');
define('GRAV_VERSION', '1.7.3');
define('GRAV_SCHEMA', '1.7.0_2020-11-20_1');
define('GRAV_TESTING', false);
// PHP minimum requirement

View File

@ -113,7 +113,6 @@ class DirectInstallCommand extends GpmCommand
$io->newLine();
$io->writeln("Preparing to install <cyan>{$package_file}</cyan>");
if (Response::isRemote($package_file)) {
$io->write(' |- Downloading package... 0%');
try {
@ -131,7 +130,7 @@ class DirectInstallCommand extends GpmCommand
$io->write(' |- Downloading package... 100%');
$io->newLine();
}
} else {
} elseif (is_file($package_file)) {
$io->write(' |- Copying package... 0%');
$zip = GPM::copyPackage($package_file, $tmp_zip);
if ($zip) {

View File

@ -131,7 +131,8 @@ class SelfupgradeCommand extends GpmCommand
$io->writeln("which was released on {$release}");
$config = Grav::instance()['config'];
if ($config->get('versions.core.grav.schema') !== GRAV_SCHEMA) {
$schema = $config->get('versions.core.grav.schema');
if ($schema !== GRAV_SCHEMA && version_compare($schema, GRAV_SCHEMA, '<')) {
$io->newLine();
$io->writeln('However post-install scripts have not been run.');
if (!$this->all_yes) {

View File

@ -30,7 +30,11 @@ class GravCommand extends Command
{
$this->setupConsole($input, $output);
$this->initializeGrav();
// Old versions of Grav called this command after grav upgrade.
// We need make this command to work with older ConsoleTrait:
if (method_exists($this, 'initializeGrav')) {
$this->initializeGrav();
}
return $this->serve();
}

View File

@ -218,21 +218,16 @@ ERR;
throw new RuntimeException('Grav has already been installed here!', 400);
}
// Make sure that none of the Grav\Installer classes have been loaded, otherwise installation may fail!
// Load the installer classes.
foreach ($this->classMap as $class_name => $path) {
// Make sure that none of the Grav\Installer classes have been loaded, otherwise installation may fail!
if (class_exists($class_name, false)) {
throw new RuntimeException(sprintf('Cannot update Grav, class %s has already been loaded!', $class_name), 500);
}
require $path;
}
$grav = Grav::instance();
/** @var ClassLoader $loader */
$loader = $grav['loader'];
// Override Grav\Installer classes by using this version of Grav.
$loader->addClassMap($this->classMap);
$this->legacySupport();
$this->location = dirname($location, 4);

View File

@ -1,26 +0,0 @@
<?php
use Grav\Installer\InstallException;
use Grav\Installer\VersionUpdate;
use Grav\Installer\YamlUpdater;
return [
'preflight' => null,
'postflight' =>
function () {
// Only reset GPM releases value if upgrading from Grav 1.7 RC.
if (version_compare(GRAV_VERSION, '1.7', '<')) {
return;
}
/** @var VersionUpdate $this */
try {
// Keep old defaults for backwards compatibility.
$yaml = YamlUpdater::instance(GRAV_ROOT . '/user/config/system.yaml');
$yaml->undefine('gpm.releases');
$yaml->save();
} catch (\Exception $e) {
throw new InstallException('Could not update system configuration to maintain backwards compatibility', $e);
}
}
];