-
Notifications
You must be signed in to change notification settings - Fork 47
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
new provider mimmi20 #111
base: master
Are you sure you want to change the base?
new provider mimmi20 #111
Conversation
'model' => true, | ||
'brand' => true, | ||
'type' => true, | ||
'isMobile' => false, |
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.
this should be true.
'bot' => [ | ||
'isBot' => true, | ||
'name' => true, | ||
'type' => false, |
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.
this should be true
|
||
'renderingEngine' => [ | ||
'name' => true, | ||
'version' => false, |
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.
this should be true
private function hydrateBot(Model\Bot $bot, BrowserInterface $browserRaw) | ||
{ | ||
$bot->setIsBot(true); | ||
$bot->setName($this->getRealResult($browserRaw->getName())); |
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.
add this: $bot->setType($this->getRealResult($browserRaw->getType()->getName()));
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.
shouldnt this be $browserRaw->getType()->getType()
? The result there is e.g. bot-syndication-reader
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.
Please use getName
. getType
is used for the caching
|
||
if ($deviceRaw->getPointingMethod() === 'touchscreen') { | ||
$device->setIsTouch(true); | ||
} |
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.
add this: $device->setIsMobile($deviceRaw->getType()->isMobile())
/* | ||
* Bot detection | ||
*/ | ||
if ($parser->getBrowser()->getType()->getType() === 'bot') { |
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.
please use this: if ($parser->getBrowser()->getType()->isBot()) {
@mimmi20 got all things covered now, will update the PR tomorrow 👍 |
@mimmi20 can u do a last review? The question is now...
Need to think about that a bit |
@ThaDafinser I do not have the time to maintain two versions. I am still working on the complexity, and I am still adding devices and browsers which are not detected yet. I dont want to add PHP 5.6 to my supported PHP versions because I want to add PHP 7+ features in the future. |
@mimmi20 leave your package as php 7+. it was more about this package ;-) |
@ThaDafinser Any news here? |
@mimmi20 can u do a review, if i map the correct fields?