From 4a77625b81d4d8a0c2975debac8eb0cb90d998fb Mon Sep 17 00:00:00 2001 From: Rafin Akther Utshaw Date: Tue, 28 Mar 2023 01:53:24 +0600 Subject: [PATCH 1/5] Add mixed return type to jsonserialize --- src/Optimizely/OptimizelyUserContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Optimizely/OptimizelyUserContext.php b/src/Optimizely/OptimizelyUserContext.php index 8769d6f7..5dbea008 100644 --- a/src/Optimizely/OptimizelyUserContext.php +++ b/src/Optimizely/OptimizelyUserContext.php @@ -148,7 +148,7 @@ public function getOptimizely() } #[\ReturnTypeWillChange] - public function jsonSerialize() + public function jsonSerialize() : mixed { return [ 'userId' => $this->userId, From 78dd54996c9a523df0a8646f5f3b1b5ef6f69b50 Mon Sep 17 00:00:00 2001 From: Rafin Akther Utshaw Date: Tue, 28 Mar 2023 01:57:59 +0600 Subject: [PATCH 2/5] Add test for 8.2 --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index e8f2061b..ed52223c 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3' ] + php-versions: [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '8.2' ] steps: - uses: actions/checkout@v3 - name: Set up PHP ${{ matrix.ruby }} From 0bb11886db788b8b5c7e14e4d3c8117adf6639bc Mon Sep 17 00:00:00 2001 From: Rafin Akther Utshaw Date: Tue, 28 Mar 2023 02:49:37 +0600 Subject: [PATCH 3/5] Rollback 8.2 tests and add suggested comments --- .github/workflows/php.yml | 2 +- src/Optimizely/OptimizelyUserContext.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index ed52223c..e8f2061b 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '8.2' ] + php-versions: [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3' ] steps: - uses: actions/checkout@v3 - name: Set up PHP ${{ matrix.ruby }} diff --git a/src/Optimizely/OptimizelyUserContext.php b/src/Optimizely/OptimizelyUserContext.php index 5dbea008..4ae19f1c 100644 --- a/src/Optimizely/OptimizelyUserContext.php +++ b/src/Optimizely/OptimizelyUserContext.php @@ -147,8 +147,11 @@ public function getOptimizely() return $this->optimizelyClient; } + /** + * @return mixed + */ #[\ReturnTypeWillChange] - public function jsonSerialize() : mixed + public function jsonSerialize() { return [ 'userId' => $this->userId, From 541d702265b6f3b2c63514b143deb2071619f841 Mon Sep 17 00:00:00 2001 From: Rafin Akther Utshaw Date: Tue, 28 Mar 2023 02:53:39 +0600 Subject: [PATCH 4/5] Fix comment --- src/Optimizely/UserProfile/UserProfileServiceInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Optimizely/UserProfile/UserProfileServiceInterface.php b/src/Optimizely/UserProfile/UserProfileServiceInterface.php index 7d3a5269..8dc2ee7b 100644 --- a/src/Optimizely/UserProfile/UserProfileServiceInterface.php +++ b/src/Optimizely/UserProfile/UserProfileServiceInterface.php @@ -23,7 +23,7 @@ interface UserProfileServiceInterface * * @param $userId string The ID of the user whose profile will be retrieved. * - * @return userProfile array The user profile. + * @return array The user profile. */ public function lookup($userId); From 0197745076fc9149ccd40352fc7aac6b6c82a5f2 Mon Sep 17 00:00:00 2001 From: Rafin Akther Utshaw Date: Tue, 28 Mar 2023 03:05:12 +0600 Subject: [PATCH 5/5] Update copyright --- src/Optimizely/OptimizelyUserContext.php | 2 +- src/Optimizely/UserProfile/UserProfileServiceInterface.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Optimizely/OptimizelyUserContext.php b/src/Optimizely/OptimizelyUserContext.php index 4ae19f1c..82b5e00b 100644 --- a/src/Optimizely/OptimizelyUserContext.php +++ b/src/Optimizely/OptimizelyUserContext.php @@ -1,6 +1,6 @@