Skip to content

Commit efcdde4

Browse files
authored
Draft: Rebranding (#3)
* Namespace change * Exception rename * Replace all old name entries * Replace image in readme
1 parent 01b878c commit efcdde4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+247
-247
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<p align="center">
22
<picture>
3-
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/luzrain/phprunner/assets/25800964/b6d62fc9-d08b-4ac7-be0b-2da6653d4c6b">
4-
<img alt="PhpRunner logo" align="center" src="https://github.com/luzrain/phprunner/assets/25800964/9107aca7-13e0-40a9-b107-7dde99f171d1">
3+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/luzrain/phprunner/assets/25800964/3e1bb7da-5fa8-47cf-8c95-5454b8b5959f">
4+
<img alt="PHPStreamServer logo" align="center" width="70%" src="https://github.com/luzrain/phprunner/assets/25800964/5664f293-41a5-424e-9f52-a403b222b17d">
55
</picture>
66
</p>
77

8-
# PhpRunner - PHP Application Server
8+
# PHPStreamServer - PHP Application Server
99
![PHP >=8.2](https://img.shields.io/badge/PHP->=8.2-777bb3.svg?style=flat)
10-
[![Version](https://img.shields.io/github/v/tag/luzrain/phprunner?label=Version&filter=v*.*.*&sort=semver&color=374151)](../../releases)
11-
[![Tests Status](https://img.shields.io/github/actions/workflow/status/luzrain/phprunner/tests.yaml?label=Tests&branch=master)](../../actions/workflows/tests.yaml)
10+
[![Version](https://img.shields.io/github/v/tag/luzrain/phpstreamserver?label=Version&filter=v*.*.*&sort=semver&color=374151)](../../releases)
11+
[![Tests Status](https://img.shields.io/github/actions/workflow/status/luzrain/phpstreamserver/tests.yaml?label=Tests&branch=master)](../../actions/workflows/tests.yaml)
1212

13-
PhpRunner is a high performance event-loop based process manager, TCP, and UDP server written in PHP.
13+
PHPStreamServer is a high performance event-loop based process manager, TCP, and UDP server written in PHP.
1414
With a built-in PSR-7 HTTP server you can easily integrate any PSR-7 compatible framework with it in no time.
1515
The built-in HTTP server is memory efficient no matter how large your HTTP requests and responses you operate are.
16-
PhpRunner is supports TLS encryption and the ability to implement custom protocols.
16+
PHPStreamServer is supports TLS encryption and the ability to implement custom protocols.
1717

1818
#### Key features:
1919
- Supervisor;
@@ -28,25 +28,25 @@ PhpRunner is supports TLS encryption and the ability to implement custom protoco
2828
## Getting started
2929
### Install composer packages
3030
```bash
31-
$ composer require luzrain/phprunner
31+
$ composer require luzrain/phpstreamserver
3232
```
3333

3434
### Configure server
3535
Here is example of simple http server.
3636
```php
3737
// server.php
3838

39-
use Luzrain\PhpRunner\Exception\HttpException;
40-
use Luzrain\PhpRunner\Listener;
41-
use Luzrain\PhpRunner\Server;
42-
use Luzrain\PhpRunner\Server\Connection\ConnectionInterface;
43-
use Luzrain\PhpRunner\Server\Http\Psr7\Response;
44-
use Luzrain\PhpRunner\Server\Protocols\Http;
45-
use Luzrain\PhpRunner\WorkerProcess;
39+
use Luzrain\PHPStreamServer\Exception\HttpException;
40+
use Luzrain\PHPStreamServer\Listener;
41+
use Luzrain\PHPStreamServer\Server;
42+
use Luzrain\PHPStreamServer\Server\Connection\ConnectionInterface;
43+
use Luzrain\PHPStreamServer\Server\Http\Psr7\Response;
44+
use Luzrain\PHPStreamServer\Server\Protocols\Http;
45+
use Luzrain\PHPStreamServer\WorkerProcess;
4646
use Psr\Http\Message\ServerRequestInterface;
4747

48-
$phpRunner = new Server();
49-
$phpRunner->addWorkers(
48+
$server = new Server();
49+
$server->addWorkers(
5050
new WorkerProcess(
5151
name: 'HTTP Server',
5252
onStart: function (WorkerProcess $worker) {
@@ -65,7 +65,7 @@ $phpRunner->addWorkers(
6565
},
6666
),
6767
);
68-
exit($phpRunner->run());
68+
exit($server->run());
6969
```
7070

7171
### Run

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "luzrain/phprunner",
2+
"name": "luzrain/phpstreamserver",
33
"description": "High performance PHP application server",
4-
"keywords": ["phprunner", "async", "http", "server", "process"],
5-
"homepage": "https://github.com/luzrain/phprunner",
4+
"keywords": ["phpstreamserver", "async", "http", "server", "process", "socket", "stream"],
5+
"homepage": "https://github.com/luzrain/phpstreamserver",
66
"type": "library",
77
"license": "MIT",
88
"authors": [
@@ -30,12 +30,12 @@
3030
},
3131
"autoload": {
3232
"psr-4": {
33-
"Luzrain\\PhpRunner\\": "src/"
33+
"Luzrain\\PHPStreamServer\\": "src/"
3434
}
3535
},
3636
"autoload-dev": {
3737
"psr-4": {
38-
"Luzrain\\PhpRunner\\Test\\": "tests/"
38+
"Luzrain\\PHPStreamServer\\Test\\": "tests/"
3939
}
4040
},
4141
"suggest": {

src/Command/ConnectionsCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Command;
5+
namespace Luzrain\PHPStreamServer\Command;
66

7-
use Luzrain\PhpRunner\Console\Command;
8-
use Luzrain\PhpRunner\Console\Table;
9-
use Luzrain\PhpRunner\Internal\Functions;
10-
use Luzrain\PhpRunner\Internal\MasterProcess;
11-
use Luzrain\PhpRunner\Server\Connection\ActiveConnection;
7+
use Luzrain\PHPStreamServer\Console\Command;
8+
use Luzrain\PHPStreamServer\Console\Table;
9+
use Luzrain\PHPStreamServer\Internal\Functions;
10+
use Luzrain\PHPStreamServer\Internal\MasterProcess;
11+
use Luzrain\PHPStreamServer\Server\Connection\ActiveConnection;
1212

1313
final class ConnectionsCommand implements Command
1414
{

src/Command/ProcessesCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Command;
5+
namespace Luzrain\PHPStreamServer\Command;
66

7-
use Luzrain\PhpRunner\Console\Command;
8-
use Luzrain\PhpRunner\Console\Table;
9-
use Luzrain\PhpRunner\Internal\Functions;
10-
use Luzrain\PhpRunner\Internal\MasterProcess;
11-
use Luzrain\PhpRunner\Internal\Status\WorkerProcessStatus;
7+
use Luzrain\PHPStreamServer\Console\Command;
8+
use Luzrain\PHPStreamServer\Console\Table;
9+
use Luzrain\PHPStreamServer\Internal\Functions;
10+
use Luzrain\PHPStreamServer\Internal\MasterProcess;
11+
use Luzrain\PHPStreamServer\Internal\Status\WorkerProcessStatus;
1212

1313
final class ProcessesCommand implements Command
1414
{

src/Command/ReloadCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Command;
5+
namespace Luzrain\PHPStreamServer\Command;
66

7-
use Luzrain\PhpRunner\Console\Command;
8-
use Luzrain\PhpRunner\Internal\MasterProcess;
7+
use Luzrain\PHPStreamServer\Console\Command;
8+
use Luzrain\PHPStreamServer\Internal\MasterProcess;
99

1010
final class ReloadCommand implements Command
1111
{

src/Command/StartCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Command;
5+
namespace Luzrain\PHPStreamServer\Command;
66

7-
use Luzrain\PhpRunner\Console\Command;
8-
use Luzrain\PhpRunner\Console\Table;
9-
use Luzrain\PhpRunner\Internal\MasterProcess;
10-
use Luzrain\PhpRunner\Internal\Status\WorkerStatus;
11-
use Luzrain\PhpRunner\Server;
7+
use Luzrain\PHPStreamServer\Console\Command;
8+
use Luzrain\PHPStreamServer\Console\Table;
9+
use Luzrain\PHPStreamServer\Internal\MasterProcess;
10+
use Luzrain\PHPStreamServer\Internal\Status\WorkerStatus;
11+
use Luzrain\PHPStreamServer\Server;
1212

1313
final class StartCommand implements Command
1414
{

src/Command/StatusCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Command;
5+
namespace Luzrain\PHPStreamServer\Command;
66

7-
use Luzrain\PhpRunner\Console\Command;
8-
use Luzrain\PhpRunner\Console\Table;
9-
use Luzrain\PhpRunner\Internal\Functions;
10-
use Luzrain\PhpRunner\Internal\MasterProcess;
11-
use Luzrain\PhpRunner\Server;
7+
use Luzrain\PHPStreamServer\Console\Command;
8+
use Luzrain\PHPStreamServer\Console\Table;
9+
use Luzrain\PHPStreamServer\Internal\Functions;
10+
use Luzrain\PHPStreamServer\Internal\MasterProcess;
11+
use Luzrain\PHPStreamServer\Server;
1212

1313
final class StatusCommand implements Command
1414
{

src/Command/StatusJsonCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Command;
5+
namespace Luzrain\PHPStreamServer\Command;
66

7-
use Luzrain\PhpRunner\Console\Command;
8-
use Luzrain\PhpRunner\Internal\MasterProcess;
7+
use Luzrain\PHPStreamServer\Console\Command;
8+
use Luzrain\PHPStreamServer\Internal\MasterProcess;
99

1010
final class StatusJsonCommand implements Command
1111
{

src/Command/StopCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Command;
5+
namespace Luzrain\PHPStreamServer\Command;
66

7-
use Luzrain\PhpRunner\Console\Command;
8-
use Luzrain\PhpRunner\Internal\MasterProcess;
7+
use Luzrain\PHPStreamServer\Console\Command;
8+
use Luzrain\PHPStreamServer\Internal\MasterProcess;
99

1010
final class StopCommand implements Command
1111
{

src/Command/WorkersCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Command;
5+
namespace Luzrain\PHPStreamServer\Command;
66

7-
use Luzrain\PhpRunner\Console\Command;
8-
use Luzrain\PhpRunner\Console\Table;
9-
use Luzrain\PhpRunner\Internal\MasterProcess;
10-
use Luzrain\PhpRunner\Internal\Status\WorkerStatus;
7+
use Luzrain\PHPStreamServer\Console\Command;
8+
use Luzrain\PHPStreamServer\Console\Table;
9+
use Luzrain\PHPStreamServer\Internal\MasterProcess;
10+
use Luzrain\PHPStreamServer\Internal\Status\WorkerStatus;
1111

1212
final class WorkersCommand implements Command
1313
{

src/Console/App.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Console;
5+
namespace Luzrain\PHPStreamServer\Console;
66

7-
use Luzrain\PhpRunner\Internal\Functions;
8-
use Luzrain\PhpRunner\Server;
7+
use Luzrain\PHPStreamServer\Internal\Functions;
8+
use Luzrain\PHPStreamServer\Server;
99

1010
final class App
1111
{

src/Console/Colorizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Console;
5+
namespace Luzrain\PHPStreamServer\Console;
66

77
final class Colorizer
88
{

src/Console/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Console;
5+
namespace Luzrain\PHPStreamServer\Console;
66

77
interface Command
88
{

src/Console/StdoutHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Console;
5+
namespace Luzrain\PHPStreamServer\Console;
66

77
/**
88
* Handler for redirect standard output to custom stream

src/Console/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Console;
5+
namespace Luzrain\PHPStreamServer\Console;
66

77
/**
88
* @internal

src/Exception/EncodeTypeError.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Exception;
5+
namespace Luzrain\PHPStreamServer\Exception;
66

77
final class EncodeTypeError extends \TypeError
88
{

src/Exception/HttpException.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Exception;
5+
namespace Luzrain\PHPStreamServer\Exception;
66

7-
use Luzrain\PhpRunner\Internal\Functions;
8-
use Luzrain\PhpRunner\Server\Http\ErrorPage;
9-
use Luzrain\PhpRunner\Server\Http\Psr7\Response;
10-
use Luzrain\PhpRunner\Server\Http\Psr7\StringStream;
7+
use Luzrain\PHPStreamServer\Internal\Functions;
8+
use Luzrain\PHPStreamServer\Server\Http\ErrorPage;
9+
use Luzrain\PHPStreamServer\Server\Http\Psr7\Response;
10+
use Luzrain\PHPStreamServer\Server\Http\Psr7\StringStream;
1111
use Psr\Http\Message\ResponseInterface;
1212

1313
final class HttpException extends \Exception
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Luzrain\PHPStreamServer\Exception;
6+
7+
final class PHPStreamServerException extends \RuntimeException
8+
{
9+
}

src/Exception/PhpRunnerException.php

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/Exception/SendTypeError.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Exception;
5+
namespace Luzrain\PHPStreamServer\Exception;
66

77
final class SendTypeError extends \TypeError
88
{

src/Exception/TlsHandshakeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Exception;
5+
namespace Luzrain\PHPStreamServer\Exception;
66

77
final class TlsHandshakeException extends \Exception
88
{

src/Exception/TooLargePayload.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Exception;
5+
namespace Luzrain\PHPStreamServer\Exception;
66

7-
use Luzrain\PhpRunner\Internal\Functions;
7+
use Luzrain\PHPStreamServer\Internal\Functions;
88

99
final class TooLargePayload extends \Exception
1010
{

src/Exception/UserChangeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Exception;
5+
namespace Luzrain\PHPStreamServer\Exception;
66

77
final class UserChangeException extends \Exception
88
{

src/Internal/ErrorHandler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
declare(strict_types=1);
44

5-
namespace Luzrain\PhpRunner\Internal;
5+
namespace Luzrain\PHPStreamServer\Internal;
66

7-
use Luzrain\PhpRunner\Exception\HttpException;
8-
use Luzrain\PhpRunner\Exception\TlsHandshakeException;
9-
use Luzrain\PhpRunner\Exception\TooLargePayload;
7+
use Luzrain\PHPStreamServer\Exception\HttpException;
8+
use Luzrain\PHPStreamServer\Exception\TlsHandshakeException;
9+
use Luzrain\PHPStreamServer\Exception\TooLargePayload;
1010
use Psr\Log\LoggerInterface;
1111
use Psr\Log\LogLevel;
1212

0 commit comments

Comments
 (0)