文档中的支付宝SDK问题yansongda/pay

唯二

问题描述

用webman框架按照文档说的执行
composer require yansongda/pay ^3.0.0
命令后,提示 psr/log[1.1.0, ..., 1.1.4] ,现在用psr/log是3.0.2的,psr/log降到1.1.4左右的话,会有其他的问题吗

程序代码

composer require yansongda/pay ^3.0.0
./composer.json has been updated
Running composer update yansongda/pay
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires yansongda/pay 3.0.0 -> satisfiable by yansongda/pay[v3.0.0].
    - yansongda/pay v3.0.0 requires psr/log ^1.1 -> found psr/log[1.1.0, ..., 1.1.4] but the package is fixed to 3.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.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

报错信息

composer require yansongda/pay ^3.0.0
./composer.json has been updated
Running composer update yansongda/pay
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires yansongda/pay 3.0.0 -> satisfiable by yansongda/pay[v3.0.0].
    - yansongda/pay v3.0.0 requires psr/log ^1.1 -> found psr/log[1.1.0, ..., 1.1.4] but the package is fixed to 3.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.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

截图报错信息里报错文件相关代码

composer require yansongda/pay ^3.0.0
./composer.json has been updated
Running composer update yansongda/pay
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1

  • Root composer.json requires yansongda/pay 3.0.0 -> satisfiable by yansongda/pay[v3.0.0].
  • yansongda/pay v3.0.0 requires psr/log ^1.1 -> found psr/log[1.1.0, ..., 1.1.4] but the package is fixed to 3.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.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

操作系统及workerman/webman等框架组件具体版本

Workerman/5.1.0 PHP/8.2.13 (Jit off) Windows NT/10.0
"workerman/webman-framework": "^2.1",

203 2 0
2个回答

唯二

我修改过composer.json 里面的psr/log版本,执行了 composer update psr/log --with-all-dependencies
后面又报了这个:

Problem 1
Problem 2

  • workerman/webman-framework is locked to version v2.1.2 and an update of this package was not requested.
  • workerman/webman-framework v2.1.2 requires psr/log ^3.0 -> found psr/log[dev-master, 3.0.0, 3.0.1, 3.0.2, 3.x-dev (alias of dev-master)] but it conflicts with your root composer.json require (^1.1).
    Problem 3
  • symfony/cache is locked to version v7.2.4 and an update of this package was not requested.
  • symfony/cache v7.2.4 requires psr/log ^1.1|^2|^3 -> found psr/log[dev-master, 1.1.0, ..., 1.1.4, 2.0.0, 3.0.0, 3.0.1, 3.0.2, 3.x-dev (alias of dev-master)] but these were not loaded, likely because it conflicts with another require.
    Problem 4
  • workerman/webman-framework v2.1.2 requires psr/log ^3.0 -> found psr/log[dev-master, 3.0.0, 3.0.1, 3.0.2, 3.x-dev (alias of dev-master)] but it conflicts with your root composer.json require (^1.1).
  • tinywan/exception-handler v1.6.0 requires workerman/webman-framework ^1.5||^2.0 -> satisfiable by workerman/webman-framework[v2.1.2].
  • tinywan/exception-handler is locked to version v1.6.0 and an update of this package was not requested.
  • 暂无评论

装的版本不对,可能你用了powershell,powershell会转义字符^,直接装3.0.0去了
powsershell 用命令
composer require yansongda/pay ~3.0 来安装

  • 唯二 5天前

    谢谢,是这个问题导致的。

×
🔝