src/Field.php
public function isCompatibleForMerge(Field $other)
    {
        if ($this->name !== $other->name) {
            return false;
        }

        if ($this->type !== $other->type) {
            return false;
        }

        if ($this->rule !== $other->rule) {
            return false;
        }

        if ($this->className !== $other->className) {
            return false;
        }

        if (!array_intersect($this->anyOfClassNames, $other->anyOfClassNames)) {
            return false;
        }

        return true;
    }
public function isCompatibleForMerge(Field $other)
    {
        if ($this->name !== $other->name) {
            return false;
        }

        if ($this->type !== $other->type) {
            return false;
        }

        if ($this->rule !== $other->rule) {
            return false;
        }

        if ($this->className !== $other->className) {
            return false;
        }

        if (!array_intersect($this->anyOfClassNames, $other->anyOfClassNames)) {
            return false;
        }

        return true;
    }
Returns true if this field is likely compatible with the
provided field during a mergeFrom operation.

todo: implement/test isCompatibleForMerge

@param Field $other

@return bool