Overview
This guide helps you migrate to LibreDTE Core and understand the requirements for running the library.PHP Version Requirements
Required PHP Extensions
The following PHP extensions are mandatory:ext-curl- For HTTP requests to SII webservicesext-json- For JSON data handlingext-mbstring- For multibyte string operationsext-openssl- For certificate and signature operationsext-soap- For SOAP webservice communication with SII
System Requirements
Composer Dependencies
LibreDTE Core uses modern PHP packages:- Symfony Components (^7.4): Cache, Filesystem, Mailer, MIME
- PDF Generation: mPDF (^8.2) and TCPDF (^6.11)
- CSV Processing: League CSV (^9.28)
- Date/Time: Carbon (^3.11)
- Security: phpseclib (^3.0)
Development Requirements
For development environments, you’ll also need:ext-xdebug- For code coverage- PHP CS Fixer (^3.94) - Code style
- PHPStan (^1.12) - Static analysis
- PHPUnit (^11.5) - Testing framework
Major Changes
Architecture
LibreDTE Core uses a component-based architecture with workers, strategies, and factories for maximum flexibility and testability.
Package Structure
The library is organized into packages:- Billing Package - Main package for electronic invoicing
- Document Component - Document creation and validation
- Trading Parties Component - Emisor/Receptor management
- Integration Component - SII webservice integration
- Exchange Component - Document exchange via email/SII
- Identifier Component - CAF (Folio) management
- Ownership Transfer Component - Guía handling
Namespace Changes
All classes use the namespace:Migration Steps
Update Your Code
Migrate to the new component-based architecture. See the Examples page for code samples.
Environment Configuration
SII Environments
LibreDTE Core supports two SII environments:- Certification - For testing (
SiiAmbiente::CERTIFICACION) - Production - For live operations (
SiiAmbiente::PRODUCCION)
Certificate Configuration
For SII integration, you need a valid digital certificate:Breaking Changes
Type Safety
All methods use strict type hints and return types. Update your code accordingly:Getting Help
If you encounter issues during migration:- Check the Troubleshooting guide
- Review the FAQ
- Visit the GitHub Issues
Next Steps
After migrating:- Review the Examples for common use cases
- Read the API Reference for detailed documentation
- Join the LibreDTE community for support