minor #13314 [Form] tweaked a deprecation message (fabpot)
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] tweaked a deprecation message
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
While upgrading an app to 2.7, I found this message unclear. To be honest, and like many developers, I did not read the entire message and I missed the "cast to a string" part.
Commits
-------
a396b41
[Form] tweaked a deprecation message
This commit is contained in:
commit
20ccb0ee17
@ -848,7 +848,7 @@ class Form implements \IteratorAggregate, FormInterface
|
||||
*/
|
||||
public function getErrorsAsString($level = 0)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the Form::getErrors(true, false) method instead and cast the result to a string.', E_USER_DEPRECATED);
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use (string) Form::getErrors(true, false) instead.', E_USER_DEPRECATED);
|
||||
|
||||
return self::indent((string) $this->getErrors(true, false), $level);
|
||||
}
|
||||
|
Reference in New Issue
Block a user