common icon indicating copy to clipboard operation
common copied to clipboard

fix: do not cast BackedEnum identifiers to int

Open Gwemox opened this issue 2 years ago • 0 comments

Another way to solve https://github.com/doctrine/common/pull/997 Thank's to @malarzm for the test (https://github.com/doctrine/common/pull/998)

The applied solution: only cast to int if return value is not a instance of BackedEnum. Another solution would be to check the return value is numeric (is_numeric) but if it is null it will change the behavior (null instead of 0)

Gwemox avatar Nov 25 '22 15:11 Gwemox