Download the PHP package timefrontiers/php-instance-error without Composer

On this page you can find all versions of the php package timefrontiers/php-instance-error. 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 php-instance-error

TimeFrontiers PHP Instance Error

InstanceError is the standard reader and access-rank filter for error collections produced by TimeFrontiers\Helper\HasErrors. It preserves the established five-element tuple and context grouping used across TimeFrontiers packages.

Installation

The package requires timefrontiers/php-error-log, so the public log() API is available after every normal Composer installation. timefrontiers/php-session remains optional; without a valid global session, extraction defaults to guest rank.

Canonical error shape

Every accepted error is a five-element list:

Errors are grouped by a non-empty context:

Malformed contexts and tuples are rejected during extraction. In particular, a missing or invalid minimum rank never defaults to guest. Safe integer-like strings in numeric tuple positions are normalized to integers; fields are not invented when missing.

Extracting errors for display

Objects using HasErrors::getErrors() are supported directly. A public legacy $errors property is used only when there is no callable getter.

get('', true) does not flatten across contexts. It returns grouped message lists:

Helper methods operate only on entries visible to the resolved rank:

Rank filtering is defense in depth, not secret scrubbing. Public responses must not contain SQL, stack traces, absolute paths, provider payloads, credentials, tokens, cookies, authorization headers, card data, or raw driver messages.

Rank resolution

The effective visibility rank is resolved in this order:

  1. An explicit AccessRank constructor override.
  2. An explicit integer constructor override.
  3. true, which deliberately bypasses filtering with PHP_INT_MAX.
  4. The callable global $session->access_rank() method.
  5. A public legacy global $session->access_rank property.
  6. AccessRank::GUEST->value.

Session method/property results may be an AccessRank, integer, or integer-like string. Invalid, negative, inaccessible, or throwing session values fail to guest. Future integer ranks are not capped; the current enum includes AccessRank::OWNER at rank 14.

Explicit rank overrides, the true bypass, and all() are trusted server-side technical/debug operations. Never populate an override from a query parameter, form field, header, token claim, or any other untrusted request input. Never return all() or unrestricted output in a public response.

Technical logging

log() applies the extractor's current visibility rank and writes one ResponseStatus::PROCESS_ERROR record per selected context. Each log detail keeps the tuple's own code separate from the response-status prefix.

A supplied context that does not exist, a failed write, or a logger exception returns false and adds a safe developer-visible diagnostic to the extractor's own HasErrors collection.

Logging does not make secrets safe to store. The logger protects its record delimiters, but application and package code must prevent credentials, tokens, card data, raw provider payloads, and other secrets from entering error messages in the first place.

Adding canonical errors

put() is a programmer-facing API. It throws InvalidArgumentException for a blank context or malformed tuple.

Using HasErrors

The current protected _addError() signature is:

Development

Dependencies

License

MIT


All versions of php-instance-error with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
timefrontiers/php-core Version ^1.0
timefrontiers/php-error-log Version ^1.0
timefrontiers/php-has-errors Version ^1.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 timefrontiers/php-instance-error contains the following files

Loading the files please wait ...