Skip to content

Commit

Permalink
Update phpstan/phpstan requirement from ^1.10.21 to ^2.0.0 (#23)
Browse files Browse the repository at this point in the history
Updates the requirements on [phpstan/phpstan](https://github.com/phpstan/phpstan) to permit the latest version.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/2.0.x/CHANGELOG.md)
- [Commits](phpstan/phpstan@1.10.21...2.0.0)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Nov 14, 2024
1 parent 8a680ef commit 9364455
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"require-dev": {
"doctrine/coding-standard": "^12.0",
"phpstan/phpstan": "^1.10.21"
"phpstan/phpstan": "^2.0.0"
},
"autoload": {
"psr-4": {
Expand Down
11 changes: 5 additions & 6 deletions src/Handler/DataDogUdpHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
use function function_exists;
use function gethostname;
use function implode;
use function is_array;
use function json_encode;
use function socket_close;
use function socket_create;
use function socket_sendto;
use function strlen;
use function strtolower;
use function strval;
use function substr;

use const AF_INET;
Expand Down Expand Up @@ -116,13 +116,12 @@ protected function write(LogRecord $record): void
private function doWrite(LogRecord $record, Span $span): void
{
$tags = $span->getAllTags();
$tags = array_filter($tags, 'is_scalar');
$tags += array_filter($record->context, 'is_scalar');

if (is_array($tags)) {
$tags = implode(', ', array_map(static function ($key, $value) {
return $key . ':' . $value;
}, array_keys($tags), $tags));
}
$tags = implode(', ', array_map(static function ($key, $value) {
return strval($key) . ':' . strval($value);
}, array_keys($tags), $tags));

$log = [
'service' => $span->getService(),
Expand Down

0 comments on commit 9364455

Please sign in to comment.