Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"symfony/yaml": "^7.0",
"symfony/validator": "^7.0",
"phpstan/phpstan-symfony": "^2",
"assoconnect/php-quality-config": "^2",
"assoconnect/php-quality-config": "^2.2",
"symfony/security-core": "^7.0"
},
"require": {
Expand Down
12 changes: 6 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd">
<php>
<ini name="error_reporting" value="-1"/>
<env name="KERNEL_CLASS" value="AssoConnect\LogBundle\Tests\Functional\App\TestKernel"/>
<env name="APP_ENV" value="test"/>
<env name="APP_DEBUG" value="1"/>
</php>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="main">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion src/Serializer/LogSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private function formatValue($value): mixed
'string' => mb_substr($value, 0, Log::MAX_STRING_LENGTH),
'NULL', 'boolean', 'double', 'integer' => $value,
'object' => $this->formatObject($value),
'array' => array_map(__METHOD__, $value),
'array' => array_map($this->formatValue(...), $value),
'resource', 'resource (closed)', 'unknown type'
=> throw new \InvalidArgumentException('Unhandled type'),
};
Expand Down
7 changes: 7 additions & 0 deletions tests/Functional/Entity/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@ public function getStreetName(): ?string
{
return $this->streetName;
}

public function setStreetName(?string $streetName): self
{
$this->streetName = $streetName;

return $this;
}
}
2 changes: 1 addition & 1 deletion tests/Serializer/LogSerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function testFormatValueAsStringWorks($value, $formatted): void
self::assertSame($formatted, $formatter->formatValueAsString($value));
}

public function providerFormatValueAsString(): iterable
public static function providerFormatValueAsString(): iterable
{
yield [null, 'null'];
yield [[null], '[null]'];
Expand Down
Loading