Hello PSR-18 WG,

According to our Naming Conventions bylaw, section 1
<https://www.php-fig.org/bylaws/psr-naming-conventions/>: Interfaces MUST
be suffixed by "Interface".
I know that this style has been contested before, but we have an
established convention in place, so we should stick to it.
Anyone who doesn't like this can circumvent it via import aliases (which I
do all the time, by the way).

On a different, opinionated, note, I don't particularly like the main
method signature: public function sendRequest(RequestInterface $request):
ResponseInterface;

The resulting consumer code would look like:

$client->sendRequest($request);

which IMHO is redundant and harder to read; I would much more prefer just:

$client->send($request);

The parameter is explicitly typed already, so I don't think that the
additional hint to "Request" is needed in the name of the method.

This is obviously a small detail, and it can probably be argued either way;
IIRC it has even been discussed already within the WG, but there are no
references in the metadoc, so I'd like the WG to either rename the method
or add some sound reasoning to the metadoc about the current, more verbose,
name.

That's my 2c!

Thanks for your time,
Stefano

Il giorno mer 22 ago 2018 alle ore 21:05 Oscar Otero <oscarot...@gmail.com>
ha scritto:

> Ah, got it!
> And, according with the php docs: PHP classes cannot implement the
> *Throwable* interface directly, and must instead extend Exception
> <https://php.net/manual/en/class.exception.php>.
> Thanks for clarification.
>
>
> El 22 ago 2018, a las 21:00, Woody Gilk <woody.g...@gmail.com> escribió:
>
> On Wed, Aug 22, 2018 at 1:59 PM Oscar Otero <oscarot...@gmail.com> wrote:
>
>
> Hello.
> I just saw the proposed specification and would like to congratulate to
> the working group for the great job. I only have a doubt related with the
> ClientException. Why does it extends to Throwable? In my mind it makes more
> sense to extend to Exception, because it represents an exception, not an
> error or other throwable class. This could also cause confusion in a
> try/catch that only catches Exception. I’m sure this was discussed and
> there’s a good reason for that, just I’m curious about it.
>
>
> The ClientException is an interface, and Throwable is an interface.
> Exception is a class and an interface cannot extend a class.
>
> I have to assume this is the reason.
> --
> Woody Gilk
> https://shadowhand.me
>
>
> Thanks!
> Oscar Otero
>
> El 22 ago 2018, a las 20:43, Sara Golemon <p...@golemon.com> escribió:
>
> As of today, with a unanimous vote from the working group, we formally
> begin the REVIEW phase of the proposed PSR-18 (HTTP Client) specification.
> The proposed specification is in the fig-standards repository at the
> following locations:
>
> - Specification:
> https://github.com/php-fig/fig-standards/blob/master/proposed/http-client/http-client.md
> - Metadocument:
> https://github.com/php-fig/fig-standards/blob/master/proposed/http-client/http-client-meta.md
>
> During the Review phase, acceptable changes to the specification include
> wording, typographical fixes, and clarifications. If you feel major changes
> are necessary, please bring your arguments to the list under this thread.
> If any major changes are considered, we will return to the Draft phase.
>
> The Review period will end no sooner than 19 Sep 2018 at 11:59pm.  At that
> time, if the working group can demonstrate two viable trial
> implementations, and no need for major changes, I will call for an
> Acceptance Vote.
>
> -Sara Golemon
> PSR-18 Sponsor
>
> --
> 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 post to this group, send email to php-fig@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/php-fig/3e454eb9-5088-40fb-b280-1d82725b512c%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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 post to this group, send email to php-fig@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/php-fig/C5077FA0-7DF9-4763-816D-1BB6ACAF4684%40gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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 post to this group, send email to php-fig@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/php-fig/CAGOJM6KTyb3pYaA0LizsFWfrb-zgASAk0kPDJ_b-3%3DoveEdYjQ%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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 post to this group, send email to php-fig@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/php-fig/41A79104-E56E-4E11-9691-E3D342A9199E%40gmail.com
> <https://groups.google.com/d/msgid/php-fig/41A79104-E56E-4E11-9691-E3D342A9199E%40gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CAFojS1tOnNsEp6JajY-mEcef4TmWP0zRDnWHmoYYkMWj5eY5NQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to