Skip to content

Add residential property to anonymizer object#273

Open
oschwald wants to merge 1 commit into
mainfrom
greg/stf-997-add-residential-to-anonymizer
Open

Add residential property to anonymizer object#273
oschwald wants to merge 1 commit into
mainfrom
greg/stf-997-add-residential-to-anonymizer

Conversation

@oschwald

Copy link
Copy Markdown
Member

Summary

Surfaces the new residential sub-object of the anonymizer object in the minFraud Insights and Factors ip_address response. 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/geoip2 requirement must be bumped to ^3.4.0 once 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

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@oschwald, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8be867bf-b2b8-46d0-8f1e-f09b7735c41e

📥 Commits

Reviewing files that changed from the base of the PR and between daa5944 and ac8604d.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • tests/MaxMind/Test/MinFraud/Model/InsightsTest.php
  • tests/data/minfraud/factors-response.json
  • tests/data/minfraud/insights-response.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch greg/stf-997-add-residential-to-anonymizer

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +159 to +163
$this->assertInstanceOf(
'GeoIp2\Record\AnonymizerFeed',
$insights->ipAddress->anonymizer->residential,
'anonymizer residential is an AnonymizerFeed'
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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>
@oschwald oschwald force-pushed the greg/stf-997-add-residential-to-anonymizer branch from 1db3816 to ac8604d Compare July 11, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant