Upgrade mobiledetect from 2.8.33 to 2.8.34

This commit is contained in:
Laurent Destailleur 2020-03-13 02:28:01 +01:00
parent fede6da5cf
commit f07d228537
9 changed files with 91 additions and 59 deletions

View File

@ -17,7 +17,7 @@ CKEditor 4.12.1 LGPL-2.1+ Yes
EvalMath 1.0 BSD Yes Safe math expressions evaluation EvalMath 1.0 BSD Yes Safe math expressions evaluation
Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package) GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
Mobiledetect 2.8.33 MIT License Yes Detect mobile devices browsers Mobiledetect 2.8.34 MIT License Yes Detect mobile devices browsers
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package) NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
ParseDown 1.6 MIT License Yes Markdown parser ParseDown 1.6 MIT License Yes Markdown parser

View File

@ -28,11 +28,11 @@
"ext-curl" : "*", "ext-curl" : "*",
"ckeditor/ckeditor" : "4.12.1", "ckeditor/ckeditor" : "4.12.1",
"mike42/escpos-php" : "2.2", "mike42/escpos-php" : "2.2",
"mobiledetect/mobiledetectlib" : "2.8.33", "mobiledetect/mobiledetectlib" : "2.8.34",
"phpoffice/phpexcel" : "1.8.1", "phpoffice/phpexcel" : "1.8.1",
"restler/framework" : "3.0.0-RC6", "restler/framework" : "3.0.0-RC6",
"tecnickcom/tcpdf" : "6.3.2", "tecnickcom/tcpdf" : "6.3.2",
"nnnick/chartjs": "2.9.3" "nnnick/chartjs" : "2.9.3"
}, },
"require-dev" : { "require-dev" : {
"jakub-onderka/php-parallel-lint" : "^0", "jakub-onderka/php-parallel-lint" : "^0",
@ -56,4 +56,4 @@
"ext-zip" : "ODT, Excel and file compression support", "ext-zip" : "ODT, Excel and file compression support",
"ext-xml" : "Excel support" "ext-xml" : "Excel support"
} }
} }

