1

I have a Craft 3 docker container. Craft is on version 3.7.44.

I log into the container with: docker exec -it [container id] /bin/sh

In the container I run: php craft update

Output:

Fetching available updates ... done You’ve got 9 available updates:

- craft 3.7.44 => 3.7.61
- blitz 3.12.4 => 3.12.7
- formie 1.6.10 => 1.6.20
- image-optimize 1.6.44 => 1.6.49
- redactor 2.10.8 => 2.10.10
- retour 3.1.73 => 3.2.7
- seomatic 3.4.32 => 3.4.45
- super-table 2.7.2 => 2.7.3
- vite 1.0.25 => 1.0.28

Run craft update all or craft update to perform an update.

I then run: php craft update craft

Output:

Fetching available updates ... done Performing one update:

- craft 3.7.44 => 3.7.61

Create database backup? (yes|no) [yes]:no Skipping database backup. Performing update with Composer ... PHP Warning: file_get_contents(/app/vendor/composer/composer/src/Composer/Repository/../InstalledVersions.php): Failed to open stream: No such file or directory in /app/vendor/composer/composer/src/Composer/Repository/FilesystemRepository.php on line 163 PHP Warning: file_get_contents(/app/vendor/composer/composer/src/Composer/Repository/../InstalledVersions.php): Failed to open stream: No such file or directory in /app/vendor/composer/composer/src/Composer/Repository/FilesystemRepository.php on line 163 PHP Warning: file_get_contents(/app/vendor/composer/composer/src/Composer/Repository/../InstalledVersions.php): Failed to open stream: No such file or directory in /app/vendor/composer/composer/src/Composer/Repository/FilesystemRepository.php on line 163 PHP Warning: file_get_contents(/app/vendor/composer/composer/src/Composer/Repository/../InstalledVersions.php): Failed to open stream: No such file or directory in /app/vendor/composer/composer/src/Composer/Repository/FilesystemRepository.php on line 163 PHP Warning: file_get_contents(/app/vendor/composer/composer/src/Composer/Repository/../InstalledVersions.php): Failed to open stream: No such file or directory in /app/vendor/composer/composer/src/Composer/Repository/FilesystemRepository.php on line 163 PHP Warning: file_get_contents(/app/vendor/composer/composer/src/Composer/Repository/../InstalledVersions.php): Failed to open stream: No such file or directory in /app/vendor/composer/composer/src/Composer/Repository/FilesystemRepository.php on line 163 PHP Warning: file_get_contents(/app/vendor/composer/composer/src/Composer/Repository/../InstalledVersions.php): Failed to open stream: No such file or directory in /app/vendor/composer/composer/src/Composer/Repository/FilesystemRepository.php on line 163 done Applying new migrations ... done Update complete!

If I run: php craft update again I see that there are no more Craft updates available.

However in the website backend I still see that there are Craft updates available and the backend in the footer still says version 3.7.44.

Running git status shows that 2 files have been changed:

composer.lock composer.json

composer.json:

 "name": "craft-cms",
    "description": "Project for Craft CMS",
    "license": "MIT",
    "require": {
        **"craftcms/cms": "3.7.61"**,
        "craftcms/redactor": "2.10.8",
        "mmikkel/cp-field-inspect": "1.4.4",
        "nystudio107/craft-emptycoalesce": "1.0.6",
        "nystudio107/craft-imageoptimize": "1.6.44",
        "nystudio107/craft-retour": "3.1.73",
        "nystudio107/craft-seomatic": "3.4.32",
        "nystudio107/craft-vite": "1.0.25",
        "putyourlightson/craft-blitz": "3.12.4",
        "putyourlightson/craft-sprig": "1.13.0",
        "sebastianlenz/linkfield": "1.0.25",
        "verbb/formie": "1.6.10",
        "verbb/super-table": "2.7.2",
        "yiisoft/yii2-redis": "^2.0",
        "zircote/swagger-php": "^4.2"
    },

Update 1:

If I run the Craft updates through the CMS backend, i.e. if I log into the website and navigate to Utilities > Updates and I click on "Update" then it works as expected. Craft is updated to version 3.7.61 and both the composer.json and composer.lock files are updated.

1 Answer 1

1

Upon further testing it seems that the updates work fine. Despite these strange errors. Not sure if others have experienced this too. It is a little worrying to see errors during an update process. But doesn't seem to have an impact. Perhaps some issues to do with composer?

2
  • 1
    I don't know why that error occurs, but a viable workaround could be to not use Craft's built-in update command at all (it uses a bundled version of Composer, which seems related to the errors you get) – instead, update using Composer directly: First do a composer update inside the container to update any and all Composer dependencies, then run php craft migrate/all (also inside the container) to run any pending migrations. Commented Dec 17, 2022 at 16:27
  • Thanks for the suggestion, will test that.
    – BrokenCode
    Commented Dec 18, 2022 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.