@@ -71,3 +71,35 @@ gcloud functions deploy helloHttp \
71
71
--allow-unauthenticated \
72
72
--set-env-vars "FUNCTION_SOURCE=public/index.php,APP_ENV=prod"
73
73
```
74
+
75
+ ## The long story
76
+
77
+ This section is for you who are new to Symfony Runtime component.
78
+
79
+ Symfony Runtime component will be released with Symfony 5.3 in May 2021. Here is
80
+ the [ official documentation] ( https://symfony.com/doc/5.3/components/runtime.html )
81
+ there is also a compressed version in the [ main readme] ( https://github.com/php-runtime/runtime ) .
82
+
83
+ Every Symfony application from Symfony 5.3 will be created with this component as
84
+ default. The component makes sure your application is decoupled from the global state.
85
+ Which means your application is very portable. With some config (or automatic mapping)
86
+ a ` RuntimeInterface ` is used as the "glue" between Nginx and your application.
87
+
88
+ Of course, different ` RuntimeInterface ` "glue" between different things. One Runtime
89
+ is for ** Google Cloud** , one for ** Bref/AWS** , one for ** Swoole** , one for ** RoadRunner**
90
+ etc. The point is that your application does not care what runtime it is. This means
91
+ that you can run your application locally with a normal web server (like Nginx) and
92
+ deploy it to Google Cloud with zero changes and still be sure everything works.
93
+
94
+ ### Google Cloud Runtime specifically
95
+
96
+ Since Google Cloud is very similar to a "normal web server", this runtime only
97
+ contains 2 things:
98
+ 1 . ` router.php ` which is a requirement from Google Cloud. Its job is just to redirect
99
+ the request to the front controller. It is not used locally.
100
+ 2 . Support for ` CloudEvent ` . If you write an application that expects a ` Google\CloudFunctions\CloudEvent `
101
+ this runtime will automatically detect that and create such object for you.
102
+
103
+ It will support native PHP applications and Symfony HttpFoundation type applications
104
+ out-of-the-box. To support PSR-7/PSR-15 or Laravel, one also need to install one additional
105
+ runtime. See [ main readme] ( https://github.com/php-runtime/runtime ) for more information.
0 commit comments