Skip to content

Commit

Permalink
Merge pull request #20 from eclipxe13/version-0.4.2
Browse files Browse the repository at this point in the history
Version 0.4.2 2024-09-02
  • Loading branch information
eclipxe13 authored Sep 2, 2024
2 parents eb36411 + a7ada73 commit 61288f8
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 38 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ 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:
php-version: '8.2'
php-version: '8.3'
coverage: none
tools: composer-normalize
env:
Expand All @@ -36,11 +36,11 @@ 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:
php-version: '8.2'
php-version: '8.3'
coverage: none
tools: cs2pr, phpcs
env:
Expand All @@ -53,11 +53,11 @@ 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:
php-version: '8.2'
php-version: '8.3'
coverage: none
tools: cs2pr, php-cs-fixer
env:
Expand All @@ -70,11 +70,11 @@ 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:
php-version: '8.2'
php-version: '8.3'
coverage: none
tools: composer:v2, phpstan
extensions: soap, gd
Expand All @@ -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') }}
Expand All @@ -95,14 +95,14 @@ 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', '8.3']
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
Expand All @@ -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
Expand All @@ -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') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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') }}
Expand Down
10 changes: 5 additions & 5 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-normalize" version="^2.31.0" installed="2.31.0" location="./tools/composer-normalize" copy="false"/>
<phar name="php-cs-fixer" version="^3.19.2" installed="3.19.2" location="./tools/php-cs-fixer" copy="false"/>
<phar name="phpcs" version="^3.7.2" installed="3.7.2" location="./tools/phpcs" copy="false"/>
<phar name="phpcbf" version="^3.7.2" installed="3.7.2" location="./tools/phpcbf" copy="false"/>
<phar name="phpstan" version="^1.10.21" installed="1.10.21" location="./tools/phpstan" copy="false"/>
<phar name="composer-normalize" version="^2.43.0" installed="2.43.0" location="./tools/composer-normalize" copy="false"/>
<phar name="php-cs-fixer" version="^3.64.2" installed="3.64.0" location="./tools/php-cs-fixer" copy="false"/>
<phar name="phpcs" version="^3.10.2" installed="3.10.2" location="./tools/phpcs" copy="false"/>
<phar name="phpcbf" version="^3.10.2" installed="3.10.2" location="./tools/phpcbf" copy="false"/>
<phar name="phpstan" version="^1.12.0" installed="1.12.0" location="./tools/phpstan" copy="false"/>
</phive>
4 changes: 2 additions & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 14 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
8 changes: 4 additions & 4 deletions docs/TODO.md
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/spipu/html2pdf/issues/530> esté solucionado para desactivar "permitir fallos"
en PHP 7.4 porque `spipu/html2pdf` tiene un bug.
Expand All @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions templates/generic.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -184,16 +184,16 @@
</p>
</div>
</div>
<?php if (null !== $relacionados) : ?>
<?php foreach ($relacionados as $relacionado) : ?>
<div class="panel">
<div class="title">CFDI Relacionados (Tipo de relación: <?=$this->e($relacionados['TipoRelacion'])?>)</div>
<div class="title">CFDI Relacionados (Tipo de relación: <?=$this->e($relacionado['TipoRelacion'])?>)</div>
<div class="content">
<?php foreach ($relacionados->searchNodes('cfdi:CfdiRelacionado') as $relacionado) : ?>
<span>UUID: <?=$relacionado['UUID']?></span>
<?php foreach ($relacionado->searchNodes('cfdi:CfdiRelacionado') as $cfdiRelacionado) : ?>
<span>UUID: <?=$cfdiRelacionado['UUID']?></span>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php foreach ($conceptos as $concepto) : ?>
<?php
$conceptoCounter = $conceptoCounter + 1;
Expand Down

0 comments on commit 61288f8

Please sign in to comment.