src/Environaut/Config/Reader/Dom/DomDocument.php
public function schemaValidate($filename)
    {
        if (!is_readable($filename)) {
            throw new \DOMException("Schema file is not readable: $filename");
        }

        $user_error_handling = $this->enableErrorHandling();

        $success = parent::schemaValidate($filename);

        $this->handleErrors(
            'Validating the document failed. Details are:' . PHP_EOL . PHP_EOL,
            PHP_EOL . 'Please fix the mentioned errors or use another schema file.',
            $user_error_handling
        );

        return $success;
    }
public function schemaValidate($filename)
    {
        if (!is_readable($filename)) {
            throw new \DOMException("Schema file is not readable: $filename");
        }

        $user_error_handling = $this->enableErrorHandling();

        $success = parent::schemaValidate($filename);

        $this->handleErrors(
            'Validating the document failed. Details are:' . PHP_EOL . PHP_EOL,
            PHP_EOL . 'Please fix the mentioned errors or use another schema file.',
            $user_error_handling
        );

        return $success;
    }
Validates the current document according to the given schema file.

@param string $filename path to the schema file

@return bool true on success

@throws \DomException in case of validation errors or non-readable file