-
Notifications
You must be signed in to change notification settings - Fork 3.4k
3.0 request detector #3031
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
3.0 request detector #3031
Conversation
Looks good to me. |
👍 |
@@ -128,12 +128,6 @@ class Request implements \ArrayAccess { | |||
'ssl' => array('env' => 'HTTPS', 'value' => 1), | |||
'ajax' => array('env' => 'HTTP_X_REQUESTED_WITH', 'value' => 'XMLHttpRequest'), | |||
'flash' => array('env' => 'HTTP_USER_AGENT', 'pattern' => '/^(Shockwave|Adobe) Flash/'), | |||
'mobile' => array('env' => 'HTTP_USER_AGENT', 'options' => array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we move this list to app.php? I'm still against completely removing the mobile detector as it is quite useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be just moving the problem to a different location. The app would then have that potentially outdated list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can add this lib to the requires? https://github.com/serbanghita/Mobile-Detect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or as "suggests" instead? I would rather not force everyone to download that lib. If for eg. you are making a webservice API you might not need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will be a big mistake to ship without something as useful as a mobile detector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for having it in app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for app too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay then merging this so I can process with patch for app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to have it the MobileDetect lib only as a suggest.
But if it has to be require, then in the app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ravage84 We can't include any defaults for is(mobile) / is(tablet) without the require.
Refs #2546