Skip to content

⬆️ Add PHP 8.3–8.5 compatibility - #12

Open
Olivier-poisson-soluble wants to merge 6 commits into
release/3.7from
ft_php85_compatibility
Open

Olivier-poisson-soluble wants to merge 6 commits into
release/3.7from
ft_php85_compatibility

Conversation

@Olivier-poisson-soluble

@Olivier-poisson-soluble Olivier-poisson-soluble commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Description :

Mise à jour du SDK Esendex à partir de la release 3.6 afin de préparer une release 3.7 compatible avec PHP 8.3, 8.4 et 8.5

Principales modifications :

  • Passage de la version minimale de PHP à 8.3
  • Correction des dépréciations PHP 8.4 et 8.5
    • paramètres implicitement nullables
    • suppression de CURLOPT_BINARYTRANSFER
    • suppression de curl_close()
    • correction des signatures ArrayAccess, Iterator et Countable
    • correction de propriétés dynamiques
  • Mise à jour de PHPUnit vers PHPUnit 12 et adaptation des tests existants
  • Mise à jour de Phing 2 vers Phing 3 et adaptation du build.xml
  • Mise à jour des dépendances afin qu'elles restent installables à partir de PHP 8.3

👮 Processus de test :

La compatibilité a été vérifiée sous PHP 8.3, PHP 8.4 et PHP 8.5

Commandes de validation utilisées :
composer install
composer check-platform-reqs
vendor/bin/phpunit test/
vendor/bin/phing test
vendor/bin/phing build

Résultat PHPUnit :

  • 92 tests exécutés
  • 392 assertions
  • aucune erreur ni aucun échec
  • aucune dépréciation PHP remontée

22 notices PHPUnit non bloquantes restent présentes sur certains mocks historiques

Le fonctionnement du SDK doit également être vérifié dans un projet qui l'utilise, notamment sur les appels Esendex qui remontaient auparavant des dépréciations PHP

🦺 Actions manuelles à effectuer :

Après merge de cette PR dans release/3.7 et validation, le tag 3.7 pour la release devra être créé depuis release/3.7

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved CI, package metadata, documentation, test-discovery, and fixture findings remain.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the Esendex SDK for PHP 8.3–8.5 compatibility, including PHPUnit 12 and Phing 3 migrations.

Changes:

  • Raises the minimum PHP version to 8.3 and updates dependencies.
  • Removes deprecated PHP and cURL usage.
  • Updates production code, tests, and build tooling for modern APIs.
