Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Upgrade to Neos 9 #129

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Neos\Flow\Persistence\PersistenceManagerInterface;
use Neos\Neos\Domain\Service\UserService;
use Neos\Neos\Service\DataSource\AbstractDataSource;
use Neos\ContentRepository\Domain\Model\NodeInterface;

class EditorsDataSource extends AbstractDataSource
{
Expand All @@ -28,11 +27,10 @@ class EditorsDataSource extends AbstractDataSource
protected $persistenceManager;

/**
* @param NodeInterface $node The node that is currently edited (optional)
* @param array $arguments Additional arguments (key / value)
* @return array
*/
public function getData(NodeInterface $node = null, array $arguments = [])
public function getData($node = null, array $arguments = [])
{
$options = [];
foreach ($this->userService->getUsers() as $user) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class UserDataHelper extends ArrayHelper

/**
* @param array $userIdentifiers
* @return array<User>
* @return array<mixed>
*/
public function getData($userIdentifiers)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Neos\DocsNeosIo\FlowQuery\Operations;

use Neos\ContentRepository\Domain\Model\NodeInterface;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
use Neos\Eel\FlowQuery\FlowQueryException;
Expand Down Expand Up @@ -49,7 +48,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments)
*/
public function getReferenceFilter(string $propertyName, array $references)
{
return function (NodeInterface $node) use ($propertyName, $references) {
return function ($node) use ($propertyName, $references) {
$nodeReferences = $node->getProperty($propertyName);

if ($nodeReferences === null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@

Neos:
Flow:
i18n:
defaultLocale: en
ContentRepository:
contentDimensions:
language:
label: Languages
icon: icon-language
# The default dimension that is applied when creating nodes without specifying a dimension
default: en
# The default preset to use if no URI segment was given when resolving languages in the router
defaultPreset: en
presets:
en:
label: English
values:
- en
uriSegment: ''
Neos:
userInterface:
defaultLanguage: en
Expand All @@ -26,3 +10,28 @@ Neos:
Neos.DocsNeosIo:
- Main
- 'NodeTypes/*'
sites:
'*':
contentDimensions:
# defaultDimensionSpacePoint is used for the homepage (URL /)
defaultDimensionSpacePoint:
language: en
resolver:
factoryClassName: Neos\Neos\FrontendRouting\DimensionResolution\Resolver\UriPathResolverFactory
options:
segments:
-
dimensionIdentifier: language
# dimensionValue => uriPathSegment (empty uriPathSegment allowed)
dimensionValueMapping:
en: ''
ContentRepositoryRegistry:
contentRepositories:
default:
contentDimensions:
language:
label: Languages
icon: icon-language
values:
en:
label: English

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'Neos.DocsNeosIo:Content.Search':
superTypes:
'Neos.Neos:Content': true
'Neos.DocsNeosIo:Constraint.Content.Restricted': true
ui:
label: 'Search'
icon: icon-search
position: 100
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'Neos.DocsNeosIo:Document.HomePage':
superTypes:
'Neos.DocsNeosIo:Document.AbstractPage': true
'Neos.Neos:Site': true
'Neos.DocsNeosIo:Constraint.Document.Restricted': true
'Neos.DocsNeosIo:Mixin.InspectorGeneral': true
ui:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@
label: 'Search Results Page'
icon: icon-search
position: 990
childNodes:
main:
constraints:
nodeTypes:
'Neos.DocsNeosIo:Content.Search': true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{"identifier":"845083dc-2a60-4b09-97b4-99fb0dfb6757","type":"RootNodeAggregateWithNodeWasCreated","payload":{"contentStreamId":"10e30310-10bb-4dac-b392-e3b0c01dbdc4","nodeAggregateId":"f570a3ac-d40d-43ef-8757-944ab6cf7127","nodeTypeName":"Neos.Neos:Sites","coveredDimensionSpacePoints":[{"language":"en"}],"nodeAggregateClassification":"root"},"metadata":{"commandClass":"Neos\\ContentRepository\\Core\\Feature\\RootNodeCreation\\Command\\CreateRootNodeAggregateWithNode","commandPayload":{"contentStreamId":"10e30310-10bb-4dac-b392-e3b0c01dbdc4","nodeAggregateId":"f570a3ac-d40d-43ef-8757-944ab6cf7127","nodeTypeName":"Neos.Neos:Sites","tetheredDescendantNodeAggregateIds":[]},"initiatingUserId":"system","initiatingTimestamp":"2024-03-13T17:52:00+00:00"}}
{"identifier":"1a858a75-e804-4574-9e54-1780b9261688","type":"NodeAggregateWithNodeWasCreated","payload":{"contentStreamId":"10e30310-10bb-4dac-b392-e3b0c01dbdc4","nodeAggregateId":"2afec4a1-3b13-4ca8-8ab1-c662e703d426","nodeTypeName":"Neos.DocsNeosIo:Document.HomePage","originDimensionSpacePoint":{"language":"en"},"coveredDimensionSpacePoints":[{"language":"en"}],"parentNodeAggregateId":"f570a3ac-d40d-43ef-8757-944ab6cf7127","nodeName":"neosdocs","initialPropertyValues":{"status":{"value":"","type":"string"},"title":{"value":"neosdocs","type":"string"}},"nodeAggregateClassification":"regular","succeedingNodeAggregateId":null},"metadata":{"commandClass":"Neos\\ContentRepository\\Core\\Feature\\NodeCreation\\Command\\CreateNodeAggregateWithNodeAndSerializedProperties","commandPayload":{"contentStreamId":"10e30310-10bb-4dac-b392-e3b0c01dbdc4","nodeAggregateId":"2afec4a1-3b13-4ca8-8ab1-c662e703d426","nodeTypeName":"Neos.DocsNeosIo:Document.HomePage","originDimensionSpacePoint":{"language":"en"},"parentNodeAggregateId":"f570a3ac-d40d-43ef-8757-944ab6cf7127","initialPropertyValues":{"title":{"value":"neosdocs","type":"string"}},"succeedingSiblingNodeAggregateId":null,"nodeName":"neosdocs","tetheredDescendantNodeAggregateIds":{"main":"157fe0f9-f8b0-4a57-8350-b76264e0ea09"}},"initiatingUserId":"system","initiatingTimestamp":"2024-03-13T17:53:46+00:00"}}
{"identifier":"82c1c89e-ae93-4874-8afc-5329cbffe76a","type":"NodeAggregateWithNodeWasCreated","payload":{"contentStreamId":"10e30310-10bb-4dac-b392-e3b0c01dbdc4","nodeAggregateId":"157fe0f9-f8b0-4a57-8350-b76264e0ea09","nodeTypeName":"Neos.Neos:ContentCollection","originDimensionSpacePoint":{"language":"en"},"coveredDimensionSpacePoints":[{"language":"en"}],"parentNodeAggregateId":"2afec4a1-3b13-4ca8-8ab1-c662e703d426","nodeName":"main","initialPropertyValues":[],"nodeAggregateClassification":"tethered","succeedingNodeAggregateId":null},"metadata":{"initiatingUserId":"system","initiatingTimestamp":"2024-03-13T17:53:46+00:00"}}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ prototype(Neos.DocsNeosIo:Component.Authors) < prototype(Neos.Neos:ContentCompon
<i>Written by</i> <span>
<Neos.Fusion:Loop items={props.authors} itemName="author" iterationName="iteration" @children="itemRenderer">
{iteration.index == 0 ? '' : iteration.isLast ? ' & ' :', '}
<strong itemprop="author" itemscope="" itemtype="https://schema.org/Person"><span itemprop="name">{author.label}</span></strong>
<strong itemprop="author" itemscope="" itemtype="https://schema.org/Person"><span itemprop="name">{Neos.Node.label(author)}</span></strong>
</Neos.Fusion:Loop>
</span>
</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../public/Frontend/scss/screen";
@use "../../../../Public/Frontend/scss/screen";

.main-footer {
background-color: #f9fcff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ prototype(Neos.DocsNeosIo:Component.Header) < prototype(Neos.Fusion:Component) {
@cache {
mode = 'cached'
entryIdentifier {
documentNode = ${documentNode}
documentNode = ${Neos.Caching.entryIdentifierForNode(documentNode)}
}
entryTags {
1 = ${Neos.Caching.nodeTypeTag('Neos.Neos:Document', documentNode)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ prototype(Neos.DocsNeosIo:Component.Layout) < prototype(Neos.Neos:ContentCompone

@cache {
mode = 'cached'
entryIdentifier.node = ${documentNode}
entryIdentifier.node = ${Neos.Caching.entryIdentifierForNode(documentNode)}
entryTags {
1 = ${Neos.Caching.nodeTypeTag('Neos.Neos:Document', documentNode)}
}
Expand All @@ -52,9 +52,9 @@ prototype(Neos.DocsNeosIo:Component.Layout) < prototype(Neos.Neos:ContentCompone
<div class="fullwidth-header">
<div class={props.flexheader ? "container-wrapper" : "main-content"}>
<h1>{props.title}</h1>
<p class="lead" @if={props.subtitle || node.context.inBackend}>{props.subtitle}</p>
<p class="lead" @if={props.subtitle || renderingMode.isEdit}>{props.subtitle}</p>
<Neos.DocsNeosIo:Component.TagList
@if.inBackend={node.context.inBackend}
@if.inBackend={renderingMode.isEdit}
items={props.tags}
additionalClass="backend-tags"
filter="" />
Expand All @@ -70,9 +70,9 @@ prototype(Neos.DocsNeosIo:Component.Layout) < prototype(Neos.Neos:ContentCompone
<main class={["main-container", props.localNav && "has-local-navigation"]} @if={!props.fullwidth}>
<div class="main-content">
<h1>{props.title}</h1>
<p class="lead" @if={props.subtitle || node.context.inBackend}>{props.subtitle}</p>
<p class="lead" @if={props.subtitle || renderingMode.isEdit}>{props.subtitle}</p>
<Neos.DocsNeosIo:Component.TagList
@if.inBackend={node.context.inBackend}
@if.inBackend={renderingMode.isEdit}
items={props.tags}
additionalClass="backend-tags"
filter="" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use "../../../../public/Frontend/scss/screen";
@use "../../../../public/Frontend/scss/helpers";
@use "../../../../Public/Frontend/scss/screen";
@use "../../../../Public/Frontend/scss/helpers";

.profile-image {
width: 200px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ prototype(Neos.DocsNeosIo:Component.LocalNavigation.LevelRenderer) < prototype(N
<a>
<Neos.DocsNeosIo:Helper.StringToHash
@path="attributes.href"
value={q(node).property('title') || node.identifier}
value={q(node).property('title') || node.aggregateId}
@process={'#' + value}/>
{q(node).property('title')}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ prototype(Neos.DocsNeosIo:Component.LocalNavigation) < prototype(Neos.Fusion:Com
<div class="local-navigation sm-hidden">
<aside class="toc">
<Neos.DocsNeosIo:Component.LocalNavigation.LevelRenderer items={props.items}/>
<div @if.inBackend={node.context.inBackend}>
<div @if.inBackend={renderingMode.isEdit}>
<i>This navigation updates only after a reload.</i>
</div>
</aside>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../public/Frontend/scss/screen";
@use "../../../../Public/Frontend/scss/screen";

.local-navigation {
display: none;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use "../../../../public/Frontend/scss/screen";
@use "../../../../public/Frontend/scss/helpers";
@use "../../../../Public/Frontend/scss/screen";
@use "../../../../Public/Frontend/scss/helpers";

.nav-bar {
position: fixed;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
prototype(Neos.DocsNeosIo:Component.NavBarContent) < prototype(Neos.Fusion:Component) {

@context.navBarNodeDepth = ${this.node.depth - this.startingPoint.depth}
@context.navBarNodeDepth = ${Neos.Node.depth(this.node) - Neos.Node.depth(this.startingPoint)}
node = ${node}
itemTitle = ${q(node).property('titleOverride') || q(node).property('title')}
itemStatus = ${q(node).property('status')}
Expand All @@ -10,7 +10,7 @@ prototype(Neos.DocsNeosIo:Component.NavBarContent) < prototype(Neos.Fusion:Compo
current = 'current'
[email protected] = ${node == documentNode}
active = 'active'
[email protected] = ${node == documentNode || (navBarNodeDepth != 1 && (q(documentNode).parents('[_identifier = "' + node.identifier + '"]').count() > 0))}
[email protected] = ${node == documentNode || (navBarNodeDepth != 1 && (q(documentNode).parents('[_identifier = "' + node.aggregateId + '"]').count() > 0))}
}
navigationClass = ${'navigation-level navigation-level--level-' + (navBarNodeDepth + 1)}
navigationItems = Neos.Fusion:Loop {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ prototype(Neos.DocsNeosIo:Component.NavBarItemDialogItem) < prototype(Neos.Fusio
itemClass = Neos.Fusion:DataStructure {
base = 'item'
active = 'active'
[email protected] = ${node == documentNode || String.indexOf(q(node).property('target'), documentNode.identifier) > -1}
[email protected] = ${node == documentNode || String.indexOf(q(node).property('target'), documentNode.aggregateId) > -1}
}

isExternal = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ prototype(Neos.DocsNeosIo:Component.NavBarItemLink) < prototype(Neos.Fusion:Comp
itemClass = Neos.Fusion:DataStructure {
base = 'item'
active = 'active'
[email protected] = ${node == documentNode || String.indexOf(q(node).property('target'), documentNode.identifier) > -1}
[email protected] = ${node == documentNode || String.indexOf(q(node).property('target'), documentNode.aggregateId) > -1}
}

renderer = afx`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ prototype(Neos.DocsNeosIo:Component.Notice) < prototype(Neos.Neos:ContentCompone
backend = ${value == 'backend' ? 'fas fa-edit' : value}
}
renderer = afx`
<div id={props.id} class={'custom-block ' + props.type} @if.isFrontendNotice={props.type != 'backend' || node.context.inBackend}>
<p @if={props.title || node.context.inBackend} class="custom-block-title">
<div id={props.id} class={'custom-block ' + props.type} @if.isFrontendNotice={props.type != 'backend' || renderingMode.isEdit}>
<p @if={props.title || renderingMode.isEdit} class="custom-block-title">
<Neos.DocsNeosIo:Component.Icon iconName={String.firstLetterToUpperCase(props.type)} iconClass={props.iconClass} additionalClass="inline-icon custom-block-icon" />
<span @if.backend={props.type == 'backend'}>Backend only: </span>
{props.title}
Expand Down
Loading