Skip to content

Commit

Permalink
feat: ready for symfony 5.3, add github actions, merged from orginal …
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris53897 committed Sep 25, 2021
1 parent 17fa419 commit ee51d4c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 14 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
MobileDetectBundle
=============

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

[![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)

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


Installation
------------

1. Install the latest version via composer:

```sh
composer require netbull/mobile-detect-bundle --dev
```

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:
```php
// config/bundles.php
// in older Symfony apps, enable the bundle in app/AppKernel.php
return [
// ...
SunCat\MobileDetectBundle\MobileDetectBundle::class => ['dev' => true],
];
```
## Documentation
The bulk of the documentation is stored in the `Resources/doc/index.md` file in this bundle:
[Read the Documentation for master](https://github.com/suncat2000/MobileDetectBundle/blob/master/Resources/doc/index.md)
[Read the Documentation for master](https://github.com/netbull/MobileDetectBundle/blob/master/src/Resources/doc/index.md)
## License
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "netbull/mobile-detect-bundle",
"description": "Symfony 4/5 bundle for detect mobile devices, managing mobile view types, redirect to mobile version.",
"description": "Symfony 4/5/6 bundle for detect mobile devices, managing mobile view types, redirect to mobile version.",
"keywords": ["mobile", "mobile detect", "symfony mobile", "mobile view managing", "mobile redirect"],
"homepage": "https://github.com/suncat2000/MobileDetectBundle",
"type": "symfony-bundle",
Expand Down Expand Up @@ -30,7 +30,6 @@
"symfony/phpunit-bridge": "^4.4|^5.0|^6.0",
"php-coveralls/php-coveralls": "^2.0.0"
},

"autoload": {
"psr-4": {
"SunCat\\MobileDetectBundle\\": "src/"
Expand Down
20 changes: 10 additions & 10 deletions src/Resources/doc/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MobileDetectBundle
=============

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


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

Installation
------------
Installation
------------

### Composer
### Composer

#### For Symfony >= 2.4
#### For Symfony >= 2.4

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

Or add to `composer.json` in your project to `require` section:
Or add to `composer.json` in your project to `require` section:

```json
```json
{
"netbull/mobile-detect-bundle": "1.0.*"
"netbull/mobile-detect-bundle": "1.0.*"
}
```
and run command:
Expand Down
Binary file added src/Resources/doc/sf-toolbar-symfony5.4.dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ee51d4c

Please sign in to comment.