Skip to content

Commit 5e4957b

Browse files
renovate[bot]kukulich
authored andcommitted
Update all non-major dependencies
| datasource | package | from | to | | ---------- | --------------- | ------ | ------ | | packagist | phpunit/phpunit | 10.5.7 | 10.5.8 | | packagist | vimeo/psalm | 5.19.1 | 5.20.0 |
1 parent bd4af33 commit 5e4957b

File tree

9 files changed

+28
-22
lines changed

9 files changed

+28
-22
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
dependencies:
9494
- "locked"
9595
php-version:
96-
- "8.2"
96+
- "8.3"
9797
operating-system:
9898
- "ubuntu-latest"
9999

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
"doctrine/coding-standard": "^12.0.0",
3737
"phpstan/phpstan": "^1.10.56",
3838
"phpstan/phpstan-phpunit": "^1.3.15",
39-
"phpunit/phpunit": "^10.5.7",
40-
"vimeo/psalm": "5.19.1",
39+
"phpunit/phpunit": "^10.5.8",
40+
"vimeo/psalm": "5.20.0",
4141
"roave/infection-static-analysis-plugin": "^1.34.0"
4242
},
4343
"autoload": {

composer.lock

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

src/Reflection/Adapter/ReflectionMethod.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function __construct(private BetterReflectionMethod $betterReflectionMeth
3737
unset($this->class);
3838
}
3939

40+
/** @psalm-suppress MethodSignatureMismatch */
4041
public static function createFromMethodName(string $method): static
4142
{
4243
if (! str_contains($method, '::')) {

src/Reflection/ReflectionClass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ private function computeTraitsData(ClassNode|InterfaceNode|TraitNode|EnumNode $n
14101410
$methodHash = $this->methodHash($usedTrait->toString(), $adaptation->method->toString());
14111411

14121412
if ($adaptation instanceof Node\Stmt\TraitUseAdaptation\Alias) {
1413-
if ($adaptation->newModifier) {
1413+
if ($adaptation->newModifier !== null) {
14141414
/** @var int-mask-of<ReflectionMethodAdapter::IS_*> $modifier */
14151415
$modifier = $adaptation->newModifier;
14161416
$traitsData['modifiers'][$methodHash] = $modifier;

src/SourceLocator/SourceStubber/ReflectionSourceStubber.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
use function implode;
5353
use function in_array;
5454
use function is_resource;
55+
use function is_string;
5556
use function method_exists;
5657
use function preg_replace;
5758
use function sprintf;
@@ -120,7 +121,8 @@ public function generateClassStub(string $className): StubData|null
120121
? $this->generateStubInNamespace($node, $classReflection->getNamespaceName())
121122
: $this->generateStub($node);
122123

123-
$extensionName = $classReflection->getExtensionName() ?: null;
124+
$extensionName = $classReflection->getExtension()?->getName();
125+
assert((is_string($extensionName) && $extensionName !== '') || $extensionName === null);
124126

125127
return $this->createStubData($stub, $extensionName);
126128
}
@@ -147,7 +149,10 @@ public function generateFunctionStub(string $functionName): StubData|null
147149
$functionNode->setReturnType($this->formatType($returnType));
148150
}
149151

150-
$extensionName = $functionReflection->getExtensionName() ?: null;
152+
/** @phpstan-ignore-next-line */
153+
$extensionName = $functionReflection->getExtension()?->getName();
154+
/** @phpstan-ignore-next-line */
155+
assert((is_string($extensionName) && $extensionName !== '') || $extensionName === null);
151156

152157
if (! $functionReflection->inNamespace()) {
153158
return $this->createStubData($this->generateStub($functionNode->getNode()), $extensionName);
@@ -214,7 +219,7 @@ private function addDocComment(
214219
Class_|Interface_|Trait_|Enum_|Method|Property|Function_ $node,
215220
CoreReflectionClass|CoreReflectionMethod|CoreReflectionProperty|CoreReflectionFunction $reflection,
216221
): void {
217-
$docComment = $reflection->getDocComment() ?: '';
222+
$docComment = $reflection->getDocComment() !== false ? $reflection->getDocComment() : '';
218223
$annotations = [];
219224

220225
if (

src/SourceLocator/Type/ComposerSourceLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function createLocatedSource(Identifier $identifier): LocatedSource|nu
4242

4343
$filename = $this->classLoader->findFile($identifier->getName());
4444

45-
if (! $filename) {
45+
if ($filename === false) {
4646
return null;
4747
}
4848

src/SourceLocator/Type/EvaledCodeSourceLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private function getInternalReflectionClass(Identifier $identifier): ReflectionC
6262
$reflection = new ReflectionClass($name);
6363
$sourceFile = $reflection->getFileName();
6464

65-
return $sourceFile && is_file($sourceFile)
65+
return $sourceFile !== false && is_file($sourceFile)
6666
? null : $reflection;
6767
}
6868
}

test/unit/SourceLocator/Type/ComposerSourceLocatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function testInvokableThrowsExceptionWhenClassNotResolved(): void
6666
->expects($this->once())
6767
->method('findFile')
6868
->with($className)
69-
->will($this->returnValue(null));
69+
->willReturn(false);
7070

7171
$locator = new ComposerSourceLocator($loader, $this->astLocator);
7272

0 commit comments

Comments
 (0)