Skip to content

API reference / Quittio \ Core \ Validation \ Drivers

KositArtifacts

final class in quittio/core

Quittio\Core\Validation\Drivers\KositArtifacts · Source

Downloads the KoSIT validator and the XRechnung validator configuration (level L5) and compiles the Peppol BIS Billing 3.0 Schematron to XSLT with the Saxon bundled in the validator (requires Java).

Constants#

ConstantValueDescription
CONFIGURATION_FILE'xrechnung-3.0.2-validator-configuration-2026-08-31.zip'
CONFIGURATION_TAG'v2026-08-31'
PEPPOL_TAG'v3.0.20'
SCHXSLT_VERSION'1.10.1'
SHA256['https://repo1.maven.org/maven2/org/kosit/validator/1.6.3/validator-1.6.3-standalone.jar' => '799e64befca97d4080e03608c80b85dd5a5ecc5f4ae4f35d1116ec2855b9a7c9' …SHA-256 of the pinned downloads. The default download checks them, because the validator JAR is run with java and release tags can be moved; update them together with the versions.
VALIDATOR_VERSION'1.6.3'

Methods#

MethodDescription
->__construct()
->compilePeppol()Compiles the Peppol Schematron into peppol/PEPPOL-EN16931-UBL.xsl below $target. download() must have run before, because Saxon comes with the validator JAR.
::configurationUrl()
->download()
::peppolScenarios()Scenario file for Peppol BIS Billing 3.0; the repository is the download target.
::peppolUrl()
::schxsltUrl()
::validatorUrl()

__construct()#

public function __construct(
    (Closure(string): string)|null $fetch = null,
    (Closure(list<string>, string, int): array{exitCode: int, stdout: string, stderr: string})|null $run = null,
)
ParameterTypeDescription
$fetch(Closure(string): string)|null = nullreturns the body of a URL; the default checks it against SHA256
$run(Closure(list<string>, string, int): array{exitCode: int, stdout: string, stderr: string})|null = nullruns a process

compilePeppol()#

public function compilePeppol(
    string $target,
    string $java = 'java',
    bool $force = false,
): array{scenarios: string, repository: string}

Compiles the Peppol Schematron into peppol/PEPPOL-EN16931-UBL.xsl below $target. download() must have run before, because Saxon comes with the validator JAR.

ParameterTypeDescription
$targetstring
$javastring = 'java'
$forcebool = false
Returns
array{scenarios: string, repository: string}

configurationUrl()#

public static function configurationUrl(
    string $tag = self::CONFIGURATION_TAG,
    string $file = self::CONFIGURATION_FILE,
): string

static

ParameterTypeDescription
$tagstring = self::CONFIGURATION_TAG
$filestring = self::CONFIGURATION_FILE
Returns
string

download()#

public function download(
    string $target,
    bool $force = false,
): array{jar: string, scenarios: string, repository: string}
ParameterTypeDescription
$targetstring
$forcebool = false
Returns
array{jar: string, scenarios: string, repository: string}

peppolScenarios()#

public static function peppolScenarios(): string

static

Scenario file for Peppol BIS Billing 3.0; the repository is the download target.

Returns
string

peppolUrl()#

public static function peppolUrl(string $tag = self::PEPPOL_TAG): string

static

ParameterTypeDescription
$tagstring = self::PEPPOL_TAG
Returns
string

schxsltUrl()#

public static function schxsltUrl(string $version = self::SCHXSLT_VERSION): string

static

ParameterTypeDescription
$versionstring = self::SCHXSLT_VERSION
Returns
string

validatorUrl()#

public static function validatorUrl(string $version = self::VALIDATOR_VERSION): string

static

ParameterTypeDescription
$versionstring = self::VALIDATOR_VERSION
Returns
string

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.