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

Migrate node.context.inBackend to Neos.Backend.isEditMode(request) #21

Closed
mhsdesign opened this issue Jul 10, 2023 · 3 comments
Closed

Comments

@mhsdesign
Copy link
Member

mhsdesign commented Jul 10, 2023

Resolves partly neos/neos-development-collection#4396

As @mficzel said here neos/neos-ui#3571:

replace Neos.Node.inBackend(node) which is removed here neos/neos-development-collection#4067 with Neos.Backend.isEditMode(request) || Neos.Backend.isPreviewMode(request)

Currently node.context.inBackend is rewritten to Neos.Node.inBackend, but we might get rid of that method or deprecate it...

The question is if we should provide a Flow or rector migration for existing 9.0 projects using Neos.Node.inBackend? - could be a simple regex ^^ (or one needs to run this regex yourself via php storm.)

search

Neos.Node.inBackend\([a-zA-Z]*\)

replace with

Neos.Backend.isEditMode(request) || Neos.Backend.isPreviewMode(request)
@mficzel
Copy link
Member

mficzel commented Jul 10, 2023

I would only provide migrations for features that we actually released. The few existing 9.0 projects are maintained by people capable of handling this just fine.

@dlubitz
Copy link
Contributor

dlubitz commented Sep 29, 2023

Can we close this @mhsdesign ?

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

No branches or pull requests

3 participants