Coder Social home page Coder Social logo

Comments (7)

sagikazarmark avatar sagikazarmark commented on July 22, 2024

For complete report:

I am running the latest proton (already using league/route) with php built-in server on PHP 5.5

from route.

philipobenito avatar philipobenito commented on July 22, 2024

The request object is fetched from the container so needs to be built within the container. I can take a look at Proton at some point or if @alexbilbie can take a look to ensure Proton is registering the request with the container?

Something like:

$container->add('Symfony\Component\HttpFoundation\Request', function () {
    return Symfony\Component\HttpFoundation\Request::buildFromGlobals();
});

In the meantime @sagikazarmark you could register it yourself within Proton by adding this somewhere within your bootstrap.

$app->getContainer()->add('Symfony\Component\HttpFoundation\Request', function () {
    return Symfony\Component\HttpFoundation\Request::buildFromGlobals();
});

from route.

sagikazarmark avatar sagikazarmark commented on July 22, 2024

@philipobenito thanks for your response. I am going to open a PR in Proton.

from route.

philipobenito avatar philipobenito commented on July 22, 2024

No problem, sorry for the delay

from route.

jakefolio avatar jakefolio commented on July 22, 2024

I had a similar issue with just working off of the http://route.thephpleague.com/getting-started/. Every time I tried to access a query param, there would be nothing.

I followed the instructions you gave here and added it to the container, and everything worked good.

This seems like a necessary step in accessing query params when using route. I'd either reopen this as a bug or update the docs on the getting started.

from route.

philipobenito avatar philipobenito commented on July 22, 2024

This is certainly something I can add for the 1.x branches that depend on Symfony\HttpFoundation, but v2 will actually depend on PSR-7 rather than a specific implementation with the documentation heavily padded out with some example implementations and how to build the requests within the app, along with v2 will come a skeleton web application (codename Sterling) and a skeleton restful API (codename Lana) that will both handle that for the user in the bootstrap and also provide a good example for anybody who wants to roll their own.

from route.

philipobenito avatar philipobenito commented on July 22, 2024

Will be addressed by #26

from route.

Related Issues (20)

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.