Closed7

Vonage API の PHP clientをfuelphpに入れる

plaincode_jpplaincode_jp

vonage の php SDK を、少々バージョン古いdocker環境のfuelphpにインストールしたい。
まだ、未解決だが、履歴残す。

// php sdk install
composer require vonage/client

plaincode_jpplaincode_jp

//udpate
composer self-update

//もとに戻す
Use composer self-update --rollback to return to version 1.10.7

plaincode_jpplaincode_jp

↑docker build できないので、やりなおし。

1. composer require vonage/client

エラー

vonage/client dev-master requires guzzlehttp/guzzle ^7.0 -> satisfiable by guzzlehttp/guzzle[7.2.0, 7.0.0, 7.0.0-beta.1, 7.0.0-beta.2, 7.0.0-rc.1, 7.0.1, 7.0.x-dev, 7.1.0, 7.1.1, 7.1.x-dev].

2. かわりに、client-core を試す

composer require vonage/client-core

エラー

vonage/client-core dev-master requires psr/http-client-implementation ^1.0 -> satisfiable by guzzlehttp/guzzle[7.2.0, 7.0.0, 7.0.0-beta.2, 7.0.0-rc.1, 7.0.1, 7.0.x-dev, 7.1.0, 7.1.1, dev-master, 7.1.x-dev].

3. nexmo/client

composer require nexmo/client

エラー

Problem 1
    - Installation request for nexmo/client dev-master -> satisfiable by nexmo/client[dev-master].
    - nexmo/client dev-master requires guzzlehttp/guzzle ^7.0 -> satisfiable by guzzlehttp/guzzle[7.2.0, 7.0.0, 7.0.0-beta.1, 7.0.0-beta.2, 7.0.0-rc.1, 7.0.1, 7.0.x-dev, 7.1.0, 7.1.1, 7.1.x-dev].

4. guzzlehttp/guzzle を入れる

composer require guzzlehttp/guzzle

エラー

- guzzlehttp/guzzle 7.1.0 requires guzzlehttp/psr7 ^1.6.1 -> satisfiable by guzzlehttp/psr7[1.x-dev, 1.6.1, 1.7.0].
    - guzzlehttp/guzzle 7.1.1 requires guzzlehttp/psr7 ^1.6.1 -> satisfiable by guzzlehttp/psr7[1.x-dev, 1.6.1, 1.7.0].
    - guzzlehttp/guzzle 7.2.0 requires guzzlehttp/psr7 ^1.7 -> satisfiable by guzzlehttp/psr7[1.x-dev, 1.7.0].
    - guzzlehttp/guzzle 7.1.x-dev requires guzzlehttp/psr7 ^1.7 -> satisfiable by guzzlehttp/psr7[1.x-dev, 1.7.0].
    - guzzlehttp/guzzle 7.2.0 requires guzzlehttp/psr7 ^1.7 -> satisfiable by guzzlehttp/psr7[1.x-dev, 1.7.0]

5. composer require guzzlehttp/psr7

エラー

Problem 1
    - Installation request for guzzlehttp/psr7 ^2.0@dev -> satisfiable by guzzlehttp/psr7[2.0.x-dev].
    - guzzlehttp/guzzle 6.3.x-dev requires guzzlehttp/psr7 ^1.4 -> satisfiable by guzzlehttp/psr7[1.x-dev, 1.5.x-dev].
    - Can only install one of: guzzlehttp/psr7[2.0.x-dev, 1.x-dev].
    - Can only install one of: guzzlehttp/psr7[2.0.x-dev, 1.x-dev].
    - Can only install one of: guzzlehttp/psr7[2.0.x-dev, 1.5.x-dev].
    - Installation request for guzzlehttp/guzzle (locked at 6.3.x-dev) -> satisfiable by guzzlehttp/guzzle[6.3.x-dev].

6. guzzlehttp と、依存関係のみ、update

composer update guzzlehttp/guzzle --with-dependencies

もろもろ入り、以下更新される

modified:   composer.lock

7. ふたたび composer require vonage/client

エラー

Problem 1
    - Installation request for vonage/client dev-master -> satisfiable by vonage/client[dev-master].
    - Conclusion: remove guzzlehttp/guzzle 6.5.x-dev
    - Conclusion: don't install guzzlehttp/guzzle 6.5.x-dev
    - vonage/client dev-master requires guzzlehttp/guzzle ^7.0 -> satisfiable by guzzlehttp/guzzle[7.0.0, 7.0.0-beta.1, 7.0.0-beta.2, 7.0.0-rc.1, 7.0.1, 7.0.x-dev, 7.1.0, 7.1.1, 7.2.0, 7.1.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.0.0, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.0.0-beta.1, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.0.0-beta.2, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.0.0-rc.1, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.0.1, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.0.x-dev, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.1.0, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.1.1, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.2.0, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.1.x-dev, 6.5.x-dev].
    - Installation request for guzzlehttp/guzzle (locked at 6.5.x-dev) -> satisfiable by guzzlehttp/guzzle[6.5.x-dev].

8. composer update guzzlehttp/psr7 --with-dependencies

psr7 のupdate を試す

ナッシング

Nothing to install or update

8. composer update

composer.lock が更新

docker build エラー

Step 11/11 : RUN php composer.phar install
 ---> Running in 8ab19af3d622
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - sebastian/code-unit-reverse-lookup 1.0.x-dev requires php >=7.3 -> your PHP version (7.2.7) does not satisfy that requirement.
    - sebastian/code-unit-reverse-lookup 1.0.x-dev requires php >=7.3 -> your PHP version (7.2.7) does not satisfy that requirement.
    - Installation request for sebastian/code-unit-reverse-lookup 1.0.x-dev -> satisfiable by sebastian/code-unit-reverse-lookup[1.0.x-dev].

ERROR: Service 'app' failed to build : The command '/bin/sh -c php composer.phar install' returned a non-zero code: 2

9. sebastian/code-unit-reverse-lookup

composer require --dev sebastian/code-unit-reverse-lookup
エラー

plaincode_jpplaincode_jp

10 。 composer require vonage/client

インストールは成功

buidはエラー。 さっきの 8. とは異なる

Step 11/11 : RUN php composer.phar install
 ---> Running in 11e5a9205534
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laminas/laminas-diactoros 2.6.x-dev requires php ^7.3 || ~8.0.0 -> your PHP version (7.2.7) does not satisfy that requirement.
    - laminas/laminas-diactoros 2.6.x-dev requires php ^7.3 || ~8.0.0 -> your PHP version (7.2.7) does not satisfy that requirement.
    - Installation request for laminas/laminas-diactoros 2.6.x-dev -> satisfiable by laminas/laminas-diactoros[2.6.x-dev].

ERROR: Service 'app' failed to build : The command '/bin/sh -c php composer.phar install' returned a non-zero code: 2
mujismart-relay $ 
plaincode_jpplaincode_jp

11。Dockerfile php バージョン上げてみる

build => 成功

#FROM php:7.2.7-apache
FROM php:7.3-apache
このスクラップは2021/02/09にクローズされました