OVH for SMS Framework - 2.0.x
=============================

Supported dependencies
----------------------
Drupal ^10.6 || ^11.4; PHP >=8.1, or >=8.3 on Drupal 11.
SMS Framework ^2.3 || ^3.0@alpha; OVH SDK ovh/ovh ^3.5; Guzzle ^7.0.
The SDK also requires ext-json and league/oauth2-client ^2.7 transitively.

The gateway implements the typed Framework 3 contract. Its same signatures also
work on Framework 2.3 (Drupal 10/11) and 2.4 (Drupal 11, PHP 8.3). Tests exercise
2.3.0, 2.4.0 and 3.0.0-alpha1. Framework 3 is prerelease: using it requires an
explicit stability opt-in in the ROOT project's Composer requirements. Normal
stable installations can retain Framework 2.3/2.4. No global stability change
is needed or made. The attribute is used by Framework 3; the annotation is
retained only because Framework 2's plugin manager cannot discover attributes.

Framework 4 uses Symfony Notifier/Texter instead of the existing gateway
contract. It is excluded, not transparently adapted. It would require a separate
migration of configuration and consumers. None of the tested Framework versions
allows Drupal 12; Drupal 12 is NOT declared or verified.

Configuration and breaking changes
----------------------------------
Plugin ID ovh and the keys endpoint, application_key, application_secret and
consumer_key are unchanged. Existing gateway entities can keep their settings.
The first SMS service returned by OVH is still used. Sender-for-response and
message options retain the historical behavior. No credentials are logged.

Breaking: old Drupal/PHP/Framework releases are excluded. Direct construction
now requires an OvhClientFactory; normally use the plugin manager. Composer
installation of the SDK is mandatory. Construction, discovery GET, and job POST
now all return structured errors on supported SDK/HTTP/JSON exceptions. Remote
bodies and exception messages are intentionally not exposed. Failure always
sets both transaction error and recipient reports. Invalid responses and
invalidReceivers cannot be reported as queued. Exactly one nonempty recipient
is required; extra recipients are rejected rather than silently discarded.

QUEUED means accepted for submission, not delivered. No retry is implemented.
An uncertain transport failure may occur after acceptance: verify provider
history before resubmitting to avoid duplicate paid messages. HTTP redirects
are disabled and connection/overall timeouts are bounded at 5/30 seconds.

Verification
------------
tests/src/Unit/OVHGatewayTest.php exercises the real SDK 3.5.0 over Guzzle
MockHandler, factory injection, plugin discovery, errors at each stage,
malformed/negative responses, config defaults and recipient validation.
No provider connection or SMS is made by the tests.
With Drupal/core-dev and the module dependencies installed:
  vendor/bin/phpunit -c core/phpunit.xml.dist modules/contrib/sms_ovh/tests
Rebuild Drupal caches after deployment. Live credentials, delivery, config forms
and site integration still require staging validation. No config update hook is
needed because the existing settings keys are retained.

References
----------
https://www.drupal.org/project/smsframework
https://github.com/ovh/php-ovh/tree/v3.5.0
