We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d56c200 commit eb64102Copy full SHA for eb64102
composer.json
@@ -14,7 +14,10 @@
14
"autoload": {
15
"psr-4": {
16
"MyCLabs\\Enum\\": "src/"
17
- }
+ },
18
+ "classmap": [
19
+ "stubs/Stringable.php"
20
+ ]
21
},
22
"autoload-dev": {
23
src/Enum.php
@@ -19,7 +19,7 @@
* @psalm-immutable
* @psalm-consistent-constructor
*/
-abstract class Enum implements \JsonSerializable
+abstract class Enum implements \JsonSerializable, \Stringable
{
24
/**
25
* Enum value
stubs/Stringable.php
@@ -0,0 +1,11 @@
1
+<?php
2
+
3
+if (\PHP_VERSION_ID < 80000 && !interface_exists('Stringable')) {
4
+ interface Stringable
5
+ {
6
+ /**
7
+ * @return string
8
+ */
9
+ public function __toString();
10
+ }
11
+}
0 commit comments