MobileDetectBundle icon indicating copy to clipboard operation
MobileDetectBundle copied to clipboard

V2.* not compatible with Symfony <4.2

Open chandon opened this issue 1 year ago • 4 comments

https://github.com/tattali/MobileDetectBundle/blob/950bbe9aa549792133cfb7dcb27a9ab7762d0826/src/DependencyInjection/Configuration.php#L36

The method getRootNode only exists since Symfony v4.2. V2.* of this module is not compatible with Symfony 3.4, 4.0 and 4.1

chandon avatar Feb 01 '24 15:02 chandon

Hi did you check how to to install legacy version?

https://github.com/tattali/MobileDetectBundle/blob/main/src/Resources/doc/legacy-versions.md

tattali avatar Feb 01 '24 19:02 tattali

Hi @tattali

Of couirse i did. I installed 2.1.1 for Symfony 3.4. As you can see on line 36 on commit = tag v2.1;1, you're using getRootNode : https://github.com/tattali/MobileDetectBundle/blob/f6b7b8b9dfb057b549982bfc95e9bfc47575609c/src/DependencyInjection/Configuration.php#L36

As you can see in the source of TreeBuilder in symfony 3.4, 4.0 and 4.1, getRootNode() method doesn't exists yet... https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php

There are other BC issues in the EventListener... if fixed everything here https://github.com/tattali/MobileDetectBundle/compare/main...chandon:MobileDetectBundle:symony3

chandon avatar Feb 01 '24 22:02 chandon

Are you using symfony flex ?

tattali avatar Feb 01 '24 22:02 tattali

Is there any link with the issue ?

chandon avatar Feb 01 '24 23:02 chandon