dotMailer-API-v2-PHP-client icon indicating copy to clipboard operation
dotMailer-API-v2-PHP-client copied to clipboard

PHP 7 Compatibility issue

Open joshangell opened this issue 8 years ago • 3 comments

The list of reserved words has been updated in PHP 7 to include ‘null’, which is used as a class name for the null DataType.

I got around it by just renaming Null class to NullDataType and updating the references. As far as I know the only reference is on line 60 of DataTypes/JsonObject.php.

I haven’t gone so far as to submit a PR as I'm wondering if the issue needs more thought, for example ‘mixed’ may well be reserved in future versions of PHP (see here). Perhaps all the core data types could be name spaced in some way?

Anyway - this library is awesome and has saved me an awful lot of time, so thank you!

joshangell avatar Apr 11 '16 08:04 joshangell

Any chance that this can be patched? Using the library and going to cause issues on server running PHP 7 which is using Envoyer for deployments and will overwrite these changes every time.

Josh-Bruce avatar Jun 23 '16 23:06 Josh-Bruce

Same problem here... Is there any fix planned for the near future? Other than that the library is great. Thank you so much for sharing it!

georgever avatar Sep 26 '16 15:09 georgever

I see this issue first came up in 2016 it is now 2019 and the composer package still does not have this fixed. Any update?

bmartinGithub avatar Mar 29 '19 19:03 bmartinGithub