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

Replace PrimaryContent usages automatically #78

Closed
bwaidelich opened this issue Jul 19, 2024 · 0 comments · Fixed by #80
Closed

Replace PrimaryContent usages automatically #78

bwaidelich opened this issue Jul 19, 2024 · 0 comments · Fixed by #80

Comments

@bwaidelich
Copy link
Member

bwaidelich commented Jul 19, 2024

Currently usages of Neos.Neos:PrimaryContent are not replaced automatically.

Instead a comment is added to the top of using files:

// TODO 9.0 migration: You need to refactor "Neos.Neos:PrimaryContent" to use "Neos.Neos:ContentCollection" instead.

// ...

main = Neos.Neos:PrimaryContent

Instead, we could consider replacing those usages directly.

Danger: With the current rectors it's not possible yet, to only replace the usages of the prototypes.. If we were to use the FusionReplacePrototypeNameRector to replace PrimaryContent, overrides such as

prototype(Neos.Neos:PrimaryContent) {
  someCustomCase {
    condition = ...
    renderer = 'this will be lost'
  }
}

would be replaced, too.

So, we would need to extend the FusionReplacePrototypeNameRector by some flag that allows us to exclude prototype definitions. Also we should extend other rectors like FusionPrototypeNameAddCommentRector such that the can target only prototype definitions/overrides.

Alternatively we should just keep Neos.Neos:PrimaryContent usages for now since the prototype still exists in 9.0 (even if deprecated)

Relates:

bwaidelich added a commit that referenced this issue Jul 19, 2024
Adjusts the set such that usages of `Neos.Neos:PrimaryContent` are replaced while overrides are still kept

Resolves: #78
Related: #79
dlubitz added a commit that referenced this issue Sep 24, 2024
Adjusts the set such that usages of `Neos.Neos:PrimaryContent` are replaced while overrides are still kept

Resolves: #78
Related: #79
dlubitz added a commit that referenced this issue Sep 24, 2024
Adjusts the set such that usages of `Neos.Neos:PrimaryContent` are replaced while overrides are still kept

Resolves: #78
Related: #79
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 a pull request may close this issue.

1 participant