Skip to content

Commit 62552cb

Browse files
authored
chore: symfony 8 dependencies (#770)
* chore: symfony 8 dependencies * fix ExceptionLogger
1 parent cb7c195 commit 62552cb

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"psr/http-server-handler": "^1",
2222
"psr/http-server-middleware": "^1",
2323
"psr/simple-cache": "^1.0.1 || ^2 || ^3",
24-
"symfony/cache": "^4.3 || ^5 || ^6 || ^7",
25-
"symfony/expression-language": "^4 || ^5 || ^6 || ^7",
24+
"symfony/cache": "^4.3 || ^5 || ^6 || ^7 || ^8",
25+
"symfony/expression-language": "^4 || ^5 || ^6 || ^7 || ^8",
2626
"webonyx/graphql-php": "^v15.0",
2727
"kcs/class-finder": "^0.6.0"
2828
},
@@ -35,7 +35,7 @@
3535
"php-coveralls/php-coveralls": "^2.7",
3636
"phpstan/extension-installer": "^1.4",
3737
"phpstan/phpstan": "^2.0",
38-
"phpunit/phpunit": "^10.5 || ^11.0",
38+
"phpunit/phpunit": "^10.5 || ^11.0 || ^12.0",
3939
"symfony/var-dumper": "^6.4"
4040
},
4141
"suggest": {

src/Utils/PropertyAccessor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public static function setValue(object $instance, string $propertyName, mixed $v
9494
throw AccessPropertyException::createForUnwritableProperty($class, $propertyName);
9595
}
9696

97+
/** @param class-string $class */
9798
private static function isPublicProperty(string $class, string $propertyName): bool
9899
{
99100
if (! property_exists($class, $propertyName)) {

tests/Loggers/ExceptionLogger.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
22

3+
declare(strict_types=1);
34

45
namespace TheCodingMachine\GraphQLite\Loggers;
56

6-
7+
use Exception;
78
use Psr\Log\AbstractLogger;
89
use Psr\Log\LogLevel;
10+
use Stringable;
911
use Throwable;
12+
1013
use function in_array;
1114

1215
/**
@@ -15,16 +18,14 @@
1518
*/
1619
class ExceptionLogger extends AbstractLogger
1720
{
18-
/**
19-
* @inheritDoc
20-
*/
21-
public function log($level, $message, array $context = array())
21+
/** @inheritDoc */
22+
public function log($level, $message, array $context = []): void
2223
{
2324
if (in_array($level, [LogLevel::EMERGENCY, LogLevel::ALERT, LogLevel::CRITICAL, LogLevel::ERROR, LogLevel::WARNING])) {
2425
if (isset($context['exception']) && $context['exception'] instanceof Throwable) {
2526
throw $context['exception'];
2627
}
27-
throw new \Exception($message);
28+
throw new Exception($message);
2829
}
2930
}
3031
}

0 commit comments

Comments
 (0)