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

Prepare for RC6 #60

Merged

Conversation

weierophinney
Copy link
Member

This patch provides a few changes to prepare for RC6:

  • It updates the zend-servicemanager version constraint to ^2.7.3 || ^3.0, to allow users to select the version they want to use. Configuration already works with either.
  • It updates the zend-expressive-helpers dependency to ^2.0, as that's the version compatible with zend-expressive RC6.
  • It updates the middleware_pipeline to follow the changes in zend-expressive RC6, providing a list of middleware specifications with priority values, and creating the following specific definitions:
    • "always" is registered at priority 10000, and represents a pipeline of middleware that acts as either pre-conditions or post-routing handlers (e.g., CORS support, WWW-Authentication header injection, etc.).
    • "routing" is registered at priority 1, and defines a middleware pipeline containing the routing, UrlHelper, and dispatch middleware; any middleware that you might want to have intercept the results of routing could go between them.
    • "error" is registered at priority -1000, and defines a middleware pipeline for error handlers.

I've cloned and installed from the local branch with these changes, and all works as expected, with one exception: I discovered that an install installs the development dependencies as defined prior to the installer script acting. This means that every renderer and every router is installed at first. Running composer update immediately following an install corrects the situation, but it's not ideal. The situation likely pre-existed these changes, as I didn't change the installer scripts, and, as such, I'm not including a fix for that behavior at this time.

@weierophinney
Copy link
Member Author

See zendframework/zend-expressive#270 for details behind the configuration changes.

@weierophinney weierophinney added this to the 1.0.0rc6 milestone Jan 18, 2016
@weierophinney
Copy link
Member Author

install installs the development dependencies as defined prior to the installer script acting. This means that every renderer and every router is installed at first.

Evidently, you must pass the --no-dev flag if you don't want this behavior. Updating the README with that information now.

@weierophinney
Copy link
Member Author

Pinging @mwillbanks, @ezimuel, and @danizord for review.

@danizord
Copy link

Looks good 👍

Sets the version constraint for zend-servicemanager to `^2.7.3 || ^3.0`,
to allow usage of either version. Initial selection will be based on
other dependencies. Users can override later to select a more specific
version.
Need the 2.0 version going forward. This also means new configuration for the
middleware pipeline.

Per zendframework/zend-expressive#270, this patch updates the middleware
pipeline to be an array of middleware specifications, each with a
priority. It defines three specific pipelines:

- "always" is registered at priority 10000, and represents a pipeline of
  middleware that acts as either pre-conditions or post-routing handlers
  (e.g., CORS support, WWW-Authentication header injection, etc.).
- "routing" is registered at priority 1, and defines a middleware
  pipeline containing the routing, UrlHelper, and dispatch middleware;
  any middleware that you might want to have intercept the results of
  routing could go between them.
- "error" is registered at priority -1000, and defines a middleware
  pipeline for error handlers.
Otherwise the dev requirements *before they are rewritten by the installer* are
used.

Also provides a note detailing how to install the dev requirements after
installation.
@weierophinney weierophinney merged commit cf17bc2 into zendframework:master Jan 19, 2016
weierophinney added a commit that referenced this pull request Jan 19, 2016
weierophinney added a commit that referenced this pull request Jan 19, 2016
weierophinney added a commit that referenced this pull request Jan 19, 2016
@weierophinney weierophinney deleted the hotfix/expressive-rc6 branch January 21, 2016 15:41
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.

2 participants