Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
vendor
composer.lock
data/public-suffix-list.txt
phpunit.xml
.phpcs-cache

29 changes: 29 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
build:
nodes:
analysis:
environment:
php:
version: 7.1
cache:
disabled: false
directories:
- ~/.composer/cache
project_setup:
override: true
tests:
override:
- php-scrutinizer-run
- phpcs-run
dependencies:
override:
- composer install --ignore-platform-reqs --no-interaction

tools:
external_code_coverage:
timeout: 600

build_failure_conditions:
- 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed
- 'issues.label("coding-style").new.exists' # No new coding style issues allowed
- 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity
- 'project.metric_change("scrutinizer.test_coverage", < 0)' # Code Coverage decreased from previous inspection
53 changes: 45 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,56 @@
dist: trusty
sudo: false
language: php

php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- nightly

matrix:
cache:
directories:
- $HOME/.composer/cache

before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- travis_retry composer self-update
- travis_retry composer config --unset platform.php

install:
- rm composer.lock
- travis_retry composer update --prefer-dist

script:
- ./vendor/bin/phpunit

jobs:
allow_failures:
- php: nightly

include:
- php: 5.3
dist: precise
- stage: Test
env: DEPENDENCIES=low
install:
- rm composer.lock
- travis_retry composer update --prefer-dist --prefer-lowest

- stage: Test
env: COVERAGE
before_script:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script:
- ./vendor/bin/phpunit --coverage-clover clover.xml
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover clover.xml

- stage: Code Quality
env: CODING_STANDARDS
install: travis_retry composer install --prefer-dist
script: ./vendor/bin/phpcs

before_script: composer install
- stage: Code Quality
env: STATIC_ANALYSIS
install: travis_retry composer install --prefer-dist
script: vendor/bin/phpstan analyse -l 7 -c phpstan.neon src
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ echo $url->canonical; // com.jwage.about/
#### Staying Up To Date

The list of domains used to parse a URL into its component parts is updated from time to time.
To ensure that you have the latest copy of the public suffix list, you can refresh
To ensure that you have the latest copy of the public suffix list, you can refresh
the local copy of the list by running `./vendor/bin/pdp-psl data`

### Extract URLs
Expand Down
15 changes: 13 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,22 @@
"autoload-dev": {
"psr-4": {"Purl\\Test\\": "tests/Purl/Test"}
},
"config": {
"sort-packages": true
},
"require": {
"php": ">=5.3.0",
"php": "^7.1",
"jeremykendall/php-domain-parser": "^1.3.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.5|^6.5|^7.0"
"doctrine/coding-standard": "^4.0",
"phpstan/phpstan": "^0.9.2",
"phpstan/phpstan-strict-rules": "^0.9",
"phpunit/phpunit": "^5.5|^6.5|^7.0"
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
}
}
Loading