2.15.2
What's Changed
- Support enum in attribute arguments by @apple-x-co in #212
Enumerations can now be used for attribute arguments as shown below!
enum FruitEnum
{
case Apple;
case Orange;
case Grape;
}
#[Attribute(Attribute::TARGET_METHOD)]
final class FruitEnum
{
public function __construct(
public readonly FruitEnum $fruit1,
public readonly FruitEnum $fruit2,
) {
}
}
#[AttrFoo(fruit1: FruitEnum::Apple, fruit2: FruitEnum::Orange)]
public function methodFoo() {}
Full Changelog: 2.15.1...2.15.2