33<img align =" right " src =" https://raw.githubusercontent.com/php-runtime/runtime/main/.github/logo.png " >
44
55In early 2021, Symfony created a "Runtime component". This component may look
6- complex, weird and full of hacks but it is a ** game changer** for how we run PHP
6+ complex, weird, and full of hacks but it is a ** game- changer** for how we run PHP
77applications.
88
99With the Runtime component, we can look at each application as a "black box". A box
1010that has no connection to globals like ` $_SERVER ` or ` $_GET ` . To run the application
1111you need (you guessed it) a ` Runtime ` . It is a class that looks at the black box
1212to figure out what input it requires and handles the output.
1313
14- Consider this small application that returns an UUID.
14+ Consider this small application that returns a UUID.
1515
1616``` php
1717namespace Acme;
@@ -38,24 +38,24 @@ return function() {
3838If you want to use this application in a CLI environment, you need a
3939` Runtime ` that knows how to run an ` Acme\Application ` object and print the output on
4040CLI. If you want to use it with Nginx/PHP-FPM then you need another ` Runtime `
41- that converts the application's output to a HTTP response.
41+ that converts the application's output to an HTTP response.
4242
4343## Why is this a good thing?
4444
4545Since your application is not connected to the global state, it is very portable.
4646It is easy to create a ` Runtime ` to run the application with Bref, Swoole or
47- ReactPHP without making any change to the application itself.
47+ ReactPHP without making any changes to the application itself.
4848
4949Since most modern PHP applications are based on Symfony's HttpKernel, PSR-7 or
5050PSR-15 we don't need too many different runtimes. This organization holds many PHP
5151packages with runtimes for the most popular environments. It is not "* the source of
5252all runtimes* ", but rather a temporary place where runtimes can live before they
53- move in to Bref/Swoole/RoadRunner etc.
53+ move into Bref/Swoole/RoadRunner etc.
5454
5555All runtimes have hard dependencies to make installation easier. Everything should
5656"just work".
5757
58- Read more at the [ Symfony documentation] ( https://symfony.com/doc/5.3 /components/runtime.html ) .
58+ Read more at the [ Symfony documentation] ( https://symfony.com/doc/current /components/runtime.html ) .
5959
6060## Available Runtimes
6161
@@ -127,7 +127,7 @@ The runtime for [Symfony](https://symfony.com/) is included in the runtime compo
127127## Note about sessions
128128
129129On Symfony < 5.4 session data will not be properly stored when using a "non-traditional"
130- webserver like Bref, Google, ReactPHP, RoadRunner or Swoole. This problem (or missing
130+ webserver like Bref, Google, ReactPHP, RoadRunner, or Swoole. This problem (or missing
131131feature) has been added in Symfony 5.4 and 6.0. You need to use ` symfony/http-kernel >= 5.4 `
132132for sessions to work properly.
133133
0 commit comments