在运行composer global require laravel/valet
时,照明/合同和照明/容器被锁定到 v5.4.36:
- Locking illuminate/container (v5.4.36)
- Locking illuminate/contracts (v5.4.36)
运行任何valet
命令都会返回一长串已弃用的方法,类似于以下内容:
Deprecated: Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/lluismather/.composer/vendor/illuminate/container/Container.php on line 1159
Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/lluismather/.composer/vendor/illuminate/container/Container.php on line 788
如果我尝试升级这些,我会收到以下错误:
Problem 1
- Root composer.json requires illuminate/contracts 8.77.1 -> satisfiable by illuminate/contracts[v8.77.1].
- illuminate/contracts v8.77.1 requires psr/container ^1.0 -> found psr/container[1.0.0, 1.1.0, 1.1.1, 1.1.2] but the package is fixed to 2.0.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Problem 2
- illuminate/container v5.4.36 requires illuminate/contracts 5.4.* -> found illuminate/contracts[v5.4.0, ..., v5.4.36] but it conflicts with your root composer.json require (8.77.1).
- laravel/valet v2.18.1 requires illuminate/container ~5.1|^6.0|^7.0|^8.0 -> satisfiable by illuminate/container[v5.4.36].
- laravel/valet is locked to version v2.18.1 and an update of this package was not requested.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
在我看来,好像代客锁定了这些软件包的弃用版本,导致我收到警告和错误。对于如何升级illuminate/contracts
和illuminate/container
停止弃用通知以及使用我当前的设置进行代客打球的任何想法或见解将不胜感激。
版本:php 8.1.1 composer 2.1.14 laravel 8 valet 2.18.1