Revision: Fri, 31 May 2024 16:10:59 GMT
v3.11 – outdated
This version of the documentation is outdated. Consider upgrading your project to Spiral Framework 3.12
Edit this page

Filters — Migration from Spiral Framework 2.x

If you are migrating from Spiral Framework 2.x, and you want to continue using the old filters you can use the spiral/filters-bridge package in this case.

The package spiral/filters-bridge provides support for request validation, composite validation, an error message mapping and locations, etc.


Make sure that your server is configured with the following PHP version and extensions:

  • PHP 8.1+
  • Spiral framework 3.0+


To install the package:

composer require spiral/filters-bridge

The package will automatically install and configure the spiral/validator package.

The package does not require any configuration and can be activated using the bootloader Spiral\Filters\Bootloader\FiltersBootloader:

public function defineBootloaders(): array
    return [
        // ...
        // ...

Read more about bootloaders in the Framework — Bootloaders section.

There is no difference between using the spiral/filters component and the spiral/filters-bridge package, so you can use documentation for the previous Spiral version.