Skip to content

Commit a440093

Browse files
committed
minor #58094 Use Stringable whenever possible (fabpot)
This PR was merged into the 7.2 branch. Discussion ---------- Use Stringable whenever possible | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | n/a | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Commits ------- 06b49968a5 Use Stringable whenever possible
2 parents 01fa185 + 2acef5c commit a440093

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Authorization/TraceableAccessDecisionManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function getStrategy(): string
8585
if (null === $this->strategy) {
8686
return '-';
8787
}
88-
if (method_exists($this->strategy, '__toString')) {
88+
if ($this->strategy instanceof \Stringable) {
8989
return (string) $this->strategy;
9090
}
9191

0 commit comments

Comments
 (0)