PankovAlxndr
@PankovAlxndr
Fullstack web developer

Как подключить phpspreadsheet к laravel 10?

PHP 8.2.5
Laravel 10.x

пытка установить пакет composer require phpoffice/phpspreadsheet
получаю ошибку
Problem 1
    - phpoffice/phpspreadsheet[1.25.0, ..., 1.28.0] require maennchen/zipstream-php ^2.1 -> satisfiable by maennchen/zipstream-php[2.1.0, ..., v2.4.0].
    - phpoffice/phpspreadsheet[1.0.0, ..., 1.8.2] require php ^5.6|^7.0 -> your php version (8.2.5) does not satisfy that requirement.
    - phpoffice/phpspreadsheet[1.9.0, ..., 1.12.0] require php ^7.1 -> your php version (8.2.5) does not satisfy that requirement.
    - phpoffice/phpspreadsheet[1.13.0, ..., 1.14.1] require php ^7.2 -> your php version (8.2.5) does not satisfy that requirement.
    - phpoffice/phpspreadsheet[1.15.0, ..., 1.22.0] require psr/simple-cache ^1.0 -> found psr/simple-cache[1.0.0, 1.0.1] but the package is fixed to 3.0.0 (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.
    - phpoffice/phpspreadsheet[1.23.0, ..., 1.24.1] require psr/simple-cache ^1.0 || ^2.0 -> found psr/simple-cache[1.0.0, 1.0.1, 2.0.0] but the package is fixed to 3.0.0 (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.
    - maennchen/zipstream-php[2.1.0, ..., v2.4.0] require psr/http-message ^1.0 -> found psr/http-message[1.0, 1.0.1, 1.1] but the package is fixed to 2.0 (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.
    - Root composer.json requires phpoffice/phpspreadsheet * -> satisfiable by phpoffice/phpspreadsheet[1.0.0, ..., 1.28.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require phpoffice/phpspreadsheet:*" to figure out if any version is installable, or "composer require phpoffice/phpspreadsheet:^2.1" if you know which you need.


те у меня лара залочила http-message на более высокой версии, а пакет требует более низких, как это победить?

пытался отдельно ставить maennchen/zipstream-php, у меня ставится 3ия версия и нет проблем, а phpspreadsheet требует 2.4, а вот те отдельно не могу поставить, по изложенной ранее причине
Problem 1
    - Root composer.json requires maennchen/zipstream-php v2.4.0 -> satisfiable by maennchen/zipstream-php[v2.4.0].
    - maennchen/zipstream-php v2.4.0 requires psr/http-message ^1.0 -> found psr/http-message[1.0, 1.0.1, 1.1] but the package is fixed to 2.0 (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.
  • Вопрос задан
  • 297 просмотров
Пригласить эксперта
Ответы на вопрос 1
Maksclub
@Maksclub
maksfedorov.ru
с пакетами так:

ждать когда поднимут, сделать форк, в нем поднять, проверить работу (если много тестов — запустить их, если мало — руками) и установить уже форк

или опустить версии в своем проекте
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы