Skip to content

Commit 46b5e9d

Browse files
authored
Merge pull request #25 from eclipxe13/version-1.3.3
Soporte para Carta Porte 3.1 (version 1.3.3)
2 parents 2c3e88d + f4ac5d4 commit 46b5e9d

File tree

7 files changed

+78
-28
lines changed

7 files changed

+78
-28
lines changed

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@
1919
/phpstan.neon.dist export-ignore
2020
/phpunit.xml.dist export-ignore
2121
/sonar-project.properties export-ignore
22+
23+
# Do not count these files on github code language
24+
/tests/_files/** linguist-detectable=false

.github/workflows/build.yml

+24-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: build
22
on:
3+
workflow_dispatch:
34
pull_request:
45
branches: [ "main" ]
56
push:
@@ -12,12 +13,29 @@ on:
1213

1314
jobs:
1415

16+
composer-normalize:
17+
name: Composer normalization
18+
runs-on: "ubuntu-latest"
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: '8.3'
26+
coverage: none
27+
tools: composer-normalize
28+
env:
29+
fail-fast: true
30+
- name: Composer normalize
31+
run: composer-normalize
32+
1533
phpcs:
1634
name: Code style (phpcs)
1735
runs-on: "ubuntu-latest"
1836
steps:
1937
- name: Checkout
20-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
2139
- name: Setup PHP
2240
uses: shivammathur/setup-php@v2
2341
with:
@@ -34,7 +52,7 @@ jobs:
3452
runs-on: "ubuntu-latest"
3553
steps:
3654
- name: Checkout
37-
uses: actions/checkout@v3
55+
uses: actions/checkout@v4
3856
- name: Setup PHP
3957
uses: shivammathur/setup-php@v2
4058
with:
@@ -51,7 +69,7 @@ jobs:
5169
runs-on: "ubuntu-latest"
5270
steps:
5371
- name: Checkout
54-
uses: actions/checkout@v3
72+
uses: actions/checkout@v4
5573
- name: Setup PHP
5674
uses: shivammathur/setup-php@v2
5775
with:
@@ -64,7 +82,7 @@ jobs:
6482
id: composer-cache
6583
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
6684
- name: Cache dependencies
67-
uses: actions/cache@v3
85+
uses: actions/cache@v4
6886
with:
6987
path: ${{ steps.composer-cache.outputs.dir }}
7088
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
@@ -82,7 +100,7 @@ jobs:
82100
php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
83101
steps:
84102
- name: Checkout
85-
uses: actions/checkout@v3
103+
uses: actions/checkout@v4
86104
- name: Setup PHP
87105
uses: shivammathur/setup-php@v2
88106
with:
@@ -95,7 +113,7 @@ jobs:
95113
id: composer-cache
96114
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
97115
- name: Cache dependencies
98-
uses: actions/cache@v3
116+
uses: actions/cache@v4
99117
with:
100118
path: ${{ steps.composer-cache.outputs.dir }}
101119
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}

.github/workflows/coverage.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: coverage
22
on:
3+
workflow_dispatch:
34
push:
45
branches: [ "main" ]
56

@@ -14,7 +15,7 @@ jobs:
1415
runs-on: "ubuntu-latest"
1516
steps:
1617
- name: Checkout
17-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1819
- name: Setup PHP
1920
uses: shivammathur/setup-php@v2
2021
with:
@@ -27,7 +28,7 @@ jobs:
2728
id: composer-cache
2829
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
2930
- name: Cache dependencies
30-
uses: actions/cache@v3
31+
uses: actions/cache@v4
3132
with:
3233
path: ${{ steps.composer-cache.outputs.dir }}
3334
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
@@ -37,7 +38,7 @@ jobs:
3738
- name: Create code coverage
3839
run: vendor/bin/phpunit --testdox --verbose --coverage-xml=build/coverage --coverage-clover=build/coverage/clover.xml --log-junit=build/coverage/junit.xml
3940
- name: Store code coverage
40-
uses: actions/upload-artifact@v3
41+
uses: actions/upload-artifact@v4
4142
with:
4243
name: code-coverage
4344
path: build/coverage
@@ -72,7 +73,7 @@ jobs:
7273
runs-on: "ubuntu-latest"
7374
steps:
7475
- name: Checkout
75-
uses: actions/checkout@v3
76+
uses: actions/checkout@v4
7677
- name: Unshallow clone to provide blame information
7778
run: git fetch --unshallow
7879
- name: Setup PHP
@@ -85,15 +86,15 @@ jobs:
8586
id: composer-cache
8687
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
8788
- name: Cache dependencies
88-
uses: actions/cache@v3
89+
uses: actions/cache@v4
8990
with:
9091
path: ${{ steps.composer-cache.outputs.dir }}
9192
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
9293
restore-keys: ${{ runner.os }}-composer-
9394
- name: Install project dependencies
9495
run: composer upgrade --no-interaction --no-progress --prefer-dist
9596
- name: Obtain code coverage
96-
uses: actions/download-artifact@v3
97+
uses: actions/download-artifact@v4
9798
with:
9899
name: code-coverage
99100
path: build/coverage

.phive/phars.xml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="phpcs" version="^3.8.1" installed="3.8.1" location="./tools/phpcs" copy="false"/>
4-
<phar name="phpcbf" version="^3.8.1" installed="3.8.1" location="./tools/phpcbf" copy="false"/>
5-
<phar name="php-cs-fixer" version="^3.47.0" installed="3.47.0" location="./tools/php-cs-fixer" copy="false"/>
6-
<phar name="phpstan" version="^1.10.56" installed="1.10.56" location="./tools/phpstan" copy="false"/>
3+
<phar name="phpcs" version="^3.10.1" installed="3.10.1" location="./tools/phpcs" copy="false"/>
4+
<phar name="phpcbf" version="^3.10.1" installed="3.10.1" location="./tools/phpcbf" copy="false"/>
5+
<phar name="php-cs-fixer" version="^3.59.3" installed="3.59.3" location="./tools/php-cs-fixer" copy="false"/>
6+
<phar name="phpstan" version="^1.11.5" installed="1.11.5" location="./tools/phpstan" copy="false"/>
7+
<phar name="composer-normalize" version="^2.43.0" installed="2.43.0" location="./tools/composer-normalize" copy="false"/>
78
</phive>

composer.json

+21-12
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
{
22
"name": "phpcfdi/cfdi-cleaner",
33
"description": "Clean up Mexican CFDI",
4-
"keywords": ["cfdi", "sat", "mexico"],
5-
"homepage": "https://github.com/phpcfdi/cfdi-cleaner",
64
"license": "MIT",
5+
"keywords": [
6+
"cfdi",
7+
"sat",
8+
"mexico"
9+
],
710
"authors": [
811
{
912
"name": "Carlos C Soto",
1013
"email": "eclipxe13@gmail.com"
1114
}
1215
],
16+
"homepage": "https://github.com/phpcfdi/cfdi-cleaner",
1317
"require": {
1418
"php": ">=7.3",
1519
"ext-dom": "*",
1620
"ext-libxml": "*",
1721
"symfony/polyfill-php80": "^1.22"
1822
},
1923
"require-dev": {
20-
"phpunit/phpunit": "^9.3",
21-
"ext-json": "*"
24+
"ext-json": "*",
25+
"phpunit/phpunit": "^9.3"
2226
},
2327
"autoload": {
2428
"psr-4": {
@@ -31,29 +35,34 @@
3135
}
3236
},
3337
"scripts": {
34-
"dev:build": ["@dev:fix-style", "@dev:test"],
38+
"dev:build": [
39+
"@dev:fix-style",
40+
"@dev:test"
41+
],
3542
"dev:check-style": [
43+
"@php tools/composer-normalize normalize --dry-run",
3644
"@php tools/php-cs-fixer fix --dry-run --verbose",
3745
"@php tools/phpcs --colors -sp"
3846
],
47+
"dev:coverage": [
48+
"@php -dzend_extension=xdebug.so -dxdebug.mode=coverage vendor/bin/phpunit --coverage-html build/coverage/html/"
49+
],
3950
"dev:fix-style": [
51+
"@php tools/composer-normalize normalize",
4052
"@php tools/php-cs-fixer fix --verbose",
4153
"@php tools/phpcbf --colors -sp"
4254
],
4355
"dev:test": [
4456
"@dev:check-style",
4557
"@php vendor/bin/phpunit --testdox --verbose --stop-on-failure",
4658
"@php tools/phpstan analyse --verbose"
47-
],
48-
"dev:coverage": [
49-
"@php -dzend_extension=xdebug.so -dxdebug.mode=coverage vendor/bin/phpunit --coverage-html build/coverage/html/"
5059
]
5160
},
5261
"scripts-descriptions": {
5362
"dev:build": "DEV: run dev:fix-style and dev:tests, run before pull request",
54-
"dev:check-style": "DEV: search for code style errors using php-cs-fixer and phpcs",
55-
"dev:fix-style": "DEV: fix code style errors using php-cs-fixer and phpcbf",
56-
"dev:test": "DEV: run dev:check-style, phpunit and phpstan",
57-
"dev:coverage": "DEV: run phpunit with xdebug and storage coverage in build/coverage/html/"
63+
"dev:check-style": "DEV: search for code style errors using composer-normalize, php-cs-fixer and phpcs",
64+
"dev:coverage": "DEV: run phpunit with xdebug and storage coverage in build/coverage/html/",
65+
"dev:fix-style": "DEV: fix code style errors using composer-normalize, php-cs-fixer and phpcbf",
66+
"dev:test": "DEV: run dev:check-style, phpunit and phpstan"
5867
}
5968
}

docs/CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ Utilizamos [Versionado Semántico 2.0.0](SEMVER.md).
88

99
Los cambios no liberados se integran a la rama principal, pero no requieren de la liberación de una nueva versión.
1010

11+
## Versión 1.3.3
12+
13+
- Se agrega *Complemento de Carta Porte 3.1* a la lista de espacio de nombres conocidos.
14+
15+
Se hacen los siguientes cambios al entorno de desarrollo:
16+
17+
- Se agrega a las herramientas de desarrollo `composer-normalize`:
18+
- Se agrega a los scripts de desarrollo de `composer` en `dev:check-style` y `dev:fix-style`.
19+
- Se agrega al flujo de trabajo de integración contínua.
20+
- Se normaliza el archivo `composer.json`.
21+
- Se aplicó en los flujos de trabajo:
22+
- Se actualizan las acciones de GitHub a la versión 4.
23+
- Se permite la ejecución de los flujos de trabajo manualmente.
24+
- Se excluye `test/_files` de la detección de lenguajes de GitHub.
25+
- Se actualizan las herramientas de desarrollo.
26+
1127
## Versión 1.3.2
1228

1329
- Se agrega *Comercio Exterior 2.0* a la lista de espacio de nombres conocidos.

src/XmlDocumentCleaners/SetKnownSchemaLocations.php

+2
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ class SetKnownSchemaLocations implements XmlDocumentCleanerInterface
134134
=> 'http://www.sat.gob.mx/sitio_internet/cfd/CartaPorte/CartaPorte20.xsd',
135135
'http://www.sat.gob.mx/CartaPorte30#3.0'
136136
=> 'http://www.sat.gob.mx/sitio_internet/cfd/CartaPorte/CartaPorte30.xsd',
137+
'http://www.sat.gob.mx/CartaPorte31#3.1'
138+
=> 'http://www.sat.gob.mx/sitio_internet/cfd/CartaPorte/CartaPorte31.xsd',
137139
'http://www.sat.gob.mx/esquemas/retencionpago/1/arrendamientoenfideicomiso#1.0'
138140
=> 'http://www.sat.gob.mx/esquemas/retencionpago/1/arrendamientoenfideicomiso/arrendamientoenfideicomiso.xsd',
139141
'http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos#1.0'

0 commit comments

Comments
 (0)