Download the PHP package kariricode/transformer without Composer
On this page you can find all versions of the php package kariricode/transformer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download kariricode/transformer
More information about kariricode/transformer
Files in kariricode/transformer
Download kariricode/transformer
More information about kariricode/transformer
Files in kariricode/transformer
Vendor kariricode
Package transformer
Short Description Composable, rule-based data transformation engine for PHP 8.4+ — 32 rules, #[Transform] attributes, case conversion, powered by kariricode/property-inspector. ARFA 1.3.
License MIT
Homepage https://kariricode.org
Package transformer
Short Description Composable, rule-based data transformation engine for PHP 8.4+ — 32 rules, #[Transform] attributes, case conversion, powered by kariricode/property-inspector. ARFA 1.3.
License MIT
Homepage https://kariricode.org
Please rate this library. Is it a good library?
Informations about the package transformer
KaririCode Transformer
[](https://www.php.net/)
[](LICENSE)
[](https://phpstan.org/)
[](https://kariricode.org)
[](composer.json)
[](https://kariricode.org)
[](https://kariricode.org)
**Composable, rule-based data transformation engine for PHP 8.4+ — 32 rules, zero dependencies.**
[Installation](#installation) · [Quick Start](#quick-start) · [Case Conversion](#case-conversion) · [All Rules](#all-32-rules) · [Architecture](#architecture)
The Problem
Data presentation layer needs conversions that don't belong in business logic but are always awkwardly placed:
The Solution
Requirements
| Requirement | Version |
|---|---|
| PHP | 8.4 or higher |
| kariricode/property-inspector | ^2.0 |
Installation
Quick Start
Attribute-Driven DTO Transformation
Case Conversion
Data Structure Transformations
Brazilian Documents
All 32 Rules
| Category | Rules | Aliases |
|---|---|---|
| String (7) | CamelCase, SnakeCase, KebabCase, PascalCase, Mask, Reverse, Repeat | camel_case, snake_case, kebab_case, pascal_case, mask, reverse, repeat |
| Data (5) | JsonEncode, JsonDecode, CsvToArray, ArrayToKeyValue, Implode | json_encode, json_decode, csv_to_array, array_to_key_value, implode |
| Numeric (4) | CurrencyFormat, Percentage, Ordinal, NumberToWords | currency_format, percentage, ordinal, number_to_words |
| Date (4) | DateToTimestamp, DateToIso8601, RelativeDate, Age | date_to_timestamp, date_to_iso8601, relative_date, age |
| Structure (5) | Flatten, Unflatten, Pluck, GroupBy, RenameKeys | flatten, unflatten, pluck, group_by, rename_keys |
| Brazilian (4) | CpfToDigits, CnpjToDigits, CepToDigits, PhoneFormat | cpf_to_digits, cnpj_to_digits, cep_to_digits, phone_format |
| Encoding (3) | Base64Encode, Base64Decode, Hash | base64_encode, base64_decode, hash |
Engine API (Programmatic)
Ecosystem Position
The Transformer converts representation — may change type, format, or structure. Contrast with the Sanitizer which cleans data while preserving semantic form.
Architecture
Source layout
Key design decisions
| Decision | Rationale | ADR |
|---|---|---|
| Semantic distinction from Sanitizer | Transformer may change type; Sanitizer preserves semantic form | ADR-001 |
| Transformation tracking | Audit trail with before/after per rule | ADR-002 |
final readonly rules |
Immutability, PHPStan L9 | ADR-003 |
Specifications
| Spec | Covers |
|---|---|
| SPEC-001 | Rule contract and context passing |
| SPEC-002 | Transformation record format |
Project Stats
| Metric | Value |
|---|---|
| PHP source files | 49 |
| Source lines | 1,433 |
| Test files | 15 |
| Test lines | 837 |
| External runtime dependencies | 1 (kariricode/property-inspector) |
| Rule classes | 32 |
| Rule categories | 7 |
| PHPStan level | 9 |
| PHP version | 8.4+ |
| ARFA compliance | 1.3 |
Contributing
License
Walmir Silva
Part of the **[KaririCode Framework](https://kariricode.org)** ecosystem.
[kariricode.org](https://kariricode.org) · [GitHub](https://github.com/KaririCode-Framework/kariricode-transformer) · [Packagist](https://packagist.org/packages/kariricode/transformer) · [Issues](https://github.com/KaririCode-Framework/kariricode-transformer/issues)
All versions of transformer with dependencies
PHP Build Version
Package Version
The package kariricode/transformer contains the following files
Loading the files please wait ...