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

Requires incorrect #31

Closed
joseph-bing-han opened this issue Sep 19, 2018 · 1 comment
Closed

Requires incorrect #31

joseph-bing-han opened this issue Sep 19, 2018 · 1 comment

Comments

@joseph-bing-han
Copy link

\BenSampo\Enum\Enum::getLocalizedDescription(value): ?string
requires PHP 7.1 but you write require PHP 7.0, so I got the error message:

In Enum.php line 100:
Parse error: syntax error, unexpected '?'

me-shaon added a commit to me-shaon/laravel-enum that referenced this issue Sep 27, 2018
@me-shaon me-shaon mentioned this issue Sep 27, 2018
@BenSampo
Copy link
Owner

Hi @joseph-bing-han and @me-shaon - firstly thanks both for pointing this out and for supplying the fix. I'm more than happy to merge your changes, @me-shaon, to make this package compatible with PHP 7.0 although I'd like to ensure that it does indeed work and that I don't break compatibility again in future by adding some automated testing in travis.

I currently have travis set up, but it's only testing with one environment configuration. You can see from my recent commit history (that I've since reverted) that I tried to configure travis to test in multiple environments. Unfortunately I could never get it to work for PHP 7.0. It was actually failing before ever testing the package, something to do with version mismatches when it was trying to do composer install. If either of you have any travis experience, it would be great if you could take a look - I'm pretty busy at the moment, so I probably wont get a change to take a look again myself for a while.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants