Skip to content

Commit

Permalink
feature #224 Add polyfill for PHP8's Stringable (nicolas-grekas)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.15-dev branch.

Discussion
----------

Add polyfill for PHP8's Stringable

- [x] Should wait for https://wiki.php.net/rfc/stringable to be approved before merging.

Commits
-------

260a76c Add polyfill for PHP8's Stringable
  • Loading branch information
nicolas-grekas committed Mar 2, 2020
2 parents 8c69b16 + 260a76c commit 1554fc4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,6 +1,7 @@
# 1.15.0

* added `preg_last_error_msg()` to the PHP 8 polyfill
* added interface `Stringable` to the PHP 8 polyfill

# 1.14.0

Expand Down
3 changes: 2 additions & 1 deletion src/Php80/README.md
@@ -1,8 +1,9 @@
Symfony Polyfill / Php80
========================

This component provides functions added to PHP 8.0 core:
This component provides features added to PHP 8.0 core:

- `Stringable` interface
- [`fdiv`](https://php.net/fdiv)
- `ValueError` class
- `FILTER_VALIDATE_BOOL` constant
Expand Down
9 changes: 9 additions & 0 deletions src/Php80/Resources/stubs/Stringable.php
@@ -0,0 +1,9 @@
<?php

interface Stringable
{
/**
* @return string
*/
public function __toString();
}

0 comments on commit 1554fc4

Please sign in to comment.