Problem/Motivation
After upgrading of test_helpers to the latest (1.5.1 version) next errors appear:
Fatal error:
Declaration of Drupal\test_helpers\Stub\RendererStub::doRender(array &$elements, Drupal\Core\Render\RenderContext $context):
Drupal\Component\Render\MarkupInterface|string
must be compatible with
Drupal\Core\Render\Renderer::doRender(&$elements, $is_root_call = false) in /docroot/modules/contrib/test_helpers/src/Stub/RendererStub.php on line 43
Drupal 10:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...
protected function doRender(&$elements, $is_root_call = FALSE) {
Drupal 11:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...
protected function doRender(array &$elements, RenderContext $context) : string|MarkupInterface {
Steps to reproduce
Proposed resolution
Mark 1.5RC and newer versions to be compatible with only Drupal 11.2
11.1 still have 10th version: https://git.drupalcode.org/project/drupal/-/blob/11.1.x/core/lib/Drupal/...
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork test_helpers-3544838
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dmitry.korhovComment #8
murzBecause Drupal 11.2.0 has breaking changes in the interfaces, it seems impossible to make a single version for both versions (11.1 and 11.2), therefore I released the 1.5.2 version that supports Drupal 11.0 - 11.1, then 1.6.0 for Drupal 11.2.
Comment #9
murzComment #11
murz