Upgrading from 2.1.35 to 3

In my system (/admin/system/updates), I have the following:

Current Build

2.1.35 (Up to Date)

Latest Build

2.1.35

Isn’t 2.2 the latest build? (for OCMS 2.0)
(see link to composer.json at bottom of this post)

After running in CLI:
php artisan october:update

I still have version 2.1.35:

[OK] System Updated to v2.1.35

If I want to update to v3, do I need to first update to 2.2.0?

Also, in the upgrade 2 > 3 docs, it says to use this in composer.json:

Update the following dependencies in your application’s composer.json file:

  • october/all to ^3.0
  • october/rain to ^3.0
  • laravel/framework to ^9.0

My composer.json is below. I don’t have a “october/all” in mine (only a “october/cms”). Do I replace october/cms with october/all ? Or use both?

Should the php version requirement be update to 8.0.3? (v3’s min requirement is this I believe).

{
    "name": "october/october",
    "description": "Built using October CMS: The Platform That Gets Back to Basics",
    "type": "project",
    "homepage": "https://octobercms.com",
    "license": "proprietary",
    "require": {
        "php": ">=7.2.9",
        "october/rain": "^2.0",
        "laravel/framework": "^6.0",
        "october/system": "^2.0",
        "october/backend": "^2.0",
        "october/cms": "^2.0",
        "october/media": "^2.0",
        "october/editor": "^2.0",
        "rainlab/pages-plugin": "^1.4",
        "rainlab/user-plugin": "^1.5",
        "lovata/toolbox-plugin": "^1.34",
        "alxy/captcha-plugin": "^1.0",
        "october/drivers-plugin": "^1.1",
        "lilessam/frontendmailsender-plugin": "^1.0",
        "rainlab/blog-plugin": "^1.7"
    },
    "require-dev": {
        "phpunit/phpunit": "^8.0|^9.0",
        "meyfa/phpunit-assert-gd": "^2.0.0|^3.0.0"
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
            "php artisan cache:clear"
        ],
        "post-create-project-cmd": [
            "php artisan key:generate --ansi"
        ],
        "post-autoload-dump": [
            "System\\Console\\ComposerScript::postAutoloadDump",
            "php artisan cache:clear"
        ],
        "post-update-cmd": [
            "System\\Console\\ComposerScript::postUpdateCmd",
            "php artisan cache:clear"
        ],
        "pre-package-uninstall": [
            "System\\Console\\ComposerScript::prePackageUninstall"
        ],
        "test": [
            "phpunit --stop-on-failure"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "allow-plugins": true
    },
    "autoload": {
        "psr-4": {
            "System\\Console\\": "modules/system/console",
            "Trader47\\Support\\": "plugins/trader47/user/support"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "repositories": {
        "octobercms": {
            "type": "composer",
            "url": "https://gateway.octobercms.com"
        }
    }
}

Also, the v2.2.0 version doesn’t have a “october/all” at all?

Any help much appreciated!

Replace all of these with october/all (they are what are contained in the “all” package). I don’t remember if v2 used the “all” package at that version, so it is safe to leave each individual module like that as well (it just means you need to update each one individually, if needed)

Yes I think we made it much further than v2.1, run composer update and make sure there are no errors – this could potentially block a complete update. The composer.json file looks fine.

Thanks a lot Sam.

Ok I updated it to 2.2.35 (no change to composer.json, just ran composer update first before running php artisan october:update again).

Then I updated the composer.json to be as follows:
(following your steps of replacing those 5 packages with “october/all”: “^3.0”, as well as the other requirements as per here: Release Note 30: October CMS 3.0 - Upgrade Guide - October CMS)

{
    "name": "october/october",
    "description": "Built using October CMS: The Platform That Gets Back to Basics",
    "type": "project",
    "homepage": "https://octobercms.com",
    "license": "proprietary",
    "require": {
        "php": ">=7.2.9",
        "october/rain": "^3.0",
        "laravel/framework": "^9.0",
        "october/all": "^3.0",
        "rainlab/pages-plugin": "^1.4",
        "rainlab/user-plugin": "^1.5",
        "lovata/toolbox-plugin": "^1.34",
        "alxy/captcha-plugin": "^1.0",
        "october/drivers-plugin": "^1.1",
        "lilessam/frontendmailsender-plugin": "^1.0",
        "rainlab/blog-plugin": "^1.7"
    },
    "require-dev": {
        "phpunit/phpunit": "^8.0|^9.0",
        "meyfa/phpunit-assert-gd": "^2.0.0|^3.0.0"
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
            "php artisan cache:clear"
        ],
        "post-create-project-cmd": [
            "php artisan key:generate --ansi"
        ],
        "post-autoload-dump": [
            "System\\Console\\ComposerScript::postAutoloadDump",
            "php artisan cache:clear"
        ],
        "post-update-cmd": [
            "System\\Console\\ComposerScript::postUpdateCmd",
            "php artisan cache:clear"
        ],
        "pre-package-uninstall": [
            "System\\Console\\ComposerScript::prePackageUninstall"
        ],
        "test": [
            "phpunit --stop-on-failure"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "allow-plugins": true
    },
    "autoload": {
        "psr-4": {
            "System\\Console\\": "modules/system/console",
            "Trader47\\Support\\": "plugins/trader47/user/support"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "repositories": {
        "octobercms": {
            "type": "composer",
            "url": "https://gateway.octobercms.com"
        }
    }
}

Now when running “composer update -W” (without -W also returns similar errors):

root@d70e8ac218b3:/var/www# composer update -W
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: don’t install october/drivers-plugin v1.1.2 (conflict analysis result)
- Conclusion: don’t install league/flysystem 3.29.1 (conflict analysis result)
- Conclusion: don’t install october/drivers-plugin v1.1.3 (conflict analysis result)
- Conclusion: don’t install league/flysystem 1.1.10 (conflict analysis result)
- Conclusion: don’t install one of laravel/framework[v9.52.16], october/drivers-plugin[v1.1.1] | install one of guzzlehttp/guzzle[6.5.3, 6.5.4, 6.5.7, 6.5.8] (conflict analysis result)
- Conclusion: don’t install one of league/flysystem[3.14.0], league/flysystem-aws-s3-v3[1.0.0] | install one of league/flysystem[1.0.46, 1.0.70] (conflict analysis result)
- october/drivers-plugin v1.1.1 requires league/flysystem-aws-s3-v3 ~1.0 → satisfiable by league/flysystem-aws-s3-v3[1.0.0, …, 1.0.x-dev].
- Conclusion: don’t install league/flysystem-aws-s3-v3 1.0.13 (conflict analysis result)
- Conclusion: don’t install laravel/framework v9.52.15 (conflict analysis result)
- Conclusion: don’t install league/flysystem 1.0.46 (conflict analysis result)
- Conclusion: don’t install league/flysystem-aws-s3-v3[1.0.25] | install one of laravel/framework[v9.52.16], league/flysystem[1.0.70] (conflict analysis result)
- Conclusion: don’t install league/flysystem[1.0.70] | install laravel/framework[v9.52.16] (conflict analysis result)
- Conclusion: don’t install laravel/framework v9.52.16 (conflict analysis result)
- Conclusion: don’t install league/flysystem-aws-s3-v3 1.0.30 (conflict analysis result)
- Conclusion: don’t install one of league/flysystem-aws-s3-v3[1.0.13], league/flysystem-rackspace[1.0.5], laravel/framework[v9.12.0] | install one of league/flysystem[1.0.70, 3.2.1, 3.14.0, 3.15.1, 3.29.1] (conflict analysis result)
- laravel/framework[v9.0.0-beta.2, …, v9.17.0] require league/flysystem ^3.0 → satisfiable by league/flysystem[3.0.0, …, 3.x-dev].
- Conclusion: don’t install one of league/flysystem[3.2.1], league/flysystem-rackspace[1.0.4] | install one of league/flysystem[1.0.29, 1.0.46, 1.0.70] (conflict analysis result)
- october/drivers-plugin v1.1.1 requires league/flysystem-rackspace ~1.0 → satisfiable by league/flysystem-rackspace[1.0.0, …, 1.0.x-dev].
- Conclusion: don’t install league/flysystem-rackspace[1.0.5] | install one of laravel/framework[v9.36.4, …, 9.x-dev], league/flysystem[1.0.29, 1.0.46, 1.0.70, 3.0.5, 3.0.9, 3.14.0, 3.15.1] (conflict analysis result)
- Conclusion: don’t install one of league/flysystem[3.0.5], league/flysystem-aws-s3-v3[1.0.0] | install one of league/flysystem[1.0.29, 1.0.46, 1.0.70] (conflict analysis result)
- Conclusion: don’t install one of league/flysystem[3.0.9], league/flysystem-aws-s3-v3[1.0.0] | install one of league/flysystem[1.0.29, 1.0.46, 1.0.70] (conflict analysis result)
- Conclusion: don’t install league/flysystem[1.0.29] | install one of laravel/framework[v9.36.4, …, 9.x-dev], league/flysystem[3.14.0, 3.15.1] (conflict analysis result)
- laravel/framework[v9.36.4, …, 9.x-dev] require league/flysystem ^3.8.0 → satisfiable by league/flysystem[3.8.0, …, 3.x-dev].
- Conclusion: don’t install league/flysystem 3.15.1 (conflict analysis result)
- Root composer.json requires october/drivers-plugin ^1.1 → satisfiable by october/drivers-plugin[v1.1.1, v1.1.2, v1.1.3, 1.x-dev].
- laravel/framework[v9.18.0, …, v9.36.3] require league/flysystem ^3.0.16 → satisfiable by league/flysystem[3.0.16, …, 3.x-dev].
- Conclusion: don’t install one of laravel/framework[v9.14.1], october/drivers-plugin[v1.1.1] | install one of league/flysystem-aws-s3-v3[1.0.25, 1.0.30], league/flysystem[1.0.46, 1.0.70, 3.2.1, 3.14.0, 3.15.1] (conflict analysis result)
- league/flysystem-rackspace[1.0.0, …, 1.0.4] require league/flysystem ~1.0 → satisfiable by league/flysystem[1.0.0-alpha1, …, 1.x-dev].
- You can only install one version of a package, so only one of these can be installed: league/flysystem[1.0.0-alpha1, …, 1.x-dev, 2.3.1, …, 2.x-dev, 3.0.0, …, 3.x-dev].
- laravel/framework v9.0.0-beta.1 requires league/flysystem ^2.3.1 → satisfiable by league/flysystem[2.3.1, …, 2.x-dev].
- Root composer.json requires laravel/framework ^9.0 → satisfiable by laravel/framework[v9.0.0-beta.1, …, 9.x-dev].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
root@d70e8ac218b3:/var/www#

Basically a whole bunch of dependency errors (googling it looks like plugins themselves’ versions too old for the v3? Conflicts with your root composer.json Question )

What is best way to go about getting the correct version of plugins into the composer.json?

Hi @trader47

Remove that october/drivers-plugin drivers plugin, it looks like it is the issue.

Thanks Sam.
That seemed to have done the upgrade.

However, I can’t seem to access my site at localhost:8000, I get
“php artisan october:install” which I do (successfully), and refreshing the homepage just gives me same message again.

localhost:8000/admin (and any other pages from my site) gives a 404.

Will do some digging, compare a october fresh install’s files with mine …

Thanks Sam, managed to get it working with some fiddling. The docker volume mount wasn’t mounting everything (just selected folders, eg not the modules folder which underwent major updates with composer update command), seems to all be working now :love_you_gesture:

1 Like

Hmmmm bizarrely this thread has been marked as spam :rofl:

Haha! Here is the rule you broke:

This new user tried to create multiple posts with links to the same domain.

Why would that even be a rule :joy:

My other post also wouldn’t let me post a link to the rainlab plugin page - super weird!

I think it is because you are a new account (level 1); I will level you up manually so it doesn’t happen.

1 Like

Thank you Sam, appreciate it! :slight_smile:

1 Like