Skip to content

Commit ed676c2

Browse files
committed
Merge branch 'master' into develop
2 parents d6194e5 + 18c01b1 commit ed676c2

Some content is hidden

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

55 files changed

+2940
-37814
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
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

.gitattributes

Lines changed: 14 additions & 0 deletions
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

.github/CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
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**!

.github/ISSUE_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 25 additions & 0 deletions
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)_

.php_cs

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,39 @@
11
<?php
22

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

5-
$finder = \Symfony\CS\Finder\DefaultFinder::create()
6-
->in('src/')
7-
->in('tests/');
8-
9-
return \Symfony\CS\Config\Config::create()
10-
->setUsingCache(true)
11-
->fixers([
12-
'-pre_increment',
13-
'-concat_without_spaces',
14-
'concat_with_spaces',
15-
'ordered_use',
16-
'long_array_syntax',
8+
return PhpCsFixer\Config::create()
9+
->setRules([
10+
'@PSR2' => true,
11+
'array_syntax' => ['syntax' => 'short'],
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,
24+
'phpdoc_order' => true,
25+
'phpdoc_scalar' => true,
26+
'phpdoc_to_comment' => true,
27+
'psr0' => true,
28+
'psr4' => true,
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,
1737
])
18-
->finder($finder);
38+
->setFinder($finder)
39+
;

.travis.yml

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,35 @@
11
language: php
2+
23
sudo: false
3-
dist: trusty
44

5-
php:
6-
- '5.4'
7-
- '5.5'
8-
- '5.6'
9-
- '7.0'
10-
- '7.1'
11-
- nightly
5+
matrix:
6+
include:
7+
- php: 7.0
8+
env: COLLECT_COVERAGE=true VALIDATE_CODING_STYLE=true IGNORE_PLATFORMS=false
9+
- php: 7.1
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
15+
allow_failures:
16+
- php: nightly
17+
fast_finish: true
18+
19+
cache:
20+
directories:
21+
- $HOME/.composer/cache
22+
23+
before_install:
24+
- travis_retry composer self-update
25+
26+
install:
27+
- if [ "$IGNORE_PLATFORMS" == "true" ]; then travis_retry composer update --no-interaction --prefer-source --ignore-platform-reqs; fi
28+
- if [ "$IGNORE_PLATFORMS" == "false" ]; then travis_retry composer update --no-interaction --prefer-source; fi
1229

13-
script: phpunit
30+
script:
31+
- composer phpunit
1432

15-
before_script:
16-
- composer install
17-
- ./bin/update-psl
33+
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
35+
- if [ "$VALIDATE_CODING_STYLE" == "true" ]; then composer phpcs; fi

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Changelog
2+
3+
All Notable changes to `PHP Domain Parser` will be documented in this file
4+
5+
## 4.0.0 - TBD
6+
7+
### Added
8+
9+
- `Pdp\Exception` a base exception for the library
10+
- `Pdp\Rules` a class to resolve domain name against the public suffix list
11+
- `Pdp\Domain` an immutable value object to represents a parsed domain name
12+
- `Pdp\Installer` a class to enable improve PSL maintenance
13+
- `Pdp\Cache` a PSR-16 file cache implementation to cache a local copy of the PSL
14+
- `Pdp\Manager` a class to enable managing PSL sources and `Rules` objects creation
15+
- `Pdp\Converter` a class to convert the PSL into a PHP array
16+
17+
### Fixed
18+
19+
- Domain class with invalid domain names improved supported
20+
- idn_* conversion error better handled
21+
22+
### Deprecated
23+
24+
- None
25+
26+
### Removed
27+
28+
- URL Parsing capabilities API is removed
29+
- `Pdp\PublicSuffixList` class replaced by the `Pdp\Rules` class
30+
- `Pdp\PublicSuffixManager` class replaced by the `Pdp\Manager` class
31+
- `Pdp\HttpAdapter\HttpAdapterInterface` interface replaced by the `Pdp\HttpClient` interface
32+
- `Pdp\HttpAdapter\CurlHttpAdapter` class replaced by the `Pdp\CurlHttpClient` class

CONTRIBUTING.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)