l2t

How to install a specific version of package using Composer?

Asked: a month ago

Syntax: composer require vendor/package:version

Examples:

# example-1
composer require nesbot/carbon:^2.0

# example-2:
composer require nesbot/carbon ^2.0

# example-3:
composer require "nesbot/carbon:2.*"
Viewed: 42 times
Liked: 1 times