Skip to content

Commit d9fd222

Browse files
authored
Merge branch 'main' into feat/validate-values
2 parents cf8866f + 62f45c3 commit d9fd222

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

packages/router/src/Static/StaticGenerateCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
use function Tempest\Support\Language\pluralize;
3535
use function Tempest\Support\path;
36+
use function Tempest\Support\str;
3637
use function Tempest\uri;
3738

3839
final class StaticGenerateCommand
@@ -226,7 +227,7 @@ private function detectDeadLinks(string $uri, string $html, bool $checkExternal
226227
if (Str\starts_with($link, '/') || Str\starts_with($this->getLinkWithoutProtocol($link), $this->getLinkWithoutProtocol($this->appConfig->baseUri))) {
227228
do {
228229
$target ??= match (true) {
229-
Str\starts_with($link, '/') => $this->appConfig->baseUri . '/' . Str\strip_start($link, '/'),
230+
! Str\starts_with($link, '/') => str($link)->stripStart($this->appConfig->baseUri)->finish('/')->toString(),
230231
default => $link,
231232
};
232233

src/Tempest/Framework/Commands/ConfigShowCommand.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ private function formatForJson(mixed $value, int $depth = 0): mixed
157157
return '@...';
158158
}
159159

160+
if ($value instanceof ClassReflector) {
161+
return [
162+
'@type' => $value->getName(),
163+
];
164+
}
165+
160166
if (is_object($value)) {
161167
$result = [
162168
'@type' => $value::class,

tests/Integration/Framework/Commands/ConfigShowCommandTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
*/
1212
final class ConfigShowCommandTest extends FrameworkIntegrationTestCase
1313
{
14+
public function test_it_shows_config_without_params(): void
15+
{
16+
$this->console
17+
->call('config:show')
18+
->assertJson();
19+
}
20+
1421
public function test_it_shows_config_in_json_format(): void
1522
{
1623
$this->console

0 commit comments

Comments
 (0)