Skip to content

Commit 2cac3fe

Browse files
authored
Merge pull request #8 from eclipxe13/maintenance-2023-06-15
Versión 0.1.6 2023-06-17
2 parents 41cf1db + 9c7a331 commit 2cac3fe

25 files changed

Lines changed: 271 additions & 30 deletions

.github/workflows/build.yml

Lines changed: 11 additions & 8 deletions
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:
@@ -21,9 +22,9 @@ jobs:
2122
- name: Setup PHP
2223
uses: shivammathur/setup-php@v2
2324
with:
24-
php-version: '8.1'
25+
php-version: '8.2'
2526
coverage: none
26-
tools: composer:v2, cs2pr, phpcs
27+
tools: cs2pr, phpcs
2728
env:
2829
fail-fast: true
2930
- name: Code style (phpcs)
@@ -38,9 +39,9 @@ jobs:
3839
- name: Setup PHP
3940
uses: shivammathur/setup-php@v2
4041
with:
41-
php-version: '8.1'
42+
php-version: '8.2'
4243
coverage: none
43-
tools: composer:v2, cs2pr, php-cs-fixer
44+
tools: cs2pr, php-cs-fixer
4445
env:
4546
fail-fast: true
4647
- name: Code style (php-cs-fixer)
@@ -55,14 +56,15 @@ jobs:
5556
- name: Setup PHP
5657
uses: shivammathur/setup-php@v2
5758
with:
58-
php-version: '8.1'
59+
php-version: '8.2'
5960
coverage: none
6061
tools: composer:v2, phpstan
6162
env:
6263
fail-fast: true
6364
- name: Get composer cache directory
6465
id: composer-cache
65-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
66+
shell: bash
67+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
6668
- name: Cache dependencies
6769
uses: actions/cache@v3
6870
with:
@@ -109,7 +111,8 @@ jobs:
109111
sudo apt-get install -y poppler-utils
110112
- name: Get composer cache directory
111113
id: composer-cache
112-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
114+
shell: bash
115+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
113116
- name: Cache dependencies
114117
uses: actions/cache@v3
115118
with:
@@ -119,4 +122,4 @@ jobs:
119122
- name: Install project dependencies
120123
run: composer upgrade --no-interaction --no-progress --prefer-dist
121124
- name: Tests (phpunit)
122-
run: vendor/bin/phpunit --testdox --verbose
125+
run: vendor/bin/phpunit --testdox --verbose

.github/workflows/sonarcloud.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: sonarcloud
22
on:
3+
workflow_dispatch:
34
push:
45
branches: [ "main" ]
56

@@ -18,7 +19,7 @@ jobs:
1819
- name: Setup PHP
1920
uses: shivammathur/setup-php@v2
2021
with:
21-
php-version: '8.1'
22+
php-version: '8.2'
2223
coverage: xdebug
2324
tools: composer:v2
2425
env:
@@ -29,7 +30,7 @@ jobs:
2930
sudo apt-get install -y poppler-utils
3031
- name: Get composer cache directory
3132
id: composer-cache
32-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
33+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3334
- name: Cache dependencies
3435
uses: actions/cache@v3
3536
with:
@@ -57,15 +58,15 @@ jobs:
5758
id: check-secrets
5859
run: |
5960
if [ -n "${{ secrets.GITHUB_TOKEN }}" ]; then
60-
echo "::set-output name=github::yes"
61+
echo "github=yes" >> $GITHUB_OUTPUT
6162
else
62-
echo "::set-output name=github::no"
63+
echo "github=no" >> $GITHUB_OUTPUT
6364
echo "::warning ::GITHUB_TOKEN non set"
6465
fi
6566
if [ -n "${{ secrets.SONAR_TOKEN }}" ]; then
66-
echo "::set-output name=sonar::yes"
67+
echo "sonar=yes" >> $GITHUB_OUTPUT
6768
else
68-
echo "::set-output name=sonar::no"
69+
echo "sonar=no" >> $GITHUB_OUTPUT
6970
echo "::warning ::SONAR_TOKEN non set"
7071
fi
7172
@@ -82,12 +83,12 @@ jobs:
8283
- name: Setup PHP
8384
uses: shivammathur/setup-php@v2
8485
with:
85-
php-version: '8.1'
86+
php-version: '8.2'
8687
coverage: none
8788
tools: composer:v2
8889
- name: Get composer cache directory
8990
id: composer-cache
90-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
91+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
9192
- name: Cache dependencies
9293
uses: actions/cache@v3
9394
with:

.phive/phars.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="phpstan" version="^1.8.11" installed="1.8.11" location="./tools/phpstan" copy="false"/>
4-
<phar name="phpcs" version="^3.7.1" installed="3.7.1" location="./tools/phpcs" copy="false"/>
5-
<phar name="phpcbf" version="^3.7.1" installed="3.7.1" location="./tools/phpcbf" copy="false"/>
6-
<phar name="php-cs-fixer" version="^3.12.0" installed="3.12.0" location="./tools/php-cs-fixer" copy="false"/>
7-
<phar name="composer-require-checker" version="^4.2.0" installed="4.2.0" location="./tools/composer-require-checker" copy="false"/>
3+
<phar name="phpstan" version="^1.10.19" installed="1.10.19" location="./tools/phpstan" copy="false"/>
4+
<phar name="phpcs" version="^3.7.2" installed="3.7.2" location="./tools/phpcs" copy="false"/>
5+
<phar name="phpcbf" version="^3.7.2" installed="3.7.2" location="./tools/phpcbf" copy="false"/>
6+
<phar name="php-cs-fixer" version="^3.17.0" installed="3.17.0" location="./tools/php-cs-fixer" copy="false"/>
7+
<phar name="composer-require-checker" version="^4.6.0" installed="4.6.0" location="./tools/composer-require-checker" copy="false"/>
88
</phive>

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contribuciones
22

