Skip to content

Fix bugs and add product improvements#13

Merged
wtorsi merged 2 commits intomainfrom
feature/bugs-and-improvements
Feb 27, 2026
Merged

Fix bugs and add product improvements#13
wtorsi merged 2 commits intomainfrom
feature/bugs-and-improvements

Conversation

@wtorsi
Copy link
Contributor

@wtorsi wtorsi commented Feb 25, 2026

Summary

  • Bug fixes: Remove inherited property filter breaking MappedSuperclass detection, assert on preg_replace return in cache key sanitization, remove dead MetadataSubscriber service registration
  • WeakMap: Replace spl_object_id-keyed arrays with \WeakMap in MetadataReader and AbstractExtensionMetadataFactory to prevent stale metadata in long-running processes
  • Exception hierarchy: DuplicateMappingException and InvalidMappingAttributeException subtypes for granular catch blocks
  • API additions: hasConfiguration(), getConfigurations(), getEntityChangeSet(), driver priority via getPriority()
  • Extension points: ValidatableConfigurationInterface (post-load validation), WakeupAwareConfigurationInterface (deserialization hook)
  • Observability: MetadataDumpCommand for CLI debugging, MetadataDataCollector for Symfony profiler, trigger_error(E_USER_NOTICE) for shadowed field mappings

Test plan

  • All 55 existing + new tests pass (bin/phpunit)
  • PHP CS Fixer clean (vendor/bin/php-cs-fixer fix --dry-run)
  • Verify inherited property attribute detection works with MappedSuperclass entities
  • Verify WeakMap behavior in long-running process (Messenger consumer)
  • Test chamber-orchestra:metadata:dump command with real entity

🤖 Generated with Claude Code

@wtorsi wtorsi force-pushed the feature/bugs-and-improvements branch from 1a33dc4 to a302195 Compare February 27, 2026 13:52
Bug fixes:
- Remove declaring-class filter in supportsByPropertyAttribute() that
  silently skipped inherited properties, breaking MappedSuperclass detection
- Assert on preg_replace return in sanitize() to prevent silent cache
  key corruption
- Remove dead MetadataSubscriber manual registration from services.php

Improvements:
- Replace spl_object_id arrays with WeakMap in MetadataReader and
  AbstractExtensionMetadataFactory to prevent stale metadata in
  long-running processes (Messenger, RoadRunner)
- Add exception hierarchy: DuplicateMappingException and
  InvalidMappingAttributeException extending MappingException
- Add hasConfiguration() and getConfigurations() to
  ExtensionMetadataInterface
- Add driver priority support via getPriority() on MappingDriverInterface
  and AutowireIterator defaultPriorityMethod
- Add getEntityChangeSet() helper to AbstractDoctrineListener
- Add ValidatableConfigurationInterface for opt-in post-load validation
- Add WakeupAwareConfigurationInterface for opt-in wakeup hooks
- Add trigger_error(E_USER_NOTICE) for shadowed field mappings instead
  of silent array_diff_key
- Add MetadataDumpCommand (chamber-orchestra:metadata:dump) for debugging
- Add MetadataDataCollector for Symfony profiler integration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wtorsi wtorsi force-pushed the feature/bugs-and-improvements branch from a302195 to e6b3c3b Compare February 27, 2026 13:56
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wtorsi wtorsi force-pushed the feature/bugs-and-improvements branch from e6b3c3b to 296f029 Compare February 27, 2026 13:59
@wtorsi wtorsi merged commit 1eaad97 into main Feb 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant