Skip to content

Metadata not transferred to attributes #4

@porebskk

Description

@porebskk

Bug Report

Q A
Version(s) all of them

Summary

Metadata values are not transferred to PSR-7 attributes. The other way round is also missing, from PSR-7 to Laminas.

How to reproduce

$request = new \Laminas\Http\Request('GET', '/metadata-to-attributes', [], [], [], [], [], []);
$request->setMetadata('metadata-key', 'metadata-value');

$psr7Request = \Laminas\Psr7Bridge\Psr7ServerRequest::fromLaminas($request);

if ($psr7Request->getAttribute('metadata-key') === 'metadata-value') {
    echo 'transformation complete';
} else {
    echo 'transformation incomplete';
}

Expected behavior

I would assume that the metadata from laminas request object are transferred to the PSR-7 request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions