diff --git a/README.md b/README.md index 3f7e04b..89505ae 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ - [Installing Statamic](#installing-statamic) - [Checking Statamic versions](#checking-statamic-versions) - [Updating Statamic](#updating-statamic) +- [Troubleshooting](#troubleshooting) + - [Composer version conflicts](#composer-version-conflicts) ## Installing the CLI tool @@ -119,3 +121,14 @@ statamic update ``` This is just syntactic sugar for the `composer update statamic/cms --with-dependencies` command. + +## Troubleshooting + +### Composer version conflicts + +If you installed the CLI tool [directly](#installing-directly), it shares Composer's global dependencies with every +other globally required package. When those packages need different versions of the same dependency, Composer may fail +to install or update the CLI tool. + +The easiest fix is to remove the global install (`composer global remove statamic/cli`) and +[use cpx](#installing-the-cli-tool) instead, which runs the CLI tool in isolation. diff --git a/composer.json b/composer.json index 6711a5d..6ce6f96 100644 --- a/composer.json +++ b/composer.json @@ -4,13 +4,13 @@ "keywords": ["statamic"], "license": "MIT", "require": { - "php": "^8.1", - "composer-runtime-api": "^2.0", + "php": "^8.2", + "composer-runtime-api": "^2.2", "guzzlehttp/guzzle": "^6.5.5|^7.0.1", "illuminate/collections": "^10.0|^11.0|^12.0|^13.0", - "laravel/prompts": "^0.1.3|^0.2.0|^0.3.0", - "symfony/console": "^4.0|^5.0|^6.0|^7.0", - "symfony/process": "^4.2|^5.0|^6.0|^7.0" + "laravel/prompts": "^0.3.19", + "symfony/console": "^6.2|^7.0", + "symfony/process": "^6.0|^7.0" }, "require-dev": { "phpunit/phpunit": "^8.0" diff --git a/src/Concerns/RunsCommands.php b/src/Concerns/RunsCommands.php index e61fa06..b1a2092 100644 --- a/src/Concerns/RunsCommands.php +++ b/src/Concerns/RunsCommands.php @@ -3,7 +3,6 @@ namespace Statamic\Cli\Concerns; use Laravel\Prompts\Support\Logger; -use Laravel\Prompts\Task; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Process\Process; @@ -100,7 +99,6 @@ private function shouldRunAsTask(): bool { return $this->output->getVerbosity() === OutputInterface::VERBOSITY_NORMAL && $this->output->isDecorated() - && property_exists(Task::class, 'keepSummary') && function_exists('pcntl_fork'); }