-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRM-19058 (Discuss) Add Civi::request()
facade based on Symfony HttpFoundation
#8603
Conversation
One note - there is some funky handling in CRM_Utils_Request::getvalues for '&q' - which is 'q' mangled by payment processors & other external manglers. We do kinda need that since we can't control the url mangling they get up to |
(Aside: There's also http://www.php-fig.org/psr/psr-7/ , but the part Eileen was looking for -- e.g. |
I'd be interested to see where that funky Can we leave that special handling out to start with, or until we at least know what circumstances make it necessary? |
One example of $amp handling in PaymentExpress - it insists on url encoding any parameters in the array - so it will hit civicrm/payment/ipn/5 on wordpress as &q=civicrm/payment/ipn/5 |
Civi::request()
facade based on Symfony HttpFoundationCivi::request()
facade based on Symfony HttpFoundation
So, this is stale but that is easily fixed. I don't think it's good to keep pull requests open forever. There comes a point where they should be merged or closed with a link to the commit for future reference. To articulate the issue we are trying to solve. We have the rather clunky CRM_Utils_System::retrieve() function with something more modern. This provides an option, although no examples on using it which would not encourage adoption. My inclination is about 60% to close this & track on JIRA until interest arises again (possibly squashing into one commit so we can link to the commit which is more enduring than a closed PR) |
I'm inclined to close the PR but keep the JIRA issue (categorized as "Improvement/Trivial") with a link to the PR. Considerations:
|
This provides a Symfony-style
$request
object, which includesParameterBag
s for various inputs (GET/POST/COOKIE) along withvarious helpers for validation.
Note: I don't expect this to be a large patch, but it's one we may want
to think about carefully. A few issues/questions:
a single request service. This is useful when processing nested
requests. Should we be doing that?
Response
object at the same time?How should it relate?
$_GET
,$_REQUEST
,$_POST
? (My sense is not very often, withthe exception of a special field like
q
.)Civi::request\(\)
facade based on Symfony HttpFoundation