Skip to content

AlpmConflict

Mark King edited this page Sep 25, 2026 · 1 revision

AlpmConflict

Describes a conflict between two packages found while preparing a transaction. You don't construct this yourself — it shows up in AlpmTransaction::prepare()'s return value when errno is ALPM_ERR_CONFLICTING_DEPS:

$err = $trans->prepare();
if ($err !== null && !empty($err["offenders"])) {
    foreach ($err["offenders"] as $conflict) {
        if ($conflict instanceof AlpmConflict) {
            echo $conflict, "\n";
        }
    }
}

See AlpmTransaction for the full prepare() error shape.

Properties

All readonly.

Property Type Description
package1 AlpmPkg First conflicting package
package2 AlpmPkg Second conflicting package
reason AlpmDepend The conflict dependency spec that triggered this

Methods

__toString()

public function __toString(): string

Returns a human-readable description of the conflict.

Clone this wiki locally