Cover of the book Symfony 5: The Fast Track

Symfony 5: The Fast Track is the best book to learn modern Symfony development, from zero to production. +300 pages showcasing Symfony with Docker, APIs, queues & async tasks, Webpack, SPAs, etc.

SymfonyCloud: PHP 8 is available right now

The PHP team has just released PHP 8.0 moments ago 👏! I am happy to announce that you can deploy your applications using PHP 8.0 on SymfonyCloud right now 🎉:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
--- a/.symfony.cloud.yaml
+++ b/.symfony.cloud.yaml
@@ -1,6 +1,6 @@
 name: app

-type: php:7.4
+type: php:8.0

 runtime:
     sizing_hints:

While the majority of PHP extensions work right away, some third-party extensions are not yet available and will give an error if you try to deploy with those enabled. Some libraries (like Doctrine) might not be compatible at the moment as well. Thanks to SymfonyCloud environments, you can give it a try without breaking your production:

1
2
3
4
$ symfony env:create php-8
$ vim .symfony.cloud.yaml
$ git add -u && git commit 'PHP 8 is here!'
$ symfony deploy

As for every new version of PHP, developer ergonomics, performance, and security are all improved. One of the most anticipated features is probably the JIT - Just In Time - compilation. The JIT compiler promises some performance improvements. In order to enable it, don’t forget to define the jit_buffer_size PHP setting:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
--- a/.symfony.cloud.yaml
+++ b/.symfony.cloud.yaml
@@ -21,6 +21,7 @@ runtime:
 variables:
     php:
         opcache.preload: /app/config/preload.php
+        opcache.jit_buffer_size: 100M

 relationships:
     database: "database:postgresql"
Help the Symfony project!

As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.

Comments

Great!

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.