Giter Club home page Giter Club logo

Comments (4)

jakecleary avatar jakecleary commented on June 5, 2024

Are you talking about encapsulating the $_SERVER and $_SESSSION variables?

If so, why don't we just use the symfony/http-foundation package? The ::createFromGlobals() method allows you to easily wrap up and read the request data, and also modify responses before sending them back. Things like adding headers etc gets a bit easier.

from tki.

thekabal avatar thekabal commented on June 5, 2024

I have suspected for a while that the project will end up using Symfony, but I'm not quite ready to make that jump. I think for the specific requirements of this bug, we can craft a reasonable small class that can manage our needs without additional overhead.

To answer your question, while POST & GET are also useful to encapsulate, SERVER and SESSION are the main concerns. I would probably start with those, and see where things land before moving to the rest. Server especially has some tricky security implications. So yes, those two are the focus (at least for this specific bug).

from tki.

jakecleary avatar jakecleary commented on June 5, 2024

That's understandable. My only counter to that is that you don't have to use the whole thing, you could just pull in symfony/http-foundation and only use it's Request class. But I do also understand why you want to minimise these things. sounds like a solid plan!

from tki.

thekabal avatar thekabal commented on June 5, 2024

Halfway done! Symfony's http-foundation component did the trick for the $_SERVER side of the equation (save one entry I have to figure out in classes/Compress). More testing to do, but so far, looks great! Thanks again, @jakecleary !!

from tki.

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.