Review main Merged

61567[FEATURE] Provide implementation for PSR-18 HTTP Client

Benjamin Franzke CR +2 V +2 Hard +577 −26 updated 09/24/19, 08:32

Commit message

The implementation of the PSR-18 ClientInterface is provided
as an adapter to the existing GuzzleHTTP Client. Therefore
existing configuraton settings will be reused.

As our current Guzzle wrapper (RequestFactory->request)
has support for passing custom guzzle per-request options,
we do not deprecate this method but add the PSR-18 implementation
as a more generic alternative.

Once GuzzleHTTP supports PSR-18 natively we can (and will)
drop our adapter and point to Guzzles native implementation
in our dependency injection configuration.
Therefore, this adapter is marked as internal and extensions
are being instructed to depend on the PSR-18 interfaces
only.

composer require psr/http-client:^1.0

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
    • Benni Mack +1
  • Verified V +2 Done
    • Anja Leichsenring +2
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 12

Review log 1422

  1. Benjamin Franzke uploaded patch set 1 08/28/19, 09:36

  2. Benjamin Franzke uploaded patch set 2 08/28/19, 09:39

  3. TYPO3com voted on patch set 1 V -1 08/28/19, 09:46 Completed build in 13s on Wed, 28 Aug, 09:46 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35884

  4. TYPO3com voted on patch set 2 V -1 08/28/19, 09:46 Completed build in 20s on Wed, 28 Aug, 09:46 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35885

  5. Benjamin Franzke uploaded patch set 3 09/20/19, 20:30

  6. TYPO3com voted on patch set 3 V +1 09/20/19, 20:39 Completed build in 08m 40s on Fri, 20 Sep, 08:39 PM Test Summary: 47739 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36616

  7. Benjamin Franzke uploaded patch set 4 09/21/19, 12:13

  8. TYPO3com voted on patch set 4 V +1 09/21/19, 12:21 Completed build in 08m 09s on Sat, 21 Sep, 12:21 PM Test Summary: 47767 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36618

  9. Benjamin Franzke uploaded patch set 5 09/23/19, 13:53

    Rebased
  10. TYPO3com voted on patch set 5 V +1 09/23/19, 14:20 Completed build in 24m 09s on Mon, 23 Sep, 02:20 PM Test Summary: 47767 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36688

  11. Markus Klein commented on patch set 5 09/23/19, 16:14

    NetworkException.php:38

    why do we need this function?

    Feature-89216-ProvideImplementationForPSR-18HTTPClient.rst:4

    This sounds a bit strange for a documentation header. I would suggest: Implementation of a PSR-18 compatible HTTP client
  12. Benjamin Franzke uploaded patch set 6 09/23/19, 17:48

  13. Benjamin Franzke commented on patch set 6 09/23/19, 17:51

    NetworkException.php:38 Reply Unresolved

    We need it to fullfill the getRequest method of PSR-18's NetworkExceptionInterface: https://www.php-fig.org/psr/psr-18/#networkexceptioninterface Guzzles ConnectException base class method RequestException::getRequest() does not fullfill the interface as it doesn't have a return type declaration.

    Feature-89216-ProvideImplementationForPSR-18HTTPClient.rst:4 Reply Unresolved

    We've got quite some mixture in documentation files, anyway, you are right, this sounds a bit strange. I've changed the header to "PSR-18 HTTP Client Implementation".
  14. TYPO3com voted on patch set 6 V +1 09/23/19, 17:59 Completed build in 11m 02s on Mon, 23 Sep, 05:59 PM Test Summary: 47765 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36704

  15. Björn Jacob commented on patch set 6 09/23/19, 20:09

    Some small nitpicks :)
    "deprecate this"
    "Therefore,"

    Feature-89216-PSR-18HTTPClientImplementation.rst:33

    Maybe better: "A PSR-7 request object" or "PSR-7 request objects".

    Feature-89216-PSR-18HTTPClientImplementation.rst:41

    Maybe better "it".
  16. Benjamin Franzke commented on patch set 6 09/23/19, 20:38

    Thank you, the next patchset fixes those issues.

    Reply

    sh*t, already fixed this locally, but forget to push :| Fixed now.

    Reply

    Ack

    Feature-89216-PSR-18HTTPClientImplementation.rst:33 Reply

    Done

    Feature-89216-PSR-18HTTPClientImplementation.rst:41 Reply

    Ack
  17. Benjamin Franzke uploaded patch set 7 09/23/19, 20:39

  18. TYPO3com voted on patch set 7 V -1 09/23/19, 20:48 Completed build in 09m 36s on Mon, 23 Sep, 08:48 PM Test Summary: 47524 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36710

  19. TYPO3com voted on patch set 7 V +1 09/23/19, 21:44 Completed build in 09m 44s on Mon, 23 Sep, 09:44 PM Test Summary: 47765 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36711

  20. Benni Mack voted on patch set 7 V +1 CR +1 09/24/19, 07:58

  21. Anja Leichsenring voted on patch set 7 V +2 CR +2 09/24/19, 08:32

  22. Anja Leichsenring merged patch set 8 09/24/19, 08:32