Problem/Motivation

Child of #3529510: [meta] Add return types to test traits

Adding return types to FieldUiTestTrait will remove 5 x 27 entries from the PHPStan baseline.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3575234

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

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
godotislate’s picture

Status: Needs review » Reviewed & tested by the community

Changes are minimal and tests pass. lgtm

sivaji_ganesh_jojodae’s picture

Status: Reviewed & tested by the community » Needs work

Merge conflicts must be resolved.

longwave’s picture

Status: Needs work » Reviewed & tested by the community

Rebased, back to RTBC.

sivaji_ganesh_jojodae’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new233.12 KB

The merge conflict is still there.

Test

longwave’s picture

Status: Needs work » Reviewed & tested by the community

Rebased again. There have been multiple large baseline changes recently and they all conflict with each other unfortunately.

sivaji_ganesh_jojodae’s picture

The pipeline was initially failing due to issue #3578653. After rebasing, the pipeline is successful now.

godotislate’s picture

Was going to merge this one, until I noticed I was the only one with an approving review. If anyone else can check and +1 for RTBC, I can merge.

mstrelan’s picture

I reviewed the changes and they look good. I also checked out the branch and rebased locally on main, then regenerated the baseline to see if there was any difference and there was none.

The only concern I had was if \Drupal\Core\Field\FieldTypePluginManager::getGroupedDefinitions ever returned an array with indexes that weren't strings, then the type for ::getFieldFromGroup would be wrong, but I can see we're already explicitly casting to a string in \Drupal\Core\Field\FieldTypePluginManager::getGroupedDefinitions.

RTBC++

  • godotislate committed 4ce99269 on main
    test: #3575234 Add return types to FieldUiTestTrait
    
    By: longwave
    By:...

godotislate’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

Committed 4ce9926 and pushed to main. Thanks!

Changes do not apply to 11.x, so would need another MR for that if we want to backport.

longwave’s picture

Version: main » 11.x-dev
Status: Patch (to be ported) » Needs review

drumm’s picture

(Updating to resolve Drupal.org issue indexing issue, please disregard)

longwave’s picture

Status: Patch (to be ported) » Needs review
longwave’s picture

Version: main » 11.x-dev
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems like a good 11.x fork. testFilterTips seems random

  • godotislate committed 4d6e2348 on 11.x
    test: #3575234 Add return types to FieldUiTestTrait
    
    By: longwave
    By:...
godotislate’s picture

Status: Reviewed & tested by the community » Fixed

Committed 4d6e234 and pushed to 11.x. 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.