script-development/kendo-report-tool
Composer 安装命令:
composer require script-development/kendo-report-tool
包简介
Laravel client library that submits user reports into a kendo project's report endpoint.
README 文档
README
Laravel client library for submitting user reports/feedback into a kendo project — config, Bearer auth, multipart image upload, and a surfaced send result, installable via Composer across Script Development Laravel territories.
Why
kendo ships a reports endpoint (POST /api/projects/{project}/reports) that accepts machine submissions authenticated with a report:create project token. This library is the secure server-side transport: a consuming app's backend holds the token (which must never ship to the browser) and relays a report — title, description, optional author name, optional screenshots — from the app's own feedback form into the kendo project.
Unlike kendo-error-tracker (auto-captured, fire-and-forget exception telemetry), a report is an explicit human submission: the send is synchronous and its outcome is surfaced, so the app can tell the user whether it sent.
Installation
composer require script-development/kendo-report-tool
The KendoReportToolServiceProvider is auto-discovered via Laravel package discovery. Publish the config if you want to tune it:
php artisan vendor:publish --tag=report-tool-config
Configuration
Set the environment variables (the config reads REPORT_TOOL_*):
| Env var | Config key | Description |
|---|---|---|
REPORT_TOOL_KENDO_URL |
kendo_url |
Base URL of your kendo tenant — https://{tenant}.kendo.dev. |
REPORT_TOOL_PROJECT |
project |
The kendo project id that owns the reports (the {project} route-key; kendo binds it by id). |
REPORT_TOOL_TOKEN |
token |
A kendo project token carrying the report:create ability (Bearer). |
REPORT_TOOL_CONNECT_TIMEOUT |
connect_timeout |
Seconds to wait while connecting to the kendo host (default 2). |
REPORT_TOOL_TIMEOUT |
timeout |
Total seconds to wait for the POST (default 5). |
REPORT_TOOL_SWALLOW |
swallow |
false (default) surfaces a failed send to the caller; true swallows it (telemetry mode). |
REPORT_TOOL_KENDO_URL=https://script.kendo.dev REPORT_TOOL_PROJECT=1 REPORT_TOOL_TOKEN=your-project-token
Preconditions
- The consuming kendo project must have the
report-toolfeature active — otherwise the endpoint rejects the submission. - The token must be minted under that project and carry the
report:createability. A token used against a different project's route is rejected (422).
Minting a project token
- Open the kendo project's API token settings.
- Create a project token — it carries the
report:createability. - Copy the token into
REPORT_TOOL_TOKEN.
A submission made with a report:create token is recorded with source = Api; the human author you pass is surfaced via author_name (the token owner is not treated as the creator).
Usage
Resolve KendoReports from the container and call submit():
use ScriptDevelopment\KendoReportTool\KendoReports; $report = app(KendoReports::class)->submit( title: 'Checkout button unresponsive', description: "Clicking \"Pay\" does nothing on the cart page.", authorName: 'Jane Customer', // optional — surfaced as the report's author ); // $report is the decoded 201 body (id + fields) of the created report. echo $report['id'];
Signature
public function submit( string $title, string $description, ?string $authorName = null, array $files = [], ): ?array
submit() POSTs a multipart request to {kendo_url}/api/projects/{project}/reports with the Bearer report:create token, then:
201 Created→ returns the decoded report body (array<string, mixed>—idplus the report's fields).- any other outcome — a non-
201status (401/403token,422validation or token/project mismatch,5xx) or a transport-level failure (timeout, unreachable host) → throwsScriptDevelopment\KendoReportTool\Exceptions\ReportSubmissionException, unlessreport-tool.swallow(REPORT_TOOL_SWALLOW) istrue, in which case the failure is logged to the local PHPerror_logandnullis returned.
A null author is omitted from the request rather than sent as an empty part.
Attaching screenshots
Pass $files as a list of Illuminate\Http\UploadedFile instances (e.g. straight from a feedback-form request) or local file paths. Each becomes a files[] multipart part:
use Illuminate\Http\Request; use ScriptDevelopment\KendoReportTool\KendoReports; public function store(Request $request): void { app(KendoReports::class)->submit( title: (string) $request->input('title'), description: (string) $request->input('description'), authorName: $request->user()?->name, files: $request->file('screenshots', []), // UploadedFile[] — or string paths ); }
The server accepts up to 5 image files (jpg/jpeg/png/bmp/gif/tiff/webp, ≤3 MB each).
Surfaced failure vs. swallow
Because a report has a human waiting on confirmation, submit() surfaces a failed send by default (swallow=false) so the app can tell the user it did not send — contrast kendo-error-tracker, which always swallows. Catch the exception to drive UX:
use ScriptDevelopment\KendoReportTool\Exceptions\ReportSubmissionException; try { app(KendoReports::class)->submit($title, $description); // tell the user it sent } catch (ReportSubmissionException $e) { // tell the user it failed; $e->getMessage() distinguishes // a rejection ("HTTP <status>") from a transport failure. }
Set REPORT_TOOL_SWALLOW=true to flip to telemetry-style swallow-on-failure (logs to error_log, returns null) when you do not want the caller to handle failures.
Contributing
composer test · composer phpstan · composer format:check — all three gate CI on PHP 8.4 and 8.5. main is always release-ready; PRs update CHANGELOG.md under [Unreleased].
script-development/kendo-report-tool 适用场景与选型建议
script-development/kendo-report-tool 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 117 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 06 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「reports」 「feedback」 「kendo」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 script-development/kendo-report-tool 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 script-development/kendo-report-tool 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 script-development/kendo-report-tool 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Symfony2 Bundle for Bootstrap MaxLength.js - An visual feedback indicator for the MaxLength attribute
TYPO3 Feedback Extension - The TYPO3 Feedback Extension is a great tool for gathering feedback from visitors or customers on your website. With the All In One TYPO3 Feedback extension, website admin can easily add feedback forms in various styles to their website, allowing them to collect valuable i
Export Craft data as CSVs in a snap
Library for easily converting reports into various HTTP responses
The Reportico Reporting Designer and Framework.
With feedback.js plugin repository and html2canvas with layout Bootstrap 3
统计信息
- 总下载量: 117
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 36
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-08