MobileDetectBundle icon indicating copy to clipboard operation
MobileDetectBundle copied to clipboard

[Question] Is this project dead/abandoned?

Open netbull opened this issue 5 years ago • 19 comments

First of all, thank you for the bundle! It's quite handy in many ways.

But as a cool project is quite unmaintained lately.. last PR merge is almost 2 years ago. The most vital PRs are for compatibility with Symfony 4.4 and 5 which is out now.

netbull avatar Dec 04 '19 13:12 netbull

i am also concerned

DennisOluoch avatar Dec 20 '19 04:12 DennisOluoch

same here, will at least the dependencies updated for symfony5?

pwnyprod avatar Jan 04 '20 14:01 pwnyprod

I don't think so...you will need to look out for the forks and replace this bundles with your preferred fork to get an update

DennisOluoch avatar Jan 07 '20 05:01 DennisOluoch

I tried start to refactor (huge pain for 2 hours), then i go over to forget this bundle and write a twig extension for my application and easily readout the server params (same like mobiledetection dependency does for mobile detection) so for me this is huge overhead and from the codebase it consume more time to refactor this. Maybe its easier to write a new Bundle.

pwnyprod avatar Jan 17 '20 12:01 pwnyprod

@pwnyprod I don't know exactly what you refactored, but I forked the bundle as well and it took an hour or so and it works just fine with Symfony 4.4.x netbull/mobile-detect-bundle

netbull avatar Jan 17 '20 12:01 netbull

@netbull i use Symfony 5.0.x

pwnyprod avatar Jan 18 '20 13:01 pwnyprod

So lets question if @suncat2000 would give you the official branch.

pwnyprod avatar Jan 18 '20 13:01 pwnyprod

Seems like https://github.com/tattali/MobileDetectBundle is a good updated alternative, based on this repo!

evertharmeling avatar Sep 01 '20 09:09 evertharmeling

Note that https://github.com/tattali/MobileDetectBundle cannot be installed with composer require tattali/MobileDetectBundle:

[InvalidArgumentException] Package tattali/MobileDetectBundle not found

truckee avatar Jan 10 '21 22:01 truckee

because its not on packagist, you have to add a vcs link in you package.json but anyway this is getting more and more outdated. A good alternative is https://github.com/Gregwar/ImageBundle

pwnyprod avatar Jan 11 '21 16:01 pwnyprod

because its not on packagist, you have to add a vcs link in you package.json but anyway this is getting more and more outdated. A good alternative is https://github.com/Gregwar/ImageBundle

How image bundle is related with mobile detect?

netbull avatar Jan 11 '21 17:01 netbull

oh nvm :D too many projects, it was the wrong thread 🦩

pwnyprod avatar Jan 11 '21 17:01 pwnyprod

Note that https://github.com/tattali/MobileDetectBundle cannot be installed with composer require tattali/MobileDetectBundle:

[InvalidArgumentException] Package tattali/MobileDetectBundle not found

You should install it with composer require tattali/mobile-detect-bundle (see https://packagist.org/packages/tattali/mobile-detect-bundle)

evertharmeling avatar Jan 11 '21 17:01 evertharmeling

netbull/mobile-detect-bundle now can be installed via composer on Symfony 5 project

netbull avatar Jan 13 '21 15:01 netbull

@netbull Service "mobile_detect.mobile_detector" not found: even though it exists in the app's container....

Captura de pantalla (14)

it give me this error

and this is my code Captura de pantalla (15)

symfony 5 and php 8

lolop93 avatar Aug 11 '21 11:08 lolop93

@lolop93 you will need to inject the MobileDetect just like you inject the repositories.

netbull avatar Aug 11 '21 12:08 netbull

@lolop93 you will need to inject the MobileDetect just like you inject the repositories.

@netbull i dont know how....

image

this is i have

still dont work

and this neither dont work use SunCat\MobileDetectBundle\MobileDetectBundle;

image

i do the inyection but give me this error image

lolop93 avatar Aug 11 '21 12:08 lolop93

@lolop93 FWIW, it is possible to gain the effects of the bundle using just the Twig Helper. No need to inject it. For example

{# base.html.twig #}
...
            {% if is_mobile_view() %}
                {% block nav_mobile %}
                    {% include 'Default/mobile_menu.html.twig' %}
                    {% include 'Default/top_menu.html.twig' %}
                {% endblock nav_mobile %}
            {% endif %}

truckee avatar Aug 11 '21 17:08 truckee

@truckee @lolop93 FWIW, it is possible to gain the effects of the bundle using just the Twig Helper. No need to inject it. For example

{# base.html.twig #}
...
            {% if is_mobile_view() %}
                {% block nav_mobile %}
                    {% include 'Default/mobile_menu.html.twig' %}
                    {% include 'Default/top_menu.html.twig' %}
                {% endblock nav_mobile %}
            {% endif %}

yes i know but i prefer inject it on the controller for a better performance and readability

The twig helper works perfectly :)

lolop93 avatar Aug 11 '21 17:08 lolop93