Skip to content

Commit df277d6

Browse files
committed
Prepare 6.3.0 release
1 parent 1f28803 commit df277d6

File tree

5 files changed

+87
-22
lines changed

5 files changed

+87
-22
lines changed

CHANGELOG.md

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
All Notable changes to `PHP Domain Parser` starting from the **5.x** series will be documented in this file
44

5-
## Next - TBD
5+
## [6.3.0] - 2023-02-25
66

77
### Added
88

9-
- `RegisteredName` class to allow subdomain with IP-like labels
9+
- `RegisteredName` class to allow domain with IP4-like labels
1010

1111
### Fixed
1212

@@ -22,7 +22,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
2222

2323
- None
2424

25-
## 6.2.0 - 2022-10-30
25+
## [6.2.0] - 2022-10-30
2626

2727
### Added
2828

@@ -40,7 +40,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
4040

4141
- PHP7 and PHP8.0 support
4242

43-
## 6.1.2 - 2022-09-29
43+
## [6.1.2] - 2022-09-29
4444

4545
### Added
4646

@@ -58,7 +58,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
5858

5959
- None
6060

61-
## 6.1.1 - 2022-02-18
61+
## [6.1.1] - 2022-02-18
6262

6363
### Added
6464

@@ -76,7 +76,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
7676

7777
- None
7878

79-
## 6.1.0 - 2021-06-19
79+
## [6.1.0] - 2021-06-19
8080

8181
### Added
8282

@@ -99,7 +99,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
9999

100100
- None
101101

102-
## 6.0.0 - 2020-12-13
102+
## [6.0.0] - 2020-12-13
103103

104104
### Added
105105

@@ -150,7 +150,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
150150
- `Pdp\TopLevelDomains::contains` without replacement
151151
- Internal Converter classes (implementation details are no longer exposed).
152152

153-
## 5.7.2 - 2020-10-25
153+
## [5.7.2] - 2020-10-25
154154

155155
### Added
156156

@@ -168,7 +168,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
168168

169169
- None
170170

171-
## 5.7.1 - 2020-08-24
171+
## [5.7.1] - 2020-08-24
172172

173173
### Added
174174

@@ -186,7 +186,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
186186

187187
- None
188188

189-
## 5.7.0 - 2020-08-02
189+
## [5.7.0] - 2020-08-02
190190

191191
### Added
192192

@@ -210,7 +210,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
210210
- Support for PHP7.0 and PHP7.1
211211
- The external data from IANA and mozilla is no longer part of the package and will be downloaded only on demand on composer update/install.
212212

213-
## 5.6.0 - 2019-12-29
213+
## [5.6.0] - 2019-12-29
214214

215215
### Added
216216

@@ -229,7 +229,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
229229

230230
- None
231231

232-
## 5.5.0 - 2019-04-14
232+
## [5.5.0] - 2019-04-14
233233

234234
### Added
235235

@@ -252,7 +252,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
252252

253253
- None
254254

255-
## 5.4.0 - 2018-11-22
255+
## [5.4.0] - 2018-11-22
256256

257257
### Added
258258

@@ -279,7 +279,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
279279

280280
- None
281281

282-
## 5.3.0 - 2018-05-22
282+
## [5.3.0] - 2018-05-22
283283

284284
### Added
285285

@@ -314,7 +314,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
314314

315315
- None
316316

317-
## 5.2.0 - 2018-02-23
317+
## [5.2.0] - 2018-02-23
318318

319319
### Added
320320

@@ -340,7 +340,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
340340

341341
- None
342342

343-
## 5.1.0 - 2017-12-18
343+
## [5.1.0] - 2017-12-18
344344

345345
### Added
346346

@@ -359,7 +359,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
359359

360360
- None
361361

362-
## 5.0.0 - 2017-12-13
362+
## [5.0.0] - 2017-12-13
363363

364364
### Added
365365

