egl/utils

General-purpose PHP utility helpers shared across EGL projects

Maintainers

Package info

github.com/danielPoloWork/egl-util-php

pkg:composer/egl/utils

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 40

v1.0.0 2026-08-08 23:15 UTC

README

General-purpose PHP utility helpers shared across EGL projects

Status

A library written in PHP 8.1+, built and governed to an enterprise quality bar: full CI matrix, static analysis, sanitizers, documented design decisions, and SemVer releases.

What it is

Provide EGL PHP projects (framework-based and native/legacy) with a modern utilities library — Composer package egl/utils, PSR-4 namespace D4np\Utils, PHP 8.1+ — offering typed readonly DTOs, explicit-mechanism security helpers, safe PDO access, hardened session/CSRF handling, and a minimal PSR-11 DI container, replacing ad-hoc per-project solutions (associative-array DTOs, blocklist sanitizers, string-built SQL, silent PDO error modes).

The frozen specification is in docs/specs/01_spec_utils.md.

Install

composer require egl/utils:^1.0

Registered on Packagist; ^1.0 resolves v1.0.0. A full consumer on-ramp (runnable examples, the naming map, the rest of the surface) is tracked as issue #118 — this line only states that the package installs.

Build, test, run

composer install --optimize-autoloader
vendor/bin/phpunit
  • Toolchain: Composer (PSR-4 autoload), PHPUnit (Pest optional), PHP-CS-Fixer (PSR-12), PHPStan (max level).
  • Supported platforms: Linux (PHP 8.1, 8.2, 8.3).
  • Consumers import the public surface via: use D4np\Utils\Dto\DataTransferObject;.

See docs/development/local-build.md for the full local setup.

How this project is run

Document Purpose
AGENTS.md How AI agents (and humans) work in this repo — the contract.
ROADMAP.md The numbered plan and what is done.
ISSUES.md The GitHub issues, newest first, each with its advisory model/effort route.
docs/adr/ Why it is built the way it is (Architecture Decision Records).
docs/patterns/ Design patterns adopted, rejected, or considered.
docs/workflow/ Git, documentation, release, and maintenance conventions.
CHANGELOG.md User-visible changes per release.
SECURITY.md How to report a vulnerability.

Milestones

# Title Status
1 Project bootstrap & CI ✅ done
2 Support layer ✅ done
3 DTO & data mapping ✅ done
4 Database ✅ done
5 Security ✅ done
6 HTTP, container, errors ✅ done
7 Release engineering & bridge ✅ done
8 PSR-7 bridge (packages/utils-psr7-bridge) ✅ done
9 Support & values ✅ done
10 Persistence ✅ done
11 Http application layer ✅ done
12 Security & channels ✅ done
13 Documentation & release hygiene (post-1.0) ⏳ planned

License

MIT © 2026 Daniel Polo. See LICENSE.