ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# `~1.2.3` 等价于 `>=1.2.3 <1.3.0` ================================ # `~1.2`等价于`>=1.2 <2.0.0` # ~2.1 等价于 >=2.1 < 3.0.0 # ~2.1.0 等价于 >=2.1.0 < 2.2.0 `1.0.*`等于`>=1.0 <1.1` 2.1.* 【x可以代表字母, * 只带代表数字】 composer require "tuupola/base62:2.1.x" composer require "tuupola/base62:2.1.*" ================================ # `^1.2.3` 等价于 `>=1.2.3 <2.0.0` (5) composer require "tuupola/base62:~2.0" 匹配到了 2.1.0 ( 5-1 ) composer require "tuupola/base62:~2.0.0" 匹配2.0.0 =================== "topthink/think-orm": "~2.0" # 波浪号版本范围 (`~`) 该`~`运算符最好通过示例来解释: `~1.2`等价于`>=1.2 <2.0.0`, `~1.2.3` 等价于 `>=1.2.3 <1.3.0` 一个常见的用法是标记您所依赖的最小次要版本,例如`~1.2`(允许任何高达但不包括 2.0 的版本)。 因为理论上在 2.0 之前不应该有向后兼容性中断,所以效果很好。另一种看待它的方式是 using`~`指定最低版本,但允许指定的最后一位数字上升。 ------------------------------------------------------------------------ # 插入符号版本范围 (`^`) 该`^`运算符的行为非常相似,但它更接近语义版本控制,并且始终允许不间断更新。 `^1.2.3` 等价于 `>=1.2.3 <2.0.0` 2.0 之前的任何版本都不会破坏向后兼容性。 对于 1.0 之前的版本,它还考虑到安全性并将`^0.3`as`>=0.3.0 <0.4.0`和`^0.0.3`as 视为`>=0.0.3 <0.0.4`. 这是在编写库代码时推荐的最大互操作性运算符。 ------------------------------------------------------------------------ PHP 8 情况下 ~~~ (1) composer require "tuupola/base62:^1.0" 显示不满足php 7 (2) composer require "tuupola/base62:^2.0" 匹配2.1.0 (3) composer require "tuupola/base62:^2.1" 匹配2.1.0 (4) composer require "tuupola/base62:~1.0" 显示不满足php 7 (5) composer require "tuupola/base62:~2.0" 也匹配到了 2.1.0 ( 5-1 ) composer require "tuupola/base62:~2.0.0" 匹配2.0.0 (6) composer require "tuupola/base62:~2.1" ~~~