Update fails 4.8.0 -> 4.9.0 -> 4.10.0

I was running recipe-cms: 4.8.0@stable on local and remote happily.

ran update on remote and it wouldn’t upload files anymore. Complained of a syntax error in symfony/process/Process.php.

Local was still fine. Ran update on local. Same problem as remote.

So I thought I’d update to 4.9.0@stable.

Errors with table loginsession does not exist.

Up to 4.10.0@stable then - same loginsession table error.

The deleted all the directories in vendor and run update on 4.10.0 again. Same loginsession table doesn’t exist error.

Both local and remote use the same docker. PHP 8.0.17.

Where to from here?

Did you run dev/build after the composer update? Did you flush the cache?
If you did, was it from the same user and PHP version that your webserver is using?

I did all those things yes.

Looks like it’s a composer/env issue.

My local copy is pulling in symfony/process v6.0.8). Remote is pulling v6.1.0 (same composer file).
symfony/process 6.1 has a PHP 8.1 requirement. I upped PHP to 8.1 but no version (4.8/.9/.10) of SS runs on PHP 8.1. Loads of file_exists() and rtrim deprecations.

To get the remote going I cow boy’d my local 6.0.8 symfony/process into remote and it worked. The remote at this point is:

SS: 4.10.0@stable
PHP: 8.0.17

I also manually created the loginsession table and added the LoginSessionID field to RememberLoginHash table.

Doing all that got it running again.

Only difference I can see between local and remote is composer versions. I’ve since updated both to 2.3.7. I haven’t tried to update SS yet. It’s been a grim bunch of hours and I’m not ready for the emotional damage yet.

I see the problem. The containers are both running 8.0.17. I run composer outside the containers as the code is outside it in volumes.

Local machine/OSX is PHP 8.0.20. Remote Ubuntu 22.04 is PHP 8.1.2

Sounds like composer on the remote machine either had --ignore-platform-refs in the composer update command, or that was being done implicitly by the newer Composer version for some reason.

The containers are both running 8.0.17. I run composer outside the containers as the code is outside it in volumes.
Local machine/OSX is PHP 8.0.20. Remote Ubuntu 22.04 is PHP 8.1.2

Ahh yup or that haha. Glad you found the problem.

@GuySartorelli after sorting out the versions of all the things so it happily updates/installs it still fails to:

Add LoginSessionID to table RememberLoginHash
and
Create LoginSession table

Oh yeah… that part definitely does sound like the class manifest cache isn’t being flushed properly - one thing to try would be deleting the silverstripe-cache directory entirely - if it’s in your tmp directory it’ll just be rebuilt automatically, but if it’s in the project root you’ll need to recreate the empty folder after deleting it.

I couldn’t find it in /tmp so created one in the root and it did get filled.

Deleted it.

Changed something in one of my own models and a Member extension.

Failed.

Took out the Member extension and it did work. Changes made for my own model.

Put it back - didn’t work.

Made the fields in the member table manually, ran dev/build?flush and this time it runs successfully - it changed the field details (varchar 255 to 500 for eg).