博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
composer version constraint 版本号前缀
阅读量:5142 次
发布时间:2019-06-13

本文共 1264 字,大约阅读时间需要 4 分钟。

Tilde Version Range (~)
-- the last second is fixed. except for 0.X
The ~ operator is best explained by example: ~1.2 is equivalent to >=1.2 <2.0.0, while ~1.2.3 is equivalent to >=1.2.3 <1.3.0. As you can see it is mostly useful for projects respecting semantic versioning. A common usage would be to mark the minimum minor version you depend on, like ~1.2 (which allows anything up to, but not including, 2.0). Since in theory there should be no backwards compatibility breaks until 2.0, that works well. Another way of looking at it is that using ~ specifies a minimum version, but allows the last digit specified to go up.
Caret Version Range (^)#
-- the first one is fixed.
The ^ operator behaves very similarly but it sticks closer to semantic versioning, and will always allow non-breaking updates. For example ^1.2.3 is equivalent to >=1.2.3 <2.0.0 as none of the releases until 2.0 should break backwards compatibility. For pre-1.0 versions it also acts with safety in mind and treats ^0.3 as >=0.3.0 <0.4.0.
This is the recommended operator for maximum interoperability when writing library code.
Example: ^1.2.3

 

https://getcomposer.org/doc/articles/versions.md#tilde-version-range-

https://semver.mwl.be

转载于:https://www.cnblogs.com/qinqiu/p/8483146.html

你可能感兴趣的文章
mysql触发器
查看>>
淌淌淌
查看>>
MySQL-定时任务
查看>>
web页面实现指定区域打印功能
查看>>
使用PHP拆分中文字符串的方法(收藏) 小节
查看>>
android系统权限的管理
查看>>
win10每次开机都显示“你的硬件设置已更改,请重启电脑……”的解决办法
查看>>
因Window服务器自动更新并重启导致WebSphere服务停止服务故障一例
查看>>
如何开启safari的调试
查看>>
js深拷贝和浅拷贝
查看>>
node.js 基础学习笔记1
查看>>
如何在linux系统中设置静态ip地址
查看>>
二分查找法,折半查找原理
查看>>
DP简单问题联系--最长递增子序列+最长公共子序列等
查看>>
2017-4-18 Zabbix server的安装以及ansible批量部署zabbix agent的工作笔记
查看>>
GridView 动态列上方添加相应的Combox等控件
查看>>
申请开发者账号
查看>>
oracle启动
查看>>
c++模板学习
查看>>
【转】MySQL Event
查看>>