Open cscrewsandcaptains opened 2 years ago
Same issue as @cscrewsandcaptains. was able to bypass the error using @cscrewsandcaptains workaround. Thanks
Trying to resolve this issue for php8, ran into another error after making above changes to composer file "Call to undefined method Symfony\Component\DomCrawler\Crawler::rewind()"
In order to solve the issue with Symfony DOM Crawler, I resolved it by changing the version of the main composer package in the following manner in composer.json
file:
My suggestion to add "symfony/css-selector":"~2.8|~3.0|~4.4", "symfony/dom-crawler": "~2.8|~3.0|~4.4" (what Discomania have done in the fix) doesn't resolve the issue. A downgrade to 3.4.47 of symfony/dom-crawler and symfony/css-selector will be done, if I remove my workaround ("symfony/css-selector": "4.4.37 as 3.0.0", "symfony/dom-crawler": "4.4.39 as 3.0.0") in my composer.json and then an exception will thrown if using the control. Sorry I have no other suggestion. I use my workaround again.
@bugToaster: I have no "codeception/module-filesystem" or "symfony/browser-kit" line in my composer.json.
I got the above packages when creating a project from yii template (eg. advance). can you try the above packages & let's see what happens?
I have not install this packages ("composer show"). So there is no need for me to install them.
Please add "|~4.4" to the composer.json entries of the required symfony packages: "symfony/css-selector":"~2.8|~3.0|~4.4", "symfony/dom-crawler": "~2.8|~3.0|~4.4" Because 4.4 is the last version that get bugfixes. There is a bug in the 3.0 version of dom-crawler, so your control cannot be used with PHP 8.1.
A workaround for my own project is to add this to composer.json: "symfony/css-selector": "4.4.37 as 3.0.0", "symfony/dom-crawler": "4.4.39 as 3.0.0"