Tests / PHP 8.4 (push) Failing after 3m23s
A command line for the library, kept deliberately small: no console component, no dependency added to the consumer's tree. - Application/Command/Input/Output: parsing, dispatch, exit codes and capturable output. Commands return an exit code instead of calling exit(), so every one is testable. - seed: runs the registered SeederRunner inside one transaction, with --list and --only=name[,name]. - doctor: one round-trip that fails loudly when the DSN is wrong. - make:model and make:seeder: live scaffolding into the consumer's code, sharing name validation, the overwrite guard and directory creation through MakeCommand. The binary ships an empty runner; an application composes SeedCommand into its own Application to register its seeders.
2.0 KiB
2.0 KiB
Changelog
All notable changes to this project are documented here. The format follows Keep a Changelog and the project adheres to Semantic Versioning.
[Unreleased]
Added
Camelia\Orm\Seeding:Seedercontract,AbstractSeederwith an idempotentseedOnce(), andSeederRunner, which runs an ordered batch inside one transaction and reports per-seeder counts. A failing seeder rolls the whole batch back.Camelia\Orm\Console: a small CLI core (Application,Command,Input,Output) with no external dependency, plusbin/camelia-ormexposingseed,doctor,make:modelandmake:seeder. Commands return exit codes instead of callingexit(), and every command can be driven from a test through a stream-backedOutput.ConfigurationException::unknownSeeder().docs/SEEDING.md.
[1.0.0] - 2026-11-15
Added
- Attribute-driven metadata:
TableName,PrimaryKey,AutoIncrement,Column,Guarded,Ignore,Required,Enum,Nullable,Length,Precision,Unique,UniqueGroup,Index,MaxLength. - Relationship mapping:
BelongsTo,HasOne,HasMany,BelongsToMany, with batched eager loading (no N+1) and a hard 3-level depth limit. Ormentry point withfromArray,fromPdo,fromEnvand nestedtransaction().Repositoryread API:find,findFirst,findByPk,findByPkOrFail,findOrCreate,count,exists,sum,avg,max,min,page,query.Repositorywrite API:save,create,update,delete,patch,remove.- Immutable
QuerywithCondoperators andGroupCondgrouping. - Typed exception hierarchy rooted at
OrmException. AuditListenerand PSR-3LoggerInterfaceextension points.TypeCasterwith strict refusal of values that cannot be cast.
Notes
Model::hydrate()accepts property or column keys; the property name wins when both are present.Page::$totalPagesis always anint.- No global helper functions are registered.