@@ -389,3 +389,21 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
389389
- `Pdp\PublicSuffixManager` class replaced by the `Pdp\Manager` class
390390
- `Pdp\HttpAdapter\HttpAdapterInterface` interface replaced by the `Pdp\HttpClient` interface
391391
- `Pdp\HttpAdapter\CurlHttpAdapter` class replaced by the `Pdp\CurlHttpClient` class
392+
393+
[6.3.0]: https://github.com/jeremykendall/php-domain-parser/compare/6.2.0...6.3.0
394+
[6.2.0]: https://github.com/jeremykendall/php-domain-parser/compare/6.1.2...6.2.0
395+
[6.1.2]: https://github.com/jeremykendall/php-domain-parser/compare/6.1.1...6.1.2
396+
[6.1.1]: https://github.com/jeremykendall/php-domain-parser/compare/6.1.0...6.1.1
397+
[6.1.0]: https://github.com/jeremykendall/php-domain-parser/compare/6.0.0...6.1.0
398+
[6.0.0]: https://github.com/jeremykendall/php-domain-parser/compare/5.7.2...6.0.0
399+
[6.0.0]: https://github.com/jeremykendall/php-domain-parser/compare/5.7.2...6.0.0
400+
[5.7.2]: https://github.com/jeremykendall/php-domain-parser/compare/5.7.1...5.7.2
401+
[5.7.1]: https://github.com/jeremykendall/php-domain-parser/compare/5.7.0...5.7.1
402+
[5.7.0]: https://github.com/jeremykendall/php-domain-parser/compare/5.6.0...5.7.0
403+
[5.6.0]: https://github.com/jeremykendall/php-domain-parser/compare/5.5.0...5.6.0
404+
[5.5.0]: https://github.com/jeremykendall/php-domain-parser/compare/5.4.0...5.5.0
405+
[5.4.0]: https://github.com/jeremykendall/php-domain-parser/compare/5.3.0...5.4.0
406+
[5.3.0]: https://github.com/jeremykendall/php-domain-parser/compare/5.2.0...5.3.0
407+
[5.2.0]: https://github.com/jeremykendall/php-domain-parser/compare/5.1.0...5.3.0
408+
[5.1.0]: https://github.com/jeremykendall/php-domain-parser/compare/5.0.0...5.1.0
409+
[5.0.0]: https://github.com/jeremykendall/php-domain-parser/compare/3.0.0...5.0.0

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
"friendsofphp/php-cs-fixer": "^v3.13.2",
5050
"guzzlehttp/guzzle": "^7.5",
5151
"guzzlehttp/psr7": "^1.6 || ^2.4.3",
52-
"phpstan/phpstan": "^1.9.18",
53-
"phpstan/phpstan-phpunit": "^1.3.4",
54-
"phpstan/phpstan-strict-rules": "^1.4.5",
55-
"phpunit/phpunit": "^10.0.11",
52+
"phpstan/phpstan": "^1.10.3",
53+
"phpstan/phpstan-phpunit": "^1.3.8",
54+
"phpstan/phpstan-strict-rules": "^1.5.0",
55+
"phpunit/phpunit": "^10.0.12",
5656
"psr/http-factory": "^1.0.1",
5757
"psr/simple-cache": "^1.0.1",
5858
"symfony/cache": "^v5.0.0 || ^v6.0.0"

src/Domain.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111

