Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

HallOfCode's avatar

Force Composer dont update a certain Package?

Following Problem quick: I want to use an older PHP Library (Proxmox Library from zAantares) which is no more actively maintained. The Problem is the newest Release (4.0) is just working with Guzzle 6, which makes it not useable with Laravel 9.

So the soultion was to install the dev-master package via composer. But now Im concerned whenever a new update is getting released under dev-master and I run composer update in my Laravel, that someday there could be bugs/issues cause changes. So I want to force composer not to update this package whenever i run composer update.

Is there any way to do so, and exclude some packages from getting updated when they dont have a version release?

Thanks for any help.

0 likes
1 reply
Sinnbeck's avatar

You can lock versions of packages by specifying a very specific version in composer.json

"some/package/": "2.0.1",

This ensures that ONLY 2.0.1 is installed

1 like

Please or to participate in this conversation.