Repository navigation
feat: 1.24.0 DDD host mapping switch (register_mapping, mapping_type, entity_manager) - #79
Merged
Merged
Conversation
|
@coderabbitai review |
HecFranco
marked this pull request as ready for review
November 21, 2026 12:44
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.
HttpLogBundle 1.24.0: DDD host mapping switch (wave D6, B3)
Additive minor; defaults unchanged (standard Symfony host keeps the 1.23 attribute mapping on the default manager).
Added
nowo_http_log.doctrine.register_mapping(defaulttrue):falseleaves theHttpLogEntrymapping to the host; the bundle then prepends a disabledNowoHttpLogBundlemapping so Doctrineauto_mappingdoes not map the entity on the auto-mapped manager too (unless the host already uses that name).nowo_http_log.doctrine.mapping_type(attribute|xml):xmlregisters the shippedsrc/Resources/config/doctrine/HttpLogEntry.orm.xml(same table, columns, options, indexes, repository).nowo_http_log.doctrine.entity_manager(defaultnull): maps the entity on that manager instead of the default one (must be declared;prepend()fails otherwise instead of creating a manager). NewHttpLogEntityManagerPassfails the build unless that manager is the only one mappingNowo\HttpLogBundle\Entity(services resolve it withgetManagerForClass()).%env()%rejected).EntityManagerMappingshelper shared withHttpLogCommitTrackingPass(same behaviour).Guarantees
Tests
XmlMappingParityTest: XML vs attributes (metadata, column declarations on SQLite/MySQL/PostgreSQL, indexes) with the path-prefix and table-prefix listeners.DedicatedEntityManagerKernelTest: XML host leg on a dedicated manager + connection, mapped by the bundle or by the host under its own name,auto_mappingon the host manager, pending host change never flushed, double mapping fails the build.DoctrineMappingExtensionTest,HttpLogEntityManagerPassTest.Gates (local Docker, PHP 8.2 / Symfony 7.4)
PHPUnit 1035 tests incl. DB suites (MySQL 8.4, MariaDB 11.4, PostgreSQL 16) PASS; coverage 100 % (5699/5699); PHPStan level 8 PASS; php-cs-fixer PASS; rector dry-run PASS; Igor PASS.
Notes
idlast; the schema comparator ignores column order (no diff on existing tables). Boolean defaults are0in the XML (same DDL as the attributes'false).