Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Throw exception if response is already completed #30

Merged

Conversation

codeliner
Copy link

@Ocramius
Copy link
Member

Ocramius commented Oct 4, 2015

@weierophinney can you let me know if this PR is legit?

I'm not experienced with the API, so I don't know if we're fixing broken API or actually changing it.

@codeliner
Copy link
Author

@Ocramius This change was discussed with @weierophinney in #24
It is a BC break and should be scheduled for next major release.

@weierophinney
Copy link
Member

Next minor release; we're still in 0.* :-)
On Oct 5, 2015 12:56 AM, "Alexander Miertsch" [email protected]
wrote:

@Ocramius https://github.com/Ocramius This change was discussed with
@weierophinney https://github.com/weierophinney in #24
#24
It is a BC break and should be scheduled for next major release.


Reply to this email directly or view it on GitHub
#30 (comment)
.

@codeliner
Copy link
Author

@weierophinney v1.1.0 doesn't look like a dev release ;) Confused with zend-expressive? Or did I miss something?

@weierophinney
Copy link
Member

@codeliner Yep. That's what I get by answering notifications via email.

@codeliner
Copy link
Author

;)

return new RuntimeException(sprintf(
'Calling %s::%s is not possible. Response is already completed',
__CLASS__,
$detectedInMethod
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__METHOD__ includes both the method name and the class name; as such, you can simplify %s::%s to just %s, and remove the __CLASS__ argument.

@weierophinney
Copy link
Member

As noted in #24, and my yourself, this is a BC break, but also fixes bad behavior. As such, I'm going to schedule this for the next minor release, where we can call it out in the release notes.

@weierophinney weierophinney merged commit 08255ed into zendframework:develop Mar 17, 2016
weierophinney added a commit that referenced this pull request Mar 17, 2016
Throw exception if response is already completed
weierophinney added a commit that referenced this pull request Mar 17, 2016
Updated the exception thrown from `responseIsAlreadyCompleted` to remove
the `%s::%s` notation and the `__CLASS__` argument, as the method passed
is `__METHOD__`.

Additionally, fixed the tests to run under PHP 5.4 (as we still support
that version).
weierophinney added a commit that referenced this pull request Mar 17, 2016
weierophinney added a commit that referenced this pull request Mar 17, 2016
@weierophinney weierophinney added this to the 1.2.0 milestone Mar 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants