Skip to content

2.0.0

Choose a tag to compare

@Gummibeer Gummibeer released this 21 Sep 10:48
  • upgrade spatie/enum to v3 - spatie/enum#56
  • drop PHP support for 7.2 and 7.3
  • drop Laravel support for 5.8 and 6.0 and 7.0
  • drop several custom exceptions:
    • ExpectsArrayOfEnumsField
    • InvalidEnumError
    • NoSuchEnumField
  • replace HasEnums trait by custom casts and default laravel query builder logic
  • add custom casts EnumCast and EnumCollectionCast
  • reduce make:enum command to --method option - no value/label mapping or method name formatting any more
  • add Laravel focused base Enum class which implements Jsonable, Castable
  • drop enum_index|EnumIndexRule, enum_name|EnumNameRule and enum_value|EnumValueRule validation rules
  • add Faker provider to generate random enum instances, values and labels \Spatie\Enum\Laravel\Faker\FakerEnumProvider