From cdf936b5d89de091eb1fee218730b5e634ea049a Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Thu, 13 Nov 2025 13:39:29 -0600 Subject: [PATCH 1/7] Remove cast (impossible case) --- src/App/ArgumentsBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/ArgumentsBuilder.php b/src/App/ArgumentsBuilder.php index 57ef1a8..a4132c4 100644 --- a/src/App/ArgumentsBuilder.php +++ b/src/App/ArgumentsBuilder.php @@ -23,7 +23,7 @@ public function build(string ...$arguments): Arguments { $arguments = array_values($arguments); while ([] !== $arguments) { - $argument = (string) array_shift($arguments); + $argument = array_shift($arguments); match (true) { in_array($argument, ['--xml', '-x'], true) => $this->setXml((string) array_shift($arguments)), in_array($argument, ['--json', '-j'], true) => $this->setJson((string) array_shift($arguments)), From 07441b798d48c6f05185ddc705b8432123ab2dfe Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Thu, 13 Nov 2025 13:39:44 -0600 Subject: [PATCH 2/7] Remove unused parameters --- tests/Fakes/PysSimulator.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/Fakes/PysSimulator.php b/tests/Fakes/PysSimulator.php index 6a626b8..4edd24a 100644 --- a/tests/Fakes/PysSimulator.php +++ b/tests/Fakes/PysSimulator.php @@ -24,8 +24,7 @@ public function __construct(private array $data) { } - /** @param array $options */ - public function __invoke(RequestInterface $request, array $options): PromiseInterface + public function __invoke(RequestInterface $request): PromiseInterface { if ('GET' === $request->getMethod()) { return $this->promise($this->createTypes()); From 16e0c4eddce5d7ffafdf65ddf53df461cdad7c39 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Thu, 13 Nov 2025 13:46:58 -0600 Subject: [PATCH 3/7] Add constant types --- src/Scraper.php | 2 +- tests/Integration/ScraperTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Scraper.php b/src/Scraper.php index 7aa0d95..6fb598b 100644 --- a/src/Scraper.php +++ b/src/Scraper.php @@ -14,7 +14,7 @@ final class Scraper implements ScraperInterface { /** @noinspection HttpUrlsUsage */ - public const PYS_URL = 'http://pys.sat.gob.mx/PyS/catPyS.aspx'; + public const string PYS_URL = 'http://pys.sat.gob.mx/PyS/catPyS.aspx'; private Crawler|null $crawler = null; diff --git a/tests/Integration/ScraperTest.php b/tests/Integration/ScraperTest.php index ac1746e..4bcc1d8 100644 --- a/tests/Integration/ScraperTest.php +++ b/tests/Integration/ScraperTest.php @@ -11,7 +11,7 @@ class ScraperTest extends TestCase { - private const MAX_RETRIES = 5; + private const int MAX_RETRIES = 5; public function testObtainSequence(): void { From b09699534d9afa6ea2b501e070213698729bc4e2 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Thu, 13 Nov 2025 13:47:40 -0600 Subject: [PATCH 4/7] Bump to PHP 8.3 --- .github/workflows/build.yml | 2 +- .github/workflows/system.yml | 2 +- README.md | 3 ++- composer.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50dee97..ef5ffee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -97,7 +97,7 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - php-version: ['8.2', '8.3', '8.4'] + php-version: ['8.3', '8.4'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/system.yml b/.github/workflows/system.yml index e89ef6f..ae6718f 100644 --- a/.github/workflows/system.yml +++ b/.github/workflows/system.yml @@ -19,7 +19,7 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - php-version: ['8.2', '8.3', '8.4'] + php-version: ['8.3', '8.4'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/README.md b/README.md index c7b95d3..344372c 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,8 @@ sin temor a romper tu aplicación. | 1.0.0 | 8.2, 8.3 | 2023-12-13 Fuera de mantenimiento | | 2.0.0 | 8.2, 8.3 | 2024-03-07 Fuera de mantenimiento | | 3.0.0 | 8.2, 8.3 | 2024-03-07 Fuera de mantenimiento | -| 4.0.0 | 8.2, 8.3, 8.4 | 2024-10-17 | +| 4.0.0 | 8.2, 8.3, 8.4 | 2024-10-17 Fuera de mantenimiento | +| 5.0.0 | 8.3, 8.4 | 2025-11-13 | ## Contribuciones diff --git a/composer.json b/composer.json index c85f0da..393a9cb 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "source": "https://github.com/phpcfdi/sat-pys-scraper" }, "require": { - "php": ">=8.2", + "php": ">=8.3", "ext-dom": "*", "guzzlehttp/guzzle": "^7.8", "symfony/css-selector": "^7.0", From aee766a5f6120866a6dc4af7b5e41a7bdcf7bc4f Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Thu, 13 Nov 2025 13:50:33 -0600 Subject: [PATCH 5/7] Bump to PHPUnit 12.4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 393a9cb..8c70d0b 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "symfony/dom-crawler": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^10.5" + "phpunit/phpunit": "^12.4" }, "autoload": { "psr-4": { From 50afb0f1e7ea828df43e922f59fdca6dda059387 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Thu, 13 Nov 2025 13:52:10 -0600 Subject: [PATCH 6/7] Fix release date for 4.0.1 & 4.0.2 --- docs/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index abb53f6..f09d0cd 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -11,11 +11,11 @@ versión, aunque sí su incorporación en la rama principal de trabajo. Generalm ## Listado de cambios -### Versión 4.0.2 2024-11-13 +### Versión 4.0.2 2025-11-13 Se corrige la imagen de Docker incluyendo la dependencia `libzip`. -### Versión 4.0.1 2024-11-13 +### Versión 4.0.1 2025-11-13 Esta actualización confirma la compatibilidad (que ya existía) con PHP 8.4. From 00c79f3c6f34d8406ac48f13770716715a4a51b4 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Thu, 13 Nov 2025 13:52:30 -0600 Subject: [PATCH 7/7] Prepare version 5.0.0 --- docs/CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index f09d0cd..32aa372 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -11,6 +11,19 @@ versión, aunque sí su incorporación en la rama principal de trabajo. Generalm ## Listado de cambios +### Versión 5.0.0 2025-11-13 + +Se elimina la compatibilidad con PHP 8.2. Se mantiene PHP 8.3 y PHP 8.4. + +Si estás usando esta herramienta en una implementación de la librería, +esta versión no presenta cambios significativos a tu código. + +- Se establece el tipo `string` a la constante `Scraper::PYS_URL`. + +En el entorno de desarrollo: + +- Se actualiza PHPUnit a la versión 12.4. + ### Versión 4.0.2 2025-11-13 Se corrige la imagen de Docker incluyendo la dependencia `libzip`.