Skip to content

Commit

Permalink
Merge branch 'develop' into 4.9
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
  • Loading branch information
brandonkelly committed Mar 20, 2024
2 parents 45e00ba + af4a1b1 commit 4260566
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Unreleased

- Selectize inputs no longer automatically select the hovered option on <kbd>Tab</kbd> press. ([selectize/selectize.js#2085](https://github.com/selectize/selectize.js/issues/2085))
- The `setup/cloud` command now ensures that the environment and `composer.json` are configured to use PHP 8.1+.
- Fixed a JavaScript error that could occur if another error occurred when performing an element action.

## 4.8.4 - 2024-03-19

Expand Down
15 changes: 14 additions & 1 deletion src/console/controllers/SetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,19 @@ public function actionCloud(): int
return ExitCode::UNSPECIFIED_ERROR;
}

$minPhpVersion = '8.1';
$composerService = Craft::$app->getComposer();
$composerPhpVersion = $composerService->getConfig()['config']['platform']['php'] ?? null;
if ($composerPhpVersion !== null && version_compare($composerPhpVersion, $minPhpVersion, '<')) {
$this->failure("Craft Cloud requires PHP $minPhpVersion+, but your `composer.json` file is currently set to `$composerPhpVersion`.");
return ExitCode::UNSPECIFIED_ERROR;
}
$installedPhpVersion = App::phpVersion();
if (version_compare($installedPhpVersion, $minPhpVersion, '<')) {
$this->failure("Craft Cloud requires PHP $minPhpVersion+, but your environment is currently running $installedPhpVersion.");
return ExitCode::UNSPECIFIED_ERROR;
}

$moduleInstalled = class_exists('craft\cloud\Module');
$message = $this->markdownToAnsi(sprintf('%s the `craftcms/cloud` extension …',
$moduleInstalled ? 'Updating' : 'Installing',
Expand All @@ -608,7 +621,7 @@ public function actionCloud(): int
$output = new StreamOutput(fopen('php://output', 'w'));
$io = new ConsoleIO($input, $output, new HelperSet([new QuestionHelper()]));

Craft::$app->getComposer()->install([
$composerService->install([
'craftcms/cloud' => '*',
], $io);

Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/web/assets/cp/src/js/BaseElementIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -1567,8 +1567,8 @@ Craft.BaseElementIndex = Garnish.Base.extend(

this.afterAction(action, params);
})
.catch(({response}) => {
Craft.cp.displayError(response.data.message);
.catch((e) => {
Craft.cp.displayError(e?.response?.data?.message);
})
.finally(() => {
this.setIndexAvailable();
Expand Down

0 comments on commit 4260566

Please sign in to comment.