Skip to content

Releases: KaririCode-Framework/kariricode-sanitizer

KaririCode Sanitizer v1.2.3

05 Mar 17:20
a9949d3

Choose a tag to compare

KaririCode\Sanitizer v1.2.3

Composable, rule-based data sanitization engine for PHP 8.4+.
33 built-in rules across 7 namespaces, #[Sanitize] attribute-driven
pipelines, XSS prevention, and 100% test coverage. ARFA 1.43 compliant.

Installation

composer require kariricode/sanitizer

Quick Start

use KaririCode\Sanitizer\Attribute\Sanitize;
use KaririCode\Sanitizer\Provider\SanitizerServiceProvider;

final class UserDto
{
    #[Sanitize('trim', 'capitalize')]
    public string $name = '';

    #[Sanitize('trim', 'email_filter')]
    public string $email = '';
}

$sanitizer = (new SanitizerServiceProvider())->createAttributeSanitizer();
$dto = new UserDto(name: '  alice  ', email: '  ALICE@EXAMPLE.COM  ');
$sanitizer->sanitize($dto);

echo $dto->name;   // 'Alice'
echo $dto->email;  // 'alice@example.com'

Quality Metrics

Metric Value
Tests 175 passing
Assertions 425
PHPStan Level 9 (0 errors)
Psalm 100% (0 errors)
Coverage 100% (48 classes)
Rules 33 built-in across 7 namespaces
PHP Version 8.4+

See CHANGELOG.md for details.

v1.2.2

26 Oct 19:19
eeb3767

Choose a tag to compare

What's Changed

  • refactor(SanitizationException): Replace instance-based exception wit… by @walmir-silva in #7
  • chore(git): remove composer.lock from version control by @walmir-silva in #8

Full Changelog: v1.2.1...v1.2.2

v1.2.1

26 Oct 15:17
19ff75c

Choose a tag to compare

What's Changed

Full Changelog: v1.2.0...v1.2.1

v1.2.0

23 Oct 17:18
f675fb4

Choose a tag to compare

What's Changed

  • Enhance Sanitizer Component and README Updates by @growthcodeoficial in #4

Full Changelog: v1.0.1...v1.2.0

v1.0.1

18 Oct 21:28
35b0293

Choose a tag to compare

What's Changed

  • enhance README with professional example and pt-br translation by @growthcodeoficial in #3

Full Changelog: v1.0.0...v1.0.1

v1.0.0

15 Oct 20:33
e31c403

Choose a tag to compare

What's Changed

  • feat: structured project base for KaririCode Sanitizer by @growthcodeoficial in #1
  • Release v1.0.0: KaririCode Sanitizer - Initial Stable Release by @growthcodeoficial in #2

New Contributors

  • @growthcodeoficial made their first contribution in #1

Full Changelog: https://github.com/KaririCode-Framework/kariricode-sanitizer/commits/v1.0.0