Neos 9.2 Beta-1 Release

Today we released our first beta of the new Neos 9.2 release line.

Thanks to all who contributed <3.

Recommended for new starting projects on stage

Neos 9.2 will introduce a new schema for the content graph. For new projects in line its worth to consider using this beta with its optimisations to be easier able to upgrade to the Neos 9.2 final release ™.

Setup Neos as usual by cloning the base distribution ~in the 9.2.0-beta1 version~ or adjust your dependencies of your base distribution as shown below.

Minimum PHP 8.4 Requirement

Neos 9.2 and Flow 9.2 raise the minimum PHP version from PHP 8.2 to PHP 8.4.
PHP 8.2 will be dead with security support ending in December 2026 and Neos 9.2 and 9.3 will be maintained well beyond that. PHP 8.4 was released in November 2024.

Guarantees of stability

We are not allowed to break any public PHP API, so the step to the final Neos 9.2 release will not introduce any problems.

Upgrading to this beta requires to remove the graph projection tables and replay. The goal of the final Neos 9.2 after having it tested is that it will contain the same schema and thus no further database adjustment would be needed.

Though if a new discovery during testing shows us that we need to change the schema again we will not refrain from the adjustment. That could require a replay when moving to the next beta or Neos 9.2 stable. This scenario with the extensive tests done so far is quite unlikely.

Migrating back to Neos 9.1 requires to remove the graph projection tables and replay again.

Upgrade instructions from Neos 9.0 and Neos 9.1

In your composer.json you should require 9.2.0-beta1 for all Neos packages from the development distribution and for the Neos Ui as well as Flow:

"neos/flow": "9.2.0-beta1",
"neos/neos": "9.2.0-beta1",
"neos/neos-ui": "9.2.0-beta1"

Also you must allow the beta via

"minimum-stability": "dev",
"prefer-stable": true,

Note that our Jenkins choose not to tag some packages correctly yet.

Due to the proxy changes in this upgrade, please do flush all temporary things;)

rm -rf Data/Temporary

Event migrations

1. Adjust recordedAt and node time stamps to UTC timezone +00:00

See issue

By storing “recordedAt” as datetime field we lost its original timezone information.
But we can make the assumption that its timezone should be the same as the one encoded in the ATOM metadata field “initiatingTimeStamp”

./flow crupgrade:eventsrecordedattoutc

While strictly not required this migration corrects the events to avoid any offset timestamps if you rely on those.

2. Deduplicate race conditioned ChangeBaseWorkspace’s

See issue

Workspace operations, also ChangeBaseWorkspace were not thread safe before the addition of workspace versioning in the read model and thus safe soft constraint checks.
That resulted in the possibility that a single workspace was changed two or more times in parallel by the same user.
Because each ChangeBaseWorkspace can be slow and cleans up at the end the content stream via ContentStreamWasRemoved, that results in possibly multiple illegal ContentStreamWasRemoved events and in total a fully illegal ChangeBaseWorkspace.

./flow crupgrade:eventsdeduplicatebaseworkspacechanges

Schema migrations / replay

The database can be migrated the following way:

A setup to apply the latest schema adjustments:

./flow doctrine:migrate

Normally you would use ./flow cr:setup to adjust also the content repository.
Because of the major change in the content graph, the tables have to not only truncated but dropped before doing the setup and full replay.

  • change to introduce new column workspace.version
  • change to introduce new column hierarchrelation.contentstreamlayer and id and new table contentstreamlayer

:warning:

:warning: The replay of the contentGraph can take some time - we are still working on an optimisation to replay 1.3 Mio events of our neos.io in ~50minutes. :warning:

./flow crupgrade:resetupandreplaycontentgraph

For remaining possible projections needing care, run

./flow cr:setup

And inspect via ./flow cr:status how your CR looks like. Everything should be now up to date and active.

Production upgrade

We are working on tooling to allow to continue operating on the current 9.0 / 9.1 content graph while Neos 9.2 is rolled out and to upgrade easier with a lesser or no content-freeze.

There will be this compatibility package neos/contentgraph-doctrinedbaladapter-compatibility which provides the 9.1 content graph compatible made for 9.2

The above upgrade steps require a content freeze and a downtime. The downtime can be reduced when upgrading and replaying first on stage or locally and then switching both database and redeploying the code to production.

Features

1.) :sparkles: Highlight :sparkles: Content Stream Layers - Fast publishing

Big concept update which heavily speeds up Neos 9.2+, by removing the full copy of Hierarchy Relations, and replacing it with so-called “hierarchy layers”.

With content stream layers a workspace can be created with cost of almost nothing. This is required to speed up our login. Also during publishing or rebase the we heavily profit from fast copying.

If you’re interested in that i recommend to look at my beautiful graphs here.

2.) :sparkles: Highlight :sparkles: Neos Ui Experience

FEATURE: Preview mode indicator for Neos UI

FEATURE: Move workspace selector to primary toolbar

3.) Workspace Role Assignments

FEATURE: Workspace module with role assignments

4.) Flow Framework

FEATURE: Runtime Constructor Injection

This changes constructor injection to happen at runtime by the ObjectManager. That means the constructor no longer needs to be proxied and loose it’s signature (Any other proxying happening, eg. AOP or other injection types will retain the signature now). It therefore also reduces the amount of proxies necessary in a project.

FEATURE: Enable Xdebug Path Mapping in Development context per default

… and many further things

This post does not document all new features as well as bug-fixes but the final release announcement will.

Debug help

Neos does not render

If opening the Neos shows:

Failed to load current content stream id from database: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘neos-base-distribution-90.cr_default_p_graph_contentstreamlayer’ doesn’t exist

Or

Failed to load workspace from database: An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘ws.version’ in ‘field list’

Then you are running the new 9.2 projection on the old schema. Please consult ./flow cr:status and execute ./flow crupgrade:resetupandreplaycontentgraph

Graph projection is not setup

Incorrect table definition; there can be only one auto column and it must be defined as a key

Using ./flow cr:setup does not work here, please use ./flow crupgrade:resetupandreplaycontentgraph

Composer conflicts

Our Jenkins choose not to tag some packages correctly yet. Among those “neos/buildessentials” and “neos/site-kickstarter”