[phpstreamserver/symfony] New version (#2037)

This commit is contained in:
Anton Zenkov
2026-08-31 15:52:49 +04:00
committed by GitHub
parent 4b5ea11ed3
commit 799cbf3da1
4 changed files with 50 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env php
<?php
use App\Kernel;
use PHPStreamServer\Symfony\ServerApplication;
require_once \dirname(__DIR__) . '/vendor/autoload_runtime.php';
return new ServerApplication(static function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
});
@@ -0,0 +1,14 @@
<?php
use PHPStreamServer\Core\ReloadStrategy\ExceptionReloadStrategy;
use PHPStreamServer\Core\Server;
use PHPStreamServer\Symfony\Worker\SymfonyHttpServerWorker;
return static function (Server $server): void {
$server->addWorker(new SymfonyHttpServerWorker(
listen: '0.0.0.0:8080',
reloadStrategies: [
new ExceptionReloadStrategy(),
],
));
};
@@ -0,0 +1,9 @@
{
"bundles": {
"PHPStreamServer\\Symfony\\PHPStreamServerBundle": ["all"]
},
"copy-from-recipe": {
"bin/": "%BIN_DIR%/",
"config/": "%CONFIG_DIR%/"
}
}
@@ -0,0 +1,16 @@
* <options=bold>One more step to complete setup:</>
Set PHPStreamServer as the application runtime using one of these options:
1. Set the environment variable:
<comment>APP_RUNTIME="PHPStreamServer\Symfony\PHPStreamServerRuntime"</>
2. Set <comment>extra.runtime.class</> in <fg=green>composer.json</> to:
<comment>PHPStreamServer\Symfony\PHPStreamServerRuntime</>
Then run:
<comment>composer dump-autoload</>
See <comment>https://phpstreamserver.dev/docs/integrations/symfony#runtime-configuration</>
* <options=bold>Run</> your application with <comment>bin/phpss start</>
* <options=bold>Read</> the documentation at <comment>https://phpstreamserver.dev/docs/general/</>