title: PHP Enums `__toString` magic method
body: <p>I am wondering why it is not possible to provide an <code>__toString</code> implementation for enum.</p>
  <p>IDE says &quot;Enum may not include '__toString'&quot;. However it was the first thing I thought about once I created enum. Previously I used Value Objects encapsulating strings in my code, which utilized string casting when necessary. Now I would like to migrate 'em into enums, but those resist.</p>
  <pre class="lang-php prettyprint-override"><code>#[Immutable]
  enum SaveKlinesFromApiQueue: string
  {
      case DEFAULT = 'save_klines_from_api_queue';
      case PRIORITY = 'save_klines_from_api_priority_queue';
  
      public function __toString(): string
      {
          return $this-&gt;value;
      }
  }
  </code></pre>