Version numbers with caret and tilde in composer.json
问题 I wonder what is the difference between caret and tilde in composer.json. Can I say it like this: caret (^) lock the first and the second version number (the 1.2 in 1.2.3) and tilde(~) lock only the first version number (the 1 in 1.2.3)? https://getcomposer.org/doc/articles/versions.md#next-significant-release-operators 回答1: From the documentation you linked: ~1.2 is equivalent to >=1.2 <2.0.0, while ~1.2.3 is equivalent to >=1.2.3 <1.3.0 ^1.2.3 is equivalent to >=1.2.3 <2.0.0 The tilde