Remove the dependency on the Session in expectation exceptions#663
Remove the dependency on the Session in expectation exceptions#663stof merged 2 commits intominkphp:masterfrom
Conversation
There was a problem hiding this comment.
I'm wondering whether we should throw exceptions in place now and deprecate this method (this was added in 1.6 just so that our own child classes can avoid using the deprecated Session getter)
There was a problem hiding this comment.
Isn't this just an internal method that contained some logic before, but not now? If so, then we'd better show exception where needed instead of calling method, that throws them for us. This would also give us shorter stacktrace for that exception.
There was a problem hiding this comment.
agreed. Precisely my point.
there was no logic before, but it allowed to access the session without using the deprecated getter
c2729cd to
22adbb0
Compare
There was a problem hiding this comment.
What is the point of using error hiding (via @) if we want to trigger an error?
00fa3d9 to
c2ec8e6
Compare
Injecting the Session in exceptions is now deprecated in favor of injecting the driver.
c2ec8e6 to
dbde834
Compare
Remove the dependency on the Session in expectation exceptions
Injecting the Session in exceptions is now deprecated in favor of injecting the driver.
This is a backport of 761bb79 which was done as part of #542 to refactor the driver in 2.0.
Backporting it with a BC layer means we give people instantiating our exception themselves (me at work for instance) an easier upgrade path, because they can prepare things before Mink 2.0.