barryvdh / laravel-ide-helper

IDE Helper for Laravel
MIT License
14.17k stars 1.16k forks source link

Add support for enum default arguments using enum cases #1464

Closed d8vjork closed 7 months ago

d8vjork commented 1 year ago

Summary

Fixes #1463

Type of change

Checklist

mfn commented 1 year ago

Can you please add a test too?

d8vjork commented 1 year ago

@mfn Will try, don't know if there are tests for these default values, I was looking around and didn't found something I can adapt to this, or do you think I should add a new folder instead?

d8vjork commented 1 year ago

Ok I reply myself, I think this should go in a new folder so we can mark it as PHP 8+ only as these enums won't work on PHP 7 tests

d8vjork commented 1 year ago

Ok tests added and passing on PHP 8.2, also added same way it was done for Laravel 9 only tests (a condition to check if PHP 8.1+ is running otherwise markAsSkipped the test)