fix: #3554801 The exception thrown by AutowiredInstanceTrait::createInstanceAutowired() uses the wrong name for the constructor
By: avpaderno
By: idebr
(cherry picked from commit 3ecd3c65)
@@ -37,7 +37,7 @@ public static function createInstanceAutowired(ContainerInterface $container, mi
$args[]=NULL;
continue;
}
thrownewAutowiringFailedException($service,sprintf('Cannot autowire service "%s": argument "$%s" of method "%s::_construct()", you should configure its value explicitly.',$service,$parameter->getName(),static::class));
thrownewAutowiringFailedException($service,sprintf('Cannot autowire service "%s": argument "$%s" of method "%s::__construct()", you should configure its value explicitly.',$service,$parameter->getName(),static::class));
$this->expectExceptionMessage('Cannot autowire service "Drupal\Core\Lock\LockBackendInterface": argument "$lock" of method "Drupal\autowire_test\Plugin\Block\AutowireErrorBlock::_construct()", you should configure its value explicitly.');
$this->expectExceptionMessage('Cannot autowire service "Drupal\Core\Lock\LockBackendInterface": argument "$lock" of method "Drupal\autowire_test\Plugin\Block\AutowireErrorBlock::__construct()", you should configure its value explicitly.');
$this->expectExceptionMessage('Cannot autowire service "Drupal\Core\Lock\LockBackendInterface": argument "$lock" of method "Drupal\system_test\Controller\BrokenSystemTestController::_construct()", you should configure its value explicitly.');
$this->expectExceptionMessage('Cannot autowire service "Drupal\Core\Lock\LockBackendInterface": argument "$lock" of method "Drupal\system_test\Controller\BrokenSystemTestController::__construct()", you should configure its value explicitly.');