Conversation
Adds additionnal attributes to be able to automatically map them to Doctrine entities.
📝 WalkthroughWalkthroughThis PR extends geocoding functionality to capture additional address metadata beyond latitude and longitude. It introduces 10 new PHP 8 attributes for boundary coordinates (north, south, east, west) and address components (street number/name, locality, postal code, sub-locality, country), updates metadata infrastructure to track these fields, and integrates result mapping in the entity listener. Changes
Sequence DiagramsequenceDiagram
participant Entity as Entity Class
participant Attrs as Attribute Classes
participant Driver as AttributeDriver
participant Metadata as ClassMetadata
participant Listener as GeocodeEntityListener
participant Result as Geocoding Result
Entity->>Attrs: Property annotated with<br/>North, South, East, etc.
Driver->>Entity: Scan for attributes
Driver->>Driver: Match via PROPERTY_MATRIX
Driver->>Metadata: Create with property<br/>reflections
Listener->>Result: Receive geocoding result
Result-->>Listener: Return bounds, address<br/>components
Listener->>Entity: Assign north, south, east,<br/>west, street*, locality,<br/>postalCode, subLocality,<br/>country
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Failure to add the new IP will result in interrupted reviews. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I tried to fix the CI but I don't really understand what's happening with the tests for Symfony 6.4. I opened an issue for the PHPStan error as it looks like a bug to me: phpstan/phpstan#14067 |
|
I am also not sure.
|
Related to #396 : I added attributes for (most, not all) properties matching the getters of the
Locationinterface, so we can easily map them to Doctrine entity properties as we can already do for latitude & longitude. Let me know what you think 🙂Summary by CodeRabbit
New Features
Tests