DEV Community

Cover image for PHP Composer package version cheatsheet
Asrar
Asrar

Posted on • Originally published at paulund.co.uk

PHP Composer package version cheatsheet


"require": {
"vendor/package": "1.5.4", // Exact version to 1.5.4
"vendor/package": ">=1.5.0", // Anything above 1.5.0
"vendor/package": "<1.5.0", // Anything below 1.5.0
"vendor/package": "1.5.*", // Wildcard i.e. >=1.5 <1.6
"vendor/package": "~1.5", // Next significant release i.e. >=1.5 <2.0.0 //
"vendor/package": "~1.5.2", // Next significant release i.e. >=1.5.2 <1.6.0
"vendor/package": "^1.5.2", // Next release, major version fixed i.e. >=1.5.2 <2.0.0
"vendor/package": "^0.5.2", // Next release, major version fixed i.e. >=0.5.2 <0.6.0
}

Top comments (0)