diff --git a/README.md b/README.md index 89fad4e..ecfe645 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 diff --git a/composer.json b/composer.json index 80ebf1f..9e9a6e0 100644 --- a/composer.json +++ b/composer.json @@ -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", @@ -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/" diff --git a/src/Resources/doc/index.md b/src/Resources/doc/index.md index 55b8401..acc37d2 100644 --- a/src/Resources/doc/index.md +++ b/src/Resources/doc/index.md @@ -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 @@ -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: diff --git a/src/Resources/doc/sf-toolbar-symfony5.4.dev.png b/src/Resources/doc/sf-toolbar-symfony5.4.dev.png new file mode 100644 index 0000000..0abc978 Binary files /dev/null and b/src/Resources/doc/sf-toolbar-symfony5.4.dev.png differ