1. Go to this page and download the library: Download nxsspryker/sentry library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nxsspryker / sentry example snippets
namespace Pyz\Service\NxsErrorHandler;
use NxsSpryker\Service\NxsErrorHandler\NxsErrorHandlerDependencyProvider as NxsSpyNxsErrorHandlerDependencyProvider;
use NxsSpryker\Service\Sentry\Business\Model\Handler\ErrorHandler;
use NxsSpryker\Service\Sentry\Business\Model\Handler\ExceptionHandler;
use NxsSpryker\Service\Sentry\Business\Model\Handler\ShutdownHandler;
class NxsErrorHandlerDependencyProvider extends NxsSpyNxsErrorHandlerDependencyProvider
{
/**
* @return array
*/
protected function getErrorHandlerPlugins(): array
{
return [
new ErrorHandler()
];
}
/**
* @return array
*/
protected function getExceptionHandlerPlugins(): array
{
return [
new ExceptionHandler()
];
}
/**
* @return array
*/
protected function getShutdownHandlerPlugins(): array
{
return [
new ShutdownHandler()
];
}
}
namespace Pyz\Yves\ShopApplication;
use NxsSpryker\Yves\SentryWidget\Plugin\Provider\SentryWidgetPlugin;
use SprykerShop\Yves\ShopApplication\ShopApplicationDependencyProvider as SprykerShopApplicationDependencyProvider;
class ShopApplicationDependencyProvider extends SprykerShopApplicationDependencyProvider
{
/**
* @return string[]
*/
protected function getGlobalWidgetPlugins(): array
{
return [
// ...
SentryWidgetPlugin::class
];
}
}