Today we released another Neos 9 Beta.
It contains many bugfixes, big refactoring and great new features.
Thanks to all who contributed <3.
- Anke Häslich
- Denny Lubitz
- Christian Wolff
- Simon Krull
- Bastian Waidelich
- Christian Müller
- Michel Loew
- Marc Henry Schultz
- Karsten Dambekalns
- Wilhelm Behncke
- Paula Kallert
Upgrade instructions from Beta 10
previous beta → Neos 9 Beta-10 Release
In your composer.json you should require 9.0.0-beta11
for all Neos packages from the development distribution and for the NeosUi as well as Flow:
"neos/neos": "9.0.0-beta11",
"neos/neos-ui": "9.0.0-beta11",
"neos/contentgraph-doctrinedbaladapter": "9.0.0-beta11"
Composer conflicts after updatating / for new installations
Setting up a new project via
composer create-project neos/neos-base-distribution:9.0.0-beta11
or updating your project will still reference the packageneos/contentrepositoryregistry-doctrinedbalclient
.
It was dropped andneos/contentgraph-doctrinedbaladapter
needs to be referenced instead! Composer create will be fixed with beta12
The database can be migrated the following:
A setup to apply the latest schema adjustments can be run via (feel free to inspect via cr:status
what will be adjusted)
./flow cr:setup
Additionally, PRs marked with ⛁ might need a dedicated migration.
- ⛁¹ Event migration for fixing already published events to include the workspace name:
./flow migrateevents:migratePayloadToWorkspaceName
- ⛁² Rewrites all events containing a workspaceName, which doesn’t match the new workspaceName constraints and rewrites them.
./flow migrateevents:migratepayloadtovalidworkspacenames
If the migration found some workspaceNames or baseWorkspaceNames to migrate, please run a projection replay of the workspace projection.
./flow cr:projectionreplay --projection workspace
Features
!!! 1.) Remove previously deprecated Beta10 APIs
- TASK: Remove deprecated beta10 apis
- !!! TASK: Remove
Node::nodeType
- TASK: Remove usages of
$node->subgraphIdentity->contentStreamId
in structure adjustments - TASK: Remove explicit deprecated command blocking
- TASK: Remove references to deprecate node read model properties
Removal of field Node::$contentSubgraphIdentity
and ContentSubgraphIdentity
The ContentSubgraphIdentity
was intermediate part of the node’s “Read Model” identity.
Please use Node::$contentRepositoryId
, Node::$workspaceName
, Node::$dimensionSpacePoint
, and Node::$aggregateId
instead,
or see NodeAddress::fromNode()
for passing the identity around.
The visibility-constraints now reside in Node::$visibilityConstraints
.
There is no replacement for the previously attached content-stream-id. Please refactor the code to use the newly available workspace-name.
Removal of Node::getLabel()
To get the label for a Node
in PHP, one must replace Node::getLabel()
with a call to Neos\Neos\Domain\NodeLabel\NodeLabelGeneratorInterface::getLabel
:
+ #[Flow\Inject]
+ protected NodeLabelGeneratorInterface $nodeLabelGenerator;
+
+ $this->nodeLabelGenerator->getLabel($node);
- $node->getLabel();
For Fusion please use the new FlowQuery operation:
- ${node.label}
+ ${q(node).label()}
Rename of field Node::$nodeAggregateId
In php Node::nodeAggregateId
was renamed to Node::aggregateId
.
- ${node.nodeAggregateId.value}
- ${node.identifier}
+ ${q(node).id()}
Removal of field Node::$nodeType
In php Node::nodeType
was removed. Please use NodeTypeManager::getNodeType
instead:
- $node->nodeType;
+ $contentRepository = $this->contentRepositoryRegistry->get($node->contentRepositoryId);
+ $nodeType = $contentRepository->getNodeTypeManager()->getNodeType($node->nodeTypeName);
The use in Fusion is discouraged (tip use a custom EEL Helper), but you can access it like:
- ${node.nodeType}
+ ${Neos.Node.getNodeType(node)}
Rename of field Node::$nodeName
In php Node::nodeName
was renamed to Node::name
.
The use in Fusion is discouraged, but you can still access it like:
${node.name.value}
Removal of CommandResult::block
The CommandResult::block
calls must be removed.
- $contentRepository->handle($command)->block();
+ $contentRepository->handle($command);
!!! 2.) New node uri building
- !!! FEATURE: Overhaul node uri building
- !!! TASK: Refactor
Node
property mapper to use new NodeAddress - !!! TASK: Remove concepts
addQueryString
andargumentsToBeExcludedFromQueryString
in Neos - !!! TASK: Deprecate concepts
addQueryString
andargumentsToBeExcludedFromQueryString
Introduces a new API for node-uribuilding to replace the LinkingService
The previous Neos9-Beta10 did already contain a similar new NodeUriBuilder
but this change overhauls the API to not expose the implementations of the Flow UriBuilder.
The new NodeUriBuilder
is not a singleton and thus cannot be injected but must be created via the NodeUriBuilderFactory
with the current ActionRequest
at hand.
Simple case:
// before
#[Flow\Inject]
protected LinkingService $linkingService;
public function uriForNode(Node $node, ControllerContext $controllerContext): string
{
return $this->linkingService
->createNodeUri(
controllerContext: $controllerContext,
node: $node
);
}
// after
#[Flow\Inject]
protected NodeUriBuilderFactory $nodeUriBuilderFactory;
public function uriForNode(Node $node, ActionRequest $actionRequest): UriInterface
{
return $this->nodeUriBuilderFactory
->forActionRequest($actionRequest)
->uriFor(
NodeAddress::fromNode($node)
);
}
Advanced case:
// before
#[Flow\Inject]
protected LinkingService $linkingService;
public function uriForNode(Node $node, ControllerContext $controllerContext): string
{
return $this->linkingService
->createNodeUri(
controllerContext: $controllerContext,
node: $node,
format: 'json',
absolute: true,
arguments: ['simple-query' => 'abc'],
section: 'my-anchor'
);
}
// after
#[Flow\Inject]
protected NodeUriBuilderFactory $nodeUriBuilderFactory;
public function uriForNode(Node $node, ActionRequest $actionRequest): UriInterface
{
$resolvedUri = $this->nodeUriBuilderFactory
->forActionRequest($actionRequest)
->uriFor(
NodeAddress::fromNode($node),
Options::create(forceAbsolute: true)->withCustomFormat('json')
);
return UriHelper::uriWithAdditionalQueryParameters($resolvedUri, ['simple-query' => 'abc'])
->withFragment('my-anchor');
}
Also notice that the PHP api for uri building will no longer keep the current format of the action request by default unlike in the Fusion api.
If this behaviour is required it should be implemented via $options->withCustomFormat($actionRequest->getFormat());
!!! 3.) Flow requires doctrine/dbal version 3
- !!! FEATURE: update to
doctrine/dbal
version 3 - !!! TASK: Raise doctrine/dbal version constraint
- Merge: 8.3 to 9.0 and fix DBAL compatibility issues
- doctrines json_array type is deprecated, therefore flow_json_array is based off of json type now
- We use PSR6 caches now instead of the deprecated doctrine cache implementation
- New Cache
Flow_Persistence_Doctrine_Metadata
for ORM class metadata Repository::findAllIterator
directly returns an iterable, theRepository::iterate
method is gone- All doctrine migration commands have a new optional
migration-folder
argument that allows to overwrite the “platform name part” in migration resolving (e.g. “Mysql”) as the resolving changed and we cannot be sure deducing it from the current connection will work long term for all cases. Currently MySQL/MariaDB (map to “Mysql”), PostgreSQL (maps to “Postgresql” and SQLite (maps to “Sqlite”) all work fine automatically still.
upgrade instructions from doctrine dbal: New Major Release: Doctrine DBAL 3.0 - Doctrine: PHP Open Source Project
4.) Streamlining the new content repository
- !!! TASK: Deprecate setting NodeNames via cr commands
- !!! TASK: streamline
NodeReferencesWereSet::$nodeAggregateId
- !!! TASK: Streamline
ContentGraph::findRootNodeAggregateByType
- !!! TASK: Followup #4520 Introduce
NodeType::tetheredNodeTypeDefinitions
- TASK: Unify naming of contentRepositoryIdentifier to contentRepository in ESCR CLI commands
- FEATURE: Add
NodeAggregateId::tryFromString()
constructor - TASK: 5051 make subgraph not jsonSerializeable
- ⛁² !!! FEATURE: Stabilize WorkspaceName value object
5.) Other refactorings
- !!! TASK: Move workspace module to separate package
- TASK: Remove
createSitePackage
action - ⛁¹ !!! FEATURE: Add
workspaceName
to relevant events - TASK: Remove DbalClient abstraction
- FEATURE: Separate properties and references in Neos UI and FEATURE: Separated references and properties in Neos UI
- FEATURE: Expose content repository ids from registry
Bugfixes
Neos Content Repository
- BUGFIX: Implement document uri path placeholders
- BUGFIX: Change workspace runs into endless while-loop
- BUGFIX: Improve output of
PropertyCannotBeSet
exception - !!! TASK: Make kickstart:site command work with Neos 9.0
- BUGFIX AssetUsage in MediaBrowser
- BUGFIX: Violation detection: Fix selection of node ids by content stream
- BUGFIX: Remove transaction closures from projections (to improve errors)
- BUGFIX: Properly convert legacy MoveNodeMappings
- BUGFIX: Ensure a valid target workspace name in node migrations
- BUGFIX: Optimize queries for subtree tags
- !!! BUGFIX: Consider entry node when filtering in reference editor (Note that the
SearchTerm
DTO was moved fromNeos\ContentRepository\Core\Projection\ContentGraph
intoNeos\ContentRepository\Core\Projection\ContentGraph\Filter\SearchTerm
)
Neos Ui
- BUGFIX Disable uriPathSegment Validation on Hompage
- BUGFIX: Add float case handling to NodePropertyConversionService
- BUGFIX: Show the right error message if only child is published
Flow
- BUGFIX: Do proper resolving of FusionPathProxy
- FEATURE: Allow
PositionalArraySorter
to keepnull
values
Dev only relevant
List of things
Neos
- TASK: Use collection value objects in content graph instead of
iterable
- TASK: 5034 fully completely workspace aware behat tests
- BUGFIX: Dont initialize $currentContentStreamId by default in behat tests
- FEATURE: NodeMigration with target workspace
- BUGFIX: Fix content cache for discard, revert #5083 for now
- BUGFIX: Flush node content caches without workspace name
- BUGFIX Workspace aware NodeCacheEntryIdentifier
- TASK: Consolidate contributing file
- TASK: Remove
--reset-projections
flag fromcr:setup
command - TASK: Tweak README
- TASK: Use correct @template-covariant tag for ProjectionFactoryInterface
- TASK: Remove i18n labels that are obsolete after neos/neos-ui#3759
- FEATURE: Update PHP Version in Behat Test docker file
- BUGFIX: fix behat configuration template folder path in README.rst
- Fix PHPStan baseline
- TASK: Cosmetic cleanup of
DoctrineDbalContentGraphProjection
- TASK: Cleanup and stabilize
Neos.ContentGraph.DoctrineDbalAdapter
- BUGFIX: Fix composer manifest
- BUGFIX: Fix linting error in
ConvertUrisImplementation
- TASK: Make the
ImageInterfaceArrayPresenter
required by the ui the … - TASK: Remove shallow
ContentGraphProjection
decorator - TASK: Format behat tests
- BUGFIX: Fix behat steps
- TASK: Add workspaceName to nodeAggregate
- TASK: Allow PropertyName in
Node::getProperty
- FEATURE: Workspace aware content cache
- TASK: Combine two
NodeTypeNotFoundExceptions
into one - TASK: Case sensitive migration and migration of baseWorkspaceName
- TASK: Add migration for workspaceName constraints
- BUGFIX: Improve invalid WorkspaceName exception message
Neos Ui
- TASK: adjust to Command Api changes in Neos
- BUGFIX: Adjust route to workspace module
- TASK: Translate backend messages
- TASK: Dont use deprecated
Node::getLabel
- FEATURE: Level up to PHPStan 8
- TASK: Adjust to
Node:$nodeType
removal - TASK: Update mariadb to 10.6 for e2e docker setups
- TASK: adjust to overhauled node uri building
- TASK: Remove
__neosLegacyUiEnabled__
flag again - TASK: Adjust to workspace name in events
- TASK: Adjust to neos 9 deprecations
- TASK: Adjust To Tethered NodeType Definitions
New included features from upcoming Neos 8.4
- FEATURE: Custom label for auto created child nodes
- FEATURE: Improve site:list command
- Userinterface - - TASK: Upgrade to FontAwesome 6.5.2 and TASK: Upgrade to FontAwesome 6.5.2
- FEATURE: Link Neos logo in modules to primary module
- FEATURE: Allow to set maximum rows to restrict height of the textarea editor in inspector
- Flow - - !!!TASK: Deprecate outdated doctrine functionality