Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Transport Laravel Package

elastic/transport

PSR-7/17/18 HTTP transport library for Elastic PHP clients. Uses HTTPlug discovery for clients/factories and supports async via compatible PSR-18 clients (e.g., Guzzle, Symfony). Falls back to a built-in cURL client if none found.

View on GitHub
Deep Wiki
Context7
v9.0.1

Fixed a missing dependency of nyholm/psr7, moved from require-dev to require.

v9.0.0

This is a new major release that includes the following change:

  • We added a new custom HTTP client based on cURL. This client is used when elastic-transport-php does not detect any installed PSR-18 clients. This client relies on the cURL php extension that must be installed. Moreover, this client does not implement the HttpAsyncClient interface, which means you won't be able to send asynchronous requests.

If you need support for asynchronous requests, consider installing a PST-18 HTTP client like Guzzle:

composer require guzzlehttp/guzzle

or Symfony HTTP Client:

composer require symfony/http-client

We introduced this change to remove the guzzle dependency in elasticsearch-php, as discussed here.

Other than that, no BC breaks have been introduced in the 9.0.0 release.

v8.11.0

This release introduces the following changes and fixes:

  • Added Node::getLastPing and Node::getFailedPings for custom NodePool implementations with ping backoffs #35
  • Add HTTP network exception as previous exception to NoNodeAvailableException for debugging #34
  • Fixed PHP 7.4+ issue - "must not be accessed before initialization" in getLastRequest() and getLastResponse() #33
  • Fixed missing response body with guzzle PSR-7 streams #30

Thanks to @gskema, @marcing and @shyim.

v8.10.0

Added the support for OpenTelemetry

We introduced in #27 and 2be33cd the support of OpenTelemetry for the HTTP send request. At the moment, the support is only for synchronous HTTP call.

To enable the OpenTelemetry you need to set the ENV variable OTEL_PHP_INSTRUMENTATION_ELASTICSEARCH_ENABLED to true.

We added the support natively in the Transport:sendRequest() function. By default, the Transport create a span from a Tracer provider (e.g. Global) with the following attributes:

http.request.method
url.full
server.address
server.port

If the $request sent using Transport::sendRequest($request) is a PSR-7 ServerRequest we get the attribute with name otel-elastic-transport and we pass to the OTel span as additional attributes. In this way, libraries like elasticsearch-php can inject specific OTel attributes (e.g. db.operation.name).

We created an OpenTelemetry class to provide all the configuration.

v8.8.0

This release contains the following new features:

  • Support path in host connection URI #21

  • Support userInfo in host connection URI #22

v8.7.0

This release contains the following new feature:

  • Allow installation of psr/http-message v2.0 #17
v8.6.0

This release contains the following new feature:

  • Add full request and response to the log message context for better integration using Clockwork #13
v8.5.0

This release contains the following fix:

  • Fixed the full body message in debug() log for Transport #11
v8.4.0

Release created to be compatible with 8.4 Elastic clients.

  • Added meta header info for Symfony HTTP client #9
  • Added composer-runtime-api v2 for InstalledVersions #10
v8.3.0

Release created to be compatible with 8.3 Elastic PHP clients.

v8.2.0

Release created to be compatible with 8.2 Elastic PHP clients.

v7.17.0

Release created to be compatible with 7.17 Elastic PHP clients.

v8.1.0

Release created to be compatible with 8.1 Elastic PHP clients.

v8.0.1

Support of psr/log v1, 2 and 3 to fix the dependency with elasticsearch/elasticsearch a413687

v8.0.0

Finally, the 8.0.0 release.

v8.0.0-rc4
  • Added the TransportException to extends the Throwableinterface 57f0265
v8.0.0-rc3

This RC3 release introduces the OnSuccessInterface and OnFailureInterface for managing the async code with the execution of a custom function during the return of OnSuccess and during the execution of OnFailure. As default behaviour the OnSuccessDefault and OnFailureDefault does not perform any operations.

v8.0.0-rc2

This RC2 release uses httplug v2.3.0 to provide a full retry async mechanism, thanks to PR https://github.com/php-http/httplug/pull/168.

v8.0.0-rc1

This the first release candidate for 8.0.0 it contains some new features and changes with the previous 7.x Elastic PHP client.

Changes

  • the ConnectionPool namespace has been renamed in NodePool, consequently all the Connection classes has been renamed in Node
  • the previous Apache 2.0 LICENSE has been changed in MIT

New features

  • added the usage of HTTPlug library to autodiscovery PSR-18 client and HttpAsyncClient interface using Promise.
  • added the Trasnport::sendAsyncRequest(RequestInterface $request): Promise to send a PSR-7 request using asynchronous request
  • added the Transport::setAsyncClient(HttpAsyncClient $asyncClient) and Transport::getAsyncClient() functions. If the PSR-18 client already implements the HttpAsyncClient interface you don't need to use the setAsyncClient() function, it will discovered automatically
  • added the Transport::setRetries() function to specify the number of HTTP request retries to apply. If the HTTP failures exceed the number of retries the client generates a NoNodeAvailableException
v7.16.0

Release created to be compatible with 7.16 Elastic PHP clients.

v7.15.0

Release created to be compatible with 7.15 Elastic PHP clients.

v7.14.0

Release created to be compatible with 7.14 Elastic PHP clients.

v7.13.0

This is the first stable release! :tada: Release created to be compatible with 7.13 Elastic clients.

v7.12.0beta1

This is the first beta release for version 7.12.0.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport