Weave 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
v3.2.1

What's Changed

New Contributors

Full Changelog: https://github.com/henzeb/enumhancer/compare/v3.2.0...v3.2.1

v3.2.0
  • fixed a few deprecations for PHP 8.5
  • added empty() method to identify an empty bitmask - @mathroc
v3.1.0
v3.0.0

What's Changed

  • fixes deprecations for php 8.4l

Full Changelog: https://github.com/henzeb/enumhancer/compare/v2.3.1...v3.0.0

Breaking changes

trigger_error with E_USER_ERROR is deprecated in php 8.4. They are replaced with simple Exceptions now. For those who were relying on triggered errors, should adjust their code.

v2.3.1
  • fixes #6 where transitions weren't allowed when using backed enums.
v2.3.0
  • tested for Laravel 11
v2.2.0
  • fixed serious bug in Getters where getting by integer would not match value first.
  • added support for BIT_MODIFIER
v2.1.0
v2.0.0
  • Now supports Laravel 10
  • dropped support for laravel 8

Upgrade notes

  • Makers (make, tryMake etc.) are removed in favor of Getters
v1.23.0
  • added PHPStan support
  • added IDE-helper (requires another package)
  • added global class for configuring Enumhancer
  • added global Macro support
v1.22.0
  • added asEnum to laravel's FormRequests
  • tiny fix in isEnum validation: When Defaults are used, it should fail validation.
v1.21.1
  • bugfix where enums wouldn't get substituted on parameters with default null
v1.21.0

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.
v1.20.1
  • fixes issue where a Bitmask instance wasn't treated as a whole in some cases.
v1.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

v1.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.
v1.18.0
  • Added Magic method functionality to State
  • Added to and tryTo methods to State
  • Added is, isNot, isIn and isNotIn to Comparison
v1.17.0
v1.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.
v1.15.0
  • Made the Laravel Reporter configurable
  • added key method to Value
v1.14.0
  • Added transition hooks State
  • Makers & From now allow you to use integer keys on basic and string enums
v1.12.1
  • replacing laravel function as this can cause major issues on projects outside laravel
v1.12.0
  • Added casting support for State
v1.11.1
  • code refactored
  • added codeclimate coverage badge
v1.11.0
  • Added State that allows you to have transitions with enums
v1.10.1
  • From now autoloads when using the Enhancers trait! This will not interfere when using basic enums!
  • Allowed From to use the default value.
v1.10.0
  • Added Defaults that allows you to have default enums
v1.9.4
  • Added Actions workflow for testing
  • Added a few more badges to the README
v1.9.3
v1.9.2
  • fixed an issue where a Constructor call within a function defined in an enum could cause errors
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.
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names