Releases: erilshackle/tbl-class-php
Tbl::class v1.1 — ON JOIN helpers
Release v1.1.0 — 2026-01-25
Resumo:
Nesta versão v1.1.0, adicionamos suporte a JOIN helpers através do novo JoinHelperTrait, permitindo gerar constantes de join e aliases de tabela de forma simples e consistente. Não há breaking changes — totalmente compatível com versões anteriores.
✨ Novos recursos
JoinHelperTrait
-
Gera constantes
on__{fromTable}__{toTable}a partir das foreign keys existentes no schema. -
Permite uso de aliases via
__callStatic:Tbl::on__posts__users(); // posts.user_id = users.id Tbl::on__posts__users('p','u'); // p.user_id = u.id Tbl::users('x'); // users AS x
-
Suporte a múltiplas FKs será tratado em versões futuras.
-
Garante coerência e estabilidade, sem arrays ou manipulação runtime complexa.
Full Changelog: v1.0.0...v1.1.0
🚀 tbl-class v1
🚀 Introducing Tbl::class
First stable release of tbl-class, a PHP CLI tool that generates type-safe database schema constants directly from your database structure.
✨ Highlights
- Automatic generation of constants for tables, columns, foreign keys, and enums
- Eliminates magic strings in SQL and PHP code
- Schema change detection via hash comparison
- Supports MySQL, PostgreSQL, and SQLite
- Configurable naming strategies (
full,abbr,alias,upper) - Seamless Composer integration
- Designed for modern PHP projects, APIs, and CI/CD pipelines
📌 Important note
The naming strategy is global. Changing it after adoption is a breaking change and should be treated as a refactor.
📄 License
MIT — Eril TS Carvalho