sendgrid-php
sendgrid-php copied to clipboard
Feature Request: Support arbitrary data storage in Sendgrid\Mail
In our application (Drupal 10, custom middleware module to leverage sendgrid-php library), we have a need to track meta-data regarding a proposed call to the Sendgrid API. Up to now, we have attached this data to the Sendgrid\Mail object as dynamic properties. As of PHP 8.2, this generates a deprecation warning (https://www.php.net/manual/en/language.oop5.properties.php#language.oop5.properties.dynamic-properties).
I'd like to modify Sendgrid\Mail to add a property for arbitrary data storage, with either:
- new supporting methods (perhaps leveraging
__set()/__get()), or - a new dependency on Symfony's
ParameterBagclass
If this is a desired feature, which route would you prefer to take?