diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8960d84..6a199b0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- php-version: ['7.3', '7.4']
+ php-version: ['7.3', '7.4', '8.0', '8.1', '8.2']
steps:
- name: Check out code into the workspace
uses: actions/checkout@v2
@@ -35,4 +35,4 @@ jobs:
- name: Run tests
run: composer run-script phpunit-ci
- name: Coverage
- run: bash <(curl -s https://codecov.io/bash)
\ No newline at end of file
+ run: bash <(curl -s https://codecov.io/bash)
diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml
index c9f9b2a..67a8851 100644
--- a/.github/workflows/code_quality.yml
+++ b/.github/workflows/code_quality.yml
@@ -11,6 +11,9 @@ jobs:
phpcs:
name: "PHP CodeSniffer"
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-version: ['7.3', '7.4', '8.0', '8.1', '8.2']
steps:
- name: Check out code into the workspace
uses: actions/checkout@v2
@@ -19,6 +22,9 @@ jobs:
phpmd:
name: "PHP MessDetector"
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-version: ['7.3', '7.4', '8.0', '8.1', '8.2']
steps:
- name: Check out code into the workspace
uses: actions/checkout@v2
@@ -28,15 +34,19 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
level: 'warning'
reporter: github-pr-check
- standard: './phpmd.xml'
+ standard: './phpmd.xml.dist'
target_directory: 'src'
phpstan:
name: PHPStan
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-version: ['7.3', '7.4', '8.0', '8.1', '8.2']
steps:
- name: Check out code into the workspace
uses: actions/checkout@v2
- name: Run PHPStan
- uses: docker://oskarstark/phpstan-ga:0.12.88
+ uses: docker://oskarstark/phpstan-ga:1.8.0
with:
- args: analyse src -c phpstan.neon --memory-limit=1G --no-progress
\ No newline at end of file
+ args: analyse src -c phpstan.neon --memory-limit=1G --no-progress
+
diff --git a/composer.json b/composer.json
index 167efe8..997d9f2 100644
--- a/composer.json
+++ b/composer.json
@@ -14,12 +14,12 @@
"require": {
"php": ">=7.3",
"ext-json": "*",
- "symfony/validator": "^3 || ^4 || ^5"
+ "symfony/validator": "^3 || ^4 || ^5 || ^6"
},
"require-dev": {
"phpunit/phpunit": "^9.5.7",
"squizlabs/php_codesniffer": "3.*",
- "phpstan/phpstan": "^0.12.92",
+ "phpstan/phpstan": "^1.10",
"phpmd/phpmd": "^2.10"
},
"support": {
@@ -40,9 +40,9 @@
"scripts": {
"phpunit": "./vendor/bin/phpunit -c phpunit.xml.dist --coverage-text",
"phpunit-ci": "@php -dpcov.enabled=1 -dpcov.directory=. -dpcov.exclude=\"~vendor~\" ./vendor/bin/phpunit --teamcity -c phpunit.xml.dist",
- "phpmd": "./vendor/bin/phpmd src text ./phpmd.xml",
- "phpcs": "./vendor/bin/phpcs -p src --runtime-set testVersion 7.3-8.0 && ./vendor/bin/phpcs -p tests --runtime-set testVersion 7.3-8.0 --warning-severity=0",
- "phpstan": "./vendor/bin/phpstan analyse -c phpstan.neon src --memory-limit=-1",
+ "phpmd": "./vendor/bin/phpmd src text ./phpmd.xml.dist",
+ "phpcs": "./vendor/bin/phpcs -p --standard=phpcs.xml.dist --runtime-set testVersion 7.3-8.2 --warning-severity=0",
+ "phpstan": "./vendor/bin/phpstan analyse -c phpstan.neon",
"verify": [
"@phpcs",
"@phpmd",
diff --git a/phpmd.xml b/phpmd.xml.dist
similarity index 62%
rename from phpmd.xml
rename to phpmd.xml.dist
index 3cd0206..b39e318 100644
--- a/phpmd.xml
+++ b/phpmd.xml.dist
@@ -5,43 +5,43 @@
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
Ruleset
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
- tests/*
diff --git a/phpstan.neon b/phpstan.neon
index 1475fdd..d0c5a8b 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -6,3 +6,5 @@ parameters:
paths:
- src
- tests
+ bootstrapFiles:
+ - ./vendor/autoload.php
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 97a7981..550dd9b 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -19,7 +19,6 @@
src
- dev
diff --git a/tests/Validator/CrmUrlValidatorTest.php b/tests/Validator/CrmUrlValidatorTest.php
index 68e25d7..5328e06 100644
--- a/tests/Validator/CrmUrlValidatorTest.php
+++ b/tests/Validator/CrmUrlValidatorTest.php
@@ -21,19 +21,20 @@ class CrmUrlValidatorTest extends TestCase
public function testValidateSuccess(): void
{
$validCrms = [
- 'https://asd.retailcrm.ru',
- 'https://test.retailcrm.pro',
- 'https://raisa.retailcrm.es',
- 'https://blabla.simla.com',
- 'https://blabla.simlachat.com',
- 'https://blabla.simlachat.ru',
- 'https://blabla.ecomlogic.com',
+ 'https://retailcrm.tvoydom.ru',
'https://retailcrm.inventive.ru',
'https://crm.baucenter.ru',
'https://crm.holodilnik.ru',
'https://crm.eco.lanit.ru',
'https://ecom.inventive.ru',
- 'https://retailcrm.tvoydom.ru',
+ 'https://test.retailcrm.ru',
+ 'https://test.retailcrm.pro',
+ 'https://test.retailcrm.es',
+ 'https://test.simla.com',
+ 'https://test.simlachat.com',
+ 'https://test.ecomlogic.com',
+ 'https://test.retailcrm.io',
+ 'https://test.simla.io'
];
$translator = new class () implements TranslatorInterface, LocaleAwareInterface {