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

Commit

Permalink
Merge branch 'hotfix/16'
Browse files Browse the repository at this point in the history
Close #16
  • Loading branch information
weierophinney committed Mar 13, 2017
2 parents d192614 + fb7e9fe commit aedfba7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- Nothing.
- [#16](https://github.com/zendframework/zend-expressive-tooling/pull/16) fixes
generation of routes where no HTTP method is specified to use a `null` instead
of the `Zend\Expressive\Router\Route::HTTP_METHOD_ANY` constant.

## 0.3.1 - 2017-03-02

Expand Down
4 changes: 2 additions & 2 deletions src/GenerateProgrammaticPipelineFromConfig/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ class Generator

const TEMPLATE_ROUTED_METHOD_WITH_NAME = '$app->%s(\'%s\', %s, \'%s\')';

const TEMPLATE_ROUTED_NO_METHOD_NO_NAME = '$app->route(\'%s\', %s, \\Zend\\Expressive\\Router\\Route::HTTP_METHOD_ANY)';
const TEMPLATE_ROUTED_NO_METHOD_NO_NAME = '$app->route(\'%s\', %s, null)';

const TEMPLATE_ROUTED_NO_METHOD_WITH_NAME = '$app->route(\'%s\', %s, \\Zend\\Expressive\\Router\\Route::HTTP_METHOD_ANY, \'%s\')';
const TEMPLATE_ROUTED_NO_METHOD_WITH_NAME = '$app->route(\'%s\', %s, null, \'%s\')';

const TEMPLATE_ROUTED_METHODS_NO_NAME = '$app->route(\'%s\', %s, %s)';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'Api\\Middleware\\Negotiation',
'Api\\Middleware\\Validation',
'Api\\Action\\PostAction',
], \Zend\Expressive\Router\Route::HTTP_METHOD_ANY, 'api.rest.post')
], null, 'api.rest.post')
->setOptions([
'sort' => 'updated',
'order' => 'desc',
Expand Down

0 comments on commit aedfba7

Please sign in to comment.