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

Command icon 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

dmitry.korhov created an issue. See original summary.

dmitry.korhov’s picture

Title: Latest version of module is not compatible with Drupal 11.1 » 1.5.1 release is not compatible with Drupal Core 11.1.x

murz made their first commit to this issue’s fork.

  • murz committed 2a9104fa on 1.6.x
    Draft: fix: #3544838 Mark unsupported versions in dependencies...

  • murz committed cf37e254 on 1.5.x
    feat: #3544838 1.5.1 release is not compatible with Drupal Core 11.1.x
    
murz’s picture

Status: Active » Postponed

Because 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.

murz’s picture

Status: Postponed » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

murz’s picture

Status: Fixed » Closed (fixed)