Problem/Motivation

Adding return types to runtime code has BC concerns, but adding to test code should be straightforward and can be at least partially automated with rector.

My suggestion would be to do, for core/tests:

Proposed resolution

Remove baseline entries and manually add missing return types and other fixes for Build, Functional and FunctionalJavascript tests.

Note that some of the failures come from usage in tests of traits that live in the runtime namespaces, and cannot be fixed in this issue.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3562645

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

mondrake created an issue. See original summary.

mondrake’s picture

Issue summary: View changes

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

mondrake’s picture

Title: Add remaining return types to core/tests code - round 4 » Fix return types and baselined errors to core/tests/ Build|FunctionalJavascript|Functional code - round 4
Issue summary: View changes
Status: Postponed » Needs review
mondrake’s picture

Title: Fix return types and baselined errors to core/tests/ Build|FunctionalJavascript|Functional code - round 4 » Fix return types and baselined errors of core/tests/ Build|FunctionalJavascript|Functional code - round 4
mondrake’s picture

Issue summary: View changes
smustgrave’s picture

Status: Needs review » Needs work

Appears to have some merge conflicts.

mondrake’s picture

Status: Needs work » Needs review

rebased

dcam’s picture

Status: Needs review » Needs work

I verified all of the new type hints that are added in the file. I didn't find anything to comment on. They're all pretty straight-forward. It looks good to me.

I'm setting the status to Needs Work for another rebase. The baseline has conflicts again. There's no need to re-review it after that. Please feel free to self-RTBC afterward.

mondrake’s picture

Status: Needs work » Reviewed & tested by the community

Adjusted baseline. RTBC per #10.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

mondrake’s picture

Status: Needs work » Reviewed & tested by the community

rebased

  • amateescu committed 62b09c02 on main
    task: #3562645 Fix return types and baselined errors of core/tests/...
amateescu’s picture

Status: Reviewed & tested by the community » Fixed

Committed 62b09c0 and pushed to main. Thanks!

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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.