From cbf5237689a8b14da835480b6fb46674f98e079f Mon Sep 17 00:00:00 2001 From: GrishaginEvgeny <86664716+GrishaginEvgeny@users.noreply.github.com> Date: Wed, 3 Jul 2024 18:14:17 +0300 Subject: [PATCH] PHP 8.3 support (#193) --- .github/workflows/ci.yml | 2 +- composer.json | 4 ++-- lib/RetailCrm/Response/ApiResponse.php | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53f73ce..268fd33 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.0', '7.1', '7.2', '7.3', '7.4'] + php-version: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] steps: - uses: actions/checkout@v2 - name: Setup PHP ${{ matrix.php-version }} diff --git a/composer.json b/composer.json index dd85e01..17c5ad5 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,10 @@ "ext-curl": "*", "ext-json": "*", "ext-fileinfo": "*", - "symfony/dotenv": "3.4.*" + "symfony/dotenv": "3.4.*|6.4.*" }, "require-dev": { - "phpunit/phpunit": "6.*", + "phpunit/phpunit": "6.*|8.*", "squizlabs/php_codesniffer": "3.*" }, "support": { diff --git a/lib/RetailCrm/Response/ApiResponse.php b/lib/RetailCrm/Response/ApiResponse.php index a8a4af4..2cb9c2a 100644 --- a/lib/RetailCrm/Response/ApiResponse.php +++ b/lib/RetailCrm/Response/ApiResponse.php @@ -171,6 +171,7 @@ class ApiResponse implements \ArrayAccess * @throws \BadMethodCallException * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { throw new \BadMethodCallException('This activity not allowed'); @@ -184,6 +185,7 @@ class ApiResponse implements \ArrayAccess * @throws \BadMethodCallException * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { throw new \BadMethodCallException('This call not allowed'); @@ -196,6 +198,7 @@ class ApiResponse implements \ArrayAccess * * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->response[$offset]); @@ -210,6 +213,7 @@ class ApiResponse implements \ArrayAccess * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { if (!isset($this->response[$offset])) {