Download the PHP package contenir/contenir-errors without Composer

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

contenir/contenir-errors

Formerly contenir/errors; the old package is abandoned in favour of this one.

Continuous Integration codecov

Framework-agnostic admin-authored error-page content for Contenir CMS.

The CMS lets an operator author per-status error pages (404, 500, 403, …). The consuming Site (Mezzio, Laminas MVC, anything else) reads those pages on every error and replaces the framework's default rendering with on-brand content.

This package provides the domain: an immutable per-status value plus a repository interface, with file-based and in-memory implementations. Framework-specific listeners and middleware come from sibling packages (e.g. contenir/contenir-errors-laminas-mvc).

Requirements

The 0.x releases, which support PHP 8.1, remain available from the 0.x branch and v0.* tags; see UPGRADE-2.0.md.

Installation

Usage

ErrorPage

An immutable (readonly) value for one HTTP status:

Listeners treat an empty page as absent and leave the framework's default rendering alone.

The body is expected to be a sanitized HTML fragment: inline elements only, no scripts or styles. Sanitization is the writer's responsibility; readers render it raw and trust the contract.

ErrorPageRepositoryInterface

Method Returns Notes
get(int $status) ?ErrorPage null when the status has no page
all() array<int, ErrorPage> indexed by status code
save(ErrorPage $page) void replaces any page for the same status; throws RuntimeException on failure
delete(int $status) void a no-op for an unknown status; throws RuntimeException on failure

Implementations treat a missing or unreadable backing store as "no configured pages" rather than throwing, so first-run and permission edge cases never crash a Site. Write failures do throw, so the admin UI can report them.

Repository\FileRepository

Reads and writes a PHP-array config file:

The file follows the Laminas/Mezzio config-namespacing convention, so it can sit in config/autoload/ and be merged into the application config:

Repository\InMemoryRepository

Holds pages in memory. It ships in src/ so consumers can use it in their own tests, and so an adapter can build a repository from merged config:

The constructor re-indexes the pages it is given by their status.

Development

The QA toolchain is contenir/contenir-qa-tools. Mago is a standalone binary, installed separately (brew install mago).

License

MIT. See LICENSE.


All versions of contenir-errors with dependencies

PHP Build Version
Package Version
Requires php Version ~8.3.0 || ~8.4.0 || ~8.5.0
contenir/contenir-config Version ^2.1
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 contenir/contenir-errors contains the following files

Loading the files please wait ...