Collections, In-Memory Indexing, Media Handling Modernization - #31
Open
hparadiz wants to merge 6 commits into
Open
Collections, In-Memory Indexing, Media Handling Modernization#31hparadiz wants to merge 6 commits into
hparadiz wants to merge 6 commits into
Conversation
hparadiz
force-pushed
the
collections-media-orm-upgrades
branch
from
September 2, 2026 03:14
48db69c to
9c5aebb
Compare
hparadiz
force-pushed
the
collections-media-orm-upgrades
branch
from
September 2, 2026 03:25
9c5aebb to
7d6ab27
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Divergence v3.3.0 Change Log
Divergence v3.3.0 introduces indexed in-memory collections and integrates them with ActiveRecord hydration and persistence, alongside media-processing updates and native PHP dynamic-method errors.
Indexed Collections
Divergence\Data\Collections\Collection, a standalone base for non-Divergence objects and model classes, usable without Divergence's ORM.Divergence\Models\Collections\RecordCollectionwhich extends that base for Divergence ActiveRecord models.getByField(),getAllByField(),getByCriteria(), andgetAllByCriteria()provide indexed collection lookup.LIKEandNOT LIKE, including%and_wildcards;INandNOT IN;AND,OR,NOT AND, andNOT ORoperations, including single-criterion negation and defined empty-group behavior.Record Identity
Data\KeyToHashIntfor packing primary-key values into integer hash keys.Data\Collections\RecordKeyas the single collection identity resolver.spl_object_id()until a model receives a primary key.xxh64.ORM Hydration Changes
#[InMemoryIndexing(indexes: [...])]for declaring collection indexes directly on a modelModels\Collections\RecordCollectionis used to map collections to their model.getAllByField()andgetAllByCriteria()that preserve the collection class, configured indexes, and record class.isDirty(),save(), andsaveWithTransaction()behavior.HashKeyIndexand all configured field indexes.ActiveRecord::restoreState().ActiveRecord factory and controller creation
Factory::get()instance registry and routed model getter access through it.ActiveRecord::create()now uses the model factory's phantom instantiator instead of invoking the model constructor directly.CreateandMultiSaveendpoints now use the model's staticcreate()API for new records.nullforfalseornullsingle-record database results.EventBinder::initPrototype()and phantom state is now passed explicitly tobindRecord().PrototypeRegistry; instantiation now creates, initializes, and clones prototypes directly in the instantiator.Errorobjects with PHP-compatible undefined-method messages.Errorfor dynamic-call failures.Database Behavior Changes
Media Handling Modernization
/tmppaths withsys_get_temp_dir()for audio previews, conversions, and remote-media downloads.Media::createFromFile()are now destroyed when analysis or file handling throws.Media::isVariantAvailable()support using readable variant paths.GdImage|falsereturn behavior for audio, PDF, and video image extraction.video/*MIME types;libx264with AAC audio;Code Quality
.php_cs.dist.phpto the php-cs-fixer-supported.php-cs-fixer.dist.phpfilename.