[SOLVED] Problem with upgrade to Neos 4.0

Hallo,

I have a problem with upgrading Neos from Version 3.3 to 4.0. I’ll get an error when executing ‘composer update’:

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: don’t install neos/flow 5.0.10
- Conclusion: don’t install neos/flow 5.0.9
- Conclusion: don’t install neos/flow 5.0.8
- Conclusion: don’t install neos/flow 5.0.7
- neos/site-kickstarter 4.0.10 requires neos/content-repository 4.0.10 → satisfiable by neos/content-repository[4.0.10].
- Conclusion: don’t install neos/content-repository 4.0.10
- neos/site-kickstarter 4.0.9 requires neos/content-repository 4.0.9 → satisfiable by neos/content-repository[4.0.9].
- Conclusion: don’t install neos/content-repository 4.0.9
- Conclusion: don’t install neos/flow 5.0.6
- Conclusion: don’t install neos/flow 5.0.5
- Installation request for neos/nodetypes ~4.0.0 → satisfiable by neos/nodetypes[4.0.0, 4.0.10, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6, 4.0.7, 4.0.8, 4.0.9].
- Conclusion: don’t install neos/flow 5.0.4
- neos/site-kickstarter 4.0.8 requires neos/content-repository 4.0.8 → satisfiable by neos/content-repository[4.0.8].
- Conclusion: don’t install neos/content-repository 4.0.8
- Conclusion: don’t install neos/flow 5.0.3
- Conclusion: don’t install neos/flow 5.0.2
- Installation request for flowpack/simplesearch ^2.0 → satisfiable by flowpack/simplesearch[2.0.0].
- Conclusion: don’t install neos/flow 5.0.1
- neos/site-kickstarter 4.0.0 requires neos/flow ~5.0.0 → satisfiable by neos/flow[5.0.0, 5.0.1, 5.0.10, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8, 5.0.9].
- neos/site-kickstarter 4.0.2 requires neos/flow ~5.0.0 → satisfiable by neos/flow[5.0.0, 5.0.1, 5.0.10, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8, 5.0.9].
- neos/site-kickstarter 4.0.3 requires neos/flow ~5.0.0 → satisfiable by neos/flow[5.0.0, 5.0.1, 5.0.10, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8, 5.0.9].
- neos/site-kickstarter 4.0.4 requires neos/flow ~5.0.0 → satisfiable by neos/flow[5.0.0, 5.0.1, 5.0.10, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8, 5.0.9].
- neos/site-kickstarter 4.0.5 requires neos/flow ~5.0.0 → satisfiable by neos/flow[5.0.0, 5.0.1, 5.0.10, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8, 5.0.9].
- neos/site-kickstarter 4.0.6 requires neos/flow ~5.0.0 → satisfiable by neos/flow[5.0.0, 5.0.1, 5.0.10, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8, 5.0.9].
- neos/site-kickstarter 4.0.7 requires neos/flow ~5.0.0 → satisfiable by neos/flow[5.0.0, 5.0.1, 5.0.10, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8, 5.0.9].
- Conclusion: don’t install neos/flow 5.0.0
- Installation request for neos/site-kickstarter ~4.0.0 → satisfiable by neos/site-kickstarter[4.0.0, 4.0.10, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6, 4.0.7, 4.0.8, 4.0.9].

I’m using the exact same steps as in the docu. Before this step I’ve updated Neos from 3.2 to 3.3 without problems. This is my update script.

# Flush the caches
./flow flow:cache:flush --force;

# Update the core package dependencies
composer require --no-update "neos/neos:~4.0.0";
composer require --no-update "neos/nodetypes:~4.0.0";

# Update optional package dependencies (if installed)
#composer require --no-update "neos/demo:~4.0.0";
composer require --no-update "neos/site-kickstarter:~4.0.0";

# Update development packages (if installed)
composer require --no-update --dev "neos/buildessentials:5.0.x-dev";

# Update new UI packages
composer require --no-update "neos/neos-ui:~1.3.0";
composer require --no-update "neos/neos-ui-compiled:~1.3.0";

# Update the packages
composer update;

# Set database charset and update to the new default given character set and collation (defaults to utf8mb4 and utf8mb4_unicode_ci).
./flow database:setcharset;

# Run database migrations
./flow doctrine:migrate;

# Publish resources
./flow resource:publish;

# Flush and warm up cache
./flow flow:cache:flush --force;
./flow cache:warmup;

And this is my composer.json after the update.

