Skip to content

Commit

Permalink
minor #51150 Use Stringable interface as much as possible (VincentLan…
Browse files Browse the repository at this point in the history
…glet)

This PR was squashed before being merged into the 6.4 branch.

Discussion
----------

Use Stringable interface as much as possible

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Instead of requiring `__toString()` in interfaces, wouldn't it be better to extend `\Stringable` ?
(I kept the method when comment was added)

Commits
-------

43a7704636 Use Stringable interface as much as possible
  • Loading branch information
fabpot committed Jul 30, 2023
2 parents 5b4932b + 091b0ee commit fc958b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resource/ResourceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @author Fabien Potencier <[email protected]>
*/
interface ResourceInterface
interface ResourceInterface extends \Stringable
{
/**
* Returns a string representation of the Resource.
Expand Down

0 comments on commit fc958b5

Please sign in to comment.