Download the PHP package kirschbaum-development/redactor without Composer

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

Kirschbaum Redactor

Laravel Supported Versions Latest Version on Packagist Application Testing Static Analysis Code Style

Automatically redact sensitive data from arrays, objects, and strings before logging or exporting. Features a class-based strategy system with profile-based configurations, Shannon entropy detection.

This package is in active development and its API can change abruptly without any notice. Please reach out if you plan to use it in a production environment.

Quick Start

The package automatically registers the service provider and facade. Use it directly:

Core Concepts

Redaction Strategies

The package uses a class-based configuration:

  1. SafeKeysStrategy - Preserves safe keys like id, user_id
  2. BlockedKeysStrategy - Always redacts blocked keys like password, secret
  3. LargeObjectStrategy - Redacts objects/arrays exceeding size limits
  4. LargeStringStrategy - Redacts strings exceeding length limits
  5. RegexPatternsStrategy - Custom regex patterns for emails, credit cards, etc.
  6. ShannonEntropyStrategy - Detects high-entropy strings (API keys, tokens)

Profiles

Profiles provide different redaction configurations for different contexts:

Configuration

The config file (config/redactor.php) uses a class-based approach:

Wildcard Patterns

The BlockedKeysStrategy and SafeKeysStrategy support powerful wildcard patterns using the * character. This allows you to match multiple key variations without listing each one explicitly.

Basic Wildcard Usage

Wildcard Pattern Types

Contains Pattern (*word*)

Matches any key that contains the specified word anywhere:

Prefix Pattern (word*)

Matches any key that starts with the specified word:

Suffix Pattern (*word)

Matches any key that ends with the specified word:

Multi-Wildcard Patterns (word*middle*word)

Use multiple wildcards for complex patterns:

Case-Insensitive Matching

All wildcard patterns are case-insensitive by default:

Combining Exact and Wildcard Patterns

You can mix exact matches with wildcard patterns in the same configuration:

Performance Considerations

Common Use Cases

Logging Context

Laravel Logging Integration

For automatic redaction of all log entries, use the CustomLogTap with Laravel's logging configuration. In your config/logging.php, add the tap to any channel:

With this configuration, all log entries will automatically have their context data redacted before being written to logs. The tap uses the default redaction profile unless otherwise configured.

API Response Sanitization

Database Export & Auditing

PCI Compliance Example

Advanced Features

Object Handling

The package handles various object types:

Custom Strategies

Create your own redaction logic with full type safety:

Multiple Usage Patterns

Built-in Profiles

Environment Configuration

Many settings can be controlled via environment variables:

File Scanning Command

The package includes a console command to scan files and directories for sensitive content:

The scanner uses the file_scan profile by default, which is optimized for plain text content and detects:

Results show CLEAN, FINDINGS, or SKIPPED status for each file, with a summary of total files scanned and findings detected.

Requirements

Installation

Testing

Roadmap

License

MIT License. See LICENSE.md for details.


All versions of redactor with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^11.9|^12.0
spatie/laravel-package-tools Version ^1.16
php Version ^8.3|^8.4
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 kirschbaum-development/redactor contains the following files

Loading the files please wait ....