Skip to content

Commit ee51d4c

Browse files
committed
feat: ready for symfony 5.3, add github actions, merged from orginal repo suncat2000#143, suncat2000#144, suncat2000#135, suncat2000#133
1 parent 17fa419 commit ee51d4c

File tree

4 files changed

+33
-14
lines changed

4 files changed

+33
-14
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
MobileDetectBundle
44
=============
55

6-
Symfony 4/5 bundle for detect mobile devices, manage mobile view and redirect to the mobile and tablet version.
6+
Symfony 4/5/6 bundle for detect mobile devices, manage mobile view and redirect to the mobile and tablet version.
77

88
[![Build Status](https://travis-ci.org/suncat2000/MobileDetectBundle.png?branch=master)](https://travis-ci.org/suncat2000/MobileDetectBundle) [![Latest Stable Version](https://poser.pugx.org/suncat/mobile-detect-bundle/v/stable.png)](https://packagist.org/packages/suncat/mobile-detect-bundle) [![Total Downloads](https://poser.pugx.org/suncat/mobile-detect-bundle/downloads.png)](https://packagist.org/packages/suncat/mobile-detect-bundle) [![Coverage Status](https://coveralls.io/repos/github/suncat2000/MobileDetectBundle/badge.svg?branch=master)](https://coveralls.io/github/suncat2000/MobileDetectBundle?branch=master)
99

@@ -19,11 +19,31 @@ This Bundle use [Mobile_Detect](https://github.com/serbanghita/Mobile-Detect) cl
1919
* Redirects to mobile and tablet sites
2020

2121

22+
Installation
23+
------------
24+
25+
1. Install the latest version via composer:
26+
27+
```sh
28+
composer require netbull/mobile-detect-bundle --dev
29+
```
30+
31+
2. If you don't use [Symfony Flex](https://symfony.com/doc/current/setup/flex.html), you must enable the bundle manually in the application:
32+
33+
```php
34+
// config/bundles.php
35+
// in older Symfony apps, enable the bundle in app/AppKernel.php
36+
return [
37+
// ...
38+
SunCat\MobileDetectBundle\MobileDetectBundle::class => ['dev' => true],
39+
];
40+
```
41+
2242
## Documentation
2343
2444
The bulk of the documentation is stored in the `Resources/doc/index.md` file in this bundle:
2545
26-
[Read the Documentation for master](https://github.com/suncat2000/MobileDetectBundle/blob/master/Resources/doc/index.md)
46+
[Read the Documentation for master](https://github.com/netbull/MobileDetectBundle/blob/master/src/Resources/doc/index.md)
2747
2848
2949
## License

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "netbull/mobile-detect-bundle",
3-
"description": "Symfony 4/5 bundle for detect mobile devices, managing mobile view types, redirect to mobile version.",
3+
"description": "Symfony 4/5/6 bundle for detect mobile devices, managing mobile view types, redirect to mobile version.",
44
"keywords": ["mobile", "mobile detect", "symfony mobile", "mobile view managing", "mobile redirect"],
55
"homepage": "https://github.com/suncat2000/MobileDetectBundle",
66
"type": "symfony-bundle",
@@ -30,7 +30,6 @@
3030
"symfony/phpunit-bridge": "^4.4|^5.0|^6.0",
3131
"php-coveralls/php-coveralls": "^2.0.0"
3232
},
33-
3433
"autoload": {
3534
"psr-4": {
3635
"SunCat\\MobileDetectBundle\\": "src/"

src/Resources/doc/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MobileDetectBundle
22
=============
33

4-
Symfony 4/5 bundle for detect mobile devices, manage mobile view and redirect to the mobile and tablet version.
4+
Symfony 4/5/6 bundle for detect mobile devices, manage mobile view and redirect to the mobile and tablet version.
55

66

77
Switch device view
@@ -13,21 +13,21 @@ For switch device view, use `device_view` GET parameter:
1313
http://site.com?device_view={full/mobile/tablet}
1414
````
1515

16-
Installation
17-
------------
16+
Installation
17+
------------
1818

19-
### Composer
19+
### Composer
2020

21-
#### For Symfony >= 2.4
21+
#### For Symfony >= 2.4
2222

23-
Run command:
24-
`composer require "netbull/mobile-detect-bundle:1.0.*"`
23+
Run command:
24+
`composer require "netbull/mobile-detect-bundle:1.0.*"`
2525

26-
Or add to `composer.json` in your project to `require` section:
26+
Or add to `composer.json` in your project to `require` section:
2727

28-
```json
28+
```json
2929
{
30-
"netbull/mobile-detect-bundle": "1.0.*"
30+
"netbull/mobile-detect-bundle": "1.0.*"
3131
}
3232
```
3333
and run command:
222 KB
Loading

0 commit comments

Comments
 (0)