spatie / enum

Strongly typed enums in PHP supporting autocompletion and refactoring

Home Page:https://docs.spatie.be/enum/v3/introduction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enum::toArray() bc break? bug?

josefsabl opened this issue · comments

Enum::toArray() v1.0 used to return array as:

home => "home"
work => "work"
other => "other"

v2.0 returns

home => 0
work => 1
other => 2

Is this supposed to be like that? I find it counterintuitive. If this is a feature and not a bug it is definitely a bc break and should be noted in changelog

Anyway, thanks for this nifty library. Once we put it in production the postcard will definitely be on its way ;-)

I've listed it in the changelog now. The BC release was done right v1 to v2.

Ok.