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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ removed.
Start your new Expressive project with composer:

```bash
$ composer create-project zendframework/zend-expressive-skeleton <project-path>
$ composer create-project --no-dev zendframework/zend-expressive-skeleton <project-path>
```

> ### Release Candidates
Expand All @@ -39,9 +39,15 @@ $ composer create-project zendframework/zend-expressive-skeleton <project-path>
> To install a release candidate, use the following:
>
> ```bash
> $ composer create-project zendframework/zend-expressive-skeleton:^1.0@rc <project-path>
> $ composer create-project --no-dev "zendframework/zend-expressive-skeleton:^1.0@rc" <project-path>
> ```

> ### Development requirements
>
> If you want Composer to install the development requirements defined by the
> skeleton — specifically PHPUnit and PHP_CodeSniffer — run a `composer update`
> after installing the skeleton.

After choosing and installing the packages you want, go to the
`<project-path>` and start PHP's built-in web server to verify installation:

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"php": "^5.5 || ^7.0",
"roave/security-advisories": "dev-master",
"zendframework/zend-expressive": "~1.0.0@rc || ^1.0",
"zendframework/zend-expressive-helpers": "^1.3",
"zendframework/zend-expressive-helpers": "^2.0",
"zendframework/zend-stdlib": "~2.7"
},
"require-dev": {
Expand Down
75 changes: 50 additions & 25 deletions config/autoload/middleware-pipeline.global.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
use Zend\Expressive\Container\ApplicationFactory;
use Zend\Expressive\Helper;

return [
Expand All @@ -10,34 +11,58 @@
],
// This can be used to seed pre- and/or post-routing middleware
'middleware_pipeline' => [
// An array of middleware to register prior to registration of the
// routing middleware
'pre_routing' => [
//[
// Required:
// 'middleware' => 'Name or array of names of middleware services and/or callables',
// Optional:
// 'path' => '/path/to/match',
// 'error' => true,
//],
[
'middleware' => [
Helper\ServerUrlMiddleware::class,
Helper\UrlHelperMiddleware::class,
],
// An array of middleware to register. Each item is of the following
// specification:
//
// [
// Required:
// 'middleware' => 'Name or array of names of middleware services and/or callables',
// Optional:
// 'path' => '/path/to/match', // string; literal path prefix to match
// // middleware will not execute
// // if path does not match!
// 'error' => true, // boolean; true for error middleware
// 'priority' => 1, // int; higher values == register early;
// // lower/negative == register last;
// // default is 1, if none is provided.
// ],
//
// While the ApplicationFactory ignores the keys associated with
// specifications, they can be used to allow merging related values
// defined in multiple configuration files/locations. This file defines
// some conventional keys for middleware to execute early, routing
// middleware, and error middleware.
'always' => [
'middleware' => [
// Add more middleware here that you want to execute on
// every request:
// - bootstrapping
// - pre-conditions
// - modifications to outgoing responses
Helper\ServerUrlMiddleware::class,
],
'priority' => 10000,
],

// An array of middleware to register after registration of the
// routing middleware
'post_routing' => [
//[
// Required:
// 'middleware' => 'Name of middleware service, or a callable',
// Optional:
// 'path' => '/path/to/match',
// 'error' => true,
//],
'routing' => [
'middleware' => [
ApplicationFactory::ROUTING_MIDDLEWARE,
Helper\UrlHelperMiddleware::class,
// Add more middleware here that needs to introspect the routing
// results; this might include:
// - route-based authentication
// - route-based validation
// - etc.
ApplicationFactory::DISPATCH_MIDDLEWARE,
],
'priority' => 1,
],

'error' => [
'middleware' => [
// Add error middleware here.
],
'priority' => -10000,
],
],
];
2 changes: 1 addition & 1 deletion src/ExpressiveInstaller/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'zendframework/zend-expressive-twigrenderer' => '^1.0',
'zendframework/zend-expressive-zendrouter' => '^1.0',
'zendframework/zend-expressive-zendviewrenderer' => '^1.0',
'zendframework/zend-servicemanager' => '^2.5',
'zendframework/zend-servicemanager' => '^2.7.3 || ^3.0',
],

'require-dev' => [
Expand Down