Hi,
I can’t make Sentry works with CakePhp, does anybody around succeed to configure Sentry for this framework ? I would appreciate a little help.
I’ve tried some CakePhp plugins, but they seem outdated comparing to PHP SDK version and I prefer a clean setup with official SDK.
I added Sentry init in my config/bootstrap.php
file:
/*
* Register application error and exception handlers.
*/
$isCli = PHP_SAPI === 'cli';
if ($isCli) {
(new ConsoleErrorHandler(Configure::read('Error')))->register();
} else {
Sentry\init(['dsn' => '*****' ]);
}
But here is the error I’m getting when I try to access my web app:
Fatal error: Uncaught Http\Discovery\Exception\DiscoveryFailedException: Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors - Puli Factory is not available - No valid candidate found using strategy "Http\Discovery\Strategy\CommonClassesStrategy". We tested the following candidates: . - No valid candidate found using strategy "Http\Discovery\Strategy\CommonPsr17ClassesStrategy". We tested the following candidates: Nyholm\Psr7\Factory\Psr17Factory, Zend\Diactoros\ResponseFactory, Http\Factory\Diactoros\ResponseFactory, Http\Factory\Guzzle\ResponseFactory, Http\Factory\Slim\ResponseFactory. in /Applications/MAMP/htdocs/winalist/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php:41 Stack trace: #0 /Applications/MAMP/htdocs/winalist/vendor/php-http/discovery/src/ClassDiscovery.php(79): Http\Discovery\Exception\DiscoveryFailedException::create(Array) #1 /Applications/MAMP/htdocs/winalist/vendor/php-http/discovery/s in /Applications/MAMP/htdocs/winalist/vendor/php-http/discovery/src/ClassDiscovery.php on line 210
Thanks.