Code Monkey home page Code Monkey logo

reactive-slim's People

Contributors

nigelgreenway 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

Watchers

 avatar  avatar  avatar  avatar

reactive-slim's Issues

with* setters in Server

Why reason why you use with* instead of set* in Server for the setters? with* suggests immutability to me and returning a new object.

Notice thrown in ./src/Server.php

Notice: Undefined index: Accept in ./src/Server.php on line 121

Only happens when Chrome dev tools is open (something todo with .css.map file)

Research into swapping `Zend\Diactoros\ServerRequest` with `Slim\Http\Request`

It seems like this is the better solution as it is all native to SlimPHP, but is this the right right to go, as they both use the PSR interface it should be simple to swap out and remove the non-required dependancy of Zend\Diactoros?

$slimRequest = new Request(
    $request->getMethod(),
    Uri::createFromString(
         $request->getPath() . '?' . http_build_query($request->getQueryParams())
    ),
    new Headers($request->getHeaders()),
    SlimCookies::parseHeader($request->getHeader('Cookie')),
    [],
    $stream,
    []
);

Request bodies

Seems like it's using php://input as request body instead of the request body stream provided by ReactPHP. php://input is additionally a read-only stream.

(new Stream('php://input', 'w+')),

Stop with the `echo`

In Server::155, echo is being used. This should possibly be switched out with the following:

$output = sprintf(
  " >> Listening on http://%s:%d\n\nIn %s environment\n\n",
  $this->host,
  $this->port,
  ServerEnvironment::getEnvironmentName($this->environment)
);
$terminal = fopen('php://stdout', 'w');
fwrite($terminal, $output);
fclose($terminal);

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.