Laravel Tutorials

What are the asterisk, tilde, and caret used for in Composer?

Published

In this Composer tutorial learn about the differences between all these characters:

Depending on your dependency manager you can define version constraints using wildcards (*), comparators like =0.9.0,=4.1.3,=4.1.0,=0.4.0,=4.0.0,=4.1.3,=4.1.0,=0.4.0,=4.0.0,

A little easier to remember than the php date format however this isn’t even all the options. The docs say you can also use a range and a hyphen range.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Sponsored

masteringlaravel logo
Laravel Code Review

Get expert guidance in a few days with a Laravel code review

Visit Laravel Code Review

The latest

View all →
PayZephyr: One Payment API for Stripe, Paystack, and PayPal image

PayZephyr: One Payment API for Stripe, Paystack, and PayPal

Read article
Bifrost Turns One With AI Builds and New Workflows image

Bifrost Turns One With AI Builds and New Workflows

Read article
Preview Blade Templates in macOS Finder with Quick Blade image

Preview Blade Templates in macOS Finder with Quick Blade

Read article
Artisan Debugging Commands in Laravel Telescope 5.24.0 image

Artisan Debugging Commands in Laravel Telescope 5.24.0

Read article
Queue totalSize() and JobInterrupted Event in Laravel 13.31 image

Queue totalSize() and JobInterrupted Event in Laravel 13.31

Read article
Find Unexpected Test Inputs with Fuzz for Pest image

Find Unexpected Test Inputs with Fuzz for Pest

Read article