{
    "name": "neos/neos-base-distribution",
    "description": "Neos Base Distribution",
    "license": "GPL-3.0+",
    "support": {
        "email": "hello@neos.io",
        "slack": "http://slack.neos.io/",
        "forum": "https://discuss.neos.io/",
        "wiki": "https://discuss.neos.io/c/the-neos-project/project-documentation",
        "issues": "https://github.com/neos/neos-development-collection/issues",
        "docs": "http://neos.readthedocs.org/",
        "source": "https://github.com/neos/neos-base-distribution"
    },
    "config": {
        "vendor-dir": "Packages/Libraries",
        "bin-dir": "bin"
    },
    "require": {
        "neos/neos": "~4.0.0",
        "neos/nodetypes": "~4.0.0",
        "neos/site-kickstarter": "~4.0.0",
        "neos/seo": "~2.0",
        "neos/setup": "~4.0",
        "flowpack/neos-frontendlogin": "~3.0",
        "neos/redirecthandler-neosadapter": "~2.0",
        "neos/redirecthandler-databasestorage": "~2.0",
        "moc/notfound": "^3.0",
        "neos/form-builder": "^1.0",
        "neos/swiftmailer": "^6.0",
        "flownative/neos-compressor": "^2.0",
        "flowpack/simplesearch": "^2.0",
        "flowpack/simplesearch-contentrepositoryadaptor": "^2.0",
        "neos/neos-ui": "~1.3.0",
        "neos/neos-ui-compiled": "~1.3.0"
    },
    "require-dev": {
        "neos/buildessentials": "5.0.x-dev",
        "mikey179/vfsstream": "~1.6",
        "phpunit/phpunit": "~7",
        "symfony/css-selector": "~2.0",
        "neos/behat": "dev-master"
    },
    "suggest": {
        "ext-pdo_sqlite": "For running functional tests out-of-the-box this is required"
    },
    "scripts": {
        "post-update-cmd": "Neos\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
        "post-install-cmd": "Neos\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
        "post-package-update": "Neos\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
        "post-package-install": "Neos\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall"
    }
}

