public function allowExtensions($extensions)
    {
        if (!is_array($extensions)) {
            $extensions = [$extensions];
        }
        $this->constraints[] = new ExtensionConstraint($extensions);
        return $this;
    }