From 7d79886f61dd37cb9cbb1159df9f70ba13cf0efd Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 13 Feb 2023 09:46:34 -0600 Subject: [PATCH 1/4] Add php-http/discovery plugin configuration --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index c3c2b4f..77c7a19 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,9 @@ } ], "config": { + "allow-plugins": { + "php-http/discovery": false + }, "preferred-install": { "*": "dist" }, From 98e6f361bfbbc1484755e04e87a9d9a1bc3e51c3 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 13 Feb 2023 09:47:08 -0600 Subject: [PATCH 2/4] refactor test to assert method deprecation --- tests/Unit/SatHttpGatewayTest.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/Unit/SatHttpGatewayTest.php b/tests/Unit/SatHttpGatewayTest.php index dc2b2f0..352c825 100644 --- a/tests/Unit/SatHttpGatewayTest.php +++ b/tests/Unit/SatHttpGatewayTest.php @@ -11,8 +11,15 @@ final class SatHttpGatewayTest extends TestCase { public function testMethodPostLoginDataIsDeprecated(): void { - $gateway = new SatHttpGateway(); - $this->expectDeprecation(); - $gateway->postLoginData('foo', []); + $gateway = new class () extends SatHttpGateway { + public function postCiecLoginData(string $loginUrl, array $formParams): string + { + return ''; + } + }; + + @$gateway->postLoginData('foo', []); + $error = error_get_last() ?? []; + $this->assertSame(E_USER_DEPRECATED, intval($error['type'] ?? 0)); } } From a586c871d0cbd1c3f4a3b3de770eb344d32fba11 Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 13 Feb 2023 10:22:25 -0600 Subject: [PATCH 3/4] Update development tools --- .phive/phars.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.phive/phars.xml b/.phive/phars.xml index 7e6b51b..5fb4fa9 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,7 +1,7 @@ - + - + From 8474290ead129654b43a5154d6f83f350f6c249a Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 13 Feb 2023 10:22:51 -0600 Subject: [PATCH 4/4] Document unreleased changes --- docs/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 1bd2efe..3062533 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -6,6 +6,13 @@ Usamos [Versionado Semántico 2.0.0](SEMVER.md) por lo que puedes usar esta libr ## Cambios aún no liberados en una versión +### Cambios no liberados: 2023-02-13 + +- Actualización de herramientas de desarrollo. +- Se agrega la configuración en `composer.json` para no permitir el uso de *plugins* de `php-http/discovery`. +- En las pruebas, se refactoriza `SatHttpGatewayTest::testMethodPostLoginDataIsDeprecated` para probar que + el método `postLoginData` está deprecado, dado que PHPUnit 9.6 descontinuó el método `expectDeprecation`. + ### Cambios no liberados: 2023-01-31 - Actualización de herramientas de desarrollo.