Запитати

Помилка при встановленні php-html-parser через composer

Вирішено
13 травня 2022 · 171 ·
0

При встановленні бібліотеки paquettg/php-html-parser командою

composer require paquettg/php-html-parser

Отримую таку помилку

  Problem 1
    - Conclusion: don't install paquettg/php-html-parser 3.1.1
    - Conclusion: remove guzzlehttp/psr7 2.2.1
    - Installation request for paquettg/php-html-parser ^3.1 -> satisfiable by paquettg/php-html-parser[3.1.0, 3.1.1].
    - Conclusion: don't install guzzlehttp/psr7 2.2.1
    - paquettg/php-html-parser 3.1.0 requires guzzlehttp/psr7 ^1.6 -> satisfiable by guzzlehttp/psr7[1.6.0, 1.6.1, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.x-dev].
    - Can only install one of: guzzlehttp/psr7[1.8.3, 2.2.1].
    - Can only install one of: guzzlehttp/psr7[1.8.4, 2.2.1].
    - Can only install one of: guzzlehttp/psr7[1.8.5, 2.2.1].
    - Can only install one of: guzzlehttp/psr7[1.x-dev, 2.2.1].
    - Can only install one of: guzzlehttp/psr7[1.6.0, 2.2.1].
    - Can only install one of: guzzlehttp/psr7[1.6.1, 2.2.1].
    - Can only install one of: guzzlehttp/psr7[1.7.0, 2.2.1].
    - Can only install one of: guzzlehttp/psr7[1.8.0, 2.2.1].
    - Can only install one of: guzzlehttp/psr7[1.8.1, 2.2.1].
    - Can only install one of: guzzlehttp/psr7[1.8.2, 2.2.1].
    - Installation request for guzzlehttp/psr7 (locked at 2.2.1) -> satisfiable by guzzlehttp/psr7[2.2.1].

Версія laravel-framework - 8.75

composer.json

    "require": {
        "php": "^7.3|^8.0",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^8.75",
        "laravel/sanctum": "^2.11",
        "laravel/tinker": "^2.5",
    },

php laravel composer php-html-parser guzzle guzzlehttp psr7

Відповіді на питання (1)

13 травня 2022
1
Обране рішення

Виправити помилку можна наступним чином

  1. Необхідно встановити пакет guzzlehttp/psr7
composer require guzzlehttp/psr7
  1. Далі в composer.json міняємо версію з "guzzlehttp/psr7": "^2.0", на "guzzlehttp/psr7": "^1.5"
  2. Оновлюємо пакети командою
composer update
  1. Після чого зможемо успішно встановити пакет paquettg/php-html-parser командою
composer require paquettg/php-html-parser

Для відповіді на запитання необхідно авторизуватись

Вхід / Реєстрація