3-
Las contribuciones son bienvenidas. Aceptamos *Pull Requests* en [el repositorio GitHub][homepage].
3+
Las contribuciones son bienvenidas. Aceptamos *Pull Requests* en [el repositorio GitHub][project].
44

55
Este proyecto se apega al siguiente [Código de Conducta][coc].
66
Al participar en este proyecto y en su comunidad, deberás seguir este código.

LICENCE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2022 PhpCfdi https://www.phpcfdi.com/
3+
Copyright (c) 2022 - 2023 PhpCfdi https://www.phpcfdi.com/
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ sin temor a romper tu aplicación.
180180

181181
## Contribuciones
182182

183-
Las contribuciones con bienvenidas. Por favor lee [CONTRIBUTING][] para más detalles
183+
Las contribuciones son bienvenidas. Por favor lee [CONTRIBUTING][] para más detalles
184184
y recuerda revisar el archivo de tareas pendientes [TODO][] y el archivo [CHANGELOG][].
185185

186186
## Copyright and License
@@ -209,7 +209,7 @@ and licensed for use under the MIT License (MIT). Please see [LICENSE][] for mor
209209
[badge-discord]: https://img.shields.io/discord/459860554090283019?logo=discord
210210
[badge-release]: https://img.shields.io/github/release/phpcfdi/csf-scraper.svg?logo=git
211211
[badge-license]: https://img.shields.io/github/license/phpcfdi/csf-scraper.svg?logo=open-source-initiative
212-
[badge-build]: https://img.shields.io/github/workflow/status/phpcfdi/csf-scraper/build/main?logo=github-actions
212+
[badge-build]: https://img.shields.io/github/actions/workflow/status/phpcfdi/csf-scraper/build.yml?branch=main&logo=github-actions
213213
[badge-reliability]: https://sonarcloud.io/api/project_badges/measure?project=phpcfdi_csf-scraper&metric=reliability_rating
214214
[badge-maintainability]: https://sonarcloud.io/api/project_badges/measure?project=phpcfdi_csf-scraper&metric=sqale_rating
215215
[badge-coverage]: https://img.shields.io/sonar/coverage/phpcfdi_csf-scraper/main?logo=sonarcloud&server=https%3A%2F%2Fsonarcloud.io

docs/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ versión, aunque sí su incorporación en la rama principal de trabajo, generalm
1111

1212
## Listado de cambios
1313

14+
### Versión 0.1.6 2023-06-17
15+
16+
- Se agrega el método `Scraper::getClient()` para obtener el cliente con el que fue construido el objeto.
17+
- Se corrige el nombre del método `PdfToTextConvertException::getOutput`, antes `getGetOutput`.
18+
- Se actualiza el año de licencia.
19+
- Se corrige la liga del proyecto en el archivo `CONTRIBUTING.md`.
20+
- Se actualiza la insignia de construcción en el archivo `README.md`.
21+
- Se actualiza el archivo de configuración de SonarCloud para excluir correctamente los archivos en `tests/_files`.
22+
- Para los flujos de trabajo:
23+
- Se permite ejecutarlos a petición.
24+
- Los trabajos se ejecutan en PHP 8.0.
25+
- No se instala `composer` cuando no es necesario.
26+
- Se sustituye la directiva `::set-output` con `$GITHUB_OUTPUT`.
27+
- Se actualizan las herramientas de desarrollo.
28+
- En las pruebas:
29+
- Se crean mejores casos para el manejo de excepciones provenientes de la lectura de un archivo PDF.
30+
- Se consigue el 100% de cobertura de código.
31+
1432
### Versión 0.1.5 2022-10-28
1533

1634
#### Regímenes que terminan en punto `.`

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<ruleset name="EngineWorks">
3-
<description>The EngineWorks (PSR-2 based) coding standard.</description>
3+
<description>The EngineWorks (PSR-12 based) coding standard.</description>
44

55
<file>src</file>
66
<file>tests</file>

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sonar.sourceEncoding=UTF-8
44
sonar.language=php
55
sonar.sources=src
66
sonar.tests=tests
7-
sonar.exclusions=vendor/,tools/,build/,tests/_files/
7+
sonar.test.exclusions=tests/_files/**/*
88
sonar.working.directory=build/.scannerwork
99
sonar.php.tests.reportPath=build/sonar-junit.xml
1010
sonar.php.coverage.reportPaths=build/sonar-coverage.xml

src/Exceptions/PdfReader/PdfToTextConvertException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function getExitCode(): int
3333
return $this->exitCode;
3434
}
3535

36-
public function getGetOutput(): string
36+
public function getOutput(): string
3737
{
3838
return $this->output;
3939
}

0 commit comments

Comments
 (0)