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

Eliminate deprecation notices due to request/response decorator usage #393

Conversation

weierophinney
Copy link
Member

This patch does the following:

  • Updates the TemplatedErrorHandler and WhoopsErrorHandler to no longer use Stratigility request/response decorator-specific methods. Instead, they now pull values via the original* request attributes, using default values.
  • Updates the Application::run() method to set the originalResponse request attribute; this allows the above changes to be used with Stratigility versions prior to 1.3 (which is the first release in which that attribute was introduced).
  • Updates the integration test to remove error handling for deprecation notices based on usage of Stratigility request/response decorators, as they are no longer invoked.

Other than the error handling deprecations, this now allows Expressive to run without deprecation notices.

These are deprecated starting with Stratigility 1.3. This patch updates
the `TemplatedErrorHandler` and the `WhoopsErrorHandler` to instead use
the request `getOriginal*` attributes, which are injected in the
Stratigility request/response decorators, and which can be injected by
the `OriginalMessages` middleware as well.

Additionally, this updates the `Application::run()` method to ensure
that the `originalResponse` attribute is injected, as it is not in
earlier Stratigility versions.
With updates from previous commit, no more error handling is required,
as no deprecation notices are emitted.
@weierophinney weierophinney added this to the 1.0.2 milestone Nov 11, 2016
Removes import statements for the Stratigility request/response
decorators, as they are no longer used.
@weierophinney weierophinney merged commit c15b416 into zendframework:master Nov 11, 2016
weierophinney added a commit that referenced this pull request Nov 11, 2016
weierophinney added a commit that referenced this pull request Nov 11, 2016
weierophinney added a commit that referenced this pull request Nov 11, 2016
Forward port #393

Conflicts:
	CHANGELOG.md
	src/Application.php
@weierophinney weierophinney deleted the hotfix/template-reponse-deprecation branch November 11, 2016 14:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant