CodeIgniter4 icon indicating copy to clipboard operation
CodeIgniter4 copied to clipboard

HTTP message interfaces & factories (PSR-7/17)

Open MGatner opened this issue 5 years ago • 13 comments

At some point we should make sure we are implementing these compliance definitions:

  • https://www.php-fig.org/psr/psr-7/
  • https://www.php-fig.org/psr/psr-17/

MGatner avatar Jul 05 '20 18:07 MGatner

Suggested using • https://github.com/laminas/laminas-diactoros • https://github.com/slimphp/Slim-Psr7

agungsugiarto avatar Aug 12 '20 04:08 agungsugiarto

What is the status about this @MGatner ? Are you working on it or should i do a pr? 😇✌️

tada5hi avatar Oct 15 '20 08:10 tada5hi

ping @MGatner

agungsugiarto avatar Oct 22 '20 05:10 agungsugiarto

I'm not actively working on this. I started a couple weeks back and determined it should not be too much work.

MGatner avatar Oct 22 '20 18:10 MGatner

so @MGatner you will catch it up later or should i just go ahead?

tada5hi avatar Oct 26 '20 13:10 tada5hi

If you can implement it then please go ahead and do so! I will not be working on this for a while.

MGatner avatar Oct 26 '20 20:10 MGatner

@MGatner thx, i think so 😄 . I will try to keep backwards compatible.

tada5hi avatar Oct 28 '20 18:10 tada5hi

@Tada5hi No pressure but I'm gathering some info for 4.1 - do you think this will be done this week?

MGatner avatar Nov 22 '20 12:11 MGatner

Hi Team, Anyone still working on this ? If no one, I want to try handle it.

asrofie avatar Jun 08 '21 02:06 asrofie

Nobody is working on it actively, please do! Familiarize yourself with the existing PRs and the conversations on those. The tricky part, if I recall, is that our version of Message has getHeader() and getHeaders() which do not comply with PSR-7 (because they return Header). However since then I think we figured out that we could make Header stringable and still comply.

Regardless pay attention that no breaking changes are made, and leverage those HTTP Integration tests (so you shouldn't have to write many!).

MGatner avatar Jun 08 '21 11:06 MGatner

Also, if you determine that this won't fit in the core framework you can compare what I did with PSR Cache and Simple Cache: https://github.com/codeigniter4/cache

We could definitely add HTTP as a separate module

MGatner avatar Jun 08 '21 11:06 MGatner

Oke, I will create implementation first.

asrofie avatar Jun 08 '21 12:06 asrofie

Ref, https://github.com/codeigniter4/CodeIgniter4/pull/6910#issuecomment-1340801335

kenjis avatar Dec 07 '22 11:12 kenjis