Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
"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",
"symfony/dom-crawler": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^10.5"
"phpunit/phpunit": "^12.4"
},
"autoload": {
"psr-4": {
Expand Down
17 changes: 15 additions & 2 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@ 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 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`.

### 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.

Expand Down
2 changes: 1 addition & 1 deletion src/App/ArgumentsBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
2 changes: 1 addition & 1 deletion src/Scraper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 1 addition & 2 deletions tests/Fakes/PysSimulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public function __construct(private array $data)
{
}

/** @param array<mixed> $options */
public function __invoke(RequestInterface $request, array $options): PromiseInterface
public function __invoke(RequestInterface $request): PromiseInterface
{
if ('GET' === $request->getMethod()) {
return $this->promise($this->createTypes());
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/ScraperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class ScraperTest extends TestCase
{
private const MAX_RETRIES = 5;
private const int MAX_RETRIES = 5;

public function testObtainSequence(): void
{
Expand Down