Docs regarding Transports are not correct
https://docs.sentry.io/platforms/php/configuration/transports/ seems quite wrong instructions for v3.2.2...
Can you specify which part?
Everything! We could't make it run with this section and had to recode quite everything. The docs seem to be OK for Version 2 but NOT version 3 of php SDK.
Example:
Does not work with V3:
$httpClientFactory = new HttpClientFactory(
UriFactoryDiscovery::find(),
MessageFactoryDiscovery::find(),
StreamFactoryDiscovery::find(),
HttpAsyncClientDiscovery::find(),
'sentry.php',
'3.3'
);
This code works:
$httpClientFactory = new HttpClientFactory(
Psr17FactoryDiscovery::findUriFactory(),
Psr17FactoryDiscovery::findResponseFactory(),
Psr17FactoryDiscovery::findStreamFactory(),
HttpAsyncClientDiscovery::find(),
'sentry.php',
'3.3'
);
OR
return new HttpTransport($options, $this->clientFactory->create($options),
MessageFactoryDiscovery::find());
should be something like this
return new HttpTransport(
$options,
$this->clientFactory->create($options),
Psr17FactoryDiscovery::findStreamFactory(),
Psr17FactoryDiscovery::findRequestFactory(),
new PayloadSerializer(),
);
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
Doc seems to have been updated. Is it fine now?
AFAICT this still needs to be fixed. The documentation was last updated the day before this issue was filed: https://github.com/getsentry/sentry-docs/commits/master/src/platforms/php/common/configuration/transports.mdx
@Jean85 AFAICT this is still not correct and all info is version for 2.x => https://docs.sentry.io/platforms/php/configuration/transports/
Version 4 of the PHP SDK did change the entire HTTP client implementation. Closing, as no longer needed.