Download the PHP package infocyph/reqshield without Composer

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

๐Ÿ›ก๏ธ ReqShield

Security & Standards Packagist Downloads License: MIT Packagist Version Packagist PHP Version GitHub Code Size Documentation

Fast, modern PHP request validation and sanitization. Schema-based rules, fail-fast execution, intelligent batching, and 107 built-in validation rules.


โœจ Features


๐Ÿ“ฆ Installation

Requirements: PHP 8.4+ and ext-hash with xxh3 support


๐Ÿš€ Quick Start

Basic Validation

Sanitization

Manual sanitization:

Or built-in sanitize+validate pipeline:

Or use the helper:


๐Ÿ“š Available Rules (107)

ReqShield includes 107 validation rules covering several common scenarios:

๐Ÿ“– View Complete Rule Reference

Upload Hardening Rules

Use upload-focused rules for request metadata and filename safety:

secure_file combines file and upload_meta so you can enforce payload validity and safe upload metadata in one rule.


๐Ÿงน Available Sanitizers (46 Built-in)

ReqShield includes 46 built-in sanitizers covering several common scenarios:

๐Ÿ“– View Complete Sanitizer Reference


๐ŸŽฏ Advanced Features

Nested Validation

Validate deeply nested arrays using dot notation:

Use enableNestedValidation(false) to flatten only required paths for large nested payloads.

Custom Field Names

Make error messages user-friendly:

Custom Messages + Locale Packs

Throw Exceptions on Failure

Failure Metadata for APIs

Conditional Rules

Schema Fragments

Typed Output + DTO

Custom Rules (Simple)

Use callbacks for quick custom validation:

Custom Rules (Advanced)

Create reusable rule classes:

Database Validation

Validate against your database:

Benefits:

Schema Export / Introspection

Stop on First Error

For maximum performance, stop all validation on first error:


โšก Performance

ReqShield is built for speed:

1. Cost-Based Rule Sorting

Rules automatically execute in order of complexity:

2. Intelligent Batching

Database rules are automatically batched:

3. Fail-Fast Execution

Stops validating a field on first rule failure:

4. Zero Overhead for Simple Cases

Nested validation only activates if you use dot notation. No performance cost for simple flat arrays.


๐Ÿงช Development Commands

composer benchmark runs the PhpBench suite in benchmarks/ValidatorBench.php.


๐Ÿ“„ License

ReqShield is open-sourced software licensed under the MIT license.


๐ŸŒŸ Show Your Support

If you find ReqShield helpful, please consider giving it a โญ๏ธ on GitHub!


**Made with โค๏ธ for the PHP community** [Documentation](https://docs.infocyph.com/projects/reqshield) โ€ข [Report Bug](https://github.com/infocyph/reqshield/issues) โ€ข [Request Feature](https://github.com/infocyph/reqshield/issues)

All versions of reqshield with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
ext-hash Version *
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 infocyph/reqshield contains the following files

Loading the files please wait ...