You should read the composer documentation, it will help you.
https://getcomposer.org/doc/01-basic-usage.md#package-versions
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
"require": { "laravel/framework": "5.0.", "illuminate/html": "~5.0", "proengsoft/laravel-jsvalidation": "1.0." },
The above code is from my composer.json file and i am using laravel framework 5.0 for my project.
Now i need to use dompdf in my project and for that they says that i need to add the following code in my composer.json file
"barryvdh/laravel-dompdf": "0.6.*"
and then update the composer. I am worried that when I update composer will it update my laravel version as well ? or my version will remain 5.0
Yes it will but you can specify an exact version by removing the "~" from your Laravel version.
"require": { "laravel/framework": "5.0.", "illuminate/html": "5.0", "proengsoft/laravel-jsvalidation": "1.0." },
You should be good to go.
Please or to participate in this conversation.