1212
final class Domain implements DomainName
1313
{
14-
private function __construct(private RegisteredName $registeredName)
14+
/**
15+
* @throws SyntaxError
16+
*/
17+
private function __construct(private readonly RegisteredName $registeredName)
1518
{
1619
if (false !== filter_var($this->registeredName->value(), FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
1720
throw SyntaxError::dueToUnsupportedType($this->registeredName->toString());
@@ -26,11 +29,17 @@ public static function __set_state(array $properties): self
2629
return new self($properties['registeredName']);
2730
}
2831

32+
/**
33+
* @throws CannotProcessHost
34+
*/
2935
public static function fromIDNA2003(DomainNameProvider|Host|Stringable|string|int|null $domain): self
3036
{
3137
return new self(RegisteredName::fromIDNA2003($domain));
3238
}
3339

40+
/**
41+
* @throws CannotProcessHost
42+
*/
3443
public static function fromIDNA2008(DomainNameProvider|Host|Stringable|string|int|null $domain): self
3544
{
3645
return new self(RegisteredName::fromIDNA2008($domain));
@@ -135,11 +144,17 @@ public function withoutLabel(int ...$keys): self
135144
return $this->newInstance($this->registeredName->withoutLabel(...$keys));
136145
}
137146

147+
/**
148+
* @throws CannotProcessHost
149+
*/
138150
public function clear(): self
139151
{
140152
return $this->newInstance($this->registeredName->clear());
141153
}
142154

155+
/**
156+
* @throws CannotProcessHost
157+
*/
143158
public function slice(int $offset, int $length = null): self
144159
{
145160
return $this->newInstance($this->registeredName->slice($offset, $length));

src/ResolvedDomain.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,17 @@ public static function fromUnknown(DomainNameProvider|Host|Stringable|string|int
6969

7070
/**
7171
* @param array{domain:DomainName, suffix:EffectiveTopLevelDomain} $properties
72+
*
73+
* @throws CannotProcessHost
7274
*/
7375
public static function __set_state(array $properties): self
7476
{
7577
return new self($properties['domain'], $properties['suffix']);
7678
}
7779

80+
/**
81+
* @throws CannotProcessHost
82+
*/
7883
private static function setDomainName(DomainNameProvider|Host|Stringable|string|int|null $domain): DomainName
7984
{
8085
return match (true) {
@@ -176,6 +181,9 @@ public function toUnicode(): self
176181
return new self($this->domain->toUnicode(), $this->suffix->toUnicode());
177182
}
178183

184+
/**
185+
* @throws CannotProcessHost
186+
*/
179187
public function withSuffix(DomainNameProvider|Host|Stringable|string|int|null $suffix): self
180188
{
181189
if (!$suffix instanceof EffectiveTopLevelDomain) {
@@ -188,6 +196,9 @@ public function withSuffix(DomainNameProvider|Host|Stringable|string|int|null $s
188196
);
189197
}
190198

199+
/**
200+
* @throws CannotProcessHost|UnableToResolveDomain
201+
*/
191202
public function withSubDomain(DomainNameProvider|Host|Stringable|string|int|null $subDomain): self
192203
{
193204
if (null === $this->suffix->value()) {
@@ -202,6 +213,9 @@ public function withSubDomain(DomainNameProvider|Host|Stringable|string|int|null
202213
return new self($this->registrableDomain->prepend($subDomain), $this->suffix);
203214
}
204215

216+
/**
217+
* @throws CannotProcessHost|UnableToResolveDomain
218+
*/
205219
public function withSecondLevelDomain(DomainNameProvider|Host|Stringable|string|int|null $label): self
206220
{
207221
if (null === $this->suffix->value()) {

src/Suffix.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public static function __set_state(array $properties): self
2929
return new self($properties['domain'], $properties['section']);
3030
}
3131

32+
/**
33+
* @throws CannotProcessHost
34+
*/
3235
public static function fromICANN(DomainNameProvider|Host|Stringable|string|int|null $domain): self
3336
{
3437
$domain = self::setDomainName($domain);
@@ -39,6 +42,9 @@ public static function fromICANN(DomainNameProvider|Host|Stringable|string|int|n
3942
return new self($domain, self::ICANN);
4043
}
4144

45+
/**
46+
* @throws CannotProcessHost
47+
*/
4248
public static function fromPrivate(DomainNameProvider|Host|Stringable|string|int|null $domain): self
4349
{
4450
$domain = self::setDomainName($domain);
@@ -49,6 +55,9 @@ public static function fromPrivate(DomainNameProvider|Host|Stringable|string|int
4955
return new self($domain, self::PRIVATE);
5056
}
5157

58+
/**
59+
* @throws CannotProcessHost
60+
*/
5261
public static function fromIANA(DomainNameProvider|Host|Stringable|string|int|null $domain): self
5362
{
5463
$domain = self::setDomainName($domain);
@@ -59,11 +68,17 @@ public static function fromIANA(DomainNameProvider|Host|Stringable|string|int|nu
5968
return new self($domain, self::IANA);
6069
}
6170

71+
/**
72+
* @throws CannotProcessHost
73+
*/
6274
public static function fromUnknown(DomainNameProvider|Host|Stringable|string|int|null $domain): self
6375
{
6476
return new self(self::setDomainName($domain), self::UNKNOWN);
6577
}
6678

79+
/**
80+
* @throws CannotProcessHost
81+
*/
6782
private static function setDomainName(int|DomainNameProvider|Host|string|Stringable|null $domain): DomainName
6883
{
6984
if ($domain instanceof DomainNameProvider) {
@@ -141,6 +156,9 @@ public function toUnicode(): self
141156
return new self($this->domain->toUnicode(), $this->section);
142157
}
143158

159+
/**
160+
* @throws CannotProcessHost
161+
*/
144162
public function normalize(DomainName $domain): self
145163
{
146164
$newDomain = $domain->clear()->append($this->toUnicode());

0 commit comments

Comments
 (0)