Upgrading from NEOS 5.3 to 7?

I tried to upgrade my 5.3. installation and followed the provided upgrade instructions:

But no matter what I trie, when I do the final “composer update” (“Finish the update”) I get the following messages:

Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - neos/nodetypes 5.3.1 requires neos/neos 5.3.1 -> satisfiable by neos/neos[5.3.1] but these conflict with your requirements or minimum-stability.
    - neos/nodetypes 5.3.1 requires neos/neos 5.3.1 -> satisfiable by neos/neos[5.3.1] but these conflict with your requirements or minimum-stability.
    - Installation request for neos/nodetypes ~5.3.1 -> satisfiable by neos/nodetypes[5.3.1].

Before doing any upgrade work the composer.json looks the following:

{
"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": "~5.3.0",
    "neos/site-kickstarter": "~5.3.0",
    "neos/neos-ui": "~5.3.0",
    "neos/seo": "~3.0",
    "neos/redirecthandler-neosadapter": "~4.0",
    "neos/redirecthandler-databasestorage": "~4.0",
    "neos/redirecthandler-ui": "~2.0",

    "neos/setup": "@dev",
    "neos/neos-setup": "@dev",
    "neos/swiftmailer": "^7.1",
    "myown/site": "@dev",
    "neos/nodetypes": "~5.3.0"
},
"require-dev": {
    "neos/buildessentials": "@dev",
    "mikey179/vfsstream": "^1.6",
    "phpunit/phpunit": "^8.1",
    "symfony/css-selector": "~2.0",
    "neos/behat": "@dev"
},
"repositories": {
    "distributionPackages": {
        "type": "path",
        "url": "./DistributionPackages/*"
    }
},
"replace": {
    "neos/neos-base-distribution": "5.2.1"
},
"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"
}

}

Does anyone know what the problem is or has a helpful hint how to find it out?

Did you also set to Nodetypes version to 7 when you changed the Neos version?

Hello Sebastian, thank you for your guess. No, I didn’t set the version to 7.

I tried to do it with this change with the effect that several other problems occured, e.g. kickstarter. Then I also set the new problems to a higher version and got even more problems concerning not only NEOS packages but also php version (which is 7.4). I can’t get it to work.

The system is basically a simple NEOS installation togehter with the demo package and later on swiftmailer. On that base a website was created. I’m a bit wondering that this can cause so much trouble. Is this normal? How can a person like me with not much knowledge about NEOS and composer solve all these particular problems? Maybe there is a guide because for me it’s ablack box.

Try it with this cleaned up composer.json:

    "name": "neos/neos-base-distribution",
    "description": "Neos Base Distribution",
    "config": {
        "vendor-dir": "Packages/Libraries",
        "bin-dir": "bin"
    },
    "require": {
        "neos/neos": "~7.0.0",
        "neos/site-kickstarter": "~7.0.0",
        "neos/neos-ui": "~7.0.0",
        "neos/nodetypes": "~7.0.0",
        "neos/seo": "~3.0",
        "neos/redirecthandler-neosadapter": "~4.0",
        "neos/redirecthandler-databasestorage": "~5.0",
        "neos/redirecthandler-ui": "~2.0",
    
        "neos/setup": "@dev",
        "neos/neos-setup": "@dev",
        "neos/swiftmailer": "^7.1",

        "myown/site": "@dev"
    },
    "repositories": {
        "distributionPackages": {
            "type": "path",
            "url": "./DistributionPackages/*"
        }
    },
    "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"
    }
}

The neos related package versions are adjusted to work with Neos 7.
I removed the development packages that you probably don’t use.

If you run into a problem like this again you have to check the composer output. It’s sometimes a bit hard to read but says which package wants an older Neos version and then you have to look which version of that package is compatible with Neos 7. In this case it was probably a problem mit the redirecthandler-databasestorage.

Hope that helps.

1 Like

Hi Sebastain, that worked without any problems. Thank you for the instant help!!!

I hope I can learn something from that to be able to solve some future problems by myself. You write “…and then you have to look which version of that package is compatible with Neos 7.”. Where do I check this?

Great!
Interpreting composer output is sometimes challenging, but version 2 improved it a bit.

I usually check packages on https://packagist.org or https://www.neos.io/download-and-extend/packages.html

They both use the same data. Both allow you to flip through the releases and see the compatibility list.

Only the minimal core packages are mentioned in the upgrade instructions. 3rd party and other Neos packages usually not. Maybe something we can improve upon. But some effort to manage for all versions and keep up-to-date.

Ah, I used composer 1. I make it again using comopser 2 to see the messages and then try to crosscheck the versions with packagist. Thanks again.