From 81ad0520c6b8fa67479e4d813f5971fda60318a5 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 2 Sep 2024 12:49:01 -0600 Subject: [PATCH 01/10] Use GitHub actions version 4 --- .github/workflows/build.yml | 14 +++++++------- .github/workflows/publish.yml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c23f55..001d73c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: runs-on: "ubuntu-latest" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -36,7 +36,7 @@ jobs: runs-on: "ubuntu-latest" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -53,7 +53,7 @@ jobs: runs-on: "ubuntu-latest" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -70,7 +70,7 @@ jobs: runs-on: "ubuntu-latest" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -84,7 +84,7 @@ jobs: id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} @@ -102,7 +102,7 @@ jobs: php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2'] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 # required for sudo-bot/action-scrutinizer - name: Install poppler-utils @@ -133,7 +133,7 @@ jobs: id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b4bb509..a4dda62 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,7 +17,7 @@ jobs: runs-on: "ubuntu-latest" steps: - name: "Checkout" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "Setup PHP" uses: shivammathur/setup-php@v2 with: @@ -31,7 +31,7 @@ jobs: id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: "Cache dependencies" - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} From f20b6c74276398412dea940079bbdbe004b70f33 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 2 Sep 2024 12:50:15 -0600 Subject: [PATCH 02/10] Use php-version matrix variable in singular --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 001d73c..b1bc6bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -95,11 +95,11 @@ jobs: run: phpstan analyse --no-progress --verbose tests: - name: Tests on PHP ${{ matrix.php-versions }} + name: Tests on PHP ${{ matrix.php-version }} runs-on: "ubuntu-latest" strategy: matrix: - php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2'] + php-version: ['7.3', '7.4', '8.0', '8.1', '8.2'] steps: - name: Checkout uses: actions/checkout@v4 @@ -112,7 +112,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-versions }} + php-version: ${{ matrix.php-version }} coverage: xdebug tools: composer:v2 extensions: soap, gd From 73f1f4b29e3f30ff467ceeb1f99de76c0090b139 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 2 Sep 2024 12:50:45 -0600 Subject: [PATCH 03/10] Run jobs using PHP 8.3 --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1bc6bb..bcbb03e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' coverage: none tools: composer-normalize env: @@ -40,7 +40,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' coverage: none tools: cs2pr, phpcs env: @@ -57,7 +57,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' coverage: none tools: cs2pr, php-cs-fixer env: @@ -74,7 +74,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' coverage: none tools: composer:v2, phpstan extensions: soap, gd @@ -99,7 +99,7 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - php-version: ['7.3', '7.4', '8.0', '8.1', '8.2'] + php-version: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] steps: - name: Checkout uses: actions/checkout@v4 From 67539bdd7b71b70f0dc2a29e000f85828a87a895 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 2 Sep 2024 12:51:02 -0600 Subject: [PATCH 04/10] Change deprecated rules --- .php-cs-fixer.dist.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 8f7048b..4d742d8 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -24,9 +24,9 @@ 'whitespace_after_comma_in_array' => true, 'no_empty_statement' => true, 'no_extra_blank_lines' => true, - 'function_typehint_space' => true, + 'type_declaration_spaces' => true, 'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arrays', 'arguments']], - 'new_with_braces' => true, + 'new_with_parentheses' => true, 'no_blank_lines_after_class_opening' => true, 'no_blank_lines_after_phpdoc' => true, 'object_operator_without_whitespace' => true, From c15ffcf0600b76b3f7e0ee59e8b07c9baf1038fb Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 2 Sep 2024 12:51:20 -0600 Subject: [PATCH 05/10] Update dependencies --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 3325f24..510aa07 100644 --- a/composer.json +++ b/composer.json @@ -23,10 +23,10 @@ }, "require": { "php": ">=7.3", - "eclipxe/cfdiutils": "^2.11.0", - "league/plates": "^3.3", - "phpcfdi/cfdi-cleaner": "^1.2", - "spipu/html2pdf": "^5.1" + "eclipxe/cfdiutils": "^2.29", + "league/plates": "^3.5", + "phpcfdi/cfdi-cleaner": "^1.3.3", + "spipu/html2pdf": "^5.2.8" }, "require-dev": { "phpunit/phpunit": "^9.5" From 7eac75fe56ec4f93058f517a2c901087682e1867 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 2 Sep 2024 12:51:29 -0600 Subject: [PATCH 06/10] Update development tools --- .phive/phars.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.phive/phars.xml b/.phive/phars.xml index 9dc628e..e294e91 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,8 +1,8 @@ - - - - - + + + + + From 62330729e333e17500685db31c07728d9981c95a Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 2 Sep 2024 12:51:54 -0600 Subject: [PATCH 07/10] Allow to have more than 1 node of Cfdi:CfdiRelacionados --- templates/generic.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/generic.php b/templates/generic.php index 59b708e..7dd02a0 100644 --- a/templates/generic.php +++ b/templates/generic.php @@ -15,7 +15,7 @@ $emisor = $cfdiData->emisor(); $receptor = $cfdiData->receptor(); $tfd = $cfdiData->timbreFiscalDigital(); -$relacionados = $comprobante->searchNode('cfdi:CfdiRelacionados'); +$relacionados = $comprobante->searchNodes('cfdi:CfdiRelacionados'); $totalImpuestosTrasladados = $comprobante->searchAttribute('cfdi:Impuestos', 'TotalImpuestosTrasladados'); $totalImpuestosRetenidos = $comprobante->searchAttribute('cfdi:Impuestos', 'TotalImpuestosRetenidos'); $conceptos = $comprobante->searchNodes('cfdi:Conceptos', 'cfdi:Concepto'); @@ -184,16 +184,16 @@

- +
-
CFDI Relacionados (Tipo de relación: e($relacionados['TipoRelacion'])?>)
+
CFDI Relacionados (Tipo de relación: e($relacionado['TipoRelacion'])?>)
- searchNodes('cfdi:CfdiRelacionado') as $relacionado) : ?> - UUID: + searchNodes('cfdi:CfdiRelacionado') as $cfdiRelacionado) : ?> + UUID:
- + Date: Mon, 2 Sep 2024 13:02:05 -0600 Subject: [PATCH 08/10] Update license year to 2024 --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 219891c..faeedc7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 - 2023 PhpCfdi https://www.phpcfdi.com/ +Copyright (c) 2018 - 2024 PhpCfdi https://www.phpcfdi.com/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From bccec85ff89f20399fb0db1b26576eaa5cb8bd7f Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 2 Sep 2024 13:14:20 -0600 Subject: [PATCH 09/10] Fix markdown whitespaces --- docs/TODO.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/TODO.md b/docs/TODO.md index bd4d9a2..cbf4861 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -1,8 +1,8 @@ # phpcfdi/cfditopdf To Do List -Intro: Al completar una tarea pasarla de *Planeada* a *Finalizada*. Escribir fecha o versión del cambio. +Intro: Al completar una tarea pasarla de *Planeada* a *Finalizada*. Escribir fecha o versión del cambio. -# Planeadas +## Planeadas - Revisar que esté solucionado para desactivar "permitir fallos" en PHP 7.4 porque `spipu/html2pdf` tiene un bug. @@ -15,8 +15,8 @@ Intro: Al completar una tarea pasarla de *Planeada* a *Finalizada*. Escribir fec ## Finalizadas -### En versión 0.3.2 o anteriores: - +### En versión 0.3.2 o anteriores + - Otros nodos de los conceptos. - Cadena de origen del TFD. - Liga del código QR. From a7ada7308e23f759b70bf4b96214c7a9696aac81 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 2 Sep 2024 13:16:25 -0600 Subject: [PATCH 10/10] Document version 0.4.2 --- docs/CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 2df3d6d..240d484 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,19 @@ # `phpcfdi/cfditopdf` Changelog +## Version 0.4.2 2024-09-02 + +- Fix issue on CFDI 4.0 generate only the first block of information for `cfdi:CfdiRelacionados`. + Now it creates a block for every occurence. +- Update license year to 2024. +- Maintenance changes: + - Use GitHub Actions version 4. + - Add PHP 8.3 to test matrix. + - Run jobs using PHP 8.3. + - Use `matrix.php-version` in singular instead of plural. + - Update `php-cs-fixer` configuration files deprecated rules. + - Update direct dependencies. + - Update development tools. + ## Maintenance 2023-06-26 - Fix configuration file `.php-cs-fixer.dist.php`.