Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata not transferred to attributes #4

Open
porebskk opened this issue Feb 4, 2020 · 0 comments
Open

Metadata not transferred to attributes #4

porebskk opened this issue Feb 4, 2020 · 0 comments

Comments

@porebskk
Copy link

porebskk commented Feb 4, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant