Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ CHANGELOG
3.7.0
------------------

* Added the `residential` property to the `anonymizer` object on
`MaxMind\MinFraud\Model\IpAddress`. This is a `GeoIp2\Record\AnonymizerFeed`
object providing residential proxy data for the network: `confidence`,
`networkLastSeen`, and `providerName`. It may be populated even when no
other anonymizer properties are set. This data is available from the
minFraud Insights and Factors web services.
* Added `tracking_token` to the `/device` request object. This is the
token generated by the
[Device Tracking Add-on](https://dev.maxmind.com/minfraud/track-devices)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"require": {
"php": ">=8.1",
"ext-json": "*",
"geoip2/geoip2": "^v3.3.0"
"geoip2/geoip2": "^v3.4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "3.*",
Expand Down
6 changes: 4 additions & 2 deletions lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# Run locally with:
# lychee './**/*.md' './src/**/*.php' './composer.json'

# Include URL fragments in checks
include_fragments = true
# Include URL fragments in checks. Lychee 0.24 replaced the old boolean
# with a `none|anchor-only|text-only|full` enum; `full` checks both anchor
# fragments (e.g. `#section`) and text fragments (e.g. `#:~:text=example`).
include_fragments = "full"

# Don't allow any redirects, so links that have moved are surfaced and updated
# to their canonical destination.
Expand Down
74 changes: 46 additions & 28 deletions mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions tests/MaxMind/Test/MinFraud/Model/InsightsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace MaxMind\Test\MinFraud\Model;

use GeoIp2\Record\AnonymizerFeed;
use MaxMind\MinFraud\Model\Insights;
use MaxMind\MinFraud\Model\Score;
use MaxMind\Test\MinFraudData as Data;
Expand Down Expand Up @@ -156,6 +157,30 @@ public function testInsightsProperties(): void
'correct anonymizer network last seen'
);

$this->assertInstanceOf(
AnonymizerFeed::class,
$insights->ipAddress->anonymizer->residential,
'anonymizer residential is an AnonymizerFeed'
);

$this->assertSame(
$array['ip_address']['anonymizer']['residential']['confidence'],
$insights->ipAddress->anonymizer->residential->confidence,
'correct anonymizer residential confidence'
);

$this->assertSame(
$array['ip_address']['anonymizer']['residential']['network_last_seen'],
$insights->ipAddress->anonymizer->residential->networkLastSeen,
'correct anonymizer residential network last seen'
);

$this->assertSame(
$array['ip_address']['anonymizer']['residential']['provider_name'],
$insights->ipAddress->anonymizer->residential->providerName,
'correct anonymizer residential provider name'
);

$this->assertSame(
$array['billing_phone']['country'],
$insights->billingPhone->country,
Expand Down
7 changes: 6 additions & 1 deletion tests/data/minfraud/factors-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@
"is_public_proxy": true,
"is_tor_exit_node": true,
"network_last_seen": "2025-01-15",
"provider_name": "TestVPN"
"provider_name": "TestVPN",
"residential": {
"confidence": 82,
"network_last_seen": "2026-05-11",
"provider_name": "quickshift"
}
}
},
"billing_address": {
Expand Down
7 changes: 6 additions & 1 deletion tests/data/minfraud/insights-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@
"is_public_proxy": true,
"is_tor_exit_node": true,
"network_last_seen": "2025-01-15",
"provider_name": "TestVPN"
"provider_name": "TestVPN",
"residential": {
"confidence": 82,
"network_last_seen": "2026-05-11",
"provider_name": "quickshift"
}
}
},
"billing_address": {
Expand Down
Loading