Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/josemmo/Verifactu-PHP/llms.txt

Use this file to discover all available pages before exploring further.

Before adding Verifactu-PHP to your project, confirm that your environment meets the system requirements below. The library ships as a standard Composer package with no C extensions or build steps beyond what PHP itself needs.

System Requirements

RequirementMinimum versionNotes
PHP8.2Uses readonly properties, named arguments, and enums introduced in PHP 8.1/8.2.
libxmlany bundled versionRequired for XML serialisation and parsing. Enabled by default in all official PHP distributions.
Composer2.x recommendedThe library is distributed via Packagist.
Check your PHP version and confirm libxml is loaded:
php -v
php -m | grep xml

Install via Composer

Run the following command in the root of your project:
composer require josemmo/verifactu-php
Composer will resolve all transitive dependencies, download the packages, and register the PSR-4 autoloader. Include vendor/autoload.php in your application bootstrap to make all classes available.
When deploying to production, run composer install --no-dev to skip development-only packages such as PHPUnit, PHPStan, and Laravel Pint. This keeps your production vendor directory lean and reduces your attack surface.

Dependencies

Verifactu-PHP declares three runtime dependencies in composer.json. Composer installs them automatically — you do not need to require them separately.

guzzlehttp/guzzle ^7.10

Guzzle is the HTTP client used by AeatClient to communicate with the AEAT SOAP endpoint. Verifactu-PHP relies on Guzzle’s promise API (PromiseInterface) to support asynchronous submission of billing records, and on its built-in support for client certificates to perform mutual TLS (mTLS) authentication required by the AEAT web service.

josemmo/uxml ^0.2.0

UXML is a lightweight PHP library for building and parsing XML documents. Verifactu-PHP uses it internally to construct the SOAP envelopes sent to the AEAT and to deserialise XML responses and stored records back into PHP model objects.

symfony/validator ^6.4 | ^7.4 | ^8.0

Symfony Validator powers the validate() method available on every model class (RegistrationRecord, CancellationRecord, ComputerSystem, and others). Constraint attributes on each property — such as #[Assert\NotBlank], #[Assert\Length], and #[Assert\Regex] — are evaluated at runtime, returning a structured list of violations before any network call is made. The broad version range (^6.4|^7.4|^8.0) means Verifactu-PHP is compatible with Symfony-based applications running any currently supported Symfony release.

Verifying the installation

After running composer require, confirm that the autoloader resolves the library’s classes correctly with this short snippet:
<?php

require __DIR__ . '/vendor/autoload.php';

use josemmo\Verifactu\Models\Records\RegistrationRecord;

$record = new RegistrationRecord();
echo get_class($record); // josemmo\Verifactu\Models\Records\RegistrationRecord
If the class loads without a fatal error, the installation is working correctly. You are ready to follow the Quickstart guide to build and send your first billing record.

Build docs developers (and LLMs) love