sendgrid-php icon indicating copy to clipboard operation
sendgrid-php copied to clipboard

Code and/or files that need upgrading to work on PHP 8.0 ini

Open BayAreaOA opened this issue 3 years ago • 3 comments

Issue Summary

We downloaded sendgrid-php from the Sendgrid website when logged in to the sendgrid site back in mid-February 2022 and we know it is compatible with PHP 7.3 but have not tested it with PHP 7.4. When in the context of PHP 8.0 it did not work. I contacted SendGrid because I heard that the SendGrid-PHP implementation was not compatible with PHP 8.0. They suggested I ask the GitHub community. Since there are a lot of files (not everyone uses all of them including us) does anyone know which files or other code is incompatible so we understand what to change? I would think that upgrading the code we are currently using to PHP 8.0 would work but SendGrid did not know. Besides the code on this site, is there anything else on SendGrid's end/when you are logged into our sendgrid account, that needs to be upgraded? Thank you for any detailed guidance you can provide.

Technical details:

  • sendgrid-php version: mid-February sendgrid website download; we don't know what version this was
  • php version: 7.3

BayAreaOA avatar May 02 '22 21:05 BayAreaOA

Support for PHP 8 added here: https://github.com/sendgrid/sendgrid-php/pull/1090

Will be released tomorrow.

childish-sambino avatar May 03 '22 15:05 childish-sambino

It is not clear to me what this post means - I clicked on the link and it showed me some tests with different PHP versions and looked like the tests for PHP 8.0 passed. However, in our PHP development environment, it only worked with PHP 7.4 and not PHP 8.0. Can anyone tell me whether all I need to do is upgrade the actual files on github to be compatible with PHP 8.0 or whether there is something in my account that I need to change? Thank you for your help.

BayAreaOA avatar May 05 '22 03:05 BayAreaOA

Shouldn't be any account changes needed. The latest version officially supports PHP 8 and tests against such versions. Recommend trying the new version of this library and going from there.

childish-sambino avatar May 05 '22 20:05 childish-sambino