diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..f5a4b05
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,73 @@
+name: Run Tests
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ runs-on: ${{ matrix.operating-system }}
+ strategy:
+ matrix:
+ operating-system: ['ubuntu-latest']
+ php-versions:
+ - '5.4'
+ - '5.5'
+ - '5.6'
+ - '7.0'
+ - '7.1'
+ - '7.2'
+ - '7.3'
+ - '7.4'
+# - '8.0'
+# - '8.1'
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-versions }}
+ - name: Cache composer packages
+ id: composer-cache
+ uses: actions/cache@v2
+ with:
+ path: vendor
+ key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-php-${{ matrix.php-versions }}-
+ - name: Validate composer configuration
+ run: |
+ composer validate
+ - name: Install dependencies
+ run: |
+ composer install --no-progress
+ - name: Run tests
+ run: |
+ composer run-script test
+
+# test-hhvm:
+# runs-on: ubuntu-latest
+# steps:
+# - name: Checkout
+# uses: actions/checkout@v2
+# - name: Setup HHVM
+# uses: azjezz/setup-hhvm@v1
+# with:
+# version: latest
+# debug: false
+# - name: Cache composer packages
+# id: composer-cache
+# uses: actions/cache@v2
+# with:
+# path: vendor
+# key: ${{ runner.os }}-hhvm-${{ hashFiles('**/composer.lock') }}
+# restore-keys: |
+# ${{ runner.os }}-hhvm-
+# - name: Validate composer configuration
+# run: |
+# composer validate
+# - name: Install dependencies
+# run: |
+# composer install --no-progress
+# - name: Run tests
+# run: |
+# composer run-script test
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 9f3c5fc..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-#see https://travis-ci.community/t/php-5-4-and-5-5-archives-missing/3723
-dist: trusty
-
-# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
-language: php
-
-# list any PHP version you want to test against
-php:
- - 5.4
- - 5.5
- - 5.6
- - 7.0
- - 7.1
- - 7.2
- - 7.3
- - 7.4
- - nightly
- - hhvm
-
-matrix:
- allow_failures:
- - php: hhvm
- - php: nightly
- include:
- - php: 5.3
- dist: precise
-
-before_script:
- - composer install
-
-# Script to run tests
-script: composer test
diff --git a/composer.json b/composer.json
index 43a760a..c05eb0f 100644
--- a/composer.json
+++ b/composer.json
@@ -3,20 +3,20 @@
"type": "library",
"description": "Simple, elegant, stand-alone validation library with NO dependencies",
"keywords": ["validation", "validator", "valid"],
- "homepage": "http://github.com/vlucas/valitron",
+ "homepage": "https://github.com/vlucas/valitron",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Vance Lucas",
"email": "vance@vancelucas.com",
- "homepage": "http://www.vancelucas.com"
+ "homepage": "https://www.vancelucas.com"
}
],
"require": {
"php": ">=5.3.2"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.5 || ^6.5"
+ "phpunit/phpunit": ">=4.8.35 <8"
},
"suggest": {
"ext-mbstring": "It can support the multiple bytes string length."
diff --git a/phpunit.xml b/phpunit.xml
index f23518b..9a3a822 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -7,7 +7,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="false"
bootstrap="tests/bootstrap.php"
>
@@ -15,12 +14,4 @@
tests/Valitron
-
-
- src/
-
-
- vendor/
-
-
diff --git a/src/Valitron/Validator.php b/src/Valitron/Validator.php
index 37a5d53..ed04d77 100644
--- a/src/Valitron/Validator.php
+++ b/src/Valitron/Validator.php
@@ -627,7 +627,8 @@ class Validator
if (function_exists('idn_to_ascii') && defined('INTL_IDNA_VARIANT_UTS46')) {
$domain = idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46);
}
- return checkdnsrr($domain, 'ANY');
+
+ return checkdnsrr($domain, 'MX');
}
return false;