Guide

How to install VAMPIRE PHP with Composer

VAMPIRE PHP is free software under the GPL-2.0-or-later and is publicly available on Packagist and GitHub. You install it with a single command and need neither credentials nor a package source of your own.


One command is all it takes

composer require invoicepress/vampire-php

Composer fetches the package from Packagist and adds it to your composer.json. You need no further settings, user names or passwords.

1 · Install
composer require invoicepress/vampire-php
2 · Self-test
vendor/bin/einvoice-validator selftest
3 · Check your first invoice
as shown in the documentation for PHP
Three steps to your first check: install, run the self-test, check your first invoice.

What your server needs

VAMPIRE PHP needs PHP 8.2 or newer together with the extensions dom, libxml and bcmath. There are no other runtime dependencies, and you do not need Java either. Run php -m to see whether the extensions are present.


How the installation works in a pipeline

In a pipeline, the same command is all you need. If the package is already in your composer.lock, composer install is enough. Because Packagist is public, the pipeline needs no credentials and no secrets.


What is in the package

The package contains the validator with its command line and all rule sets together with their schemas and code lists. A rule set holds the validation rules of one format in one version, for example the rules of XRechnung 3.0.2, and a code list is a defined list of allowed values, for example the currency codes. The Peppol rules are included as well. The package also contains the license of the validator, the file NOTICE with the origin and license of every rule set, and the license texts of the rule sets. Which rule sets these are in detail is shown on the page Rule packages.


How to get new rule releases

New rule releases arrive as a new version of the package, and the command composer update invoicepress/vampire-php fetches them. There is no subscription for rule packages, because the rule packages are free.


How to check that the installation worked

vendor/bin/einvoice-validator selftest

The self-test shows how many rule sets and matching rules are loaded and then checks a sample document. If it passes, VAMPIRE PHP is ready to use. How to check your first invoice after that is described in the documentation for PHP.


VAMPIRE PHP free, VAMPIRE JS in the shop.

VAMPIRE PHP and all rule packages are free and available on GitHub and Packagist. You can buy VAMPIRE JS in the shop on invoicePress.de.