From a83b544577488b08eab5499bfe2ba22161dfdc35 Mon Sep 17 00:00:00 2001 From: Lennart Van Vaerenbergh Date: Thu, 17 Sep 2026 17:29:22 +0200 Subject: [PATCH] Update API Client for Guzzle 8 and QA PHP 3 --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 18 ++++++++++++++++++ README.md | 30 ++++++++++++++++++++++-------- composer.json | 8 ++++---- phpunit.xml | 36 ------------------------------------ 5 files changed, 45 insertions(+), 49 deletions(-) delete mode 100644 phpunit.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed2de55..bda41d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,6 @@ jobs: issues: write pull-requests: write with: - php-versions: "['8.3', '8.4']" + php-versions: "['8.3', '8.4', '8.5']" tasks: '' coverage-report: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 65ba4b7..1054ee0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,23 @@ All Notable changes to `digipolisgent/api-client` package. +## [4.2.0] + +### Changed + +* Added Guzzle 8 support, allowing consumers such as Drupal 12 to resolve + Guzzle PSR-7 3.x while retaining Guzzle 6 and 7 compatibility. +* Added PHP 8.5 to the continuous-integration matrix. +* Updated development tooling to QA PHP 3.1, including shared PHPUnit 11/12 + configuration generation. +* Updated the README requirements, testing guidance, and continuous-integration + badge. + +### Removed + +* Removed the project-specific PHPUnit XML configuration, now provided by QA + PHP. + ## [4.1.0] ### Updated @@ -100,6 +117,7 @@ This includes: * Interfaces to create services in client packages. [Unreleased]: https://github.com/digipolisgent/php_package_dg-api-client/compare/master...develop +[4.2.0]: https://github.com/digipolisgent/php_package_dg-api-client/compare/4.1.0...4.2.0 [4.1.0]: https://github.com/digipolisgent/php_package_dg-api-client/compare/4.0.0...4.1.0 [4.0.0]: https://github.com/digipolisgent/php_package_dg-api-client/compare/3.0.1...4.0.0 [3.0.1]: https://github.com/digipolisgent/php_package_dg-api-client/compare/3.0.0...3.0.1 diff --git a/README.md b/README.md index e159bd6..0bb77e6 100644 --- a/README.md +++ b/README.md @@ -6,21 +6,24 @@ This package provides interfaces and abstract implementations to create an API c [![Total Downloads][ico-downloads]][link-packagist] [![License][ico-license]][link-license] -[![Build Status][ico-travis]][link-travis] +[![Build Status][ico-ci]][link-ci] [![Maintainability][ico-maintainability]][link-maintainability] [![Test Coverage][ico-test-coverage]][link-test-coverage] ![PHP from Packagist][ico-php-version] ## Install -Add the package to composer.json: - Install the package: ```bash composer require digipolisgent/api-client ``` +### Requirements + +The package supports PHP `^7.4 || ^8.0` and Guzzle `^6.5 || ^7.0 || ^8.0`. +Guzzle 8 support allows consumers such as Drupal 12 to use Guzzle PSR-7 3.x. + ## Usage See the examples of service packages how to use this package: @@ -34,34 +37,45 @@ Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recen ## Testing -Run first GrumPHP to generate the proper config files: +Install the development dependencies on PHP 8.3, 8.4, or 8.5: + +```shell +composer install +``` + +Run the complete QA suite: ```shell composer grumphp ``` -Run all PHPUnit tests: +Run the PHPUnit suite: ```shell composer phpunit ``` +QA PHP generates the schema-correct PHPUnit 11.5 or 12.5 configuration +automatically. The PHPUnit and coverage scripts run the QA PHP test suite, so +no project-level `phpunit.xml` file is needed. Coverage reports are written to +`build/` when code coverage is available. + ## License The MIT License (MIT). -Please see [License File](LICENSE.md) for more information. +Please see [License File](LICENSE) for more information. [ico-version]: https://img.shields.io/packagist/v/digipolisgent/api-client.svg?style=flat-square [ico-downloads]: https://img.shields.io/packagist/dt/digipolisgent/api-client.svg?style=flat-square [ico-license]: https://img.shields.io/github/license/district09/php_package_dg-api-client.svg?style=flat-square -[ico-travis]: https://app.travis-ci.com/district09/php_package_dg-api-client.svg?branch=master +[ico-ci]: https://github.com/district09/php_package_dg-api-client/actions/workflows/ci.yml/badge.svg?branch=develop [ico-maintainability]: https://api.codeclimate.com/v1/badges/658619da9e80449755a2/maintainability [ico-test-coverage]: https://api.codeclimate.com/v1/badges/658619da9e80449755a2/test_coverage [ico-php-version]: https://img.shields.io/packagist/php-v/digipolisgent/api-client.svg?style=flat-square [link-packagist]: https://packagist.org/packages/digipolisgent/api-client [link-license]: LICENSE.md -[link-travis]: https://app.travis-ci.com/district09/php_package_dg-api-client +[link-ci]: https://github.com/district09/php_package_dg-api-client/actions/workflows/ci.yml [link-maintainability]: https://codeclimate.com/github/district09/php_package_dg-api-client/maintainability [link-test-coverage]: https://codeclimate.com/github/district09/php_package_dg-api-client/test_coverage diff --git a/composer.json b/composer.json index 34ab894..f0b9d22 100644 --- a/composer.json +++ b/composer.json @@ -27,13 +27,13 @@ "require": { "php": "^7.4 || ^8.0", "ext-json": "*", - "guzzlehttp/guzzle": "^6.5 || ^7.0", + "guzzlehttp/guzzle": "^6.5 || ^7.0 || ^8.0", "jumbojett/openid-connect-php": "^1", "psr/http-message": "^1.0 || ^2.0", "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { - "district09/qa-php": "^2.2" + "district09/qa-php": "^3.1" }, "minimum-stability": "dev", "prefer-stable": true, @@ -61,12 +61,12 @@ }, "scripts": { "post-install-cmd": "vendor/bin/grumphp git:init", - "coverage": "vendor/bin/phpunit --configuration=phpunit.qa-php.xml --coverage-html build/coverage", + "coverage": "vendor/bin/grumphp run --testsuite=tests", "grumphp": "vendor/bin/grumphp run", "phpcpd": "vendor/bin/grumphp run --tasks=phpcpd", "phpcs": "vendor/bin/grumphp run --tasks=phpcs", "phpmd": "vendor/bin/grumphp run --tasks=phpmd", "phpstan": "vendor/bin/grumphp run --tasks=phpstan", - "phpunit": "vendor/bin/phpunit --configuration=phpunit.qa-php.xml" + "phpunit": "vendor/bin/grumphp run --testsuite=tests" } } diff --git a/phpunit.xml b/phpunit.xml deleted file mode 100644 index a98ffd8..0000000 --- a/phpunit.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - src - - - - - - tests - - - - - - - - - -