Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into spi/laravel
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLightfootWild committed Oct 27, 2024
2 parents a3cf950 + 0a41216 commit 1a1daa0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: PHP QA

on:
Expand All @@ -19,28 +18,30 @@ jobs:
fail-fast: false
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
# Sorted alphabetically to ease finding the desired run in the GitHub Workflow UI.
project: [
'Aws',
'Context/Swoole',
'Instrumentation/CakePHP',
'Instrumentation/CodeIgniter',
'Instrumentation/ExtAmqp',
'Instrumentation/ExtRdKafka',
'Instrumentation/Guzzle',
'Instrumentation/HttpAsyncClient',
'Instrumentation/Slim',
'Instrumentation/CakePHP',
'Instrumentation/IO',
'Instrumentation/Laravel',
'Instrumentation/MongoDB',
'Instrumentation/OpenAIPHP',
'Instrumentation/PDO',
# Sort PSRs numerically.
'Instrumentation/Psr3',
'Instrumentation/Psr6',
'Instrumentation/Psr14',
'Instrumentation/Psr15',
'Instrumentation/Psr16',
'Instrumentation/Psr18',
'Instrumentation/IO',
'Instrumentation/PDO',
'Instrumentation/Slim',
'Instrumentation/Symfony',
'Instrumentation/OpenAIPHP',
'Instrumentation/Laravel',
'Instrumentation/MongoDB',
'Instrumentation/CodeIgniter',
'Instrumentation/Yii',
'Logs/Monolog',
'Propagation/ServerTiming',
Expand All @@ -49,7 +50,7 @@ jobs:
'ResourceDetectors/Container',
'Sampler/RuleBased',
'Shims/OpenTracing',
'Symfony'
'Symfony',
]
exclude:
- project: 'Instrumentation/Guzzle'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ public static function serializeCommand(string $command, array $params): string
$paramsToSerialize[] = '[' . (count($params) - $paramsToSerializeNum) . ' other arguments]';
}

// In some cases (for example when using LUA scripts) arrays are valid parameters
$paramsToSerialize = array_map(function($param) { return is_array($param) ? json_encode($param) : $param; }, $paramsToSerialize);

return $command . ' ' . implode(' ', $paramsToSerialize);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ public function serializeCases(): iterable

// Serialize all params
yield ['DEL', ['param1', 'param2', 'param3', 'param4'], 'DEL param1 param2 param3 param4'];

// Parameters of array type
yield ['EVAL', ['param1', 'param2', ['arg1', 'arg2']], 'EVAL param1 param2 ["arg1","arg2"]'];
}
}

0 comments on commit 1a1daa0

Please sign in to comment.