Skip to content

Commit f8e3604

Browse files
aarsilvjaugustin
andauthored
Allow newer symfony cache (#56)
* Update composer deps * Fix php deprecation from logs * make test workflow work on forks --------- Co-authored-by: jaugustin <[email protected]>
1 parent cb940f5 commit f8e3604

File tree

5 files changed

+81
-71
lines changed

5 files changed

+81
-71
lines changed

.github/workflows/run-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ jobs:
3939
echo "Test Data: sdk-test-data@${TEST_DATA_BRANCH_NAME}"
4040
echo "SDK Branch: php-sdk@${SDK_BRANCH_NAME}"
4141
42-
- uses: actions/checkout@v3
42+
- uses: actions/checkout@v5
4343
with:
44-
repository: Eppo-exp/php-sdk
45-
ref: ${{ env.SDK_BRANCH_NAME}}
44+
repository: ${{ github.event.pull_request.head.repo.full_name || 'Eppo-exp/php-sdk' }}
45+
ref: ${{ env.SDK_BRANCH_NAME }}
4646

4747
- name: Validate composer.json and composer.lock
4848
run: composer validate --strict
4949

5050
- name: Cache Composer packages
5151
id: composer-cache
52-
uses: actions/cache@v3
52+
uses: actions/cache@v4
5353
with:
5454
path: vendor
5555
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"composer/semver": "^3.4",
3030
"php-http/discovery": "^1.17",
3131
"webclient/ext-redirect": "^2.0",
32-
"symfony/cache": "^6.4"
32+
"symfony/cache": "^6.4|^7.0"
3333
},
3434
"require-dev": {
3535
"phpunit/phpunit": "^9.6",

composer.lock

Lines changed: 73 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/DTO/Bandit/Bandit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static function fromArray(array $arr): Bandit
3232
} catch (\Exception $e) {
3333
syslog(
3434
LOG_WARNING,
35-
"[Eppo SDK] invalid timestamp for bandit model ${arr['updatedAt']}: " . $e->getMessage()
35+
"[Eppo SDK] invalid timestamp for bandit model {$arr['updatedAt']}: " . $e->getMessage()
3636
);
3737
$updatedAt = new DateTime();
3838
} finally {

src/EppoClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ private function getAssignmentDetail(
359359
$flag = $config->getFlag($flagKey);
360360

361361
if (!$flag) {
362-
syslog(LOG_WARNING, "[EPPO SDK] No assigned variation; flag not found ${flagKey}");
362+
syslog(LOG_WARNING, "[EPPO SDK] No assigned variation; flag not found {$flagKey}");
363363
return null;
364364
}
365365

@@ -376,7 +376,7 @@ private function getAssignmentDetail(
376376
) {
377377
$actualType = gettype($computedVariation->value);
378378
$eVarType = $expectedVariationType->value;
379-
syslog(LOG_ERR, "[EPPO SDK] Variation does not have the expected type, ${eVarType}; found ${actualType}");
379+
syslog(LOG_ERR, "[EPPO SDK] Variation does not have the expected type, {$eVarType}; found {$actualType}");
380380
return null;
381381
}
382382

0 commit comments

Comments
 (0)