On Mon, May 24, 2021 at 12:06 PM Larry Garfield <la...@garfieldtech.com> wrote:
> On Mon, May 24, 2021, at 10:57 AM, Matthew Weier O'Phinney wrote: > > You're aware we have constants defined already in the > > fig/http-message-util library, right? Couldn't we just add an enum > > later, once 8.1 is ready? > > > > (I'd argue that, in general, the *-util packages are a good place for > these.) > > I am unsurprised to learn it. :-) > > For HTTP-related enums, that may be a good place to put it. However, > making them their own package may be helpful for those not already using > PSR-7. (Or, maybe we do want to put it in that package to encourage people > to use PSR-7? Interesting question.) Currently, http-message-util only has a requirement on PHP, not on psr/http-message. It's defining interfaces with constants for status codes and request methods only. That's not to say it would NEVER depend on psr/http-message, but the idea behind it has been primarily to provide a vendor-neutral package for common HTTP-related concerns, which is why I suggested it here. I see good arguments for having them separate as well. It's hard for me to gauge which direction would have greatest impact. > The current PSRs (naturally) don't use any enums themselves, either. > > There's likely other enums that it makes sense to have a single definition > of, but don't fit neatly into a single existing PSR/util package. > > -- > Larry Garfield > la...@garfieldtech.com > > -- > You received this message because you are subscribed to the Google Groups > "PHP Framework Interoperability Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to php-fig+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/php-fig/b78ce3af-6a01-43fe-93af-83900665358b%40www.fastmail.com > . > -- Matthew Weier O'Phinney mweierophin...@gmail.com https://mwop.net/ he/him -- You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAJp_myV7sjREkt65yiT4uLwU5-%3D4nSDvghP%3DkLVgvaE9cJEHDQ%40mail.gmail.com.