sendgrid / sendgrid-php

The Official Twilio SendGrid PHP API Library
https://sendgrid.com
MIT License
1.49k stars 624 forks source link

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

Open BayAreaOA opened 2 years ago

BayAreaOA commented 2 years ago

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:

childish-sambino commented 2 years ago

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

Will be released tomorrow.

BayAreaOA commented 2 years ago

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.

childish-sambino commented 2 years ago

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.