Download the PHP package event4u/data-helpers without Composer

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

Data Helpers

Packagist Version GitHub Code Quality Action Status GitHub PHPStan Action Status GitHub Test Matrix Action Status

Framework-agnostic PHP library with deep framework integration โ€“ get the power of framework-specific solutions without the lock-in.

Transform complex data structures, create type-safe DTOs and simplify data operations with expressive syntax. Works standalone in Pure PHP or with deep integration for Laravel and Symfony. Includes DataMapper, SimpleDto/LiteDto, DataAccessor/Mutator/Filter and utility helpers (MathHelper, EnvHelper, etc.).

๐ŸŽฏ Framework-Agnostic + Deep Integration โ€ข Pure PHP with zero dependencies โ€ข Optional Laravel & Symfony integration โ€ข No framework lock-in

๐Ÿ“– Full Documentation โ€ข Getting Started โ€ข API Reference

๐Ÿ’– Support the Development - Help us build better tools for the PHP community


๐Ÿ’ก Why Data Helpers?

๐ŸŽฏ Stop Writing Nested Loops

๐Ÿš€ Key Benefits


๐Ÿ“ฆ Installation

Requirements: PHP 8.2+

Framework support (all optional):

๐Ÿ“– Installation Guide โ€ข Configuration


๐Ÿ”Œ Framework Integration

The best of both worlds: Use Data Helpers as a standalone library in pure PHP, or leverage deep framework integration for Laravel and Symfony โ€“ without framework lock-in.

๐ŸŽฏ Framework-Agnostic Core

Zero dependencies required. Works out of the box with:

๐Ÿš€ Optional Deep Integration

When you need it: Add framework-specific features without changing your core code.

Laravel Integration (Optional)

Symfony Integration (Optional)

๐Ÿ’ก Key Integration Features

Feature Pure PHP Laravel Symfony
DTOs & Validation โœ… โœ… โœ…
Controller Injection โŒ โœ… Auto โœ… Auto
Request Validation โœ… Manual โœ… Auto โœ… Auto
Model/Entity Mapping โœ… Plain Objects โœ… Eloquent โœ… Doctrine
Framework Attributes โŒ โœ… Auth/Can/Role โœ… Granted/Role
Code Generation โŒ โœ… Artisan โœ… Console
TypeScript Export โŒ โœ… โœ…

The Power: Get framework-specific features when you need them, without framework dependencies in your core code.

๐Ÿ“– Laravel Integration Guide โ€ข Symfony Integration Guide


โšก Core Components

The heart of this library: Data mapping and DTOs for transforming and structuring data, plus powerful data manipulation tools.

1๏ธโƒฃ DataAccessor - Read & Transform Data

Access deeply nested data with dot notation, wildcards, and powerful transformation methods:

๐Ÿ“– DataAccessor Documentation

2๏ธโƒฃ DataCollection - Type-Safe Collections

Framework-independent collection class with fluent API. Uses DataAccessor for reading, DataMutator for writing, and DataFilter for SQL-like querying:

๐Ÿ“– DataCollection Documentation

3๏ธโƒฃ DataMutator - Modify Nested Data

Safely modify nested structures:

๐Ÿ“– DataMutator Documentation

4๏ธโƒฃ DataFilter - Query Data

Filter and query data with SQL-like API:

๐Ÿ“– DataFilter Documentation

5๏ธโƒฃ SimpleDto - Immutable Dtos

Create type-safe, immutable Data Transfer Objects with automatic type casting and multi-format serialization (JSON, XML, YAML, CSV):

๐Ÿ“– SimpleDto Documentation

Plain PHP Object Integration

SimpleDto seamlessly integrates with plain PHP objects (like Zend Framework models or any plain PHP classes):

Also works with getters/setters:

๐Ÿ“– Example Code

6๏ธโƒฃ LiteDto - Ultra-Fast Dtos

Create ultra-fast, minimalistic DTOs with essential features:

Performance: LiteDto is 7.6x faster than SimpleDto Normal (~2.3ฮผs vs ~18.5ฮผs)

๐Ÿ“– LiteDto Documentation

3๏ธโƒฃ DataMapper - Transform Data

Map between different data structures with templates. Supports multi-format output (JSON, XML, YAML, CSV):

๐Ÿ’ก No-Code Data Mapping: Templates can be stored in a database and created with a drag-and-drop editor - perfect for import wizards, API integrations and ETL pipelines without writing code!

โš ๏ธ XML Files: When loading XML files with sourceFile(), the root element name is preserved. Always include it in your paths: '{{ company.name }}' for <company><name>...</name></company>.

๐Ÿ“– DataMapper Documentation

7๏ธโƒฃ Utility Helpers - Common Data Operations

Simplify common data operations with specialized helper classes:

