[phpstreamserver/symfony] New version (#1840)

This commit is contained in:
Anton Zenkov
2025-08-18 14:05:39 +08:00
committed by GitHub
parent 0045dcccb1
commit afcb2b9588
6 changed files with 22 additions and 17 deletions

View File

@@ -1,13 +0,0 @@
#!/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']);
};

View File

@@ -1,4 +0,0 @@
* 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/</>

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']);
});

View File

@@ -0,0 +1,11 @@
* One more step to complete setup:
Set PHPStreamServerRuntime as the Application Runtime by either:
* setting env <comment>APP_RUNTIME="PHPStreamServer\Symfony\PHPStreamServerRuntime"</>
* adding <comment>extra.runtime.class</> to <fg=green>composer.json</>
Read more: <comment>https://phpstreamserver.dev/docs/integrations/symfony#runtime-configuration</>
If you edited <fg=green>composer.json</>, run <comment>composer dump-autoload</> to apply.
* Your Symfony application is ready to run with PHPStreamServer.
Start the server with: <comment>bin/phpss start</>
* Read the documentation at: <comment>https://phpstreamserver.dev/docs/general/</>