Skip to content

Commit a0b959d

Browse files
committed
feedback
1 parent 5f2ed4b commit a0b959d

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

components/runtime.rst

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ To make a console application, the bootstrap code would look like::
7373
return new Application($kernel);
7474
};
7575

76+
7677
Selecting Runtimes
7778
------------------
7879

@@ -101,6 +102,22 @@ Use the ``APP_RUNTIME`` environment variable or by specifying the
101102
}
102103
}
103104
105+
If modifying the runtime class is not enough, you can always create your own runtime
106+
template:
107+
108+
.. code-block:: json
109+
110+
{
111+
"require": {
112+
"...": "..."
113+
},
114+
"extra": {
115+
"runtime": {
116+
"autoload_template": "resources/runtime/autoload_runtime.template"
117+
}
118+
}
119+
}
120+
104121
Using the Runtime
105122
-----------------
106123

@@ -483,28 +500,5 @@ The end user will now be able to create front controller like::
483500
return new SomeCustomPsr15Application();
484501
};
485502

486-
Create Your Own Runtime Template
487-
--------------------------------
488-
489-
In some cases the default generic runtime template generated (`vendor/autoload_runtime.php`)
490-
file is not enough. For example: you want to use a different entry point than
491-
`$_SERVER['FILE_SCRIPTNAME']` or a different SAPI than the traditional `cli`,
492-
`phpdbg` or `embed`.
493-
494-
To use your own template, you can register it as follows:
495-
496-
.. code-block:: json
497-
498-
{
499-
"require": {
500-
"...": "..."
501-
},
502-
"extra": {
503-
"runtime": {
504-
"autoload_template": "resources/runtime/autoload_runtime.template"
505-
}
506-
}
507-
}
508-
509503
.. _ReactPHP: https://reactphp.org/
510504
.. _`PSR-15`: https://www.php-fig.org/psr/psr-15/

0 commit comments

Comments
 (0)