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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
/phpunit.xml
/.phpcs-cache
/vendor
/.phpunit.result.cache

2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ build:
analysis:
environment:
php:
version: 7.1
version: 7.2
cache:
disabled: false
directories:
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ sudo: false
language: php

php:
- 7.1
- 7.2
- nightly

cache:
directories:
Expand Down
19 changes: 0 additions & 19 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,6 @@ echo $url->fragment->query; // param1=value1&param2=value2
echo $url; // http://jwage.com#about/me?param1=value1&param2=value2
```

### Domain Parts

Purl can parse a URL in to parts and its canonical form. It uses the list of domains from http://publicsuffix.org to break the domain into its public suffix, registerable domain, subdomain and canonical form.

```php
$url = new \Purl\Url('http://about.jwage.com');

echo $url->publicSuffix; // com
echo $url->registerableDomain; // jwage.com
echo $url->subdomain; // about
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
the local copy of the list by running `./vendor/bin/pdp-psl data`

### Extract URLs

You can easily extract urls from a string of text using the `extract` method:
Expand Down
12 changes: 5 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@
"sort-packages": true
},
"require": {
"php": "^7.1",
"jeremykendall/php-domain-parser": "^1.3.1"
"php": "^7.2"
},
"require-dev": {
"doctrine/coding-standard": "^5.0",
"phpstan/phpstan": "^0.10",
"phpstan/phpstan-deprecation-rules": "^0.10",
"phpstan/phpstan-strict-rules": "^0.10",
"phpunit/phpunit": "^5.5|^6.5|^7.0"
"doctrine/coding-standard": "^6.0",
"phpstan/phpstan": "^0.11.5",
"phpstan/phpstan-strict-rules": "^0.11.0",
"phpunit/phpunit": "^8.1"
},
"extra": {
"branch-alias": {
Expand Down
Loading