Working on a small Composer plugin, which has a listener for the pre-package-update event.
public function prePackageUpdate(PackageEvent $event): void
{
/** @var UpdateOperation $operation */
$operation = $event->getOperation();
if ($something) {
// I would like the stop the update for this package...
}
}
Based on some logic, I would like the package to not be updated, but I cannot find any way to do that... Is there one?
Ideally I'd like the command (either install or update) to continue with the other packages, but if that's not possible, it's ok if the whole process is cancelled and reverted.