[Corona][Shadow] Add a request option to query the SERVER global

Review Request #391 — Created Nov. 6, 2015 and submitted

smillernl
Lunr
personal/sean/request_server_global
e3b429b...
lunr

Corona: Add a request option to query the SERVER global
Shadow: Add the parse_server() for Cli Requests

Yes, testing with an invalid server variable could not be done however due to clover breaking on overriding the server super global.

  • 0
  • 0
  • 7
  • 0
  • 7
Description From Last Updated
smillernl
tardypad
  1. 
      
  2. src/Lunr/Corona/Request.php (Diff revision 1)
     
     

    The value is not necessarily a HTTP header

  3. src/Lunr/Corona/RequestInterface.php (Diff revision 1)
     
     

    Retrieve a stored SERVER value

  4. I'm not sure if this one should be reset globally.
    Check with Heinz on this.

    Some projects use the SERVER variable directly, so if you reset it, there are gonna break.

    Maybe ideally it is better reset.
    But then please check all the projects to see if they use this variable directly and adapt them

  5. src/Lunr/Corona/WebRequestParser.php (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Since you don't use the function "parse_super_global" the value is actually not reset

  6. src/Lunr/Corona/WebRequestParser.php (Diff revision 1)
     
     

    $headers -> "something else" more generic

  7. 
      
smillernl
tardypad
  1. It looks fine for me, you can do the unit tests.
    Check with Heinz if he has any remark though.

  2. src/Lunr/Corona/WebRequestParser.php (Diff revision 2)
     
     

    you should check whether to reset it or not in here as well

  3. src/Lunr/Corona/WebRequestParser.php (Diff revision 2)
     
     

    I think the coding style doesn't allow one line if

  4. 
      
smillernl
smillernl
smillernl
smillernl
pprkut
  1. Ship It!
  2. 
      
smillernl
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master

Loading...