Skip to content

Commit e1ee8c3

Browse files
Mikael PeigneyMika56
Mikael Peigney
authored andcommitted
Add UPGRADE.md
1 parent aa3c6c4 commit e1ee8c3

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

UPGRADE.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# UPGRADE FROM 1.x TO 2.0
2+
3+
## PHP Version
4+
5+
Version 2.0 now requires a supported PHP version, that is PHP 7.4 and >= 8.0
6+
7+
## Public methods of `SPFCheck`
8+
9+
The available methods of `SPFCheck` has changed.
10+
11+
```php
12+
# removed
13+
public function isIPAllowed($ipAddress, $domain);
14+
# replaced by
15+
public function getIPStringResult(string $ipAddress, string $domain): string;
16+
17+
# added
18+
public function getDomainSPFRecords(string $domainName): array;
19+
public function getResult(Query $query): Result;
20+
```
21+
22+
## `DNSRecordGetter` moved to the `Mika56\SPFCheck\DNS` namespace
23+
24+
```php
25+
# before
26+
use Mika56\SPFCheck\DNSRecordGetter;
27+
use Mika56\SPFCheck\SPFCheck;
28+
29+
$checker = new SPFCheck(new DNSRecordGetter());
30+
31+
# after
32+
use Mika56\SPFCheck\DNS\DNSRecordGetter;
33+
use Mika56\SPFCheck\SPFCheck;
34+
35+
$checker = new SPFCheck(new DNSRecordGetter());
36+
```
37+
38+
## `DNSRecordGetterDirect` moved to its own repository
39+
40+
The class has been moved to [mika56/spfcheck-dns-direct](https://github.com/Mika56/PHP-SPF-Check-DNS-Direct). This removed the dependency on `purplepixie/phpdns`.

0 commit comments

Comments
 (0)