File summaries
File Reviewed changes
test/Esendex/Services/SurveySendServiceTests/SendWithTemplateDataTests.php PHPUnit 12 migration; default PHPUnit discovery issue due to Tests.php suffix (moderate, 1 vote).
test/Esendex/Services/SurveySendServiceTests/SendWithMetadataTests.php PHPUnit 12 migration; default PHPUnit discovery issue due to Tests.php suffix (moderate, 1 vote).
test/Esendex/Services/SurveySendServiceTests/SendTests.php PHPUnit 12 migration; default PHPUnit discovery issue due to Tests.php suffix (moderate, 1 vote).
test/Esendex/Services/SurveyReportServiceTests/GetStandardReportWithInvalidDateRangeTypeTest.php PHPUnit 12 migration.
test/Esendex/Services/SurveyReportServiceTests/GetStandardReportTest.php PHPUnit 12 migration.
test/Esendex/Services/SurveyReportServiceTests/GetStandardReportForDateRangeTest.php PHPUnit 12 migration.
test/Esendex/Services/SessionServiceTest.php PHPUnit 12 migration.
test/Esendex/Services/SentMessagesServiceTest.php PHPUnit 12 migration.
test/Esendex/Services/OptOutsServiceTest.php PHPUnit 12 migration.
test/Esendex/Services/MessageInformationServiceTest.php PHPUnit 12 migration.
test/Esendex/Services/MessageHeaderServiceTest.php PHPUnit 12 migration.
test/Esendex/Services/MessageBodyServiceTest.php PHPUnit 12 migration.
test/Esendex/Services/InboxServiceTest.php PHPUnit 12 migration.
test/Esendex/Services/DispatchServiceTest.php PHPUnit 12 migration.
test/Esendex/Services/CheckAccessServiceTest.php PHPUnit 12 migration.
test/Esendex/Services/AccountServiceTest.php PHPUnit 12 migration.
test/Esendex/Parser/SentMessagesXmlParserTest.php PHPUnit 12 migration.
test/Esendex/Parser/OptOutXmlParserTest.php PHPUnit 12 migration and date expectations.
test/Esendex/Parser/MessageInformationXmlParserTest.php Data provider and exception assertion migration.
test/Esendex/Parser/MessageHeaderXmlParserTest.php PHPUnit 12 migration.
test/Esendex/Parser/InboxXmlParserTest.php PHPUnit 12 migration.
test/Esendex/Parser/DispatchXmlParserTest.php PHPUnit 12 migration.
test/Esendex/Parser/AccountXmlParserTest.php PHPUnit 12 migration; fixture contains a stray literal a (nit, 3 votes).
test/Esendex/Http/UriBuilderTest.php PHPUnit 12 attributes and process isolation.
test/Esendex/Authentication/SessionAuthenticationTest.php PHPUnit 12 migration.
test/Esendex/Authentication/LoginAuthenticationTest.php PHPUnit 12 migration.
src/Esendex/SurveySendService.php Nullable HTTP client signature.
src/Esendex/SurveyReportService.php Declared parser property and nullable signatures.
src/Esendex/SessionService.php Declared HTTP client property and updated constructor type.
src/Esendex/SentMessagesService.php Nullable dependency signatures.
src/Esendex/Parser/DispatchXmlParser.php Updated recipient null handling.
src/Esendex/OptOutsService.php Nullable dependency signatures.
src/Esendex/Model/SentMessagesPage.php PHP-compatible interface signatures.
src/Esendex/Model/InboxPage.php PHP-compatible interface signatures.
src/Esendex/MessageInformationService.php Nullable dependency signatures.
src/Esendex/MessageHeaderService.php Nullable dependency signatures.
src/Esendex/MessageBodyService.php Nullable HTTP client signature.
src/Esendex/MessageBatchesService.php Nullable dependency signatures.
src/Esendex/InboxService.php Nullable dependency signatures.
src/Esendex/Http/UriBuilder.php Nullable array parameter.
src/Esendex/Http/HttpClient.php Removed obsolete cURL options and close call.
src/Esendex/Exceptions/EsendexException.php Nullable exception code handling.
src/Esendex/DispatchService.php Nullable dependency signatures.
src/Esendex/CheckAccessService.php Nullable HTTP client signature.
src/Esendex/AccountService.php Nullable dependency signatures.
composer.lock Updated dependency lockfile.
composer.json PHP, PHPUnit, and Phing requirements; CI matrix mismatch (critical, 1 vote), PEAR metadata mismatch (moderate, 1 vote), and outdated README requirement (nit, 1 vote).
build.xml Phing 3 compatibility updates.
Review details

Suppressed comments (5)

composer.json:19

  • The compatibility bump is not propagated to the PEAR package metadata: pear_generator.php:104 still calls setPhpDep('5.3.0'). A package generated for this release would advertise PHP 5.3 support despite the SDK requiring PHP 8.3; update the generator's dependency constraint.
        "php": ">=8.3",

composer.json:19

  • The runtime requirement is being raised to PHP 8.3, but README.md:8 still documents PHP >= 5.3.0. Update the public installation/runtime documentation so consumers are not told that an unsupported PHP version is valid.
        "php": ">=8.3",

test/Esendex/Services/SurveySendServiceTests/SendTests.php:37

  • This file is named SendTests.php, but the build invokes vendor/bin/phpunit test/ without a configuration or custom suffix. PHPUnit's default directory discovery looks for *Test.php, so this migrated test class is skipped; rename the file to SendTest.php or configure the Tests.php suffix.
    test/Esendex/Services/SurveySendServiceTests/SendWithMetadataTests.php:37
  • This file is named SendWithMetadataTests.php, but the build invokes vendor/bin/phpunit test/ without a configuration or custom suffix. PHPUnit's default directory discovery looks for *Test.php, so this migrated test class is skipped; rename the file to SendWithMetadataTest.php or configure the Tests.php suffix.
    test/Esendex/Services/SurveySendServiceTests/SendWithTemplateDataTests.php:37
  • This file is named SendWithTemplateDataTests.php, but the build invokes vendor/bin/phpunit test/ without a configuration or custom suffix. PHPUnit's default directory discovery looks for *Test.php, so this migrated test class is skipped; rename the file to SendWithTemplateDataTest.php or configure the Tests.php suffix.
  • Files reviewed: 47/48 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread composer.json
Comment thread test/Esendex/Parser/AccountXmlParserTest.php Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants