我似乎无法安装软件包,因为我需要使用php 5.6,最低要求是7。
我尝试了
composer require mopo922/laravel-treats --ignore-platform-reqs
[InvalidArgumentException]
Could not find package mopo922/laravel-treats at any version matching your PHP version 5.6.32.0
然后我暂时从composer文件中删除了平台要求并成功安装,但是现在我无法进行“ composer update”
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- mopo922/laravel-treats v2.0.4 requires php >=7.0 -> your PHP version (7.2.1) overridden by "config.platform.php" version (5.6.32) does not satisfy that requirement.
- mopo922/laravel-treats v2.0.3 requires php >=7.0 -> your PHP version (7.2.1) overridden by "config.platform.php" version (5.6.32) does not satisfy that requirement.
- mopo922/laravel-treats v2.0.2 requires php >=7.0 -> your PHP version (7.2.1) overridden by "config.platform.php" version (5.6.32) does not satisfy that requirement.
- mopo922/laravel-treats v2.0.1 requires php >=7.0 -> your PHP version (7.2.1) overridden by "config.platform.php" version (5.6.32) does not satisfy that requirement.
- mopo922/laravel-treats v2.0.0 requires php >=7.0 -> your PHP version (7.2.1) overridden by "config.platform.php" version (5.6.32) does not satisfy that requirement.
- mopo922/laravel-treats v2.0.4 requires php >=7.0 -> your PHP version (7.2.1) overridden by "config.platform.php" version (5.6.32) does not satisfy that requirement.
- Installation request for mopo922/laravel-treats ^2.0 -> satisfiable by mopo922/laravel-treats[v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4].
作曲家可以通过任何方式忽略特定软件包吗?
答案 0 :(得分:0)
我在这里看到三种可能性:
mopo922/laravel-treats
提取所需的功能,然后直接在项目中使用。如果它只是一个很小的功能,那么作曲家不收录它就不会产生很大的影响。比搞乱版本限制恕我直言更好。composer update --ignore-platform-reqs