12
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "9f3a6e33d25fad5f44426d0dc8fc3c3d", "content-hash": "3c03efa3fe59b85d3d389e01cc65812b",
"packages": [ "packages": [
{ {
"name": "ckeditor/ckeditor", "name": "ckeditor/ckeditor",
@ -104,16 +104,16 @@
}, },
{ {
"name": "mobiledetect/mobiledetectlib", "name": "mobiledetect/mobiledetectlib",
"version": "2.8.33", "version": "2.8.34",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/serbanghita/Mobile-Detect.git", "url": "https://github.com/serbanghita/Mobile-Detect.git",
"reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102" "reference": "6f8113f57a508494ca36acbcfa2dc2d923c7ed5b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/cd385290f9a0d609d2eddd165a1e44ec1bf12102", "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/6f8113f57a508494ca36acbcfa2dc2d923c7ed5b",
"reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102", "reference": "6f8113f57a508494ca36acbcfa2dc2d923c7ed5b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -152,7 +152,7 @@
"mobile detector", "mobile detector",
"php mobile detect" "php mobile detect"
], ],
"time": "2018-09-01T15:05:15+00:00" "time": "2019-09-18T18:44:20+00:00"
}, },
{ {
"name": "nnnick/chartjs", "name": "nnnick/chartjs",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -68,13 +68,13 @@ or include the dependency in the `composer.json` file:
#### Demo #### Demo
* [:iphone: Live demo!](http://is.gd/mobiletest) * [:iphone: Live demo!](http://demo.mobiledetect.net)
* [Code examples](../../wiki/Code-examples) * [Code examples](../../wiki/Code-examples)
#### Contribute #### Contribute
*Submit a PR* *Submit a PR*
> Submit a pull request but before make sure you read [how to contribute](../../docs/CONTRIBUTING.md) guide. > Submit a pull request but before make sure you read [how to contribute](docs/CONTRIBUTING.md) guide.
*Donate* *Donate*
@ -92,7 +92,7 @@ Special thanks to the community :+1: for donations, JetBrains team for the conti
> [Submit new module, plugin, port](../../issues/new?title=New%203rd%20party%20module&body=Name,%20Link%20and%20Description%20of%20the%20module.) > [Submit new module, plugin, port](../../issues/new?title=New%203rd%20party%20module&body=Name,%20Link%20and%20Description%20of%20the%20module.)
:point_right: Keep `Mobile_Detect.php` class in a separate `module` and do NOT include it in your script core because of the high frequency of updates. :point_right: Keep `Mobile_Detect.php` class in a separate `module` and do NOT include it in your script core because of the high frequency of updates.
:point_right: When including the class into you `web application` or `module` always use `include_once '../path/to/Mobile_Detect.php` to prevent conflicts. :point_right: When including the class into your `web application` or `module` always use `include_once '../path/to/Mobile_Detect.php` to prevent conflicts.
**JavaScript** **JavaScript**

View File

@ -1,31 +1,42 @@
{ {
"name": "mobiledetect/mobiledetectlib", "name" : "mobiledetect/mobiledetectlib",
"type": "library", "type" : "library",
"description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", "description" : "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.",
"keywords": ["mobile", "mobile detect", "mobile detector", "php mobile detect", "detect mobile devices"], "keywords" : [
"homepage": "https://github.com/serbanghita/Mobile-Detect", "mobile",
"license": "MIT", "mobile detect",
"authors": [ "mobile detector",
{ "php mobile detect",
"name": "Serban Ghita", "detect mobile devices"
"email": "serbanghita@gmail.com", ],
"homepage": "http://mobiledetect.net", "homepage" : "https://github.com/serbanghita/Mobile-Detect",
"role": "Developer" "license" : "MIT",
} "authors" : [{
], "name" : "Serban Ghita",
"require": { "email" : "serbanghita@gmail.com",
"php": ">=5.0.0" "homepage" : "http://mobiledetect.net",
}, "role" : "Developer"
"require-dev": { }
"phpunit/phpunit": "~4.8.35||~5.7" ],
}, "require" : {
"autoload": { "php" : ">=5.0.0"
"classmap": ["Mobile_Detect.php"], },
"psr-0": { "require-dev" : {
"Detection": "namespaced/" "phpunit/phpunit" : "~4.8.35||~5.7"
} },
}, "autoload" : {
"archive": { "classmap" : [
"exclude": ["docs", "examples", "export"] "Mobile_Detect.php"
} ],
} "psr-0" : {
"Detection" : "namespaced/"
}
},
"archive" : {
"exclude" : [
"docs",
"examples",
"export"
]
}
}

View File

@ -0,0 +1,16 @@
app:
restart: 'on-failure'
image: php:7
working_dir: /app
command: vendor/bin/phpunit -v -c tests/phpunit.xml --coverage-text --strict-coverage --stop-on-risky
ports:
- "8000:8000"
volumes:
- .:/app
composer:
restart: 'no'
image: composer/composer:php7
command: install
volumes:
- .:/app

View File

@ -3,7 +3,8 @@
* Mobile Detect script was designed to detect `mobile` devices. Implicitly other devices are considered to be `desktop`. * Mobile Detect script was designed to detect `mobile` devices. Implicitly other devices are considered to be `desktop`.
* User-Agent and HTTP headers sniffing is a non reliable method of detecting a mobile device. * User-Agent and HTTP headers sniffing is a non reliable method of detecting a mobile device.
* If the mobile browser is set on `Desktop mode`, the Mobile Detect script has no way of knowing that the device is `mobile`. * If the mobile browser is set on `Desktop mode`, the Mobile Detect script has no way of knowing that the device is `mobile`.
* Some touchscreen devices (eg. Microsoft Surface) are tough to detect as mobile since they can be used in a laptop mode. * Some touchscreen devices (eg. Microsoft Surface) are tough to detect as mobile since they can be used in a laptop mode. See: [#32](https://github.com/serbanghita/Mobile-Detect/issues/32), [#461](https://github.com/serbanghita/Mobile-Detect/issues/461), [#667](https://github.com/serbanghita/Mobile-Detect/issues/667)
* Some mobile devices (eg. IPadOS, Google Pixel Slate). See: [#795](https://github.com/serbanghita/Mobile-Detect/issues/795), [#788](https://github.com/serbanghita/Mobile-Detect/issues/788)
* Detecting the device brand (eg. Apple, Samsung, HTC) is not 100% reliable. * Detecting the device brand (eg. Apple, Samsung, HTC) is not 100% reliable.
* We don't monitor the quality of the 3rd party tools based on Mobile Detect script. * We don't monitor the quality of the 3rd party tools based on Mobile Detect script.
We cannot guarantee that they are using the class properly or if they provide the latest version. We cannot guarantee that they are using the class properly or if they provide the latest version.