Coder Social home page Coder Social logo

zendframework / zend-httphandlerrunner Goto Github PK

View Code? Open in Web Editor NEW
46.0 16.0 14.0 1.3 MB

Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.

License: BSD 3-Clause "New" or "Revised" License

PHP 100.00%
php php71 psr-15 psr-7 zend-framework

zend-httphandlerrunner's Introduction

zend-httphandlerrunner

Repository abandoned 2019-12-31

This repository has moved to laminas/laminas-httphandlerrunner.

Build Status Coverage Status

This library provides utilities for:

  • Emitting PSR-7 responses.
  • Running PSR-15 server request handlers, which involves marshaling a PSR-7 ServerRequestInterface, handling exceptions due to request creation, and emitting the response returned by the composed request handler.

The RequestHandlerRunner will be used in the bootstrap of your application to fire off the RequestHandlerInterface representing your application.

Installation

Run the following to install this library:

$ composer require zendframework/zend-httphandlerrunner

Documentation

Documentation is in the doc tree, and can be compiled using mkdocs:

$ mkdocs build

You may also browse the documentation online.

zend-httphandlerrunner's People

Contributors

dcabanaw avatar michalbundyra avatar pine3ree avatar weierophinney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zend-httphandlerrunner's Issues

PHP requirement

composer require zendframework/zend-httphandlerrunner

[InvalidArgumentException]
Package zendframework/zend-httphandlerrunner at version has a PHP requirement incompatible with your PHP version (5.6.40)

assertNoPreviousOutput check ?

Hi, in my framework, ofter need output someting with ob content, like a image captcha, then I get this error

`
Uncaught Zend\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response

`

so I 'm curious, why do I have to perform a $this->assertNoPreviousOutput(); check?

composer install fails because http-message-implementaion was not found

I'm not be able to include this package in my project (server is PHP 7.2). I execute "composer require zendframework/zend-httphandlerunner" and here's the error output:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for zendframework/zend-httphandlerrunner ^1.1 -> satisfiable by zendframework/zend-httphandlerrunner[1.1.0].
    - zendframework/zend-httphandlerrunner 1.1.0 requires psr/http-message-implementation ^1.0 -> no matching package found.

Redundant status code emits?

I noticed the HTTP status code gets applied with every individual header() call:

https://github.com/zendframework/zend-httphandlerrunner/blob/master/src/Emitter/SapiEmitterTrait.php#L84-L88

But headers get emitted before the status line:

https://github.com/zendframework/zend-httphandlerrunner/blob/master/src/Emitter/SapiEmitter.php#L28-L29

And the status line gets emitted last, with the status code:

https://github.com/zendframework/zend-httphandlerrunner/blob/master/src/Emitter/SapiEmitterTrait.php#L60-L65

Any reason why it isn't enough to just apply the status code last with emitStatusLine()?

Note that this isn't an issue with the code, merely a bit of a comprehension difficulty.

I'm sure it isn't harmful to apply the status code repeatedly - but unless it's meaningful, it's probably confusing more than it is helpful to a person reading the code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.