Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different issues related to Enums on PHP7 #169

Open
maurogesuitti opened this issue Mar 13, 2023 · 0 comments
Open

Different issues related to Enums on PHP7 #169

maurogesuitti opened this issue Mar 13, 2023 · 0 comments

Comments

@maurogesuitti
Copy link

maurogesuitti commented Mar 13, 2023

Summary

The requirement for the latest version of this package is "PHP 7.3 and later" but PHP 7.X doesn't support Enums so I am getting errors on serialization.

Expected Behavior

The package should work normally on PHP 7 or the requirement should be different.

Current Behavior

syntax error, unexpected 'PostcardSize' (T_STRING)

PostcardSize is an Enum

Steps to Reproduce

(new LettersApi($config, $guzzleClient))->create(new LetterEditable($data));

--> Exception: syntax error, unexpected 'PostcardSize' (T_STRING)
--> /var/www/vendor/lob/lob-php/lib/ObjectSerializer.php:93
--> FYI: $data['size'] === "4x6";

Context (Environment)

  • I got the same exception with any API method that uses Enums.
  • I am using PHP 7.4.6 and Laravel 6.
  • If there is another way to use the library that works on PHP 7 that would be awesome.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant