rfc:stringable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
rfc:stringable [2020/02/11 08:50]
nicolasgrekas
rfc:stringable [2020/05/12 13:37]
nicolasgrekas
Line 3: Line 3:
   * Date: 2020-01-15   * Date: 2020-01-15
   * Author: Nicolas Grekas, nicolasgrekas@php.net   * Author: Nicolas Grekas, nicolasgrekas@php.net
-  * Status: Under Discussion+  * Status: Accepted
   * First Published at: http://wiki.php.net/rfc/stringable   * First Published at: http://wiki.php.net/rfc/stringable
  
 ===== Introduction ===== ===== Introduction =====
  
-This RFC introduces a new ''Stringable'' interface is automatically added to classes that implement the ''%%__toString()%%'' method.+This RFC introduces a new ''Stringable'' interface that is automatically added to classes that implement the ''%%__toString()%%'' method.
  
 It has two goals: It has two goals:
Line 38: Line 38:
 Providing an easy forward-path is the second goal of this RFC. Providing an easy forward-path is the second goal of this RFC.
  
-For reference, [[https://github.com/symfony/symfony/search?q=%22%40param+string%7Cobject%22+stringable&unscoped_q=%22%40param+string%7Cobject%22+stringable|here are some annotations in Symfony]], added by contributions from real-world use cases and that currently cannot be expressed precisely enough using any union types in PHP 8.+For reference, [[https://github.com/symfony/symfony/search?q=%22%40param+string|stringable%22|here are some annotations in Symfony]], added by contributions from real-world use cases and that currently cannot be expressed precisely enough using any union types in PHP 8.
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
Line 60: Line 60:
  
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
-Accept the proposed interface for PHP 8.0: yes/no+yes/no 
 + 
 +===== Vote ===== 
 +<doodle title="Adopt the Stringable interface as proposed in this RFC?" auth="nicolasgrekas" voteType="single" closed="true"> 
 +   * Yes 
 +   * No 
 +</doodle>
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
rfc/stringable.txt · Last modified: 2020/08/01 23:38 by carusogabriel