Skip to content
This repository was archived by the owner on Mar 18, 2021. It is now read-only.

Releases: vladdeSV/simple-enum

1.2.0

01 Dec 20:33
c915a72

Choose a tag to compare

This new release adds the method ->equals(Enum $enum) to the Enum class, which will compare the enum values, but also the enum types.

<?php

use SimpleEnum\Enum;

class Foo extends Enum { const foo = 1; }
class Bar extends Enum { const bar = 1; }

$foo = new Foo(1);
$bar = new Bar(1);

assert(!$foo->equals($bar));

1.1.1

17 Sep 22:20

Choose a tag to compare

Bugfix.

Changelog

  • Bugfix: Handle passing in invalid values of non string convertible types.

Proof

Proof runs on PHP 5.3
1 1 1 simple-enum test proof

1.1.0

16 Sep 20:04

Choose a tag to compare

This is a minor release. This mean this release will affect you if you type juggle when creating enums.

Changelog

  • Enum values are now compared strictly, meaning no type juggling.

Proof

Runs on PHP 5.3
proof works on php 5.3

1.0.1

05 Aug 15:39

Choose a tag to compare

Changelog

  • Make compatible with PHP >=5.3

Proof

proof works on php 5 3

1.0.0

04 Aug 17:57

Choose a tag to compare

Initial release πŸŽ‰

Features

  • Very simple enum implementation, reminiscent of C-like languages' native enum implementations.