Skip to content

Releases

v8.5.1

Choose a tag to compare

@MoamenEltouny MoamenEltouny released this 09 Oct 07:59

Changed

  • Documentation puts the is<Case>() checks first, with a case-name-to-check table (IN_PROGRESS → isInProgress()), the names that are not checks and what to write instead, and a status-branching example.

Full Changelog: 8.5.0...8.5.1

v8.5.0

Choose a tag to compare

@MoamenEltouny MoamenEltouny released this 09 Oct 07:44

Added

  • SmartEnum trait for native enums.
  • Static helpers: names(), labels(), values(), options(), fromName(), tryFromName(), hasName(), hasValue().
  • Instance helpers: label(), eq(), is(), isNot(), in(), notIn(), info().
  • is<Case>() checks for every case, resolved by __call(); a check shared by two cases throws BadMethodCallException.
  • Optional global smart_enum_label() hook for labels.
  • Unit enum support: values(), options(), hasValue(), info() and is() use the case name as its value.
  • Tests, PHPStan (level max), PHP_CodeSniffer (PSR-12) and CI configuration.
  • Repository documentation and contribution files.
  • Versioned documentation in docs/ for pharaonic.dev.

Compatibility

  • Requires PHP >=8.5 <8.6.

v8.4.0

Choose a tag to compare

@MoamenEltouny MoamenEltouny released this 09 Oct 07:44

Added

  • SmartEnum trait for native enums.
  • Static helpers: names(), labels(), values(), options(), fromName(), tryFromName(), hasName(), hasValue().
  • Instance helpers: label(), eq(), is(), isNot(), in(), notIn(), info().
  • is<Case>() checks for every case, resolved by __call(); a check shared by two cases throws BadMethodCallException.
  • Optional global smart_enum_label() hook for labels.
  • Unit enum support: values(), options(), hasValue(), info() and is() use the case name as its value.
  • Tests, PHPStan (level max), PHP_CodeSniffer (PSR-12) and CI configuration.
  • Repository documentation and contribution files.
  • Versioned documentation in docs/ for pharaonic.dev.

Compatibility

  • Requires PHP >=8.4 <8.5.

v8.3.0

Choose a tag to compare

@MoamenEltouny MoamenEltouny released this 09 Oct 07:44

Added

  • SmartEnum trait for native enums.
  • Static helpers: names(), labels(), values(), options(), fromName(), tryFromName(), hasName(), hasValue().
  • Instance helpers: label(), eq(), is(), isNot(), in(), notIn(), info().
  • is<Case>() checks for every case, resolved by __call(); a check shared by two cases throws BadMethodCallException.
  • Optional global smart_enum_label() hook for labels.
  • Unit enum support: values(), options(), hasValue(), info() and is() use the case name as its value.
  • Tests, PHPStan (level max), PHP_CodeSniffer (PSR-12) and CI configuration.
  • Repository documentation and contribution files.
  • Versioned documentation in docs/ for pharaonic.dev.

Compatibility

  • Requires PHP >=8.3 <8.4.

v8.2.0

Choose a tag to compare

@MoamenEltouny MoamenEltouny released this 09 Oct 07:44

Added

  • SmartEnum trait for native enums.
  • Static helpers: names(), labels(), values(), options(), fromName(), tryFromName(), hasName(), hasValue().
  • Instance helpers: label(), eq(), is(), isNot(), in(), notIn(), info().
  • is<Case>() checks for every case, resolved by __call(); a check shared by two cases throws BadMethodCallException.
  • Optional global smart_enum_label() hook for labels.
  • Unit enum support: values(), options(), hasValue(), info() and is() use the case name as its value.
  • Tests, PHPStan (level max), PHP_CodeSniffer (PSR-12) and CI configuration.
  • Repository documentation and contribution files.
  • Versioned documentation in docs/ for pharaonic.dev.

Compatibility

  • Requires PHP >=8.2 <8.3.

v8.1.1

Choose a tag to compare

@MoamenEltouny MoamenEltouny released this 09 Oct 07:43

Changed

  • The package archive no longer includes docs/, so composer require installs only the library files.

Full Changelog: 8.1.0...8.1.1

v8.1.0

Choose a tag to compare

@MoamenEltouny MoamenEltouny released this 09 Oct 07:27

Added

  • SmartEnum trait for native enums.
  • Static helpers: names(), labels(), values(), options(), fromName(), tryFromName(), hasName(), hasValue().
  • Instance helpers: label(), eq(), is(), isNot(), in(), notIn(), info().
  • is<Case>() checks for every case, resolved by __call(); a check shared by two cases throws BadMethodCallException.
  • Optional global smart_enum_label() hook for labels.
  • Unit enum support: values(), options(), hasValue(), info() and is() use the case name as its value.
  • Tests, PHPStan (level max), PHP_CodeSniffer (PSR-12) and CI configuration.
  • Repository documentation and contribution files.
  • Versioned documentation in docs/ for pharaonic.dev.

Compatibility

  • Requires PHP >=8.1 <8.2.