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

FEATURE: Neos 9.0 compatibility #51

Open
wants to merge 56 commits into
base: 3.0
Choose a base branch
from
Open

FEATURE: Neos 9.0 compatibility #51

wants to merge 56 commits into from

Conversation

mhsdesign
Copy link
Contributor

@mhsdesign mhsdesign commented Jun 2, 2023

This change introduces support for Neos 9.

When starting the development it was eminent that not all features of NodeTemplates version 1.0 could be considered. To ease maintenance the version 2 of NodeTemplates was a complete rewrite for this package in anticipation of Neos 9. It removed incompatible features but also introduced new functionalities. The core functionality was rewritten to not depend on active records so it can be adjusted to issue a set of content repository commands.
That way it became possible to reuse the test-suite as well as parts of the core domain and be up-mergeable.
Multiple up-merges from version 2 have been successful and this strategy will allow us to fix bugs or ease introducing new minor features.

That being said all features of NodeTemplates version 2 are herby adjusted/refactored to work with Neos 9 while passing all tests:

Core functionality, NodeTemplates via options.template

Full support of the feature set of version 2.
The deprecated EEL context variable triggeringNode was removed as discussed. Please use site or parentNode instead.

flow nodetemplate:validate

Includes new --site option: the Neos site, which determines the content repository. Defaults to the first available one.

flow nodeTemplate:createFromNodeSubtree

Includes new --site option: the Neos site, which determines the content repository. Defaults to the first available one.

Additional notes

mhsdesign added a commit that referenced this pull request Jun 13, 2023
…ed explicitly

Backport of #51

The idea is we move more and more to separating the "command" creation and the actual apply should go through flawless. This will enable us validating the template without applying it.
@mhsdesign
Copy link
Contributor Author

mhsdesign commented Jun 14, 2023

Some notes:

related: #50

related: #35 (comment)

references need special handling: https://github.com/neos/neos-ui/blob/4681fd003d9f9b6a14a47440d859265bad35044e/Classes/Domain/Model/Changes/Property.php#L152-L180


Question is, how to support usecases like #60

            childNodesToCopy: "${q(node).find('#' + data.templateNodeIdentifier).children('main').children().get()}"

as flowquery will only work with a "real" node and we have one yet. Maybe we need a helper for this?

Neos.Node.findNodeById(id, subgraph)

edit: as discussed in #70 (comment) we will make the parentNode or site node available ;)

@theilm
Copy link
Collaborator

theilm commented Jun 15, 2023

Question is, how to support usecases like #60

I think for this use case, the flowquery is not the problem: the nodes we try to get should be already materialized. The problem is: ATM we can copy the nodes when reacting to the signal; in the future, the target is not yet materialized and we have to modify the template based on the nodes we want to copy. Although this would be part of the package implementing the feature, we should think about how this could be done.

@mhsdesign mhsdesign changed the base branch from 2.0 to bugfix/66-correct-constraint-checks June 24, 2023 20:52
This upmerge includes changes until 2.0.1 aswell as the WIP features #58 and #67
Base automatically changed from bugfix/66-correct-constraint-checks to feature/separateNodeCreationWithQueuedMutators June 30, 2023 17:16
Base automatically changed from feature/separateNodeCreationWithQueuedMutators to 2.0 July 22, 2023 07:07
@mhsdesign mhsdesign force-pushed the neos9 branch 3 times, most recently from 6bd8b45 to ea3512b Compare July 22, 2023 20:29
@mhsdesign mhsdesign marked this pull request as ready for review June 21, 2024 07:37
@mhsdesign mhsdesign changed the title WIP: FEATURE: Neos 9.0 Prototype FEATURE: Neos 9.0 compatibility Jun 21, 2024
@mhsdesign
Copy link
Contributor Author

mhsdesign commented Jun 21, 2024

The node creation handler overhaul was merged neos/neos-ui#3519 and the node was made workspace aware neos/neos-development-collection#5042, the biggest changes in Neos 9 that would affect this package are done and the main functionality of this package is now fully compatible (without patches) with the latest beta Neos9-Beta10.
That means we can merge this into a target branch wed like to eventually tag a first V3.0 some time.
We can merge into master (though its behind 2.0) or create a new main branch, or create just a 3.0 branch. Your choice :D Edit lets do 3.0

@mhsdesign mhsdesign changed the base branch from 2.0 to 3.0 June 21, 2024 11:34
Neos.ContentRepository.Core/Classes/EventStore/EventPersister.php:47

RuntimeException: A transaction is active already, can't commit events!

-----------

and succeeding errors:

Neos.ContentRepository.Core/Classes/Infrastructure/DbalCheckpointStorage.php:88

RuntimeException: Failed to acquire checkpoint lock for subscriber "Neos\ContentRepository\Core\Projection\ContentStream\ContentStreamProjection" because a transaction is active already
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants