Add new recipe for phpstreamserver/symfony (#1749)

This commit is contained in:
Anton Zenkov
2025-01-29 08:50:54 +01:00
committed by GitHub
parent c640837b1c
commit ee921b828c
8 changed files with 40 additions and 40 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env php
<?php
use App\Kernel;
use PHPStreamServer\Symfony\PHPStreamServerRuntime;
$_SERVER['APP_RUNTIME'] = PHPStreamServerRuntime::class;
require_once \dirname(__DIR__).'/vendor/autoload_runtime.php';
return 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\SymfonyHttpServerProcess;
return static function (Server $server): void {
$server->addWorker(new SymfonyHttpServerProcess(
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,4 @@
* You're ready to run your Symfony application with PHPStreamServer!
Run <comment>bin/phpss start</> command to get started
* <fg=blue>Read</> the documentation at <comment>https://phpstreamserver.dev/docs/general/</>