Skip to content

Commit 9b1595f

Browse files
authored
Merge pull request #308 from jeremykendall/develop
Prepare 6.0.0 release
2 parents a2f61eb + ef61cc3 commit 9b1595f

File tree

107 files changed

+6135
-8442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+6135
-8442
lines changed

.editorconfig

+6
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ trim_trailing_whitespace = true
1010

1111
[*.md]
1212
trim_trailing_whitespace = false
13+
14+
[*.neon]
15+
indent_size = 2
16+
17+
[*.xml.dist]
18+
indent_size = 2

.gitattributes

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
/.github export-ignore
66
/.gitignore export-ignore
77
/.php_cs export-ignore
8-
/.phpstan.src.neon export-ignore
9-
/.phpstan.tests.neon export-ignore
8+
/phpstan.neon export-ignore
109
/.travis.yml export-ignore
1110
/README.md export-ignore
1211
/phpunit.xml.dist export-ignore
13-
/tests export-ignore
12+
/CHANGELOG.md export-ignore
13+
/**/*Test.php export-ignore

.github/CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We accept bug reports via issues created on [Github](https://github.com/jeremyke
1010

1111
- **Always search the issue or pull request list first** - The odds are good that if you've found a problem, someone else has found it, too.
1212

13-
- **Always try the [developer branch](https://github.com/jeremykendall/php-domain-parser/tree/develop)** - to see if the reported bug has not already been fixed.
13+
- **Always try the [master branch](https://github.com/jeremykendall/php-domain-parser/tree/master)** - to see if the reported bug has not already been fixed.
1414

1515
### When submitting your report
1616

@@ -24,7 +24,7 @@ We accept bug reports via issues created on [Github](https://github.com/jeremyke
2424

2525
We accept contributions via Pull Requests on [Github](https://github.com/jeremykendall/php-domain-parser/pull).
2626

27-
- **Always make your Pull Request against the [developer branch](https://github.com/jeremykendall/php-domain-parser/tree/develop)**
27+
- **Always make your Pull Request against the [master branch](https://github.com/jeremykendall/php-domain-parser/tree/master)**
2828

2929
- **[PSR-2 Coding Standard](http://www.php-fig.org/psr/psr-2/)** - Your patch won't be accepted if it doesn't pass the package coding style test suite.
3030

.github/workflows/build.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Build
3+
on:
4+
push: ~
5+
pull_request: ~
6+
7+
jobs:
8+
phpunit:
9+
name: PHPUnit tests on ${{ matrix.php }} ${{ matrix.composer-flags }}
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
php: [ '7.4', '8.0' ]
14+
composer-flags: [ '' ]
15+
phpunit-flags: [ '--coverage-text' ]
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: ${{ matrix.php }}
21+
coverage: pcov
22+
tools: composer:v2
23+
- run: composer update --no-progress ${{ matrix.composer-flags }}
24+
- run: composer phpunit
25+
- run: composer phpstan
26+
if: ${{ matrix.php == '7.4' }}
27+
- run: composer psalm
28+
if: ${{ matrix.php == '7.4' }}
29+
- run: composer phpcs
30+
if: ${{ matrix.php == '7.4' }}

.gitignore

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
tags
2-
composer.lock
1+
data
32
vendor
4-
*.swp
53
docs
6-
*~
74
build
85
.idea
96
.php_cs.cache
107
.phpunit.result.cache
8+
composer.lock

.php_cs

+4-21
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,22 @@
11
<?php
22

3-
$header = <<<EOF
4-
PHP Domain Parser: Public Suffix List based URL parsing.
5-
6-
@see http://github.com/jeremykendall/php-domain-parser for the canonical source repository
7-
8-
@copyright Copyright (c) 2017 Jeremy Kendall (http://jeremykendall.net)
9-
10-
For the full copyright and license information, please view the LICENSE
11-
file that was distributed with this source code.
12-
EOF;
13-
143
$finder = PhpCsFixer\Finder::create()
15-
->in(__DIR__.'/bin')
164
->in(__DIR__.'/src')
17-
->in(__DIR__.'/tests')
185
;
196

207
return PhpCsFixer\Config::create()
218
->setRules([
229
'@PSR2' => true,
2310
'array_syntax' => ['syntax' => 'short'],
2411
'concat_space' => ['spacing' => 'none'],
25-
'header_comment' => [
26-
'commentType' => 'PHPDoc',
27-
'header' => $header,
28-
'location' => 'after_open',
29-
'separate' => 'both',
30-
],
3112
'new_with_braces' => true,
3213
'no_blank_lines_after_phpdoc' => true,
3314
'no_empty_phpdoc' => true,
3415
'no_empty_comment' => true,
3516
'no_leading_import_slash' => true,
17+
'no_superfluous_phpdoc_tags' => true,
3618
'no_trailing_comma_in_singleline_array' => true,
37-
'no_trailing_whitespace' => true,
38-
'no_whitespace_in_blank_line' => true,
19+
'no_superfluous_phpdoc_tags' => true,
3920
'no_unused_imports' => true,
4021
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
4122
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
@@ -45,6 +26,7 @@ return PhpCsFixer\Config::create()
4526
'phpdoc_scalar' => true,
4627
'phpdoc_to_comment' => true,
4728
'phpdoc_summary' => true,
29+
'psr0' => true,
4830
'psr4' => true,
4931
'return_type_declaration' => ['space_before' => 'none'],
5032
'single_blank_line_before_namespace' => true,
@@ -54,6 +36,7 @@ return PhpCsFixer\Config::create()
5436
'trailing_comma_in_multiline_array' => true,
5537
'trim_array_spaces' => true,
5638
'whitespace_after_comma_in_array' => true,
39+
'yoda_style' => true,
5740
])
5841
->setFinder($finder)
5942
;

.travis.yml

-56
This file was deleted.

CHANGELOG.md

+53-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,57 @@
11
# Changelog
22

3-
All Notable changes to `PHP Domain Parser` **5.x** series will be documented in this file
3+
All Notable changes to `PHP Domain Parser` starting from the **5.x** series will be documented in this file
4+
5+
## 6.0.0 - 2020-12-13
6+
7+
### Added
8+
9+
- Adding proper Interfaces
10+
- Added `Domain::clear` to easily initialize an empty domain object
11+
- Added `Domain::slice` to easily slice a domain object
12+
- Added `ResolvedDomain` object to normalize Resolver results.
13+
- Added `Suffix` object to replace the `PublicSuffix` object from v5.
14+
- Public Suffix List and IANA Top Level Domain List are fully decoupled
15+
- Added `Idna`, IDN support has been completely revamped
16+
- Added internal `Stream` class, to improve path/stream resolution
17+
- Resolver uses by default UTS#46 IDNA2008 algorithm to convert domain names
18+
- Storage capability is now optional and can be based on PHP-FIG related interfaces to improve interoperability
19+
- `Pdp\TopLevelDomains::getIANADomain` which throws on syntax error and if no effective TLD is found (behave like `Pdp\TopLevelDomains::resolve` in v5).
20+
21+
### Fixed
22+
23+
- The `Pdp\Domain` class not longer directly exposes Effective TLD status.
24+
- Effective TLD resolver (`Pdp\Rules::resolve` and `Pdp\TopLevelDomains::resolve`) no longer accept IDNA options.
25+
- `Rules::getICANNDomain`, `Rules::getPrivateDomain` will throw even if a `PublicSuffix` is found but does not belong to the correct PSL section.
26+
- `Pdp\TopLevelDomains::resolve` acts like `Pdp\Rules::resolve` and only throw on `TypeError`
27+
28+
### Deprecated
29+
30+
- None
31+
32+
### Removed
33+
34+
- `__toString` and `__debugInfo` usage
35+
- Support for PHP7.4-
36+
- Composer script for automatic updates of the remote databases
37+
- CLI command `bin/update-psl`
38+
- `Pdp\Cache`, `Pdp\CacheException`: The package PSR-16 Cache implementation using the underlying filesystem.
39+
- `Pdp\HttpClient`, `Pdp\CurlHttpClient` and `Pdp\HttpClientException`: The package Http Client.
40+
- `Pdp\Installer`, `Pdp\Manager`: The package source manager and installer
41+
- `Pdp\Logger`, The package logger implementation
42+
- `Pdp\Rules::ALL_DOMAINS` constant deprecated in version 5.3
43+
- `Pdp\Domain::getDomain` deprecated in version 5.3
44+
- `Pdp\Domain::resolve`
45+
- `Pdp\Domain::getPublicSuffix` replaced by `Pdp\ResolvedDomain::suffix`
46+
- `Pdp\Domain::getRegistrableDomain` replaced by `Pdp\ResolvedDomain::registrableDomain`
47+
- `Pdp\Domain::getSubDomain` replaced by `Pdp\ResolvedDomain::subDomain`
48+
- `Pdp\Domain::withPublicSuffix` replaced by `Pdp\ResolvedDomain::withSuffix`
49+
- `Pdp\Domain::getLabel` replaced by `Pdp\Domain::label`
50+
- `Pdp\Domain::isTransitionalDifferent` replaced by `Pdp\IdnaInfo::isTransitionalDifferent`
51+
- `Pdp\PublicSuffix` replaced by `Pdp\Suffix`
52+
- Accessing suffix information from the `Pdp\Domain` object is no longer possible you need to do it from `Pdp\Suffix`
53+
- `Pdp\TopLevelDomains::contains` without replacement
54+
- Internal Converter classes (implementation details are no longer exposed).
455

556
## 5.7.2 - 2020-10-25
657

@@ -16,7 +67,7 @@ All Notable changes to `PHP Domain Parser` **5.x** series will be documented in
1667

1768
- None
1869

19-
### Removed
70+
### Remove
2071

2172
- None
2273

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (C) 2013-2019 Jeremy Kendall, http://about.me/jeremykendall
3+
Copyright (C) 2013 Jeremy Kendall, http://about.me/jeremykendall
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

0 commit comments

Comments
 (0)