{"action":"created","issue":{"url":"https://api.github.com/repos/zendframework/zend-expressive/issues/396","repository_url":"https://api.github.com/repos/zendframework/zend-expressive","labels_url":"https://api.github.com/repos/zendframework/zend-expressive/issues/396/labels{/name}","comments_url":"https://api.github.com/repos/zendframework/zend-expressive/issues/396/comments","events_url":"https://api.github.com/repos/zendframework/zend-expressive/issues/396/events","html_url":"https://github.com/zendframework/zend-expressive/pull/396","id":188866728,"number":396,"title":"Implement programmatic pipeline features","user":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"labels":[{"id":242836266,"url":"https://api.github.com/repos/zendframework/zend-expressive/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/zendframework/zend-expressive/milestones/15","html_url":"https://github.com/zendframework/zend-expressive/milestones/1.1.0","labels_url":"https://api.github.com/repos/zendframework/zend-expressive/milestones/15/labels","id":1497861,"number":15,"title":"1.1.0","description":null,"creator":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":3,"state":"open","created_at":"2016-01-11T17:34:09Z","updated_at":"2016-11-11T22:41:19Z","due_on":null,"closed_at":null},"comments":17,"created_at":"2016-11-11T22:40:16Z","updated_at":"2016-12-06T14:18:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zendframework/zend-expressive/pulls/396","html_url":"https://github.com/zendframework/zend-expressive/pull/396","diff_url":"https://github.com/zendframework/zend-expressive/pull/396.diff","patch_url":"https://github.com/zendframework/zend-expressive/pull/396.patch"},"body":"This patch implements the [Programmatic Pipelines RFC requirements](https://gist.github.com/weierophinney/a983f733c2ff3c9b3a687625e012e6e1#requirements-for-expressive-11).\r\n\r\nTODO\r\n----\r\n\r\n- [x] Create `Zend\\Expressive\\Middleware\\ErrorResponseGenerator`\r\n- [x] Create `Zend\\Expressive\\Middleware\\WhoopsErrorResponseGenerator`\r\n- [x] Create `Zend\\Expressive\\Middleware\\NotFoundHandler`\r\n- [x] Create `Zend\\Expressive\\Container\\ErrorResponseGeneratorFactory`\r\n- [x] Create `Zend\\Expressive\\Container\\WhoopsErrorResponseGeneratorFactory`\r\n- [x] Create `Zend\\Expressive\\Container\\NotFoundHandlerFactory`\r\n- [x] Create `Zend\\Expressive\\Container\\ErrorHandlerFactory`\r\n- [x] Create `Zend\\Expressive\\ApplicationConfigInjectionTrait`, and compose it into `Application`.\r\n- [x] Update `Zend\\Expressive\\Container\\ApplicationFactory` to vary creation and return of the `Application` instance based on the `zend-expressive.programmatic_pipeline` configuration flag.\r\n- [x] Update `Zend\\Expressive\\Container\\ApplicationFactory` to use the methods defined in `ApplicationConfigInjectionTrait` to inject pipeline and routed middleware from configuration into the `Application` instance.\r\n- [x] Update `Zend\\Expressive\\Application` to emit a deprecation notice from `pipeErrorMiddleware()`.\r\n- [x] Update `Zend\\Expressive\\MarshalMiddlewareTrait` to allow marshalling http-interop middleware.\r\n- [x] Add support for \"raise throwables\" flag to `ApplicationFactory`.\r\n- [x] Tool for generating programmatic pipelines and routing from existing configuration.\r\n    - [x] working proof of concept\r\n    - [x] unit tests\r\n    - [x] tool should push the `OriginalMessages` middleware as the outermost layer of the pipe.\r\n- [x] Tool for migrating `getOriginal*()` calls to `getAttribute(*)` calls on the request object.\r\n- [x] Tool for identifying error middleware in an existing application.\r\n- [x] Documentation\r\n\r\nReferences\r\n----------\r\n\r\n- [Programmatic Pipelines RFC](https://gist.github.com/weierophinney/a983f733c2ff3c9b3a687625e012e6e1)\r\n- #392 (original draft of error handler classes)\r\n- [Stratigility 1.3/2.0 migration docs](https://docs.zendframework.com/zend-stratigility/migration/to-v2/)"},"comment":{"url":"https://api.github.com/repos/zendframework/zend-expressive/issues/comments/265160408","html_url":"https://github.com/zendframework/zend-expressive/pull/396#issuecomment-265160408","issue_url":"https://api.github.com/repos/zendframework/zend-expressive/issues/396","id":265160408,"user":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T14:18:42Z","updated_at":"2016-12-06T14:18:42Z","body":"> \"expressive-scan-for-error-middleware\" script requires zend-code to work.\r\n\r\nI noticed this yesterday, but originally thought it was a fluke, so thanks for confirming! I'd forgotten that Composer no longer installs dev dependencies of dependencies when installing (it did in early versions, and we got bit by this change in other components later).\r\n\r\nI'm not quite sure what to do about this. Expressive itself does not _require_ zend-code; only this particular script does. And I'm a bit loathe to add a _required_ dependency for something that is only to be used during _development_.\r\n\r\nOne possibility would be to create a separate package with these migration tools which users can then install as a development dependency in their projects. The problem I see with that is it's an additional step: they have to (a) read the migration documentation, (b) install the tooling, and then (c) use it, versus just (a) and (c) as we currently have. The benefit, though, is that they could then remove it when done. Additionally, they could install it globally, and run it on any project.\r\n\r\nThe only command that has any dependencies on Expressive classes is `Zend\\Expressive\\Command\\GenerateProgrammaticPipelineFromConfig\\Generator`, and this is due to constants it references. These could easily be updated to inline those values locally, which would allow the tooling to exist with only dependencies on Stratigility (for identifying ErrorMiddlewareInterface instances), zend-code, and either zend-stdlib or zf-console or symfony/console for console tooling. As a development dependency, none of these would then be installed for production deployments, which would also ensure there is no vector for abuse on production systems.\r\n\r\nWhat do you think about this approach, @webimpress? /cc @zendframework/community-review-team @michaelmoussa @xtreamwayz \r\n\r\n"}}
{"actor":{"display_login":"weierophinney"}}