Problem/Motivation

The array shape returned by LogMessageParserInterface::parseMessagePlaceholders() is undocumented. This makes phpstan unhappy.

Steps to reproduce

Run phpstan on code that calls LogMessageParserInterface::parseMessagePlaceholders()

Proposed resolution

Document it, using the potential types returned by LogMessageParser: array<string, scalar|\Stringable|null>

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3624512

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

mfb created an issue. See original summary.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

This appears to be correct from looking at LogMessageParser, could argue there are probably dozens of instances that could be expanded but think for logger makes sense.

mfb’s picture

Issue summary: View changes

  • catch committed 83bd5996 on 11.5.x
    fix: #3624512 Document LogMessageParserInterface::...

  • catch committed e996e6b7 on 11.x
    fix: #3624512 Document LogMessageParserInterface::...

  • catch committed ffdf7130 on 12.0.x
    fix: #3624512 Document LogMessageParserInterface::...

  • catch committed e41cecab on main
    fix: #3624512 Document LogMessageParserInterface::...
catch’s picture

Version: main » 11.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and cherry-picked to 12.0.x, 11.x, and 11.5.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.