auraphp/Aura.Web

Extract "Accept" classes to their own package?

harikt opened this issue ยท 10 comments

Accept can be used with routing also.

So probably Accept class can be split to a separate package itself.

Will it be hard if we move the Accept to another package ?

  • Problems are namespace needs to be changes.
  • The way we called the method needs changed.

These are the open-source projects I have found, some may be using for closed source projects. So I am not aware of them if so.

@jblotus : https://github.com/jblotus/PlanningPoker

@thedigital : https://github.com/thedigital/auraphp-rest

@yamacraft : https://github.com/yamacraft/bearsunday.dev

@koriym : https://github.com/koriym/BEAR.Package

@mosiyash : https://github.com/mosiyash/generator

@jeichorn : https://github.com/jeichorn/PHP-Developer-Example

If you guys have any thoughts on the issue let us know.

@pmjones can describe more on this issue.

Sorry for tagging and disturbing all of you.

/ cc @auraphp/code-team and contributors @jakeasmith , @jelofson , @ralouphie , @dhrrgn , @garoevans assuming you may have some private projects.

We're using the Accept functionality internally but with enough heads up its not a big deal to change some references. That said, I'm not sure I see the point in splitting it out. Its tied pretty tightly to the concept of a web request.

Its tied pretty tightly to the concept of a web request.

Yeah, that's why it was there in the first place. More specifically, the issue is with the act of negotiating the content type. Stick with me here:

The act of negotiation is not quite a Request issue, but neither is it quite a Response issue. It is more of a transitional issue that occurs while building a Response based on the Request. It is the transitional nature of specifically the negotiation activity that makes me think it might be better as its own package. That is, Request will still have a way to tell you what the Accept header values are, but the negotiation stuff specifically would be extracted to a separate package.

Does that make sense?

Ah, okay. I see where you're coming from now. Makes sense to me.

@pmjones I have a thought here.

If you split the Accept to a different place, we should also make a bundle at the same time. So people who are using Aura.Web as earlier could make use of the bundle without much breaks, part from a few namespace.

Hi everyone, especially @EquisoftDev @thedigital @jeichorn @jblotus @jacobemerick @Tuxion @tailwindsllc @thatsamguy @cdspuglia @mosiyash @koriym @yamacraft @kumamidori --

The Accept functionality has been split out to Aura.Accept: https://github.com/auraphp/Aura.Accept

I am going to remove the Accept functionality from Aura.Web; you can see what the reduced package will look like here: https://github.com/auraphp/Aura.Web/tree/noaccept

This is your last chance to speak up and let me know if you have any problems with this!

๐Ÿ‘

๐Ÿ‘

๐Ÿ‘

All righty then! As of a few moments ago, the Accept classes have been extracted to Aura.Accept. Thanks for the assistance, all!