执行 composer update 时,提示:Package codeception/base is abandoned, you should avoid using it. No replacement was suggested. 的解决
1、执行 composer update 时,提示:Package codeception/base is abandoned, you should avoid using it. No replacement was suggested.,如图1
PS E:\wwwroot\github-shuijingwan-yii2-app-advanced> composer update Loading composer repositories with package information Updating dependencies (including require-dev) The "https://asset-packagist.org/p/provider-latest/5ef0dd267fe49b34e98cd105cacfd72ecd16b1c8f262edeecb0248316fe7ff50.json " file could not be downloaded: failed to open stream: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试 失败。 https://asset-packagist.org could not be fully loaded, package information was loaded from the local cache and may be ou t of date Package operations: 1 install, 27 updates, 0 removals Package codeception/base is abandoned, you should avoid using it. No replacement was suggested. Writing lock file Generating autoload files 19 packages you are using are looking for funding. Use the `composer fund` command to find out more! Seems you have upgraded Yii Framework from version 2.0.31 to 2.0.35. Please check the upgrade notes for possible incompatible changes and adjust your application code accordingly.
2、由于使用的是 Yii 2 高级项目模板,查看 GitHub 上的 composer.json,发现已经没有依赖:codeception/base,参考:https://github.com/yiisoft/yii2-app-advanced/blob/2.0.35/composer.json ,如图2
3、在本地环境中,composer.json 仍然依赖:codeception/base,如图3
"require-dev": { "yiisoft/yii2-debug": "~2.0.0", "yiisoft/yii2-gii": "~2.0.0", "yiisoft/yii2-faker": "~2.0.0", "codeception/base": "^2.2.3", "codeception/verify": "~0.3.1" },
4、更改 composer.json 文件以与 GitHub 上的 composer.json 一致
"require-dev": { "yiisoft/yii2-debug": "~2.1.0", "yiisoft/yii2-gii": "~2.1.0", "yiisoft/yii2-faker": "~2.0.0", "codeception/codeception": "^4.0", "codeception/module-asserts": "^1.0", "codeception/module-yii2": "^1.0", "codeception/module-filesystem": "^1.0", "codeception/verify": "~0.5.0 || ~1.1.0", "symfony/browser-kit": ">=2.7 <=4.2.4" },
5、再次执行 composer update ,将开发依赖项更新至最新版本,提示:Package codeception/base is abandoned, you should avoid using it. No replacement was suggested. 已经消失。如图4
PS E:\wwwroot\github-shuijingwan-yii2-app-advanced> composer update Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 13 installs, 15 updates, 2 removals - Removing bower-asset/typeahead.js (v0.11.1) - Removing codeception/base (2.5.6) - Updating phpunit/php-code-coverage (6.1.4 => 7.0.10): Downloading (100%) - Installing sebastian/type (1.1.3): Downloading (100%) - Updating sebastian/global-state (2.0.0 => 3.0.0): Downloading (100%) - Updating phpunit/phpunit (7.5.20 => 8.5.5): Downloading (100%) - Updating codeception/phpunit-wrapper (7.8.0 => 8.1.2): Downloading (100%) - Updating codeception/verify (0.3.3 => 1.1.0): Loading from cache - Installing opis/closure (3.5.3): Downloading (100%) - Updating yiisoft/yii2-debug (2.0.14 => 2.1.13): Downloading (100%) - Updating yiisoft/yii2-gii (2.0.8 => 2.1.4): Downloading (100%) - Installing symfony/polyfill-intl-normalizer (v1.17.0): Downloading (100%) - Installing symfony/polyfill-intl-grapheme (v1.17.0): Downloading (100%) - Installing symfony/string (v5.1.0): Downloading (100%) - Updating symfony/console (v4.4.9 => v5.1.0): Downloading (100%) - Installing psr/event-dispatcher (1.0.0): Downloading (100%) - Updating symfony/event-dispatcher-contracts (v1.1.7 => v2.1.2): Downloading (100%) - Installing symfony/deprecation-contracts (v2.1.2): Downloading (100%) - Updating symfony/event-dispatcher (v4.4.9 => v5.1.0): Downloading (100%) - Updating symfony/yaml (v4.4.9 => v5.1.0): Downloading (100%) - Updating symfony/css-selector (v4.4.9 => v5.1.0): Downloading (100%) - Updating codeception/stub (2.1.0 => 3.6.1): Downloading (100%) - Updating symfony/finder (v4.4.9 => v5.1.0): Downloading (100%) - Installing codeception/lib-asserts (1.12.0): Downloading (100%) - Installing codeception/codeception (4.1.5): Downloading (100%) - Installing codeception/module-asserts (1.2.1): Downloading (100%) - Downgrading symfony/browser-kit (v4.4.9 => v4.2.4): Loading from cache - Installing codeception/lib-innerbrowser (1.3.1): Downloading (100%) - Installing codeception/module-yii2 (1.1.0): Downloading (100%) - Installing codeception/module-filesystem (1.0.2): Loading from cache codeception/codeception suggests installing hoa/console (For interactive console functionality) codeception/codeception suggests installing codeception/specify (BDD-style code blocks) codeception/codeception suggests installing symfony/phpunit-bridge (For phpunit-bridge support) codeception/codeception suggests installing stecman/symfony-console-completion (For BASH autocompletion) Writing lock file Generating autoload files 25 packages you are using are looking for funding. Use the `composer fund` command to find out more!
近期评论