This repository has been archived by the owner on Jul 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Consistent behaviour between MessageBag constructor and public API #56
Labels
Comments
Yeah we should fix this. |
@taylorotwell If no one is working on this, then I would like to get assigned on this issue. |
If this isn't fixed yet, I'm open to PRs. |
taylorotwell
pushed a commit
to laravel/framework
that referenced
this issue
Mar 12, 2018
…3485) * Make MessageBag constructor behaviour consistent with `add` Addresses laravel/ideas#56 and the (long-closed) #13196. This change in constructor behaviour aims to bring consistency with the public `add` method on the MessageBag class, which would prevent duplicate values in any given MessageBag's key. * update test to show consistency of behaviour
symfony-splitter
pushed a commit
to illuminate/support
that referenced
this issue
Mar 12, 2018
…3485) * Make MessageBag constructor behaviour consistent with `add` Addresses laravel/ideas#56 and the (long-closed) #13196. This change in constructor behaviour aims to bring consistency with the public `add` method on the MessageBag class, which would prevent duplicate values in any given MessageBag's key. * update test to show consistency of behaviour
taylorotwell
pushed a commit
to illuminate/support
that referenced
this issue
Sep 17, 2018
…3485) * Make MessageBag constructor behaviour consistent with `add` Addresses laravel/ideas#56 and the (long-closed) #13196. This change in constructor behaviour aims to bring consistency with the public `add` method on the MessageBag class, which would prevent duplicate values in any given MessageBag's key. * update test to show consistency of behaviour
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, the behaviour between initialising a new
MessageBag
and using theadd
method is inconsistent.The
add
method tests for uniqueness (of the key, and the message in the keyed array), whereas the constructor will accept duplicate messages.I'm not certain if this is on purpose, so I propose to fix the constructor behaviour, which will bring consistency between the constructor and public API of the MessageBag (
add
) method.It appears this has been around since January, 2013, so this would likely be targeted to next release due to backwards compatibility breakage.
The text was updated successfully, but these errors were encountered: