masonite icon indicating copy to clipboard operation
masonite copied to clipboard

Fix session errors and View errors() helper always empty

Open circulon opened this issue 1 year ago • 0 comments

@josephmancuso

Sorry I broke this PR badly and had to recreate it so we have lost the chat history ;(.

This PR addresses #816:

moves the MessageBag helper in the View from 'bag()' back to its documented expected value 'errors()' adds the "errors" key back into the session for backwards compatibility.

One thing I would ask is:

Is there any reason not to have the errors added back to the session as a MessageBag? This makes SharedErrorsInSessionMiddleware a bit redundant...

Happy to discuss

will add Tests for SessionMiddleware soon

circulon avatar Aug 22 '24 05:08 circulon