Looks like you need to update flowpack/simplesearch to ^3.0, since 2.x requires Flow 4.x (see https://packagist.org/packages/flowpack/simplesearch#2.0.0).

Also, remove the direct dependency on neos/neos-ui-compiled, it is not needed. And update the neos/neos-ui dependency to ^1.4 –with ~1.3.0 you will never get the newer releases.

Generally, I’d rather use ^x.0 to require things, only if you definitely want to skip minor releases, go for three digits…

Hi Karsten,

now composer update works :+1:t3:

Also, remove the direct dependency on neos/neos-ui-compiled , it is not needed. And update the neos/neos-ui dependency to ^1.4 –with ~1.3.0 you will never get the newer releases.

Thats what composer added to the composer.json when I executed the command of the upgrade documentation:

# Update the core package dependencies
composer require --no-update "neos/neos-ui:~1.3.0"
composer require --no-update "neos/neos-ui-compiled:~1.3.0"

Unfortunately I get a new error, but when calling the backend or frontend and not on the command line. No class schema found for “Neos\ContentRepository\Domain\Model\NodeType”. This is the full message.

Exception #1295973082 in line 182 of /Users/Shared/development/projects_git/cms/laudert-relaunch-2017/neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Flow_Persistence_Doctrine_Mapping_Driver_FlowAnnotationDriver.php: No class schema found for “Neos\ContentRepository\Domain\Model\NodeType”.

40 Neos\Flow\Persistence\Doctrine\Mapping\Driver\FlowAnnotationDriver_Original::getClassSchema(“Neos\ContentRepository\Domain\Model\NodeType”)
39 Neos\Flow\Persistence\Doctrine\Mapping\Driver\FlowAnnotationDriver_Original::loadMetadataForClass(“Neos\ContentRepository\Domain\Model\NodeType”, Neos\Flow\Persistence\Doctrine\Mapping\ClassMetadata)
38 Doctrine\ORM\Mapping\ClassMetadataFactory::doLoadMetadata(Neos\Flow\Persistence\Doctrine\Mapping\ClassMetadata, NULL, false, array|0|)
37 Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory::loadMetadata(“Neos\ContentRepository\Domain\Model\NodeType”)
36 Doctrine\ORM\Mapping\ClassMetadataFactory::loadMetadata(“Neos\ContentRepository\Domain\Model\NodeType”)
35 Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory::getMetadataFor(“Neos\ContentRepository\Domain\Model\NodeType”)
34 Doctrine\ORM\EntityManager::getClassMetadata(“Neos\ContentRepository\Domain\Model\NodeType”)
33 Doctrine\ORM\UnitOfWork::getSingleIdentifierValue(Neos\ContentRepository\Domain\Model\NodeType)
32 Doctrine\ORM\AbstractQuery::processParameterValue(Neos\ContentRepository\Domain\Model\NodeType)
31 Doctrine\ORM\AbstractQuery::processParameterValue(array|5|)
30 Doctrine\ORM\Query::processParameterMappings(array|4|)
29 Doctrine\ORM\Query::_doExecute()
28 Doctrine\ORM\AbstractQuery::executeIgnoreQueryCache(NULL, 1)
27 Doctrine\ORM\AbstractQuery::execute(NULL, 1)
26 Doctrine\ORM\AbstractQuery::getResult()
25 Neos\ContentRepository\Domain\Repository\NodeDataRepository_Original::getNodeDataForParentAndNodeType(“/”, “Neos.Seo:TwitterCardMixin”, Neos\ContentRepository\Domain\Model\Workspace, array|0|, false, true)
24 Neos\ContentRepository\Domain\Repository\NodeDataRepository_Original::findByParentAndNodeType(“/”, “Neos.Seo:TwitterCardMixin”, Neos\ContentRepository\Domain\Model\Workspace, NULL, false, true)
23 Neos\ContentRepository\Domain\Repository\NodeDataRepository_Original::findByParentAndNodeTypeRecursively(“/”, “Neos.Seo:TwitterCardMixin”, Neos\ContentRepository\Domain\Model\Workspace)
22 Neos\ContentRepository\Command\NodeCommandControllerPlugin_Original::removeBrokenEntityReferences(“live”, false, NULL)
21 Neos\ContentRepository\Command\NodeCommandControllerPlugin_Original::invokeSubCommand(“repair”, Neos\Flow\Cli\ConsoleOutput, NULL, “live”, false, true, NULL, NULL)
20 Neos\ContentRepository\Command\NodeCommandController_Original::repairCommand(NULL, “live”, false, true, NULL, NULL)
19 call_user_func_array(array|2|, array|6|)
18 Neos\Flow\Cli\CommandController_Original::callCommandMethod()
17 Neos\Flow\Cli\CommandController_Original::processRequest(Neos\Flow\Cli\Request, Neos\Flow\Cli\Response)
16 Neos\Flow\Mvc\Dispatcher_Original::initiateDispatchLoop(Neos\Flow\Cli\Request, Neos\Flow\Cli\Response)
15 Neos\Flow\Mvc\Dispatcher_Original::dispatch(Neos\Flow\Cli\Request, Neos\Flow\Cli\Response)
14 Neos\Flow\Cli\CommandRequestHandler::Neos\Flow\Cli{closure}()
13 Closure::__invoke()
12 Neos\Flow\Security\Context_Original::withoutAuthorizationChecks(Closure)
11 Neos\Flow\Security\Context::withoutAuthorizationChecks(Closure)
10 call_user_func_array(array|2|, array|1|)
9 Neos\Flow\Security\Context::Flow_Aop_Proxy_invokeJoinPoint(Neos\Flow\Aop\JoinPoint)
8 Neos\Flow\Aop\Advice\AdviceChain::proceed(Neos\Flow\Aop\JoinPoint)
7 Neos\Flow\Session\Aspect\LazyLoadingAspect_Original::callMethodOnOriginalSessionObject(Neos\Flow\Aop\JoinPoint)
6 Neos\Flow\Aop\Advice\AroundAdvice::invoke(Neos\Flow\Aop\JoinPoint)
5 Neos\Flow\Aop\Advice\AdviceChain::proceed(Neos\Flow\Aop\JoinPoint)
4 Neos\Flow\Security\Context::withoutAuthorizationChecks(Closure)
3 Neos\Flow\Cli\CommandRequestHandler::handleRequest()
2 Neos\Flow\Core\Bootstrap::run()
1 require(“/Users/Shared/development/projects_git/cms/laudert…neos/Packages/Framework/Neos.Flow/Scripts/flow.php”)

Got it. It’s the issue with the Doctrine ORM 2.6.3 version. I’ve added “doctrine/orm”: “2.6.2” to the require section of the composer.json and executed a composer update.

By now we fixed Flow to work with newer Doctrine ORM versions, so feel free to remove that constraint and upgrade again.

2 Likes