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

Move Non PSR7 Methods to Decorator #50

Closed
ghost opened this issue May 30, 2018 · 4 comments
Closed

Move Non PSR7 Methods to Decorator #50

ghost opened this issue May 30, 2018 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented May 30, 2018

I would like to suggest we make a pure PSR7 implementation and move any non-PSR7 methods to a decorator classes labelled something like SlimRequestDecorator.

Any of the immutable methods should of course clone properly down through the involved classes.

This would allow us to create pure PSR objects if needed, and add functionality like non-PSR methods and our static factory methods and media type parsers within the decorator.

Feedback on this suggestion would be appreciated.

@akrabat
Copy link
Member

akrabat commented Jul 25, 2018

I'm not adverse to this as long as Slim\Http\Request & friends are the decorator classes.

/cc @danopz

@danopz
Copy link
Member

danopz commented Jul 30, 2018

Sounds like both oppinions doesn't real match.

But after thinking a bit about it my oppinion is to just keep the methods as is. The reason is if we would add some decorator class/static helper/whatever we would just add complexity without a real gain.
If we just keep the methods one building apps using Slim\Http is able to directly use them, others who are using PSR-7 just don't care about them.

@ghost
Copy link
Author

ghost commented Jul 31, 2018

Ok, I think an interface of the Slim methods would be beneficial at least; one that extends the Psr interface to aid in type declaration.

@akrabat
Copy link
Member

akrabat commented Oct 30, 2018

Done. #67

@akrabat akrabat closed this as completed Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants