Skip to content

Enums support? #159

Discussion options

You must be logged in to vote

You just use an enum within your settings class, take a look at the tests if you need more context:

it('has support for native enums', function () {
$this->skipIfPHPLowerThen('8.1');
$settings = new class extends Settings {
public DummyUnitEnum $unit;
public DummyIntEnum $int;
public DummyStringEnum $string;
public static function group(): string
{
return 'enums';
}
};
FakeSettingsContainer::setUp()->addSettingsClass(get_class($settings));
resolve(SettingsMigrator::class)->inGroup('enums', function (SettingsBlueprint $blu…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hamzaelmaghari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants