PHP Common utilities for Mexican CFDI 3.2, 3.3 & 4.0
Add CFDI 4.0 compatibility: read, validate and create:
CfdiUtils\Cfdi
object now can read CFDI 4.0.CfdiUtils\CfdiValidator40
object was introduced to validate CFDI 4.0 with only the following validations:
NoCertificado
, Certificado
and Sello
.TimbreFiscalDigital
and information matches with cfdi:Comprobante@Sello
.CfdiUtils\CfdiCreator40
object was introduced to create CFDI 4.0.CfdiUtils\Elements\Cfdi40
were created.The following are development details:
\CfdiUtils\Validate\Xml\XmlFollowSchema
as a standard validator, it does not depend on the type of CFDI.CfdiUtils\Validate\Cfdi33\Xml\XmlFollowSchema
is now an extended class of \CfdiUtils\Validate\Xml\XmlFollowSchema
. The class is also deprecated.CfdiUtils\Certificado::getPemContentsOneLine()
.CfdiUtils\CadenaOrigen\CfdiDefaultLocations
.CfdiUtils\Certificado\NodeCertificado
.CfdiUtils\CfdiVersion
.CfdiUtils\Cfdi::CFDI_NAMESPACE
.CfdiUtils\CfdiCreateObjectException
that contains all the failures when try to construct a CfdiUtils\Cfdi
object.CfdiUtils\CfdiValidator33
to CfdiUtils\Validate\CfdiValidatorTrait
.CfdiUtils\Validate\Cfdi33\Standard\SelloDigitalCertificado
to CfdiUtils\Validate\Common\SelloDigitalCertificadoValidatorTrait
.CfdiUtils\Validate\Cfdi33\Standard\TimbreFiscalDigitalSello
to CfdiUtils\Validate\Common\TimbreFiscalDigitalSelloValidatorTrait
.CfdiUtils\Validate\Cfdi33\Standard\TimbreFiscalDigitalVersion
to CfdiUtils\Validate\Common\TimbreFiscalDigitalVersionValidatorTrait
.CfdiUtils\CfdiCreator33
to CfdiUtils\Validate\CfdiCreatorTrait
.CfdiUtils\Elements\Cfdi33\Helpers\SumasConceptosWriter
to CfdiUtils\SumasConceptos\SumasConceptosWriter
.30001000000400002495
is included.CfdiUtilsTests\Validate\ValidateTestCase
was renamed to CfdiUtilsTests\Validate\Validate33TestCase
and extracted to CfdiUtilsTests\Validate\ValidateBaseTestCase
because it shares a lot of logic with CfdiUtilsTests\Validate\Validate40TestCase
.CfdiUtils\SumasConceptos\SumasConceptosWriter
can handle both CFDI 3.3 & 3.4.This version introduces this soft breaking compatibility changes, your implementation should not be affected:
[BC] REMOVED: These ancestors of CfdiUtils\Validate\Cfdi33\Xml\XmlFollowSchema have been removed: ["CfdiUtils\\Validate\\Cfdi33\\Abstracts\\AbstractVersion33"]
Other changes:
Fix Carta Porte 1.0 add missing element Notificado
. Thanks @celli33.
Fix Carta Porte 2.0 XML Namespace.
Remove development/
from distribution package.
Previous tag had a typo v.2.18.0
.
See https://github.com/eclipxe13/CfdiUtils/releases/tag/v.2.18.0
Add CfdiUtils\Elements\CartaPorte20
Elements to work with "Carta Porte 2.0".
Add Elements Maker, a development tool to create element classes based on a specification file.
Fix dev:coverage
composer script.
The helper object SumasConceptosWriter
also writes the sum of impuestos locales when they are present.
Thanks, @celli33 and @luffynando for your help.
Fix bug when create expression to query for the SAT status and the RFC (emisor or receptor) contains the characters &
or Ñ
. The service requires that the expression is XML "encoded". Thanks, @ramboram and @TheSpectroMX for your help.
Refactor test script tests/estadosat.php
.
Fix typos on "Complemento de Nómina versión 1.2, revisión B" documentation.
Add CfdiUtils\Elements\CartaPorte10
Helper elements to work with "Carta Porte 1.0". See #70 & #73.
Fix try to close public key when it didn't exists. Good catch PHPStan!
Improvements:
ValidacionEFOS
as StatusResponse::getValidationEfos() string
and StatusResponse::isEfosListed() bool
.ConsultaCFDIServiceSAT.svc.xml
. It is unused, but exists for compatibility.General:
phpcs
.Bugfixes:
SELLO04
fails when there are special caracters like é
and LC_CTYPE
is not setup.COMPIMPUESTOSC01
description typo.There are some soft backwards incompatibility changes:
Development environment: