Download the PHP package script-development/kendo-report-tool without Composer
On this page you can find all versions of the php package script-development/kendo-report-tool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download script-development/kendo-report-tool
More information about script-development/kendo-report-tool
Files in script-development/kendo-report-tool
Package kendo-report-tool
Short Description Laravel client library that submits user reports into a kendo project's report endpoint.
License MIT
Informations about the package kendo-report-tool
kendo-report-tool
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
The KendoReportToolServiceProvider is auto-discovered via Laravel package discovery. Publish the config if you want to tune it:
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). |
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():
Signature
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:
The server accepts up to 5 image files (jpg/jpeg/png/bmp/gif/tiff/webp, ≤3 MB each). The client enforces the count (KendoReports::MAX_FILES): a call with more files is refused before anything is sent, with a ReportSubmissionException whose errors() is keyed by files. It also enforces the size (KendoReports::MAX_FILE_BYTES, 3,072,000 bytes — the server's 3mb) and refuses a path that is not a readable file, keyed by files.{index}; a file is sized before it is read, so an oversized one never enters memory. The type is checked by the server.
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:
The exception tells the failure classes apart:
$e->status() |
$e->errors() |
Meaning |
|---|---|---|
422 |
field-keyed, e.g. ['title' => [...]] |
The payload was invalid — fix the input and resubmit. |
0 |
['files' => [...]] |
Too many files; refused locally, nothing was sent. |
0 |
['files.1' => [...]] |
That file is over MAX_FILE_BYTES or not a readable file; refused locally, nothing was sent. |
401 / 403 |
[] |
The token or project setup is wrong — an operations problem, no resubmission fixes it. |
5xx |
[] |
kendo failed; a later retry may succeed. |
0 |
[] |
Transport failure (timeout, unreachable host). |
A missing or malformed kendo_url, project or token throws ScriptDevelopment\KendoReportTool\Exceptions\ReportConfigurationException before anything is sent — also when swallowing, because a deployment that can never send is not a failed send. It is not a ReportSubmissionException.
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
CI runs, on PHP 8.4 and 8.5: composer validate --strict · composer audit · composer format:check · composer phpstan · composer test:coverage (the Pest suite with a coverage floor). Run those to reproduce CI locally; composer test and composer format are convenience scripts no workflow runs. main is always release-ready; PRs update CHANGELOG.md under [Unreleased].
All versions of kendo-report-tool with dependencies
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^11.0 || ^12.0 || ^13.0