Download the PHP package finntenzor/think-report without Composer

On this page you can find all versions of the php package finntenzor/think-report. 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 think-report

think-report

A simple reporter for ThinkPHP v5.1 基于ThinkPHP v5.1的简易错误报告工具

你是否遇到上线的项目需要debug,但是又因为打开debug配置等同于让自己的应用“裸奔”而苦恼?那么你一定需要试试这个。

如何使用

使用异常处理

在你的ThinkPHP项目中,找到config/app.php。在大概最后一行的位置找到“exception_handle”配置,将它修改为“\\finntenzor\\report\\ExceptionHandle”,如:

修改路由

在你的ThinkPHP项目中,找到route/route.php。在你需要的位置添加如下代码:

它某种意义上等价于自动编写一个Group以及对应的两个路由:

因此你可以很轻松地将它和其他路由混合在一起:

如上代码所示,你可以访问/app/reports来查看所有的错误报告,其中的各项报告链接会自动处理。

并且,它返回了ThinkPHP的返回值,你还可以将它跟中间件等其他功能结合在一起。

取代默认响应格式

错误报告工具启动后,默认会保存所有的错误报告到项目目录/runtime/reports下,但是仅进行保存而不会将错误返回给用户显示,给用户/前端的将会是一段默认的json,格式如下:

如果你需要修改为其他格式,你可以利用ThinkPHP的容器绑定来修改格式:

  1. 首先你需要创建一个类实现ResponseBuilder,例如:

  2. 在你的ThinkPHP项目中找到application/provider.php,在其中将ResponseBuilder接口绑定到你自己的实现上:

添加异常忽略类型

ThinkPHP默认忽略了“\think\exception\HttpException”类型的异常,在此工具中,如果需要忽略更多类型的异常,则可以使用如下代码修改:

这段代码需要放在初始化阶段加载的php文件中,例如/application/common.php


All versions of think-report with dependencies

PHP Build Version
Package Version
No informations.
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 finntenzor/think-report contains the following files

Loading the files please wait ....