Skip to content

Latest commit

 

History

History
178 lines (113 loc) · 4.64 KB

CHANGELOG.md

File metadata and controls

178 lines (113 loc) · 4.64 KB

Changelog

All notable changes to Enumhancer will be documented in this file

2.2.0 - 2023-06-09

  • fixed serious bug in Getters where getting by integer would not match value first.
  • added support for BIT_MODIFIER

2.1.0 - 2023-05-12

2.0.0 - 2023-02-28

  • Now supports Laravel 10
  • dropped support for laravel 8

Upgrade notes

  • Makers (make, tryMake etc.) are removed in favor of Getters

1.23.0 - 2023-02-03

  • added PHPStan support
  • added IDE-helper (requires another package)
  • added global class for configuring Enumhancer
  • added global Macro support

1.22.0 - 2023-01-07

  • added asEnum to laravel's FormRequests
  • tiny fix in isEnum validation: When Defaults are used, it should fail validation.

1.21.0 - 2023-01-06

  • added (basic) enum binding allowing you to bind basic enumerations to your routes and use Enumhancers secret sauce.
  • Fixed a lot of potential issues with PHPstan.

1.20.0 - 2023-01-04

  • bugfix in Default where configured defaults would not override the by const defined value
  • bugfix in Mappers where mapping to integers was not allowed

Extended features

  • You can now set Mapper FQCN in constants starting with map and map_flip
  • Mappers methods now are usable statically
  • All Laravel rules have now macro's set on Rule

New features

1.19.0 - 2022-12-15

  • You can now use constants for Mappers and Defaults
  • you can now flag a unit enum as strict, so you don't have to worry about casing in Values.

1.18.0 - 2022-12-14

  • Added Magic method functionality to State
  • Added to and tryTo methods to State
  • Added is, isNot, isIn and isNotIn to Comparison

1.17.0 - 2022-12-13

  • Added Flip, allowing to use a single mapper for mapping between enums
  • From now allows UnitEnum objects for use with Flip
  • Comparison now allows different enums when used with Mappers
  • Deprecated Makers, replaced by Getters

1.16.0 - 2022-12-11

  • Added Configure
  • Added Dropdown
  • Comparison now accepts null values
  • Fixed bug in Casting where in the latest Laravel versions the Keep Enum Value Case switch no longer worked.

1.15.0 - 2022-06-21

  • Made the Laravel Reporter configurable
  • added key method to Value

1.14.0 - 2022-06-19

  • Added transition hooks State
  • Makers & From now allow you to use integer keys on basic and string enums

1.12.0 - 2022-06-15

  • Added casting support for State

1.11.0 - 2022-06-14

  • Added State that allows you to have transitions with enums

1.10.0 - 2022-06-12

  • Added Defaults that allows you to have default enums

1.9.0 - 2022-06-08

1.8.0 - 2022-06-07

1.7.0 - 2022-06-06

  • When using Comparison, you can now assert with is or isNot

1.6.0 - 2022-06-04

  • Added Eloquent Casting support for basic enumerations

1.5.0 - 2022-05-31

  • Added Extractor to extract enums from a string mentioned by value
  • Some documentation repairs

1.4.1 - 2022-03-04

  • Added cases method to Subset

1.4.0 - 2022-03-02

  • Renamed Multi to Subset
  • Added names method to Subset
  • Added values method to Subset
  • Added do method to Subset

1.3.0 - 2022-02-28

  • Added Multi. Currently allows you to compare against a subset of your enum

1.2.0 - 2022-02-26

  • Added Value (for use with basic enums)

1.1.0 - 2022-02-25

  • Added From. Useful for situations where you need them with basic enums

1.0.2 - 2022-02-16

  • Bugfix: Constructor did not use internal mapper

1.0.1 - 2022-02-16

  • You can now define a mapper in a method
  • When you use an empty string or null in mappable, it will return null now

1.0.0 - 2022-02-15

  • Initial release