suncat2000 / MobileDetectBundle

Symfony 2/3/4 bundle for detect mobile devices, manage mobile view and redirect to the mobile and tablet version.
397 stars 153 forks source link

[Question] Is this project dead/abandoned? #138

Open netbull opened 4 years ago

netbull commented 4 years ago

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.

DennisOluoch commented 4 years ago

i am also concerned

pwnyprod commented 4 years ago

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

DennisOluoch commented 4 years ago

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

pwnyprod commented 4 years ago

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.

netbull commented 4 years ago

@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

pwnyprod commented 4 years ago

@netbull i use Symfony 5.0.x

pwnyprod commented 4 years ago

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

evertharmeling commented 4 years ago

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

truckee commented 3 years ago

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

[InvalidArgumentException] Package tattali/MobileDetectBundle not found

pwnyprod commented 3 years ago

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

netbull commented 3 years ago

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?

pwnyprod commented 3 years ago

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

evertharmeling commented 3 years ago

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)

netbull commented 3 years ago

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

lolop93 commented 3 years ago

@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

netbull commented 3 years ago

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

lolop93 commented 3 years ago

@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

truckee commented 3 years ago

@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 %}
lolop93 commented 3 years ago

@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 :)