Skip to content

Commit

Permalink
Update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach authored and actions-user committed Nov 25, 2021
1 parent c99fdbb commit cb1f818
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `enum` will be documented in this file

## 3.11.0 - 2021-11-25

- Added support for PHP 8.1

## 3.10.0 - 2021-10-20

- Fix `from()` and `tryFrom()` methods to do PHP type-juggling (string to integer) - [#108](https://github.com/spatie/enum/pull/108)
Expand Down Expand Up @@ -76,6 +80,7 @@ All notable changes to `enum` will be documented in this file
## 3.1.0 - 2020-08-28

[#64](https://github.com/spatie/enum/pull/64)

- Add missing type-hints and doc-blocks
- Fix unique values and labels
- Flag `EnumDefinition` as internal
Expand All @@ -98,7 +103,7 @@ All notable changes to `enum` will be documented in this file

## 2.3.5 - 2020-02-11

- Fix for `isEqual()` and `isAny()` method doc-tags to accept `mixed` values
- Fix for `isEqual()` and `isAny()` method doc-tags to accept `mixed` values

## 2.3.4 - 2020-01-17

Expand All @@ -115,7 +120,8 @@ All notable changes to `enum` will be documented in this file
## 2.3.0 - 2019-08-05

- Make `\Spatie\Enum\Enumerable::isValidIndex/Name/Value()` methods public [#36](https://github.com/spatie/enum/pull/36)
> Please note that this could be breaking for custom implementations of the `\Spatie\Enum\Enumerable` interface.
- > Please note that this could be breaking for custom implementations of the `\Spatie\Enum\Enumerable` interface.
-

## 2.2.0 - 2019-07-18

Expand Down Expand Up @@ -143,17 +149,17 @@ A full major rework of the `Enum` class - we try to list all changes, for more d

- Add `\Spatie\Enum\Enumerable` interface
- Add `\Spatie\Enum\Exceptions\DuplicatedIndexException`, `\Spatie\Enum\Exceptions\DuplicatedValueException`, `\Spatie\Enum\Exceptions\InvalidIndexException` and `\Spatie\Enum\Exceptions\InvalidValueException` exceptions
- Add `\Spatie\Enum\Enum->getIndex()` method
- Add `\Spatie\Enum\Enum->getIndex()` method
- Add `\Spatie\Enum\Enum::getIndices()` method
- Add `\Spatie\Enum\Enum->getValue()` method
- Add `\Spatie\Enum\Enum->getValue()` method
- Add `\Spatie\Enum\Enum::getValues()` method
- Rename `\Spatie\Enum\Enum::from()` to `\Spatie\Enum\Enum::make()`
- Rename `\Spatie\Enum\Enum::equals()` to `\Spatie\Enum\Enum::isEqual()`
- Rename `\Spatie\Enum\Enum::isOneOf()` to `\Spatie\Enum\Enum::isAny()`
- Change `\Spatie\Enum\Enum->__construct()` signature and responsibility - only take index & value and validate them
- Change `\Spatie\Enum\Enum::toArray()` return value instead of an array of `value => name` it returns `value => index`
- Change `\Spatie\Enum\Enum->__construct()` signature and responsibility - only take index & value and validate them
- Change `\Spatie\Enum\Enum::toArray()` return value instead of an array of `value => name` it returns `value => index`
- Drop recursive `\Spatie\Enum\Enum::make()` support from inside of an unstatic method
- Drop `\Spatie\Enum\Enum::$map` in favor of `\Spatie\Enum\Enum->getIndex()`and `\Spatie\Enum\Enum->getValue()`
- Drop `\Spatie\Enum\Enum::$map` in favor of `\Spatie\Enum\Enum->getIndex()`and `\Spatie\Enum\Enum->getValue()`
- Update all methods have strict type checks: `index: int` and `value: string`
- Update all methods are compatible with all required types: index, value, name or instance of Enum

Expand Down

0 comments on commit cb1f818

Please sign in to comment.