Git Product home page Git Product logo

rector's Introduction

The Neos package

Note

This repository is a read-only subsplit of a package that is part of the Neos project (learn more on www.neos.io).

Neos is an open source Content Application Platform based on Flow. A set of core Content Management features is resting within a larger context that allows you to build a perfectly customized experience for your users.

If you want to use Neos, please have a look at the Neos documentation

Contribute

If you want to contribute to Neos, please have a look at https://github.com/neos/neos-development-collection - it is the repository used for development and all pull requests should go into it.

Build frontend assets

If you need to rebuild the frontend assets you need to run the following commands within the Neos.Neos package directory:

For develpment:

yarn
yarn build

For production:

yarn
yarn build:production

rector's People

Contributors

ahaeslich avatar bwaidelich avatar dlubitz avatar drprofesq avatar kdambekalns avatar kitsunet avatar mficzel avatar mhsdesign avatar reflexxion avatar robert-heinig avatar saschanowak avatar skurfuerst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rector's Issues

Special cases of `node.context.*`

  • migrate node.context.currentSite to eel helper to fetch site entity
  • migrate node.context.workspace to eel helper to fetch workspace, but attention, the workspace api in fusion also changed.
  • warn if anything else is accessed by node.context.*
  • while the renderingMode has a basic migration via #22, but the not all things are migrated currently
    • node.context.workspace.name == 'live' -> !renderingMode.isEdit
    • node.context.workspace.personalWorkspace -> renderingMode.isEdit
    • node.context.currentRenderingMode.* -> renderingMode.*

Renamed/Moved Classes are not detected in php

For example I got this exception while updating a project (DocsNeosIo) to Neos9:

Required class "Neos\ContentRepository\Migration\Transformations\AbstractTransformation" could not be loaded properly for reflection from "Neos\DocsNeosIo\ContentRepository\Transformations\UpdateHyphenTransformation"

And I know a fix for all classes will not be possible/overwhelming, but at least the most used ones should be fixed/commented by rector

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

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)

some signals no longer exist

On the Neos Sprint in Hamburg I found out that some signals have been removed and replaced with catchUpHooks.

It would be pretty awesome if it would be possible to get a comment if the used signal is no longer supported
Maybe with a small hint for the hooks

Provide a migration for people using „sites“ and rewrite this to Neos.Neos:Sites?

We should provide a migration for people using „sites“ and rewrite this to Neos.Neos:Sites

Originally posted by @mhsdesign in neos/neos-development-collection#4339 (comment)

to be discussed in which places this should happen.

most obvious ones are in yaml configurations fx for startingPoints of the reference editor.

i think transforming php automagically might not be trivial, so I would count on manual migration there, but we should still highlight possible places with todo comments

Remove NodeTypeManager from NodeType

See: neos/neos-development-collection#4520

the NodeTypeManager can provide replacements:

- $nodeType->getAutoCreatedChildNodes();
+ $nodeTypeManager->getTetheredNodesConfigurationForNodeType($nodeType);

- $nodeType->hasAutoCreatedChildNode($nodeName);
+ $nodeType->hasTetheredNode($nodeName);

- $parentsNodeType->getTypeOfAutoCreatedChildNode($nodeName);
+ $nodeTypeManager->getTypeOfTetheredNode($parentsNodeType, $nodeName);

- $grandParentsNodeType->allowsGrandchildNodeType($parentNodeName, $nodeType);
+ $nodeTypeManager->isNodeTypeAllowedAsChildToTetheredNode($grandParentsNodeType, NodeName::fromString($parentNodeName), $nodeType);

Migrate `Node::getNodeType`

neos/neos-development-collection#5020

Following code should be migrated:

- $node->getNodeTypeName();
+ $node->nodeTypeName;
- $node->getNodeType()->getName();
+ $node->nodeTypeName->value;
- $nodeType->getName();
+ $nodeType->name->value;
- $node->getNodeType();
+ $nodeTypeManger = ...;
+ $nodeTypeManager->getNodeType($node->nodeTypeName);
- $node->getNodeType()->getTypeOfAutoCreatedChildNode(NodeName::fromString('name'));
+ $nodeTypeManager->getTypeOfTetheredNode($node->nodeTypeName, NodeName::fromString('name'));

This package is not simple to install

... because we use an outdated rector version and also the pin on phpstan will prohibit any other version installed.
This is unfortunate and ideally we should upgrade to rector stable 1.x from our current 0.15.8 from april 23. The upgrade is not straight forward due to many breaking changes, which also happened in patch levels (they dont do semver) #56.
As discussed in the weekly our last resort would be to just bundle a phar and have that installed and at a later point totally refactor this package, removing all previous rules.

cc @kitsunet @dlubitz @ahaeslich

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.