PHP Common utilities for Mexican CFDI 3.2, 3.3 & 4.0
This is a maintenance release to fix the continuous integration workflow and append pending development changes.
CertificadoTest::testConstructWithValidExample()
to allow quoted slashes on name.Certificate::getCertificateName()
.
The value can contain quoted slashes \/
depending on the OpenSSL version.tests/validate.php
to validate CFDI 3.3 or CFDI 4.0.Status::comparableValue
and Status::__toString
.Discoverer::discoverInFile
.TestCase::installCertificate()
: It doesn't depend on the certificate's file name to install correctly.::set-output
& ::save-state
.Fix CFDI 4.0, must include Comprobante/Impuestos/Traslados/[email protected]=Exento
when exists at least one node Comprobante/Conceptos/Concepto/Impuestos/Traslados/[email protected]=Exento
.
The node must contain attribute TipoFactor=Exento
and the rounded sum of the attributes Base
grouped by attribute Impuesto
.
Thanks @jiag-dev for noticing this issue, and @yairtestas for your guidance to find the solution.
Symfony/Process
instead of ShellExec
.ShellExec
and ShellExecResult
.ShellExecTemplate
to CommandTemplate
.Fix hardcoded Regímenes catalog to fix CFDI33 validation EmisorRegimenFiscal
.
Thanks @celli33 for your contribution.
Add CfdiUtils\Elements\PlataformasTecnologicas10
Elements to work with "Complemento Servicios de Plataformas Tecnológicas".
Thanks @gam04 for your contribution.
Add support to read and create a RET 1.0 (Retenciones e información de pagos 2.0) document. (Closes #96)
CfdiUtils\Elements\Retenciones20
.CfdiUtils\Retenciones\RetencionVersion
.CfdiUtils\Retenciones\RetencionesCreator20
.CfdiUtils\Retenciones\RetencionesCreator10
to CfdiUtils\Retenciones\RetencionesCreatorTrait
.CfdiUtils\Retenciones\Retenciones
to read versions 1.0 and 2.0.Thanks @gam04 for your contribution.
\CfdiUtils\Nodes\NodeHasValueInterface
to work with nodes simple text content.\CfdiUtils\Nodes\Node
implements \CfdiUtils\Nodes\NodeHasValueInterface
.Allow installing Genkgo/Xsl version 1.1.0; used for PHP >= 7.4.
Test: Fix test that was overriding retenciones/sample-before-tfd.xml
file.
Include the following unreleased changes from 2022-03-18:
Fix build since GitHub Action sudo-bot/action-scrutinizer
is failing.
Use scrutinizer/ocular
package instead.
Test: When creating a pago, use addSumasConceptos
to populate SubTotal
and Total
.
CI: Always run apt-get update
before apt-get install
.
Add PHP 8.1 minimal compatibility.
Skip tests on GenkgoXslBuilderTest
because the library genkgo/xsl
is not compatible with PHP 8.1.
Skip tests WebServiceConsumingTest::testSoapClientHasSettings
because cannot access SoapClient
private properties.
Add dependence on symfony/process
to include 6.0. This allows to install the library on PHP 8.1.
Upgrade eclipxe/xmlschemavalidator
from version 2.x to version 3.x (fully PHP 8.1 compatible).
Add #[\ReturnTypeWillChange]
or fix return types on implemented classes like
IteratorAggregate::getIterator(): Traversable
.
Add information about how tu run locally GitHub Actions using nektos/act
tool.
Add CfdiUtils\Elements\Pagos20
Elements to work with "Complemento para recepción de Pagos 2.0". Thanks @EmmanuelJCS. (Closes #89)