Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 2 commits into from
Mar 18, 2014
Merged

3.0 request detector #3031

merged 2 commits into from
Mar 18, 2014

Conversation

ADmad
Copy link
Member

@ADmad ADmad commented Mar 16, 2014

Refs #2546

@markstory
Copy link
Member

Looks good to me.

@markstory markstory added this to the 3.0.0 milestone Mar 17, 2014
@jippi
Copy link
Contributor

jippi commented Mar 17, 2014

👍

@@ -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(
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for app too

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member

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.

ADmad added a commit that referenced this pull request Mar 18, 2014
@ADmad ADmad merged commit 9c4453b into cakephp:3.0 Mar 18, 2014
@ADmad ADmad deleted the 3.0-request-detector branch March 18, 2014 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants