amphp / amphp/http-server

PSR-7 compliance

Open
#357 11 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion feature request
Dominant language
PHP
Stars
1.3k
Forks
103
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am trying to write an integration between a framework (https://packagist.org/packages/phespro/phespro) and amphp http server.

Unfortunately amphp/http-server does not follow PSR-7 (https://www.php-fig.org/psr/psr-7/).

The class \Amp\Http\Server\Request does not implement \Psr\Http\Message\ServerRequestInterface

This prevents me from simply forwarding the request to the kernel of that framework (which would have been a no brainer).

Why does amphp/http-server not follow that standard? Are there any plans to support PSR-7 in the future?

Thanks in advance!

Best Regards
Martin

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the \Amp\Http\Server\Request class, the PSR-7 ServerRequestInterface specification, and the issue discussion about compatibility with the framework. The issue does not define an implementation or acceptance criteria; a maintainer decision about whether and how PSR-7 support should work is needed before coding.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.