Skip to content

Data-Helpers

Framework-agnostic PHP library with deep framework integration – get the power of framework-specific solutions without the lock-in. Works standalone in Pure PHP or with deep integration for Laravel and Symfony.
Data Helpers - Framework-agnostic PHP library for data manipulation, transformation and validation

Core: Data mapping and DTOs for transforming and structuring data, plus powerful data manipulation tools.

DataMapper

Core Feature: Transform data structures with templates and pipelines. Multi-format output (JSON, XML, YAML, CSV). Perfect for API integrations and ETL.

SimpleDto & LiteDto

Core Feature: Type-safe, immutable Data Transfer Objects. SimpleDto supports JSON, XML, YAML, CSV. Framework-agnostic with optional deep integration for Laravel/Symfony. LiteDto is 7.6x faster.

DataAccessor

Read nested data with dot notation and wildcards. Analyze data structure with type information. Type-safe getters for arrays, objects, Collections and Models.

DataMutator

Modify nested data structures safely. Set, merge and unset values with wildcard support.

DataFilter

Query and filter data with SQL-like API. WHERE, ORDER BY, LIMIT and custom operators.

Utility Helpers

Simplify common operations with MathHelper, EnvHelper, StringHelper, ArrayHelper and ConfigHelper.

Framework-Agnostic + Deep Integration

Pure PHP with zero dependencies. Optional deep integration for Laravel and Symfony. No framework lock-in.

// From this messy API response...
$apiResponse = [
'data' => [
'departments' => [
['users' => [['email' => 'alice@example.com'], ['email' => 'bob@example.com']]],
['users' => [['email' => 'charlie@example.com']]],
],
],
];
// ...to this clean result in a few lines
$accessor = new DataAccessor($apiResponse);
$emails = $accessor->get('data.departments.*.users.*.email');
// Result: ['alice@example.com', 'bob@example.com', 'charlie@example.com']
  • 🎯 Framework-Agnostic + Deep Integration - Pure PHP with zero dependencies, optional deep Laravel/Symfony integration, no framework lock-in
  • Data mapping & DTOs at its core - Transform data structures and create type-safe DTOs with ease
  • Stop writing nested loops - Use dot notation and wildcards instead
  • Utility helpers included - MathHelper, EnvHelper, StringHelper and more for common operations
  • Type-safe and well-tested - PHPStan Level 9 with 4700+ tests
  • Blazing fast - Faster than most traditional serializers

Installation

Install Data Helpers via Composer and get started in minutes.

Install now →

API Reference

Complete API documentation for all classes and methods.

Read docs →