diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 0a857b46..93367023 100755 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,19 +1,12 @@ -FROM php:7.3-apache +FROM php:8.0-apache RUN a2enmod rewrite RUN set -xe \ && apt-get update \ - && apt-get install -y --no-install-recommends git wget unzip imagemagick libpng-dev libjpeg-dev \ - libfreetype6-dev default-mysql-client libmcrypt-dev libicu-dev libxml2 libxml2-dev libmagickwand-dev \ - && rm -rf /var/lib/apt/lists/* \ - && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr --with-freetype-dir=/usr \ - && docker-php-ext-install opcache soap gd mbstring mysqli zip intl \ - && pecl install mcrypt-1.0.1 imagick-3.4.4 \ - && docker-php-ext-enable mcrypt imagick \ - && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* + && apt-get install -y unzip libpng-dev libzip-dev libonig-dev libjpeg-dev libmcrypt-dev wget \ + && docker-php-ext-install mysqli zip RUN curl --insecure https://getcomposer.org/composer.phar -o /usr/bin/composer && chmod +x /usr/bin/composer -RUN wget -O /usr/bin/phpunit https://phar.phpunit.de/phpunit-7.phar && chmod +x /usr/bin/phpunit WORKDIR /bitrix-module diff --git a/.docker/php.ini b/.docker/php.ini index c3eddbf9..45c4ddf4 100755 --- a/.docker/php.ini +++ b/.docker/php.ini @@ -7,7 +7,6 @@ log_errors = On display_startup_errors = On cgi.fix_pathinfo = 0 date.timezone = "Europe/Moscow" -mbstring.internal_encoding = "UTF-8" default_charset = utf-8 max_input_vars = 10000 post_max_size = 1024M diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36765d9c..1f9ba3c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['7.3'] + php-version: ['7.4', '8.0'] bitrix-edition: ['small_business_encode', 'business_encode'] services: mysql: diff --git a/CHANGELOG.md b/CHANGELOG.md index 806b3a6e..32070810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2023-03-10 v.6.2.0 +- Добавлена поддержка PHP 8.0 + ## 2023-02-16 v.6.1.16 - Добавление передачи магазина для корпоративных клиентов diff --git a/bin/bitrix-install b/bin/bitrix-install index 63bee803..32a3eb82 100755 --- a/bin/bitrix-install +++ b/bin/bitrix-install @@ -18,6 +18,8 @@ if (!file_exists($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/install/wizar ob_start(); require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/install/wizard/wizard.php'; +ob_clean(); + require_once __DIR__ . '/../helpers/installation/ExtendedCreateModulesStep.php'; require_once __DIR__ . '/../helpers/installation/Installer.php'; @@ -25,8 +27,6 @@ $installer = new Installer(); $step = $argv[1]; -ob_clean(); - switch ($step) { case 'db_type': $installer->dbTypeStep(); diff --git a/composer.json b/composer.json index 991265a3..f70396bd 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "retailcrm/bitrix-module", "scripts": { "pre-module-install": "cp -R intaro.retailcrm $BITRIX_PATH/bitrix/modules", - "tests": "php vendor/bin/phpunit -c phpunit.xml.dist --whitelist=$BITRIX_PATH/bitrix/modules/intaro.retailcrm" + "tests": "vendor/bin/phpunit -c phpunit.xml.dist --whitelist=$BITRIX_PATH/bitrix/modules/intaro.retailcrm" }, "description": "Integration module for Bitrix & RetailCRM", "license": "MIT", @@ -20,9 +20,9 @@ "ext-xmlwriter": "*" }, "require-dev": { - "phpunit/phpunit": "^7", + "phpunit/phpunit": "^8.5", "vlucas/phpdotenv": "^3.3", "mockery/mockery" : "^1.0", - "fzaninotto/faker" : "^1.7" + "fakerphp/faker": "^1.21" } } diff --git a/composer.lock b/composer.lock index 3120278b..39920dfe 100644 --- a/composer.lock +++ b/composer.lock @@ -4,34 +4,35 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a51135dfd806a9758965d7dd91cb8b2a", + "content-hash": "7229b3690506f58c6a0d2865033b3147", "packages": [], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { @@ -58,7 +59,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -74,34 +75,48 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { - "name": "fzaninotto/faker", - "version": "v1.9.2", + "name": "fakerphp/faker", + "version": "v1.21.0", "source": { "type": "git", - "url": "https://github.com/fzaninotto/Faker.git", - "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e" + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e", - "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/92efad6a967f0b79c499705c69b662f738cc9e4d", + "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.4 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "conflict": { + "fzaninotto/faker": "*" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", "ext-intl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7", - "squizlabs/php_codesniffer": "^2.9.2" + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" + }, + "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-main": "v1.21-dev" } }, "autoload": { @@ -125,11 +140,10 @@ "fixtures" ], "support": { - "issues": "https://github.com/fzaninotto/Faker/issues", - "source": "https://github.com/fzaninotto/Faker/tree/v1.9.2" + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.21.0" }, - "abandoned": true, - "time": "2020-12-11T09:56:16+00:00" + "time": "2022-12-13T13:54:32+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -184,30 +198,33 @@ }, { "name": "mockery/mockery", - "version": "1.3.3", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d" + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/60fa2f67f6e4d3634bb4a45ff3171fa52215800d", - "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": ">=5.6.0" + "php": "^7.3 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.10|^6.5|^7.5|^8.5|^9.3" + "phpunit/phpunit": "^8.5 || ^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { @@ -247,43 +264,44 @@ ], "support": { "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.3.3" + "source": "https://github.com/mockery/mockery/tree/1.5.1" }, - "time": "2020-08-11T18:10:21+00:00" + "time": "2022-09-07T15:32:08+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -299,7 +317,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -307,32 +325,33 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -364,26 +383,26 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" + "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2018-07-08T19:23:20+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "2.0.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -415,195 +434,39 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/master" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2018-07-08T19:19:57+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master" - }, - "time": "2020-04-27T09:25:28+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/release/4.x" - }, - "time": "2019-12-28T18:55:12+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "shasum": "" - }, - "require": { - "php": "^7.1", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/0.7.2" - }, - "time": "2019-08-22T18:11:29+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpoption/phpoption", - "version": "1.7.5", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" + "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", + "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -618,11 +481,13 @@ "authors": [ { "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" }, { "name": "Graham Campbell", - "email": "graham@alt-three.com" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], "description": "Option Type for PHP", @@ -634,7 +499,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.7.5" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" }, "funding": [ { @@ -646,111 +511,44 @@ "type": "tidelift" } ], - "time": "2020-07-20T17:29:33+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.10.3", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" - }, - "time": "2020-03-05T15:02:03+00:00" + "time": "2023-02-25T19:38:58+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "7.0.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "819f92bba8b001d4363065928088de22f25a3a48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", + "reference": "819f92bba8b001d4363065928088de22f25a3a48", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", + "php": ">=7.2", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", + "phpunit/php-token-stream": "^3.1.3 || ^4.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", + "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -778,22 +576,28 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" }, - "time": "2018-10-31T16:06:48+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-26T12:20:09+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.3", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357" + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357", - "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", "shasum": "" }, "require": { @@ -832,7 +636,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" }, "funding": [ { @@ -840,7 +644,7 @@ "type": "github" } ], - "time": "2020-11-30T08:25:21+00:00" + "time": "2021-12-02T12:42:26+00:00" }, { "name": "phpunit/php-text-template", @@ -948,29 +752,29 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.1.2", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "472b687829041c24b25f475e14c2f38a09edf1c2" + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2", - "reference": "472b687829041c24b25f475e14c2f38a09edf1c2", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=7.1" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -995,7 +799,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.2" + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" }, "funding": [ { @@ -1004,57 +808,52 @@ } ], "abandoned": true, - "time": "2020-11-30T08:38:46+00:00" + "time": "2020-08-04T08:28:15+00:00" }, { "name": "phpunit/phpunit", - "version": "7.5.20", + "version": "8.5.33", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.4", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.5", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.5", + "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, - "require-dev": { - "ext-pdo": "*" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -1062,7 +861,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -1090,9 +889,76 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/7.5.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.33" }, - "time": "2020-01-08T08:45:45+00:00" + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-02-27T13:04:50+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1151,16 +1017,16 @@ }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { @@ -1213,7 +1079,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, "funding": [ { @@ -1221,7 +1087,7 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2022-09-14T12:31:48+00:00" }, { "name": "sebastian/diff", @@ -1354,16 +1220,16 @@ }, { "name": "sebastian/exporter", - "version": "3.1.3", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { @@ -1372,7 +1238,7 @@ }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -1419,7 +1285,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, "funding": [ { @@ -1427,27 +1293,30 @@ "type": "github" } ], - "time": "2020-11-30T07:47:53+00:00" + "time": "2022-09-14T06:00:17+00:00" }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921", + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -1455,7 +1324,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1480,9 +1349,15 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/2.0.0" + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2" }, - "time": "2017-04-27T15:39:26+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-10T06:55:38+00:00" }, { "name": "sebastian/object-enumerator", @@ -1711,6 +1586,62 @@ ], "time": "2020-11-30T07:30:19+00:00" }, + { + "name": "sebastian/type", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:25:11+00:00" + }, { "name": "sebastian/version", "version": "2.0.1", @@ -1759,29 +1690,99 @@ "time": "2016-10-03T07:35:21+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.22.0", + "name": "symfony/deprecation-contracts", + "version": "v2.5.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { "php": ">=7.1" }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1789,12 +1790,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1819,7 +1820,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -1835,27 +1836,27 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "theseer/tokenizer", - "version": "1.1.3", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -1877,22 +1878,28 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/master" + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, - "time": "2019-06-13T22:48:21+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v3.6.7", + "version": "v3.6.10", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2065beda6cbe75e2603686907b2e45f6f3a5ad82" + "reference": "5b547cdb25825f10251370f57ba5d9d924e6f68e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2065beda6cbe75e2603686907b2e45f6f3a5ad82", - "reference": "2065beda6cbe75e2603686907b2e45f6f3a5ad82", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/5b547cdb25825f10251370f57ba5d9d924e6f68e", + "reference": "5b547cdb25825f10251370f57ba5d9d924e6f68e", "shasum": "" }, "require": { @@ -1903,7 +1910,7 @@ "require-dev": { "ext-filter": "*", "ext-pcre": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0" + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.21" }, "suggest": { "ext-filter": "Required to use the boolean validator.", @@ -1927,13 +1934,13 @@ "authors": [ { "name": "Graham Campbell", - "email": "graham@alt-three.com", - "homepage": "https://gjcampbell.co.uk/" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" }, { "name": "Vance Lucas", "email": "vance@vancelucas.com", - "homepage": "https://vancelucas.com/" + "homepage": "https://github.com/vlucas" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -1944,7 +1951,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v3.6.7" + "source": "https://github.com/vlucas/phpdotenv/tree/v3.6.10" }, "funding": [ { @@ -1956,60 +1963,7 @@ "type": "tidelift" } ], - "time": "2020-07-14T19:04:52+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.9.1", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" - }, - "type": "library", - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozart/assert/issues", - "source": "https://github.com/webmozart/assert/tree/master" - }, - "time": "2020-07-08T17:02:28+00:00" + "time": "2021-12-12T23:02:06+00:00" } ], "aliases": [], @@ -2024,5 +1978,5 @@ "ext-xmlwriter": "*" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.3.0" } diff --git a/intaro.retailcrm/classes/general/CustomerBuilder.php b/intaro.retailcrm/classes/general/CustomerBuilder.php index 368893b1..5f4ce2e4 100644 --- a/intaro.retailcrm/classes/general/CustomerBuilder.php +++ b/intaro.retailcrm/classes/general/CustomerBuilder.php @@ -138,7 +138,7 @@ class CustomerBuilder extends AbstractBuilder implements RetailcrmBuilderInterfa if (isset($this->dataCrm['phones'])) { foreach ($this->dataCrm['phones'] as $phone) { - if (isset($phone['old_number']) && in_array($phone['old_number'], $this->user)) { + if (is_array($this->user) && isset($phone['old_number']) && in_array($phone['old_number'], $this->user)) { $key = array_search($phone['old_number'], $this->user); if (isset($phone['number'])) { diff --git a/intaro.retailcrm/classes/general/RestNormalizer.php b/intaro.retailcrm/classes/general/RestNormalizer.php index 36750ab4..c02986a1 100644 --- a/intaro.retailcrm/classes/general/RestNormalizer.php +++ b/intaro.retailcrm/classes/general/RestNormalizer.php @@ -99,7 +99,7 @@ class RestNormalizer $formatted[ $code ] = $this->formatting($value, true); } - if ($formatted[ $code ] === null || $formatted[ $code ] === '' || count($formatted[ $code ]) < 1) { + if (empty($formatted[$code])) { if ($this->clear === true) { unset($formatted[ $code ]); } diff --git a/intaro.retailcrm/classes/general/collector/RetailCrmCollector.php b/intaro.retailcrm/classes/general/collector/RetailCrmCollector.php index 49a0fdfc..c501f675 100644 --- a/intaro.retailcrm/classes/general/collector/RetailCrmCollector.php +++ b/intaro.retailcrm/classes/general/collector/RetailCrmCollector.php @@ -18,8 +18,9 @@ class RetailCrmCollector { $keys = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_COLL_KEY, 0)); $collector = COption::GetOptionString(self::$MODULE_ID, self::$CRM_COLL, 0); + $request = \Bitrix\Main\Context::getCurrent()->getRequest(); - if ($collector === 'Y' && !empty($keys[SITE_ID]) && ADMIN_SECTION !== true) { + if ($collector === 'Y' && !empty($keys[SITE_ID]) && $request->isAdminSection() !== true) { global $USER; $params = array(); diff --git a/intaro.retailcrm/classes/general/consultant/RetailCrmOnlineConsultant.php b/intaro.retailcrm/classes/general/consultant/RetailCrmOnlineConsultant.php index 3332c0bb..723c97c1 100644 --- a/intaro.retailcrm/classes/general/consultant/RetailCrmOnlineConsultant.php +++ b/intaro.retailcrm/classes/general/consultant/RetailCrmOnlineConsultant.php @@ -12,7 +12,9 @@ class RetailCrmOnlineConsultant */ public static function add() { - if (RetailcrmConfigProvider::isOnlineConsultantEnabled() && ADMIN_SECTION !== true) { + $request = \Bitrix\Main\Context::getCurrent()->getRequest(); + + if (RetailcrmConfigProvider::isOnlineConsultantEnabled() && $request->isAdminSection() !== true) { \Bitrix\Main\Page\Asset::getInstance()->addString( RetailcrmConfigProvider::getOnlineConsultantScript(), true diff --git a/intaro.retailcrm/classes/general/events/RetailCrmEvent.php b/intaro.retailcrm/classes/general/events/RetailCrmEvent.php index f77bd23b..6e3deabe 100644 --- a/intaro.retailcrm/classes/general/events/RetailCrmEvent.php +++ b/intaro.retailcrm/classes/general/events/RetailCrmEvent.php @@ -40,7 +40,7 @@ class RetailCrmEvent * @return bool * @throws InvalidArgumentException */ - public function OnAfterUserUpdate($arFields) + public static function OnAfterUserUpdate($arFields) { if (isset($GLOBALS['RETAIL_CRM_HISTORY']) && $GLOBALS['RETAIL_CRM_HISTORY']) { return false; @@ -67,7 +67,7 @@ class RetailCrmEvent * @param mixed $ID - Order id * @param mixed $arFields - Order arFields */ - public function onUpdateOrder($ID, $arFields) + public static function onUpdateOrder($ID, $arFields) { if (isset($GLOBALS['RETAIL_CRM_HISTORY']) && $GLOBALS['RETAIL_CRM_HISTORY']) { $GLOBALS['RETAILCRM_ORDER_OLD_EVENT'] = false; @@ -91,7 +91,7 @@ class RetailCrmEvent * * @param object $event - Order object */ - public function orderDelete($event) + public static function orderDelete($event) { $GLOBALS['RETAILCRM_ORDER_DELETE'] = true; @@ -426,7 +426,7 @@ class RetailCrmEvent * @throws InvalidArgumentException * */ - public function paymentSave(Payment $event) + public static function paymentSave(Payment $event) { $apiVersion = COption::GetOptionString(self::$MODULE_ID, 'api_version', 0); @@ -472,7 +472,9 @@ class RetailCrmEvent $payments = $orderCrm['order']['payments']; } - if ($payments) { + $paymentsExternalIds = []; + + if (!empty($payments)) { foreach ($payments as $payment) { if (isset($payment['externalId'])) { if (RCrmActions::isNewExternalId($payment['externalId'])) { @@ -524,9 +526,9 @@ class RetailCrmEvent $arPaymentExtId = RCrmActions::generatePaymentExternalId($arPayment['ID']); - if (array_key_exists($arPaymentExtId, $paymentsExternalIds)) { + if (!empty($paymentsExternalIds) && array_key_exists($arPaymentExtId, $paymentsExternalIds)) { $paymentData = $paymentsExternalIds[$arPaymentExtId]; - } elseif (array_key_exists($arPayment['ID'], $paymentsExternalIds)) { + } elseif (!empty($paymentsExternalIds) && array_key_exists($arPayment['ID'], $paymentsExternalIds)) { $paymentData = $paymentsExternalIds[$arPayment['ID']]; } else { $paymentData = []; @@ -564,7 +566,7 @@ class RetailCrmEvent * * @throws InvalidArgumentException */ - public function paymentDelete(Payment $event): void + public static function paymentDelete(Payment $event): void { $apiVersion = COption::GetOptionString(self::$MODULE_ID, 'api_version', 0); diff --git a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php index 5563f16f..6d137cc7 100644 --- a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php +++ b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php @@ -72,7 +72,7 @@ class RetailCrmHistory Logger::getInstance()->write($customerH, 'customerHistory'); - if (count($customerH) == 0) { + if (is_array($customerH) && count($customerH) === 0) { if ($customerHistory['history']['totalPageCount'] > $customerHistory['history']['currentPage']) { $historyFilter['page'] = $customerHistory['history']['currentPage'] + 1; @@ -271,7 +271,7 @@ class RetailCrmHistory Logger::getInstance()->write($orderH, 'orderHistory'); - if (count($orderH) === 0) { + if (is_array($orderH) && count($orderH) === 0) { if ($orderHistory['history']['totalPageCount'] > $orderHistory['history']['currentPage']) { $historyFilter['page'] = $orderHistory['history']['currentPage'] + 1; @@ -722,7 +722,7 @@ class RetailCrmHistory } else { self::setProp($somePropValue, RCrmActions::fromJSON($order[$key])); } - } elseif (array_key_exists($key, $order['delivery']['address'])) { + } elseif (is_array($order['delivery']['address']) && array_key_exists($key, $order['delivery']['address'])) { if ($propsKey[$orderProp]['TYPE'] == 'LOCATION') { if (!empty($order['delivery']['address'][$key])) { @@ -793,7 +793,7 @@ class RetailCrmHistory ->getItemByOrderPropertyId($propsKey[$orderProp]['ID']); self::setProp($somePropValue, RCrmActions::fromJSON($order[$key])); - } elseif(array_key_exists($key, $order['contragent'])) { + } elseif(is_array($order['contragent']) && array_key_exists($key, $order['contragent'])) { $somePropValue = $propertyCollection ->getItemByOrderPropertyId($propsKey[$orderProp]['ID']); self::setProp($somePropValue, RCrmActions::fromJSON($order['contragent'][$key])); @@ -1115,7 +1115,7 @@ class RetailCrmHistory $orderSumm += $item->getFinalPrice(); } - if (array_key_exists('cost', $order['delivery'])) { + if (is_array($order['delivery']) && array_key_exists('cost', $order['delivery'])) { $deliverySumm = $order['delivery']['cost']; } else { $deliverySumm = $newOrder->getDeliveryPrice(); @@ -1228,8 +1228,9 @@ class RetailCrmHistory if (!empty($newHistoryPayments)) { foreach ($newOrder->getPaymentCollection() as $orderPayment) { - if (array_key_exists($orderPayment->getField('XML_ID'), $newHistoryPayments)) { - + if (is_array($newHistoryPayments) + && array_key_exists($orderPayment->getField('XML_ID'), $newHistoryPayments) + ) { $paymentId = $orderPayment->getId(); $paymentExternalId = RCrmActions::generatePaymentExternalId($paymentId); if (is_null($paymentId)) { @@ -1372,7 +1373,10 @@ class RetailCrmHistory } if ($fields['customer'][$change['field']] == 'phones') { - $key = count($customers[$change['customer']['id']]['phones']); + if (is_array($customers[$change['customer']['id']]['phones'])) { + $key = count($customers[$change['customer']['id']]['phones']); + } + if (isset($change['oldValue'])) { $customers[$change['customer']['id']]['phones'][$key]['old_number'] = $change['oldValue']; } @@ -1463,7 +1467,7 @@ class RetailCrmHistory $change['order']['payments'] = $payments; } - if (isset($change['order']['contragent']) && count($change['order']['contragent']) > 0) { + if (is_array($change['order']['contragent']) && isset($change['order']['contragent']) && count($change['order']['contragent']) > 0) { foreach ($change['order']['contragent'] as $name => $value) { $change['order'][$name] = self::newValue($value); } @@ -1875,7 +1879,7 @@ class RetailCrmHistory public static function newValue($value) { - if (array_key_exists('code', $value)) { + if (is_array($value) && array_key_exists('code', $value)) { return $value['code']; } else { return $value; diff --git a/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php b/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php index 23a2eeb1..5bf9b46c 100644 --- a/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php +++ b/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php @@ -59,7 +59,6 @@ class RetailCrmOrder $dimensionsSetting = RetailcrmConfigProvider::getOrderDimensions(); $currency = RetailcrmConfigProvider::getCurrencyOrDefault(); - $optionCorpClient = RetailcrmConfigProvider::getCorporateClientStatus(); $order = [ 'number' => $arOrder['NUMBER'], @@ -105,6 +104,7 @@ class RetailCrmOrder //fields foreach ($arOrder['PROPS']['properties'] as $prop) { if (!empty($arParams['optionsLegalDetails']) + && is_array($arParams['optionsLegalDetails'][$arOrder['PERSON_TYPE_ID']]) && $search = array_search($prop['CODE'], $arParams['optionsLegalDetails'][$arOrder['PERSON_TYPE_ID']]) ) { $order['contragent'][$search] = $prop['VALUE'][0];//legal order data @@ -112,7 +112,8 @@ class RetailCrmOrder && $search = array_search($prop['CODE'], $arParams['optionsCustomFields'][$arOrder['PERSON_TYPE_ID']]) ) { $order['customFields'][$search] = $prop['VALUE'][0];//custom properties - } elseif ($search = array_search($prop['CODE'], $arParams['optionsOrderProps'][$arOrder['PERSON_TYPE_ID']])) {//other + } elseif (is_array($arParams['optionsOrderProps'][$arOrder['PERSON_TYPE_ID']]) + && $search = array_search($prop['CODE'], $arParams['optionsOrderProps'][$arOrder['PERSON_TYPE_ID']])) {//other if (in_array($search, ['fio', 'phone', 'email'])) {//fio, phone, email if ($search === 'fio') { $order = array_merge($order, RCrmActions::explodeFio($prop['VALUE'][0]));//add fio fields @@ -188,6 +189,7 @@ class RetailCrmOrder } //basket + foreach ($arOrder['BASKET'] as $position => $product) { $itemId = null; $externalId = $position . '_' . $product['PRODUCT_ID']; @@ -196,9 +198,15 @@ class RetailCrmOrder $externalIds = $orderItems[$externalId]['externalIds']; $itemId = $orderItems[$externalId]['id']; - $key = array_search('bitrix', array_column($externalIds, 'code')); + $key = null; + $keyBasketId = null; - if ($externalIds[$key]['code'] === 'bitrix') { + if (is_array($externalIds)) { + $key = array_search('bitrix', array_column($externalIds, 'code')); + $keyBasketId = array_search('bitrixBasketId', array_column($externalIds, 'code')); + } + + if (isset($externalIds[$key]['code']) && $externalIds[$key]['code'] === 'bitrix') { $externalIds[$key] = [ 'code' => 'bitrix', 'value' => $externalId, @@ -208,11 +216,11 @@ class RetailCrmOrder 'code' => 'bitrix', 'value' => $externalId, ]; - } + } - $keyBasketId = array_search('bitrixBasketId', array_column($externalIds, 'code')); - - if ($externalIds[$keyBasketId]['code'] === 'bitrixBasketId') { + if (isset($externalIds[$keyBasketId]['code']) + && $externalIds[$keyBasketId]['code'] === 'bitrixBasketId' + ) { $externalIds[$keyBasketId] = [ 'code' => 'bitrixBasketId', 'value' => $product['ID'], @@ -222,7 +230,7 @@ class RetailCrmOrder 'code' => 'bitrixBasketId', 'value' => $product['ID'], ]; - } + } } else { //create $externalIds = [ [ diff --git a/intaro.retailcrm/classes/general/ua/RetailCrmUa.php b/intaro.retailcrm/classes/general/ua/RetailCrmUa.php index cc170222..80e2954d 100644 --- a/intaro.retailcrm/classes/general/ua/RetailCrmUa.php +++ b/intaro.retailcrm/classes/general/ua/RetailCrmUa.php @@ -9,8 +9,9 @@ class RetailCrmUa { $ua = COption::GetOptionString(self::$MODULE_ID, self::$CRM_UA, 0); $uaKeys = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_UA_KEYS, 0)); + $request = \Bitrix\Main\Context::getCurrent()->getRequest(); - if ($ua === 'Y' && !empty($uaKeys[SITE_ID]['ID']) && !empty($uaKeys[SITE_ID]['INDEX']) && ADMIN_SECTION !== true) { + if ($ua === 'Y' && !empty($uaKeys[SITE_ID]['ID']) && !empty($uaKeys[SITE_ID]['INDEX']) && $request->isAdminSection() !== true) { global $APPLICATION; $ua = " diff --git a/intaro.retailcrm/description.ru b/intaro.retailcrm/description.ru index 5b903449..3fe9bc9e 100644 --- a/intaro.retailcrm/description.ru +++ b/intaro.retailcrm/description.ru @@ -1 +1 @@ -- Добавлена поддержка работы с корпоративными клиентами при мультисайтовости cms системы +- Добавлена поддержка PHP 8.0 diff --git a/intaro.retailcrm/export/export_setup.php b/intaro.retailcrm/export/export_setup.php index 88217c55..9ecbf239 100644 --- a/intaro.retailcrm/export/export_setup.php +++ b/intaro.retailcrm/export/export_setup.php @@ -495,7 +495,7 @@ if ($STEP === 1) {   -
+


  diff --git a/intaro.retailcrm/include.php b/intaro.retailcrm/include.php index 9e68ce2d..740a8bb9 100644 --- a/intaro.retailcrm/include.php +++ b/intaro.retailcrm/include.php @@ -61,9 +61,7 @@ if (empty(ConfigProvider::getSitesAvailable())) { try { $credentials = $client->getCredentials(); - ConfigProvider::setSitesAvailable( - count($credentials->sitesAvailable) > 0 ? $credentials->sitesAvailable[0] : '' - ); + ConfigProvider::setSitesAvailable($credentials->sitesAvailable[0] ?? ''); } catch (ArgumentOutOfRangeException | CurlException $exception) { Logger::getInstance()->write($exception->getMessage()); } diff --git a/intaro.retailcrm/install/index.php b/intaro.retailcrm/install/index.php index d0285c67..84805c26 100644 --- a/intaro.retailcrm/install/index.php +++ b/intaro.retailcrm/install/index.php @@ -89,7 +89,7 @@ class intaro_retailcrm extends CModule public $PROTOCOL = 'protocol'; public $INSTALL_PATH; - function intaro_retailcrm() + public function __construct() { $arModuleVersion = []; $path = str_replace("\\", '/', __FILE__); @@ -615,15 +615,69 @@ class intaro_retailcrm extends CModule COption::SetOptionString($this->MODULE_ID, $this->PROTOCOL, 'http://'); } - COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_TYPES_ARR, serialize(RCrmActions::clearArr($orderTypesArr))); - COption::SetOptionString($this->MODULE_ID, $this->CRM_DELIVERY_TYPES_ARR, serialize(RCrmActions::clearArr($deliveryTypesArr))); - COption::SetOptionString($this->MODULE_ID, $this->CRM_PAYMENT_TYPES, serialize(RCrmActions::clearArr($paymentTypesArr))); - COption::SetOptionString($this->MODULE_ID, $this->CRM_PAYMENT_STATUSES, serialize(RCrmActions::clearArr($paymentStatusesArr))); - COption::SetOptionString($this->MODULE_ID, $this->CRM_PAYMENT, serialize(RCrmActions::clearArr($paymentArr))); + // Set order types + if (!empty($orderTypesArr)) { + COption::SetOptionString( + $this->MODULE_ID, + $this->CRM_ORDER_TYPES_ARR, + serialize(RCrmActions::clearArr($orderTypesArr) + ) + ); + } + + // Set delivery types + if (!empty($deliveryTypesArr)) { + COption::SetOptionString( + $this->MODULE_ID, + $this->CRM_DELIVERY_TYPES_ARR, + serialize(RCrmActions::clearArr($deliveryTypesArr) + ) + ); + } + + // Set payment types + if (!empty($paymentTypesArr)) { + COption::SetOptionString( + $this->MODULE_ID, + $this->CRM_PAYMENT_TYPES, + serialize(RCrmActions::clearArr($paymentTypesArr) + ) + ); + } + + // Set payment statuses + if (!empty($paymentStatusesArr)) { + COption::SetOptionString( + $this->MODULE_ID, + $this->CRM_PAYMENT_STATUSES, + serialize(RCrmActions::clearArr($paymentStatusesArr) + ) + ); + } + + // Set payments + if (!empty($paymentArr)) { + COption::SetOptionString( + $this->MODULE_ID, + $this->CRM_PAYMENT, + serialize(RCrmActions::clearArr($paymentArr) + ) + ); + } + COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_LAST_ID, 0); COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_DISCHARGE, 1); COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_FAILED_IDS, serialize([])); - COption::SetOptionString($this->MODULE_ID, $this->CRM_CANSEL_ORDER, serialize(RCrmActions::clearArr($canselOrderArr))); + + // Set cansel order + if (!empty($canselOrderArr)) { + COption::SetOptionString( + $this->MODULE_ID, + $this->CRM_CANSEL_ORDER, + serialize(RCrmActions::clearArr($canselOrderArr) + ) + ); + } if ($orderProps = COption::GetOptionString($this->OLD_MODULE_ID, $this->CRM_ORDER_PROPS, 0)) { $arResult['ORDER_PROPS'] = unserialize($orderProps); diff --git a/intaro.retailcrm/install/version.php b/intaro.retailcrm/install/version.php index b31f7c70..447e0a59 100644 --- a/intaro.retailcrm/install/version.php +++ b/intaro.retailcrm/install/version.php @@ -1,6 +1,6 @@ '6.1.16', - 'VERSION_DATE' => '2023-02-16 12:00:00' + 'VERSION' => '6.2.0', + 'VERSION_DATE' => '2023-03-10 12:00:00' ]; diff --git a/intaro.retailcrm/lib/component/builder/api/customerbuilder.php b/intaro.retailcrm/lib/component/builder/api/customerbuilder.php index 4fa35c49..0a1c9bbe 100644 --- a/intaro.retailcrm/lib/component/builder/api/customerbuilder.php +++ b/intaro.retailcrm/lib/component/builder/api/customerbuilder.php @@ -236,7 +236,7 @@ class CustomerBuilder implements BuilderInterface private function handleFields(): void { - if (count($this->customFields) === 0) { + if (is_array($this->customFields) && count($this->customFields) === 0) { return; } diff --git a/intaro.retailcrm/lib/component/handlers/eventshandlers.php b/intaro.retailcrm/lib/component/handlers/eventshandlers.php index 84ebd13e..e12e05f1 100644 --- a/intaro.retailcrm/lib/component/handlers/eventshandlers.php +++ b/intaro.retailcrm/lib/component/handlers/eventshandlers.php @@ -60,7 +60,7 @@ class EventsHandlers * @param array $arParams * @param array $arResult */ - public function OnSaleComponentOrderResultPreparedHandler( + public static function OnSaleComponentOrderResultPreparedHandler( Order $order, array $arUserResult, HttpRequest $request, @@ -125,7 +125,7 @@ class EventsHandlers * * @param \Bitrix\Main\Event $event */ - public function OnSaleOrderSavedHandler(Event $event): void + public static function OnSaleOrderSavedHandler(Event $event): void { if (self::$disableSaleHandler === true) { return; @@ -222,7 +222,7 @@ class EventsHandlers * @return mixed * @throws \ReflectionException */ - public function OnAfterUserRegisterHandler(array $arFields): void + public static function OnAfterUserRegisterHandler(array $arFields): void { if (isset($arFields['USER_ID']) && $arFields['USER_ID'] > 0) { $user = UserRepository::getById($arFields['USER_ID']); diff --git a/intaro.retailcrm/lib/component/json/strategy/deserialize/typedarraystrategy.php b/intaro.retailcrm/lib/component/json/strategy/deserialize/typedarraystrategy.php index 43246082..d69d3e3e 100644 --- a/intaro.retailcrm/lib/component/json/strategy/deserialize/typedarraystrategy.php +++ b/intaro.retailcrm/lib/component/json/strategy/deserialize/typedarraystrategy.php @@ -37,6 +37,10 @@ class TypedArrayStrategy implements DeserializeStrategyInterface $valueType = ''; $result = []; + if (!is_array($value)) { + return $result; + } + if (strpos($this->innerType, ',') !== false) { [$keyType, $valueType] = static::getInnerTypes($this->innerType); diff --git a/intaro.retailcrm/lib/component/json/strategy/serialize/typedarraystrategy.php b/intaro.retailcrm/lib/component/json/strategy/serialize/typedarraystrategy.php index aef1be3e..0b2507f5 100644 --- a/intaro.retailcrm/lib/component/json/strategy/serialize/typedarraystrategy.php +++ b/intaro.retailcrm/lib/component/json/strategy/serialize/typedarraystrategy.php @@ -36,6 +36,10 @@ class TypedArrayStrategy implements SerializeStrategyInterface $valueType = ''; $result = []; + if (!is_array($value)) { + return $result; + } + if (strpos($this->innerType, ',') !== false) { [$keyType, $valueType] = static::getInnerTypes($this->innerType); diff --git a/intaro.retailcrm/lib/controller/loyalty/register.php b/intaro.retailcrm/lib/controller/loyalty/register.php index 41c5f43e..4ff24ea5 100644 --- a/intaro.retailcrm/lib/controller/loyalty/register.php +++ b/intaro.retailcrm/lib/controller/loyalty/register.php @@ -46,12 +46,12 @@ class Register extends Controller return [ 'saveUserLpFields' => [ '-prefilters' => [ - new Authentication, + Authentication::class, ], ], 'resetUserLpFields' => [ '-prefilters' => [ - new Authentication, + Authentication::class, ], ], ]; diff --git a/intaro.retailcrm/lib/icml/settingsservice.php b/intaro.retailcrm/lib/icml/settingsservice.php index 267872db..7bee56a0 100644 --- a/intaro.retailcrm/lib/icml/settingsservice.php +++ b/intaro.retailcrm/lib/icml/settingsservice.php @@ -624,7 +624,7 @@ class SettingsService */ public function isExport($iblockId, $iblockExport): bool { - if (count($iblockExport) !== 0) { + if (is_array($iblockExport) && count($iblockExport) !== 0) { return (in_array($iblockId, $iblockExport)); } diff --git a/intaro.retailcrm/lib/service/loyaltyaccountservice.php b/intaro.retailcrm/lib/service/loyaltyaccountservice.php index 71d3a649..c0543f44 100644 --- a/intaro.retailcrm/lib/service/loyaltyaccountservice.php +++ b/intaro.retailcrm/lib/service/loyaltyaccountservice.php @@ -19,6 +19,7 @@ use Intaro\RetailCrm\Component\ConfigProvider; use Intaro\RetailCrm\Component\Factory\ClientFactory; use Intaro\RetailCrm\Component\Json\Serializer; use Intaro\RetailCrm\Component\ServiceLocator; +use Intaro\RetailCrm\Model\Api\IdentifiersPair; use Intaro\RetailCrm\Model\Api\LoyaltyAccount; use Intaro\RetailCrm\Model\Api\LoyaltyAccountApiFilterType; use Intaro\RetailCrm\Model\Api\Request\Loyalty\Account\LoyaltyAccountRequest; @@ -118,9 +119,12 @@ class LoyaltyAccountService $createRequest->loyaltyAccount = new SerializedCreateLoyaltyAccount(); $createRequest->loyaltyAccount->phoneNumber = $phone ?? ''; $createRequest->loyaltyAccount->cardNumber = $card ?? ''; - $createRequest->loyaltyAccount->customer->externalId = $externalId; $createRequest->loyaltyAccount->customFields = []; + $createRequest->loyaltyAccount->customer = new IdentifiersPair(); + $createRequest->loyaltyAccount->customer->externalId = $externalId; + + $createResponse = $client->createLoyaltyAccount($createRequest); if ($createResponse instanceof LoyaltyAccountCreateResponse) { diff --git a/intaro.retailcrm/lib/service/loyaltyservice.php b/intaro.retailcrm/lib/service/loyaltyservice.php index 7264e74c..a96afbf5 100644 --- a/intaro.retailcrm/lib/service/loyaltyservice.php +++ b/intaro.retailcrm/lib/service/loyaltyservice.php @@ -22,6 +22,7 @@ use Intaro\RetailCrm\Component\Constants; use Intaro\RetailCrm\Component\Factory\ClientFactory; use Intaro\RetailCrm\Component\ServiceLocator; use Intaro\RetailCrm\Model\Api\LoyaltyAccount; +use Intaro\RetailCrm\Model\Api\LoyaltyAccountApiFilterType; use Intaro\RetailCrm\Model\Api\OrderProduct; use Intaro\RetailCrm\Model\Api\PriceType; use Intaro\RetailCrm\Model\Api\Request\Loyalty\Account\LoyaltyAccountRequest; @@ -176,6 +177,7 @@ class LoyaltyService public function getLoyaltyAccounts(int $idInLoyalty): ?LoyaltyAccount { $request = new LoyaltyAccountRequest(); + $request->filter = new LoyaltyAccountApiFilterType(); $request->filter->id = $idInLoyalty; $request->filter->sites = $this->site; diff --git a/intaro.retailcrm/lib/service/utils.php b/intaro.retailcrm/lib/service/utils.php index 1b0adf63..80ee7813 100644 --- a/intaro.retailcrm/lib/service/utils.php +++ b/intaro.retailcrm/lib/service/utils.php @@ -46,7 +46,7 @@ class Utils foreach ($arr as $index => $node) { $result[$index] = is_array($node) === true ? $this->clearArray($node) : trim($node); - if ($result[$index] === '' || $result[$index] === null || count($result[$index]) < 1) { + if (empty($result[$index])) { unset($result[$index]); } } diff --git a/intaro.retailcrm/lib/vendor/doctrine/common/annotations/tokenparser.php b/intaro.retailcrm/lib/vendor/doctrine/common/annotations/tokenparser.php index d4fd583c..ada4a9a9 100644 --- a/intaro.retailcrm/lib/vendor/doctrine/common/annotations/tokenparser.php +++ b/intaro.retailcrm/lib/vendor/doctrine/common/annotations/tokenparser.php @@ -99,14 +99,22 @@ class TokenParser */ public function parseUseStatement() { - $groupRoot = ''; $class = ''; $alias = ''; $statements = []; $explicitAlias = false; while (($token = $this->next())) { + if (false !== strpos(PHP_VERSION, '8') && $token[0] === T_NAME_QUALIFIED) { + $fullAlias = explode('\\', $token[1]); + $alias = $fullAlias[array_key_last($fullAlias)]; + $statements[strtolower($alias)] = $token[1]; + + break; + } + $isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR; + if (!$explicitAlias && $isNameToken) { $class .= $token[1]; $alias = $token[1]; diff --git a/intaro.retailcrm/options.php b/intaro.retailcrm/options.php index 3c3364a0..aca716ae 100644 --- a/intaro.retailcrm/options.php +++ b/intaro.retailcrm/options.php @@ -525,11 +525,8 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) { } $bitrixCorpShopsArr = array_values(array_filter($_POST, 'maskCorp', ARRAY_FILTER_USE_KEY)); - - RegisterModuleDependences("main", "OnBeforeProlog", $mid, "RetailCrmCc", "add"); } else { $cc = 'N'; - UnRegisterModuleDependences("main", "OnBeforeProlog", $mid, "RetailCrmCc", "add"); } //purchasePrice_null @@ -983,6 +980,8 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) { ); } ?> + +