You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having issues debugging a php error that is only thrown during behat testing. If I try to load url_generator service during behat step definition I'm getting this error and the tests are ultimately failing.
Circular reference detected for service "url_generator", path: "url_generator". (Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException)
I was able to get all other services service I tried, looks like url_generator is the only exception. If I check:
$c = \Drupal::genContainer();
$c->hasService('url_generator');
=> bool(true)
$c->initialized('url_generator');
=> bool(false)
$c->get('url_generator');
=> Circular reference detected for service "url_generator", path: "url_generator". (Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException)
This error only started after I've updated to php8.1. I can not even reproduce if I run it within drush php console (I can get url_generator service normally).
The other url_generator service issue I see during behat execution is:
Type error: Drupal\Core\Routing\UrlGenerator::setContext(): Argument #1 ($context) must be of type Symfony\Component\Routing\RequestContext, null given (Behat\Testwork\Call\Exception\FatalThrowableError)
They are probably related somehow, not sure.
Any idea where could the error be?
The text was updated successfully, but these errors were encountered:
I'm having issues debugging a php error that is only thrown during behat testing. If I try to load
url_generator
service during behat step definition I'm getting this error and the tests are ultimately failing.I was able to get all other services service I tried, looks like
url_generator
is the only exception. If I check:This error only started after I've updated to php8.1. I can not even reproduce if I run it within drush php console (I can get
url_generator
service normally).The other
url_generator
service issue I see during behat execution is:They are probably related somehow, not sure.
Any idea where could the error be?
The text was updated successfully, but these errors were encountered: