Skip to content

Commit

Permalink
Merge pull request geekwright#7 from XOOPS/master
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
geekwright authored Jul 8, 2024
2 parents 5948ac1 + 62dbca2 commit f13f304
Show file tree
Hide file tree
Showing 21 changed files with 4,558 additions and 9,785 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
* text=auto

/archive export-ignore
/_archive export-ignore
/tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
phpcs.xml.dist export-ignore
phpunit.xml.dist export-ignore
64 changes: 64 additions & 0 deletions .github/workflows/pr_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on: [push, pull_request]

jobs:
phpunit-9-6:
strategy:
fail-fast: false
matrix:
php_version: ["7.4", "8.1", "8.2", "8.3"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: "7.4"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
coverage: xdebug
- name: Unit Tests with PHPUnit 9.6
run: vendor/bin/phpunit --stderr --version 9.6

phpunit-10-5:
strategy:
fail-fast: false
matrix:
php_version: ["8.1", "8.2", "8.3"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: "8.1"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
coverage: xdebug
- name: Unit Tests with PHPUnit 10.5
run: vendor/bin/phpunit --stderr --version 10.5

phpunit-11-2:
strategy:
fail-fast: false
matrix:
php_version: ["8.2", "8.3"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: "8.2"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
coverage: xdebug
- name: Unit Tests with PHPUnit 11.2
run: vendor/bin/phpunit --stderr --version 11.2
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
\#*
*.bak
.idea/
coverage.clover
vendor/
composer.lock
coverage.clover
git-phpcs.phar
15 changes: 14 additions & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# .scrutinizer.yml
build:
nodes:
analysis:
environment:
php:
version: 7.4
project_setup:
override: true
tests:
override:
- php-scrutinizer-run
- php-scrutinizer-run
filter:
excluded_paths:
- '_archive/*'
- 'tests/*'
tools:
external_code_coverage:
timeout: 300 # Timeout in seconds.
26 changes: 10 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
language: php

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4snapshot
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3

matrix:
include:
- php: 5.3
dist: precise
- php: 5.4
dist: trusty
- php: 5.5
dist: trusty
jobs:
allow_failures:
- php: nightly
include:
- php: nightly

install:
- composer install
Expand All @@ -26,5 +20,5 @@ script:
- vendor/bin/phpunit

after_script:
- if [ "$TRAVIS_PHP_VERSION" != "7.4snapshot" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "7.4snapshot" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
- if [[ "$TRAVIS_PHP_VERSION" != "8.3" && "$TRAVIS_PHP_VERSION" != "nightly" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ "$TRAVIS_PHP_VERSION" != "8.3" && "$TRAVIS_PHP_VERSION" != "nightly" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ the list, please see [publicsuffix.org](https://publicsuffix.org/)

# Installation

> composer require geekwright/regdom
> composer require xoops/regdom
# Usage

## Class Geekwright\RegDom\PublicSuffixList
## Class Xoops\RegDom\PublicSuffixList
This class handles all direct interaction with the public suffix list (PSL.)
This includes, fetching the list from a source URL, caching that list
locally, converting that list to a tree form to facilitate rapid lookup,
Expand All @@ -27,15 +27,15 @@ https://publicsuffix.org/list/public_suffix_list.dat
Resets the current PSL, and uses the specified URL as the source.

### $psl->getTree()
Returns the tree of the current PSL. `Geekwright\RegDom\RegisteredDomain`
Returns the tree of the current PSL. `Xoops\RegDom\RegisteredDomain`
uses this tree form for all lookups.

### $psl->clearDataDirectory(*$cacheOnly*)
By default, this will clear all cached PSL data, including local copies
of remotely accessed PSL data. Pass *true* for `$cacheOnly` to clear only
the serialized tree data.

## Class Geekwright\RegDom\RegisteredDomain
## Class Xoops\RegDom\RegisteredDomain
This class can be used to determine the registrable domain portion of a
URL, respecting the public suffix list conventions.

Expand Down
Loading

0 comments on commit f13f304

Please sign in to comment.