Available Helpers:

  • MathHelper - Precision math operations using bcmath (add, subtract, multiply, divide, modulo, powerOf, squareRoot, compare, min, max, sum, average, product, time conversions)
  • EnvHelper - Type-safe environment variable access with framework detection (get, has, string, integer, float, boolean, array)
  • ConfigHelper - Singleton configuration manager with framework detection and dot notation (getInstance, get, getBoolean, getInteger, getFloat, getString, getArray, has, set, reset)
  • DotPathHelper - Dot notation path utilities with wildcard support (segments, buildPrefix, isWildcard, containsWildcard)
  • ObjectHelper - Deep object cloning with recursion control (copy)

๐Ÿ“– Helpers Documentation


๐ŸŽฏ Advanced Features

No-Code Data Mapping

Store templates in database and create mappings without programming:

Perfect for:

  • ๐Ÿ“ฅ Import Wizards - Let users map CSV/Excel columns to your data model
  • ๐Ÿ”Œ API Integration - Configure API mappings without code changes
  • ๐Ÿข Multi-Tenant Systems - Each tenant can have custom data mappings
  • ๐Ÿ”„ Dynamic ETL - Build data transformation pipelines visually
  • ๐Ÿ“ Form Builders - Map form submissions to different data structures

๐Ÿ“– Template-Based Mapping Guide

Complex Nested Mapping

Map complex nested structures to Eloquent Models or Doctrine Entities:

  • โœ… Automatic Relation Detection
  • โœ… Type Casting (string โ†’ int/float/bool)
  • โœ… Snake_case โ†’ camelCase conversion
  • โœ… Nested Wildcards

๐Ÿ“– Advanced Mapping Guide

Pipeline API

Transform data with composable filters:

๐Ÿ“– Pipeline Documentation

Template Expressions

Use Twig-like expressions with 18+ built-in filters:

๐Ÿ“– Template Expressions

Query Builder

Laravel-style fluent interface for building queries:

๐Ÿ“– Query Builder Documentation


๐Ÿ“š Documentation

Comprehensive documentation with guides, examples and API reference is available at:

๐Ÿ”— event4u-app.github.io/data-helpers

The documentation includes:

  • ๐Ÿ“– Getting Started Guides - Installation, configuration and quick start tutorials
  • ๐Ÿ”ง Main Classes - Detailed guides for DataAccessor, DataMutator, DataMapper and DataFilter
  • ๐ŸŽฏ SimpleDto - Type-safe Dtos with validation, casting and collections
  • โšก LiteDto - Ultra-fast, minimalistic Dtos (7.6x faster than SimpleDto)
  • ๐Ÿš€ Advanced Features - Template expressions, query builder, pipelines and reverse mapping
  • ๐Ÿ”Œ Framework Integration - Laravel, Symfony and Doctrine integration guides
  • ๐Ÿ’ก 90+ Code Examples - Runnable examples for every feature
  • ๐Ÿ“Š Performance Benchmarks - Optimization tips and benchmark results
  • ๐Ÿ” Complete API Reference - Full API documentation for all classes and methods

๐Ÿงช Testing & Quality

  • โœ… 4700+ tests with comprehensive coverage
  • โœ… PHPStan Level 9 - Highest static analysis level
  • โœ… 100% type coverage - All methods fully typed
  • โœ… Continuous Integration - Automated testing across PHP 8.2, 8.3, 8.4

๐Ÿ“– Contributing Guide โ€ข Development Setup


โšก Performance

All operations are highly optimized:

  • Simple access: ~0.0ฮผs
  • Nested access: ~0.4ฮผs
  • Wildcards: ~1ฮผs
  • SimpleDto #[UltraFast] is up to 12.5x faster than Other Serializer

๐Ÿ“– Performance Benchmarks โ€ข Optimization Tips


๐Ÿค Contributing

Contributions are welcome! Please see the Contributing Guide for details.


๐Ÿ’– Sponsoring

This package is part of the event4u ecosystem - a comprehensive event management platform. Your sponsorship helps us:

  • ๐Ÿš€ Develop event4u - The next-generation event management app
  • ๐Ÿ“ฆ Maintain open-source packages - Like this Data Helpers library
  • ๐Ÿ”ง Build new tools - More packages and utilities for the PHP community
  • ๐Ÿ“š Improve documentation - Better guides and examples
  • ๐Ÿ› Fix bugs faster - Dedicated time for maintenance and support

Support the Development

Sponsor @matze4u    Sponsor event4u-app

Every contribution, no matter how small, makes a difference and is greatly appreciated! ๐Ÿ™


๐Ÿ“„ License

MIT License. See LICENSE for details.


๐ŸŒŸ Show Your Support

If this package helps you, please consider:


All versions of data-helpers with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
composer-plugin-api Version ^2.0
ext-simplexml 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 event4u/data-helpers contains the following files

Loading the files please wait ...