Download the PHP package hop-top/kit without Composer

On this page you can find all versions of the php package hop-top/kit. 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 kit

php

experimental PHP client SDK.

Modules

URI facade

The experimental SDK exposes a thin facade over hop-top/cite so kit callers can use the shared URI contract without depending on kit-specific parsing code.

This facade intentionally delegates to hop-top/cite; it does not reimplement URI parsing, vanity handling, action routing, or handler identity.

Telemetry

The PHP SDK ships a publish-only telemetry client under the HopTop\Kit\Telemetry namespace. It mirrors the Go ground truth at go/runtime/telemetry/.

Default-denied posture

Telemetry is off by default. The PHP SDK never prompts the user; the canonical consent prompt lives in the Go CLI. Adopters drive the lifecycle with:

The PHP SDK only reads the persisted decision from $XDG_CONFIG_HOME/kit/config.yaml (default ~/.config/kit/config.yaml) at the kit.telemetry.consent partition. A pre-refactor $XDG_CONFIG_HOME/kit/telemetry.yaml (bare telemetry.consent) is honored as a read-only fallback.

What is collected

Mode Fields recorded
off nothing (no envelope created)
anon event, ts, install_id, mode, sdk
full anon fields + attrs (redacted PII / token shapes)

install_id is a SHA-256 hex digest of 32 random bytes stored at $XDG_STATE_HOME/kit/telemetry/installation_id. Rotate via kit telemetry reset or InstallId::rotate().

Disabling

Any of these turns telemetry off:

Signal Effect
DO_NOT_TRACK=1 (or any truthy) Honored before mode resolution
KIT_TELEMETRY_MODE=off Mode resolves to Off, all events drop
KIT_TELEMETRY_CONSENT=denied Reserved override (Go CLI authoritative)
kit telemetry disable Persists state: denied in YAML

If the persisted YAML reports state: denied, Telemetry::record() short- circuits regardless of mode.

Sink selection

The transport is chosen via KIT_TELEMETRY_SINK:

Value Sink
(unset) / jsonl JsonlSink — append JSONL to a per-PID file under XDG_STATE (default; FPM-safe)
none NullSink — drop every envelope (CI / staging)
https Adopters construct HttpsSink themselves and call Telemetry::setSink() (see FPM caveat below)

JsonlSink registers a register_shutdown_function callback so envelopes are flushed even when the caller never calls Telemetry::flush(). The on- disk layout is $XDG_STATE_HOME/kit/telemetry/inbox/php-<pid>.jsonl with LOCK_EX serialization and a 10 MiB size-rotation trigger. A separate Go drain (future kit telemetry daemon) sweeps these files.

HttpsSink posts batched NDJSON to a remote ingestor. It is opt-in.

FPM caveat (HTTPS sink)

HttpsSink::flush() makes synchronous HTTPS calls. Under php-fpm a flush during a request adds the round-trip to that request's wall-clock time. The class deliberately does not auto-register a shutdown flush. In FPM the recommended pattern is:

CLI processes can safely register the shutdown flush themselves:

Redaction

Redactor applies best-effort PII / token-prefix replacement to all attributes in Full mode:

Adopters can supply a custom callback for project-specific patterns:

The custom callback's output is re-run through the default pass as defense in depth.

Bus transport

The PHP SDK is publish-only. It does not consume from any event bus. Envelopes flow PHP → JSONL/HTTPS → Go drain → bus. Adopters who need bus consumption should call the Go runtime.

Cross-references


All versions of kit with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
guzzlehttp/guzzle Version ^7.9
hop-top/cite Version ^0.2.0
jewei/typeid-php Version ^1.1
laravel/prompts Version ^0.3
symfony/console Version ^7.0
symfony/event-dispatcher Version ^7.0
symfony/yaml Version ^7.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 hop-top/kit contains the following files

Loading the files please wait ...