Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.* not compatible with Symfony <4.2 #29

Open
chandon opened this issue Feb 1, 2024 · 4 comments
Open

V2.* not compatible with Symfony <4.2 #29

chandon opened this issue Feb 1, 2024 · 4 comments

Comments

@chandon
Copy link

chandon commented Feb 1, 2024

$rootNode = $treeBuilder->getRootNode();

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

@tattali
Copy link
Owner

tattali commented Feb 1, 2024

Hi did you check how to to install legacy version?

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

@chandon
Copy link
Author

chandon commented Feb 1, 2024

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 :

$rootNode = $treeBuilder->getRootNode();

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 main...chandon:MobileDetectBundle:symony3

@tattali
Copy link
Owner

tattali commented Feb 1, 2024

Are you using symfony flex ?

@chandon
Copy link
Author

chandon commented Feb 1, 2024

Is there any link with the issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants