在thinkphp6.1.1中composer安装 liliuwei/thinkphp-jump报错

hykeda3年前ThinkPHP1923

报错内容:

Problem 1
    - Root composer.json requires liliuwei/thinkphp-jump ^1.5 -> satisfiable by liliuwei/thinkphp-jump[v1.5].
    - liliuwei/thinkphp-jump v1.5 requires topthink/think-view ^1.0 -> found topthink/think-view[v1.0.0, ..., v1.0.14] but it conflicts with your root composer.json require (^2.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 liliuwei/thinkphp-jump:*" to figure out if any version is installable, or "composer require liliuwei/thinkphp-jump:
^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

提示jump和view冲突了,所以我这边先移除了view

composer  remove topthink/think-view

然后再安装 composer require liliuwei/thinkphp-jump


thinkphp6.0安装

composer require liliuwei/thinkphp-jump=1.*

thinkphp8.0安装

composer require liliuwei/thinkphp-jump=2.*


安装后在安装topthink/think-view,但是这里要指定版本,不然还是会冲突

composer require topthink/think-view v1.0.14

然后就安装成功。


如果指定安装了tp版本,比如指定了 

composer create-project topthink/think=6.0.*

安装后是最新的6.0.13,但是如果你直接去执行:composer require topthink/think-view,这样你的thinkphp版本会变成6.1,需要php版本为8以上。所以安装view时必须指定版本为1.0的。不然会莫名其妙发现tp版本变了



添加指定版本扩展:

composer create-project topthink/think:"5.1.*"
composer create-project topthink/think=5.1.*
composer require topthink/think-view  v1.0.14
composer require topthink/think-view ">=1.0.14"

移除:

composer remove topthink/think-image


相关文章

thinkphp 行为Hook 使用说明

关于tp的钩子功能,梳理下: 添加行为标签位: tp默认在tags.php文件中已经添加了: return [ // 应用初始化...

Thinkphp5 创建模块

一、创建三个模块 Common(公共模块),Index(前台模块),Admin(后台模块)。 index.php实际配置 <?php // 定义应用目录 define('APP_...

thinkphp5 导入第三方类库和导入扩展类库细节

在用到tp5之后,很多东西都不太一样了。在此记录些小经验: 类库的导入,tp5有两种类库,分别为第三方类库和扩展类库 导入扩展类库,tp的手册中有示例代码: extend目录下面...

记录thinkphp3.13移植到php7过程

随着php7的兴起,越来越多的公司用php7了,下面记录一次thinkphp3.1.3项目移植到php7解决兼容性的过程。 先在thinkphp...

Thinkphp5 记录点,注意点

json对象转成数组 先用$flag->getContent() $flag = json_decode($flag->getContent(),true); 控制器: 1、当控制器...

关于thinkphp5.1钩子和行为的个人理解和使用

关于thinkphp5.1钩子和行为的个人理解和使用

thinkphp5中的钩子和行为属于AOP编程思想,类似于AOP编程中的“切面”的概念,简单理解就是一个切入点,可以大大增加程序的耦合性。如何使用钩子和行为来开发:首先在项目中创建一个行为文件夹:1、...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。