Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Commitb6418aa
committed
feature#52079 [HttpKernel] Add parameters
This PR was merged into the 6.4 branch.Discussion----------[HttpKernel] Add parameters `kernel.runtime_mode` and `kernel.runtime_mode.*`, all set from env var `APP_RUNTIME_MODE`| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | no| New feature? | yes| Deprecations? | no| Tickets |Fix#51340| License | MIT| Doc PR | TODOAlternative to#51408. I think this approach is simpler and more powerful.Here, we ensure that the kernel always provides a new `kernel.runtime_mode` parameter. This parameter is an array derived by default from the `APP_RUNTIME_MODE` env var, using the `query_string` processor.This also creates 3 new parameters that should be the most common: `kernel.runtime_mode.web`, `kernel.runtime_mode.cli`, and `kernel.runtime_mode.worker`.A long-running server would typically set `APP_RUNTIME_MODE` to `web=1&worker=1` or `web=0&worker=1` when appropriate (eghttps://github.com/php-runtime/frankenphp-symfony/ should do so when `FRANKENPHP_WORKER` is set.)I screened the codebase and updated them all except cache pools (where the SAPI is used to enable/disable locking) and error renderers (where the SAPI is used to turn html-rendering on/off.) These require more work that could be done later on. There are a few other remaining usages of `PHP_SAPI` but these look not appropriate for the new flag.Commits-------7c70aec [HttpKernel] Add parameters `kernel.runtime_mode` and `kernel.runtime_mode.*`, all set from env var `APP_RUNTIME_MODE`kernel.runtime_mode andkernel.runtime_mode.*, all set from env varAPP_RUNTIME_MODE (nicolas-grekas)File tree
31 files changed
+62
-36
lines changed- src/Symfony
- Bundle/FrameworkBundle
- DependencyInjection
- Resources/config
- Component
- Cache
- Adapter
- Traits
- DependencyInjection
- Dumper
- ParameterBag
- Tests/Fixtures/php
- ErrorHandler
- HttpFoundation
- HttpKernel
- DataCollector
- DependencyInjection
- EventListener
- Log
- Routing
- Runtime
- Internal
- Runner/Symfony
- Translation/Loader
- VarDumper
- Resources/functions
31 files changed
+62
-36
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
1187 | | - | |
| 1187 | + | |
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
391 | 392 | | |
392 | 393 | | |
393 | 394 | | |
| |||
1591 | 1592 | | |
1592 | 1593 | | |
1593 | 1594 | | |
1594 | | - | |
| 1595 | + | |
1595 | 1596 | | |
1596 | 1597 | | |
1597 | 1598 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
0 commit comments
Comments
(0)