Download the PHP package hanoii/composer-should-not without Composer
On this page you can find all versions of the php package hanoii/composer-should-not. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hanoii/composer-should-not
More information about hanoii/composer-should-not
Files in hanoii/composer-should-not
Package composer-should-not
Short Description Provides a way to prevent installing configured versions of packages.
License MIT
Informations about the package composer-should-not
Composer should-not
This plugin removes certain versions from your dependency list preventing them from being installed and provide a reason for doing so.
While the idea of versions constraint is that you can do this on your
composer.json that works OK as long as everybody in your team knows what to do
when changing or requiring a new version constraint.
This module is meant to provide a fail-safe and document a reason for doing so that if others tries to change the current constraint that will fail and a warning with a reason will be provided.
Installation
Install as usual:
Usage
The configuration of this plugin is through the "extra" property
of your composer.json file.
Alternatively, you can also provide an array of reasons:
[!NOTE] dev versions are always allowed.
Demo
The provided example configuration is what encouraged the creation of this plugin, see https://www.drupal.org/project/block_class/issues/3468976.
~They decided to create a new major version out of an older codebase :shrug:, and it has proven to be an issue for us, so with this we can preemptively avoid the module from being upgrade to 3.0.~ This was fixed with a new 4.0.0 release.
However, other times I wanted something like this for ducumenting why a certain dependency should be locked to a specific version (something that I needed several times in Drupal projects).