Skip to content

Commit 9d85a75

Browse files
committed
Update Symfony documentation page
1 parent 7946290 commit 9d85a75

File tree

2 files changed

+39
-8
lines changed

2 files changed

+39
-8
lines changed

docs/integrations/symfony.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,22 @@ return [
2424
];
2525
```
2626

27-
### Create phpss.config.php file in the config directory
27+
### Set PHPStreamServerRuntime as the application runtime
28+
Use the `APP_RUNTIME` environment variable or by specifying the `extra.runtime.class` in `composer.json` to change the Runtime class to `PHPStreamServer\Symfony\PHPStreamServerRuntime`.
29+
```json title="composer.json"
30+
{
31+
"require": {
32+
"...": "..."
33+
},
34+
"extra": {
35+
"runtime": {
36+
"class": "PHPStreamServer\\Symfony\\PHPStreamServerRuntime"
37+
}
38+
}
39+
}
40+
```
41+
42+
### Create config/phpss.config.php file
2843
```php title="config/phpss.config.php"
2944
<?php
3045

@@ -49,23 +64,38 @@ This bundle adds new Symfony-specific workers:
4964
- ⚙️ [SymfonyPeriodicProcess](/docs/general/configuration#%EF%B8%8F-symfonyperiodicprocess)
5065
- ⚙️ [SymfonyWorkerProcess](/docs/general/configuration#%EF%B8%8F-symfonyworkerprocess)
5166

52-
### Create phpss file in the bin directory
67+
### Create bin/phpss file
5368
```php title="bin/phpss"
5469
#!/usr/bin/env php
5570
<?php
5671

5772
use App\Kernel;
58-
use PHPStreamServer\Symfony\PHPStreamServerRuntime;
73+
use PHPStreamServer\Symfony\ServerApplication;
74+
75+
require_once \dirname(__DIR__) . '/vendor/autoload_runtime.php';
76+
77+
return new ServerApplication(static function (array $context) {
78+
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
79+
});
80+
```
5981

60-
$_SERVER['APP_RUNTIME'] = PHPStreamServerRuntime::class;
82+
### Create bin/console file
83+
```php title="bin/console"
84+
#!/usr/bin/env php
85+
<?php
86+
87+
use App\Kernel;
88+
use PHPStreamServer\Symfony\ConsoleApplication;
6189

62-
require_once \dirname(__DIR__).'/vendor/autoload_runtime.php';
90+
require_once \dirname(__DIR__) . '/vendor/autoload_runtime.php';
6391

64-
return static function (array $context) {
92+
return new ConsoleApplication(static function (array $context) {
6593
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
66-
};
94+
});
6795
```
6896

97+
\* Modifying the `bin/console` file is essential to integrate console commands with PHPStreamServer—do not skip this step.
98+
6999
### Start the server
70100
```bash
71101
$ bin/phpss start
@@ -74,7 +104,7 @@ $ bin/phpss start
74104
This bundle adds new Symfony-specific options to the start command: `--env`, `--no-debug`. For more details, refer to the help output.
75105

76106
## Resolvable arguments in phpss.config.php
77-
The closure returned from the phpss.config.php may have zero or more arguments:
107+
The closure returned from the `config/phpss.config.php` may have zero or more arguments:
78108
```php
79109
return static function (Server $server): void {
80110
// ...

src/components/LandingPage/index.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
position: relative;
88
overflow: hidden;
99
background: linear-gradient(135deg, color-mix(in srgb, var(--ifm-hero-background-color), transparent 95%) 50%, color-mix(in srgb, var(--ifm-hero-background-color), transparent 98%) 25%, transparent 50%);
10+
/* background: radial-gradient(circle at 90% 10%,color-mix(in srgb,var(--ifm-hero-background-color),#0000 92%),#0000 60%); */
1011
}
1112

1213
.heroBanner:before {

0 commit comments

Comments
 (0)