For Neos 4.0 and Flow 5.0 quite some changes were made under the hood. But even though there's a review process in place and changes are usually well tested by members of the Neos Team and the community, a couple of glitches slipped through. This kept everyone from using the new releases right away in a professional hosting environment using Redis …

A smooth migration path

In general, the upgrade of our own website went pretty smooth. It mostly consisted of declaring new Composer dependencies for all the relevant Open Source packages we maintain, a few Fusion adjustments (be aware that the old ".ts2" file extension is ignored now) and then … just deploy it to our staging instance in Beach.

On the Beach side of things, we needed to make sure that Beach automatically sets the FLOW_HTTP_TRUSTED_PROXIES environment variable for the new (well, more restrictive) trusted proxy feature in Flow 5.0. And then that should be it – we thought.

Everything working … but Redis

It turned out that our website's frontend woke up with just a white screen. However, it wasn't a fatal error or hosting issue. Karsten and I found out that Neos was sending a zero bytes response with a 200 OK - but no error logged anywhere. The reason for that was a tiny, but ugly new bug in the Redis cache backend. The well-meant addition of a PHP type hint caused an error which was then caught by Fusion and effectively resulted in an empty response, as soon as the given page was cached:

 * TODO: No return type declaration for now, as it needs to return false as well.
 * @param string $value
 * @return mixed
private function uncompress(string $value): string
    if (empty($value)) {
         return $value;
     return $this->useCompression() ? gzdecode($value) : $value;

Do you see the bug? The uncompress() function has a string type declaration for $value, however, as the TODO comment states, it can very well happen that $value is false.

All's well that ends well

This morning we released Flow 5.0.2 which contains the bugfix, deployed based on the new version and … voilá, everything is working nicely. So, if you upgrade your project to Neos 4.0 or Flow 5.0 today, Beach is ready for it, too – enjoy!

Want to try out Neos 4.0 or upgrade, but your current environment doesn't support it? How about trying out Beach? We have a 14-days free trial and a great support directly from the folks who also released Neos 4.0 ;-)