Add residential property to anonymizer object#273
Conversation
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Code Review
This pull request introduces the residential property to the anonymizer object in MaxMind\MinFraud\Model\IpAddress, updating the changelog, mock response data, and unit tests accordingly. The feedback suggests using class name resolution (::class) instead of a hardcoded string literal in the test assertions to improve type safety and static analysis.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| $this->assertInstanceOf( | ||
| 'GeoIp2\Record\AnonymizerFeed', | ||
| $insights->ipAddress->anonymizer->residential, | ||
| 'anonymizer residential is an AnonymizerFeed' | ||
| ); |
There was a problem hiding this comment.
Prefer using class name resolution via \GeoIp2\Record\AnonymizerFeed::class instead of a hardcoded string literal. This ensures better type safety, allows static analysis tools (like PHPStan) to verify the class exists, and enables IDE refactoring support.
$this->assertInstanceOf(
\GeoIp2\Record\AnonymizerFeed::class,
$insights->ipAddress->anonymizer->residential,
'anonymizer residential is an AnonymizerFeed'
);Surface the residential sub-object added to the anonymizer object in the underlying GeoIP2 library (since 3.4.0). The IpAddress model already exposes GeoIp2\Record\Anonymizer directly, so this is a test fixture and CHANGELOG update only; no model code changes are needed. STF-997 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1db3816 to
ac8604d
Compare
Summary
Surfaces the new
residentialsub-object of theanonymizerobject in the minFraud Insights and Factorsip_addressresponse. The models reuse the GeoIP2 library's Anonymizer record, so this is a fixtures/tests/changelog change; the field flows through via the dependency.Depends on maxmind/GeoIP2-php#319. At release time the
geoip2/geoip2requirement must be bumped to^3.4.0once that version is tagged.Testing
With geoip2 from that PR (composer path override, not committed): phpunit 245 tests / 1005 assertions; php-cs-fixer, phpcs, phpstan, and composer validate all clean.
🤖 Generated with Claude Code