Problem/Motivation

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

Adding return types to AssertPageCacheContextsAndTagsTrait will remove 6 x 41 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-3575231

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

   * @return bool
   *   Always returns TRUE.
   */
  protected function assertCacheContexts(array $expected_contexts, $message = NULL, $include_default_contexts = TRUE): bool {

Out of scope but this should probably be changed to void as well.

longwave’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Wow so many rough reviews :)

LGTM!

godotislate’s picture

Two test failures, look to be random though.

smustgrave’s picture

That's on me, I saw javascript and immediately assumed. Am re-running it.

smustgrave’s picture

Yup random!

catch’s picture

Status: Reviewed & tested by the community » Needs work

Needs a rebase.

longwave’s picture

Status: Needs work » Reviewed & tested by the community

Rebased.

godotislate’s picture

Status: Reviewed & tested by the community » Needs work

Looks like the baseline needs updating.

  • catch committed f9a4e33a on main
    task: #3575231 Add return types to AssertPageCacheContextsAndTagsTrait...
catch’s picture

Status: Needs work » Fixed

Had to rebuild the baseline again due to some shortcut test moves, but easy enough to do locally.

Committed/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.