Skip to content

Commit 4e3cd4d

Browse files
authored
Merge pull request #2017 from hydephp/shorter-server-start-message
Shorten the realtime compiler server start message
2 parents 25413d0 + a0bf7ad commit 4e3cd4d

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ This serves two purposes:
2727
- Updated to HydeFront v3.4 in https://github.com/hydephp/develop/pull/1803
2828
- Realtime Compiler: Virtual routes are now managed through the service container in https://github.com/hydephp/develop/pull/1858
2929
- Realtime Compiler: Improved the dashboard layout in https://github.com/hydephp/develop/pull/1866
30+
- Realtime Compiler: Shorten the realtime compiler server start message from "Press Ctrl+C to stop" to "Use Ctrl+C to stop" to better fit 80 column terminals in https://github.com/hydephp/develop/pull/2017
3031

3132
### Deprecated
3233
- The `PostAuthor::getName()` method is now deprecated and will be removed in v2. (use `$author->name` instead) in https://github.com/hydephp/develop/pull/1794

packages/framework/src/Console/Commands/ServeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected function configureOutput(): void
101101
protected function printStartMessage(): void
102102
{
103103
$this->useBasicOutput()
104-
? $this->output->writeln('<info>Starting the HydeRC server...</info> Press Ctrl+C to stop')
104+
? $this->output->writeln('<info>Starting the HydeRC server...</info> Use Ctrl+C to stop')
105105
: $this->console->printStartMessage($this->getHostSelection(), $this->getPortSelection(), $this->getEnvironmentVariables());
106106
}
107107

packages/framework/tests/Feature/Commands/ServeCommandTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected function setUp(): void
2727
public function testHydeServeCommand()
2828
{
2929
$this->artisan('serve --no-ansi')
30-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
30+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
3131
->assertExitCode(0);
3232

3333
Process::assertRan("php -S localhost:8080 {$this->binaryPath()}");
@@ -36,7 +36,7 @@ public function testHydeServeCommand()
3636
public function testHydeServeCommandWithPortOption()
3737
{
3838
$this->artisan('serve --no-ansi --port=8081')
39-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
39+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
4040
->assertExitCode(0);
4141

4242
Process::assertRan("php -S localhost:8081 {$this->binaryPath()}");
@@ -45,7 +45,7 @@ public function testHydeServeCommandWithPortOption()
4545
public function testHydeServeCommandWithHostOption()
4646
{
4747
$this->artisan('serve --no-ansi --host=foo')
48-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
48+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
4949
->assertExitCode(0);
5050

5151
Process::assertRan("php -S foo:8080 {$this->binaryPath()}");
@@ -54,7 +54,7 @@ public function testHydeServeCommandWithHostOption()
5454
public function testHydeServeCommandWithPortAndHostOption()
5555
{
5656
$this->artisan('serve --no-ansi --port=8081 --host=foo')
57-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
57+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
5858
->assertExitCode(0);
5959

6060
Process::assertRan("php -S foo:8081 {$this->binaryPath()}");
@@ -65,7 +65,7 @@ public function testHydeServeCommandWithPortDefinedInConfig()
6565
config(['hyde.server.port' => 8081]);
6666

6767
$this->artisan('serve --no-ansi')
68-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
68+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
6969
->assertExitCode(0);
7070

7171
Process::assertRan("php -S localhost:8081 {$this->binaryPath()}");
@@ -76,7 +76,7 @@ public function testHydeServeCommandWithPortDefinedInConfigAndPortOption()
7676
config(['hyde.server.port' => 8081]);
7777

7878
$this->artisan('serve --no-ansi --port=8082')
79-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
79+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
8080
->assertExitCode(0);
8181

8282
Process::assertRan("php -S localhost:8082 {$this->binaryPath()}");
@@ -87,7 +87,7 @@ public function testHydeServeCommandWithPortMissingInConfigAndPortOption()
8787
config(['hyde.server.port' => null]);
8888

8989
$this->artisan('serve --no-ansi --port=8081')
90-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
90+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
9191
->assertExitCode(0);
9292

9393
Process::assertRan("php -S localhost:8081 {$this->binaryPath()}");
@@ -98,7 +98,7 @@ public function testHydeServeCommandWithHostDefinedInConfig()
9898
config(['hyde.server.host' => 'foo']);
9999

100100
$this->artisan('serve --no-ansi')
101-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
101+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
102102
->assertExitCode(0);
103103

104104
Process::assertRan("php -S foo:8080 {$this->binaryPath()}");
@@ -109,7 +109,7 @@ public function testHydeServeCommandWithHostDefinedInConfigAndHostOption()
109109
config(['hyde.server.host' => 'foo']);
110110

111111
$this->artisan('serve --no-ansi --host=bar')
112-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
112+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
113113
->assertExitCode(0);
114114

115115
Process::assertRan("php -S bar:8080 {$this->binaryPath()}");
@@ -120,7 +120,7 @@ public function testHydeServeCommandWithHostMissingInConfigAndHostOption()
120120
config(['hyde.server.host' => null]);
121121

122122
$this->artisan('serve --no-ansi --host=foo')
123-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
123+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
124124
->assertExitCode(0);
125125

126126
Process::assertRan("php -S foo:8080 {$this->binaryPath()}");
@@ -132,7 +132,7 @@ public function testHydeServeCommandWithInvalidConfigValue()
132132
config(['hyde.server.port' => 'foo']);
133133

134134
$this->artisan('serve --no-ansi')
135-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
135+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
136136
->assertExitCode(0);
137137
}
138138

@@ -158,7 +158,7 @@ public function testHydeServeCommandPassesThroughProcessOutput()
158158
->andReturnSelf();
159159

160160
$this->artisan('serve --no-ansi')
161-
->expectsOutput('Starting the HydeRC server... Press Ctrl+C to stop')
161+
->expectsOutput('Starting the HydeRC server... Use Ctrl+C to stop')
162162
->expectsOutput('foo')
163163
->assertExitCode(0);
164164
}

packages/realtime-compiler/src/ConsoleOutput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected function formatLineForOutput(string $line): ?string
101101

102102
protected function formatServerStartedLine(string $line): string
103103
{
104-
return $this->formatLine(sprintf('PHP %s Development Server started. <span class="text-yellow-500">Press Ctrl+C to stop.</span>', PHP_VERSION), $this->parseDate($line), 'green-500');
104+
return $this->formatLine(sprintf('PHP %s Development Server started. <span class="text-yellow-500">Use Ctrl+C to stop.</span>', PHP_VERSION), $this->parseDate($line), 'green-500');
105105
}
106106

107107
protected function formatRequestLine(string $line): string

0 commit comments

Comments
 (0)