CfdiUtils Versions Save

PHP Common utilities for Mexican CFDI 3.2, 3.3 & 4.0

v2.14.2

3 years ago

Fixes:

  • Validation TIPOCOMP03 does not apply on documents type N - Nómina (by @ircsasw, thank you!).

v2.14.1

3 years ago

Fixes:

  • Remove redundant valiations METPAG01 and METPAG02.
  • Validation TIPOCOMP04 does not apply on documents type N - Nómina.

Previously merged but not released.

  • Looks like web service at https://rdc.sat.gob.mx/ is having issues (again). This is breaking testing. To mitigate the problem, a new testing class CertificateDownloaderHelper has been created to retry the download if it fails, for a maximum of 5 attempts. This change does not create a new release version.
  • Add XDEBUG_MODE=coverage on Travis-CI configuration file since it upgrade to XDebug v3.0.0 and it contains a bug that makes PHPUnit break with the message: Use of undefined constant XDEBUG_CC_UNUSED - assumed 'XDEBUG_CC_UNUSED'. This will be resolved on https://github.com/xdebug/xdebug/pull/699 but not released (yet).

v2.14.0

3 years ago
  • Add Retenciones reader to work with CFDI de retenciones e información de pagos. (Closes #57)
  • Refactor Cfdi and Retenciones to use recently created XmlReaderTrait.

v2.13.1

3 years ago
  • Fix validation FORMAPAGO01, it only applies when Complemento de Pago exists. (Closes #58)

v2.13.0

3 years ago

Add helper elements for Complemento de Nómina 1.2 revisión B.

  • Root element is CfdiUtils\Elements\Nomina12\Nomina.
  • Add test with 100% coverage on the namespace.
  • Add documentation.
  • Important It does not contain any validators but standard XSD.

v2.12.11

3 years ago
  • Fix TimbreFiscalDigital XSLT URL locations, updated from SAT documentation. For more information check phpcfdi/sat-ns-registry project.

v2.12.10

3 years ago

This is a documentation and testing improvement version.

  • Documentation "Descarga de recursos XSD y XSLT"

    • 2020-07-14: Documentation: "Descarga de recursos XSD y XSLT"
    • 2020-07-18: Documentation: Add last document to mkdocs:nav, format rewording and links.
  • Add tests/resource-sat-xml-download, include it on travis build.

SAT has been failing providing XSD and XSLT files. This tool obtains (via tests/resource-sat-xml-download) a fresh copy of those files from phpcfdi/resources-sat-xml project for development.

In the past, SAT allowed at least 2 different URLS for TFD 1.0 on XSD and XSLT files. In this version this is normalized with phpcfdi/sat-ns-registry project.

  • Add a new cleaner method Cleaner::fixKnownSchemaLocationsXsdUrls to override the XSD file URLS for CFDI and TFD.

This replaces any known and found URL ignoring case and put the correct one, it also replaces http://www.sat.gob.mx/sitio_internet/TimbreFiscalDigital/TimbreFiscalDigital.xsd (unused) with http://www.sat.gob.mx/sitio_internet/cfd/TimbreFiscalDigital/TimbreFiscalDigital.xsd (official).

  • Improve explanation on TFDSELLO01 when unable to get certificate.

The assert TFDSELLO01 El Sello SAT del Timbre Fiscal Digital corresponde al certificado SAT, now includes the exception message when unable to obtain a certificate.

  • Remove insecure downloader from testing.

This was introduced previously because the webserver was using invalid SSL certificates. This problem does not exist anymore (since 2019-10-24).

v2.12.9

4 years ago
  • Review and fix CreateComprobantePagosCaseTest.
  • Add docblocks on StatusResponse and fix script tests/estadosat.php.
  • Remove overtrue/phplint from development dependences.

v2.12.8

4 years ago
  • Change License year to 2020.
  • Change running dependence of symfony/process to allow version ^0.5
  • Change development dependence phpstan/phpstan-shim to phpstan/phpstan (versions ^0.9 to ^0.11)

v2.12.7

4 years ago
  • Add 2 new default cleans, before loading the CFDI as XML DOM Document:
    • Change invalid xmlns:schemaLocation to xsi:schemaLocation. SAT uses to create "valid" CFDI with this error.
    • Remove xmlns="http://www.sat.gob.mx/cfd/3" when also xmlns:cfdi="http://www.sat.gob.mx/cfd/3" is found.
  • Improve SerialNumber to use map + impode instead of concatenation.
  • Improve SerialNumber to substr instead of strpos to check if a string start with text.
  • (DOC) Add cleaner notes and example about clean before load.
  • (DOC) Simplify example on RequestParameters usage.
  • (DEV) Add support for PHP 7.4 on Travis-CI
  • (DEV) Add support for PHP 7.4 on AppVeyor
    • Downgrade chocolatey to 0.10.13
    • Add --no-progress to choco commands
    • Setup extensions declared without prefix php_ on PHP versions lower than 7.2
    • Add PHP_CS_FIXER environment variables