Download the PHP package minbaby/hyperf-sentry without Composer

On this page you can find all versions of the php package minbaby/hyperf-sentry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hyperf-sentry

hyperf sentry

WARNING

  1. 原版sentry更新比较多,如果需要可以自行 fork 然后修改。

  2. 新版升级,改动较多
    • 使用 class_map 重写 \Sentry\SentrySdk
    • 使用 Aspect,拦截单例,Minbaby\HyperfSentry\Aspect\SingletonHookAspect::class

已知问题

  1. sentry/sdk 依赖的 http 类库报错

    报错 Argument 1 passed to swoole_curl_setopt() must be an instance of Swoole\Curl\Handler, null given

    • vendor/sentry/sentry/src/Transport/HttpTransport.php:110
    • vendor/symfony/http-client/Response/CurlResponse.php:74

    解决方案:

    1. 编译 swoole 的时候, 需要启用 --enable-swoole-curl 参数,
    2. 关闭CURL HOOK,修改 SWOOLE_HOOK_FLAGS to SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_CURL

    说明:

    1. 从 v4.5.4 版本起,SWOOLE_HOOK_ALL 包括 SWOOLE_HOOK_CURL (这种是不完全hook,在某些场景下会报错)
    2. 从 v4.6.0 版本起,启用--enable-swoole-curl后, SWOOLE_HOOK_ALL 包括 SWOOLE_HOOK_NATIVE_CURL

      说明

sentry/sdk 类库经过更新迭代,当前版本已经非常现代化了(3.0+)。再辅以 Hyperf 2.0+ 强大的 AOP功能,除了少部分单例和辅助方法,基本已经不需要特殊修改了。

版本

主版本和 hyperf 保持一致

version hyperf version 说明
0.1.* 1.1.* -
2.0.* 2.0.* -
2.2.* >=2.1.* 本次更新移除 hyperf 包依赖
3.0.* >=3.0.* 因为 Hyperf\Utils\Context => Hyperf\Utils\Context

使用

  1. 安装

  2. 配置文件

    发布: php bin/hyperf.php vendor:publish minbaby/hyperf-sentry

    然后在 .env 中添加 SENTRY_DSN=

  3. 注册 SentryExceptionHandler

  4. 执行 php bin/hyperf.php sentry:test

参考


All versions of hyperf-sentry with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
sentry/sdk Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package minbaby/hyperf-sentry contains the following files

Loading the files please wait ....