Skip to content

Commit dd48f84

Browse files
committed
improve v5
Use league/uri-hostname-parser 1.0.4 as basis and adds the ability to resolve the domain against a sub section of the PSL
1 parent 6143445 commit dd48f84

Some content is hidden

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

42 files changed

+2216
-1766
lines changed

Diff for: .editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

Diff for: .gitattributes

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
* text=auto
2+
3+
/.editorconfig export-ignore
4+
/.gitattributes export-ignore
5+
/.github export-ignore
6+
/.gitignore export-ignore
7+
/.php_cs export-ignore
8+
/.scrutinizer.yml export-ignore
9+
/.travis.yml export-ignore
10+
/README.md export-ignore
11+
/CHANGELOG.md export-ignore
12+
/CONDUCT.md export-ignore
13+
/phpunit.xml export-ignore
14+
/tests export-ignore

Diff for: .github/CONTRIBUTING.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
## Bug Report
6+
7+
We accept bug reports via issues created on [Github](https://github.com/jeremykendall/php-domain-parser/issues).
8+
9+
### Prior to submitting your report
10+
11+
- **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.
12+
13+
- **Always try the [master branch](https://github.com/jeremykendall/php-domain-parser)** - to see if the reported bug has not already been fixed.
14+
15+
### When submitting your report
16+
17+
- **Open a new bug report for each issue.**
18+
19+
- **Write a clear summary in english** - A good summary should quickly and uniquely identify a bug report. It should explain the problem, not your suggested solution.
20+
21+
- **Be brief, but don't leave any important details out** - Tell us what you did, what you expected to happen, and what happened. Do not forget to mention your PHP version, the OS Platform and the package version you were using.
22+
23+
## Pull Request
24+
25+
We accept contributions via Pull Requests on [Github](https://github.com/jeremykendall/php-domain-parser/pull).
26+
27+
- **[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.
28+
29+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
30+
31+
- **Document any change in behaviour** - Make sure the README and any other relevant documentation are kept up-to-date.
32+
33+
- **Consider our release cycle** - We try to follow semver. Randomly breaking public APIs is not an option.
34+
35+
- **Create topic branches** - Don't ask us to pull from your master branch.
36+
37+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
38+
39+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.
40+
41+
42+
## Running Tests
43+
44+
``` bash
45+
$ composer test
46+
```
47+
48+
49+
**Happy coding**!

Diff for: .github/ISSUE_TEMPLATE.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Issue summary
2+
3+
_(Please explain in plain english your issue)_
4+
5+
### System informations
6+
7+
_(In case of a bug report Please complete the table below)_
8+
9+
| Information | Description |
10+
|--------------|---------|
11+
| Pdp version | |
12+
| PHP version | |
13+
| OS Platform | |
14+
15+
16+
## Standalone code, or other way to reproduce the problem
17+
18+
_(Please complete the text below to help us fix the issue)_
19+
20+
### Expected result
21+
22+
### Actual result

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Introduction
2+
3+
_(Please explain the library current status regarding your PR.)_
4+
5+
## Proposal
6+
7+
### Describe the new/upated/fixed feature
8+
9+
_(Please explain your proposal. If this is a issue fix, please provide the issue number. If you have not yet created an issue, please do so now)_
10+
11+
### Backward Incompatible Changes
12+
13+
_(Describe if they exists BC break)_
14+
15+
### Targeted release version
16+
17+
_(Indicate the release version targeted for your PR)_
18+
19+
### PR Impact
20+
21+
_(Describe the PR impact on the current public API)_
22+
23+
## Open issues
24+
25+
_(Describe possible open issues and/or future scope if any depending on this RFC acceptance)_

Diff for: .php_cs

+28-17
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,39 @@
11
<?php
22

3-
require_once __DIR__ . '/vendor/autoload.php';
4-
53
$finder = PhpCsFixer\Finder::create()
6-
->in('src')
7-
->in('tests');
4+
->in(__DIR__.'/src')
5+
->in(__DIR__.'/tests')
6+
;
87

98
return PhpCsFixer\Config::create()
10-
->setRiskyAllowed(true)
11-
->setUsingCache(true)
129
->setRules([
1310
'@PSR2' => true,
14-
'@Symfony' => true,
1511
'array_syntax' => ['syntax' => 'short'],
16-
'concat_space' => ['spacing' => 'one'],
17-
'yoda_style' => false,
18-
'is_null' => true,
19-
'modernize_types_casting' => true,
20-
'no_alias_functions' => true,
21-
'ordered_imports' => true,
12+
'concat_space' => ['spacing' => 'none'],
13+
'new_with_braces' => true,
14+
'no_blank_lines_after_phpdoc' => true,
15+
'no_empty_phpdoc' => true,
16+
'no_empty_comment' => true,
17+
'no_leading_import_slash' => true,
18+
'no_trailing_comma_in_singleline_array' => true,
19+
'no_unused_imports' => true,
20+
'ordered_imports' => ['importsOrder' => null, 'sortAlgorithm' => 'alpha'],
21+
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
22+
'phpdoc_align' => true,
23+
'phpdoc_no_empty_return' => true,
2224
'phpdoc_order' => true,
23-
'pre_increment' => false,
25+
'phpdoc_scalar' => true,
26+
'phpdoc_to_comment' => true,
27+
'psr0' => true,
2428
'psr4' => true,
25-
'random_api_migration' => true,
26-
'single_blank_line_before_namespace' => false,
29+
'return_type_declaration' => ['space_before' => 'none'],
30+
'single_blank_line_before_namespace' => true,
31+
'single_quote' => true,
32+
'space_after_semicolon' => true,
33+
'ternary_operator_spaces' => true,
34+
'trailing_comma_in_multiline_array' => true,
35+
'trim_array_spaces' => true,
36+
'whitespace_after_comma_in_array' => true,
2737
])
28-
->setFinder($finder);
38+
->setFinder($finder)
39+
;

Diff for: .travis.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ sudo: false
55
matrix:
66
include:
77
- php: 7.0
8-
env: VALIDATE_CODING_STYLE=true IGNORE_PLATFORMS=false
8+
env: COLLECT_COVERAGE=true VALIDATE_CODING_STYLE=true IGNORE_PLATFORMS=false
99
- php: 7.1
10-
env: VALIDATE_CODING_STYLE=true IGNORE_PLATFORMS=false
11-
- php: master
12-
env: VALIDATE_CODING_STYLE=false IGNORE_PLATFORMS=true
10+
env: COLLECT_COVERAGE=true VALIDATE_CODING_STYLE=true IGNORE_PLATFORMS=false
11+
- php: 7.2
12+
env: COLLECT_COVERAGE=false VALIDATE_CODING_STYLE=false IGNORE_PLATFORMS=true
13+
- php: nightly
14+
env: COLLECT_COVERAGE=false VALIDATE_CODING_STYLE=false IGNORE_PLATFORMS=true
1315
allow_failures:
14-
- php: master
16+
- php: nightly
1517
fast_finish: true
1618

1719
cache:
@@ -29,4 +31,5 @@ script:
2931
- composer phpunit
3032

3133
after_script:
34+
- if [ "$COLLECT_COVERAGE" == "true" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/clover.xml; fi
3235
- if [ "$VALIDATE_CODING_STYLE" == "true" ]; then composer phpcs; fi

Diff for: CONTRIBUTING.md

-22
This file was deleted.

0 commit comments

Comments
 (0)