Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Enumhancer Laravel Package

henzeb/enumhancer

View on GitHub
Deep Wiki
Context7
2.2.0
  • fixed serious bug in Getters where getting by integer would not match value first.
  • added support for BIT_MODIFIER
2.1.0
2.0.0
  • Now supports Laravel 10
  • dropped support for laravel 8

Upgrade notes

  • Makers (make, tryMake etc.) are removed in favor of Getters
1.23.0
  • added PHPStan support
  • added IDE-helper (requires another package)
  • added global class for configuring Enumhancer
  • added global Macro support
1.22.0
  • added asEnum to laravel's FormRequests
  • tiny fix in isEnum validation: When Defaults are used, it should fail validation.
1.21.0
  • 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
  • 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
  • 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
  • Added Magic method functionality to State
  • Added to and tryTo methods to State
  • Added is, isNot, isIn and isNotIn to Comparison
1.17.0
  • 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
  • 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
  • Made the Laravel Reporter configurable
  • added key method to Value
1.14.0
  • Added transition hooks State
  • Makers & From now allow you to use integer keys on basic and string enums
1.12.0
  • Added casting support for State
1.11.0
  • Added State that allows you to have transitions with enums
1.10.0
  • Added Defaults that allows you to have default enums
1.9.0
1.8.0
1.7.0
  • When using Comparison, you can now assert with is or isNot
1.6.0
  • Added Eloquent Casting support for basic enumerations
1.5.0
  • Added Extractor to extract enums from a string mentioned by value
  • Some documentation repairs
1.4.1
  • Added cases method to Subset
1.4.0
  • Renamed Multi to Subset
  • Added names method to Subset
  • Added values method to Subset
  • Added do method to Subset
1.3.0
  • Added Multi. Currently allows you to compare against a subset of your enum
1.2.0
  • Added Value (for use with basic enums)
1.1.0
  • Added From. Useful for situations where you need them with basic enums
1.0.2
  • Bugfix: Constructor did not use internal mapper
1.0.1
  • 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
  • Initial release
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed