Skip to content

Commit 7b7e2ca

Browse files
authored
fix(core): installers not updating docblock references (#696)
1 parent ab0eecd commit 7b7e2ca

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Tempest/Core/src/PublishesFiles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function publishImports(): void
7070
$contents = str(file_get_contents($file));
7171

7272
foreach ($this->publishedClasses as $old => $new) {
73-
$contents = $contents->replace("use {$old};", "use {$new};");
73+
$contents = $contents->replace($old, $new);
7474
}
7575

7676
file_put_contents($file, $contents);

tests/Integration/Auth/AuthInstallerTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,10 @@ public function test_install_auth(): void
5555
'App/Auth/User.php',
5656
'use App\Auth\UserPermission',
5757
);
58+
59+
$this->installer->assertFileContains(
60+
'App/Auth/User.php',
61+
'/** @var \App\Auth\UserPermission[] $userPermissions */',
62+
);
5863
}
5964
}

0 commit comments

Comments
 (0)