0

When trying to update CraftCMS I'm getting the following errors:

Error: An error occurred

Output: Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for craftcms/cms 3.0.21 -> satisfiable by craftcms/cms[3.0.21].
- craftcms/cms 3.0.21 requires enshrined/svg-sanitize ~0.9.0 -> satisfiable by enshrined/svg-sanitize[0.9.0] but these conflict with your requirements or minimum-stability.
Problem 2
- craftcms/ckeditor 1.0.0-beta.2 requires craftcms/cms ^3.0.0-RC1 -> satisfiable by craftcms/cms[3.0.21].
- craftcms/ckeditor 1.0.0-beta.2 requires craftcms/cms ^3.0.0-RC1 -> satisfiable by craftcms/cms[3.0.21].
- craftcms/cms 3.0.21 requires enshrined/svg-sanitize ~0.9.0 -> satisfiable by enshrined/svg-sanitize[0.9.0] but these conflict with your requirements or minimum-stability.
- Installation request for craftcms/ckeditor 1.0.0-beta.2 -> satisfiable by craftcms/ckeditor[1.0.0-beta.2].

Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.

The problem is, the following is all OK:

  • composer update comes back with "Nothing to Install"
  • @RobinSchambach So remove every package except the plugins I have installed at this moment? – JMKelley Aug 22 '18 at 12:57
  • 1
    Yes. You only need vlucas, craftcms + the plugins – Robin Schambach Aug 22 '18 at 13:13
  • But this above isn't the problem though? It seems to be throwing errors for CKeditor and CraftCMS? – JMKelley Aug 22 '18 at 13:54
  • If it's the same problem I had, from the issue linked to above, I removed the reference in the composer.json file – Andrew Aug 22 '18 at 15:43
  • @Andrew Can you write an answer to the question on what your composer looked like after you removed the required includes? – JMKelley Aug 23 '18 at 8:52
1

The original composer file that caused the error above looked like this:

{  "name": "craftcms/craft",
"description": "Craft CMS",
"keywords": [
"craft",
"cms",
"craftcms",
"project"
],
"license": "MIT",
"homepage": "https://craftcms.com/",
"type": "project",
"support": {
"email": "support@craftcms.com",
"issues": "https://github.com/craftcms/cms/issues",
"forum": "https://craftcms.stackexchange.com/",
"source": "https://github.com/craftcms/cms",
"docs": "https://craftcms.com/docs",
"rss": "https://craftcms.com/changelog.rss"
},
"require": {
"craftcms/cms": "3.0.13.1",
"vlucas/phpdotenv": "v2.4.0",
"craftcms/ckeditor": "1.0.0-beta.2",
"craftcms/redactor": "2.1.5",
"cebe/markdown": "1.1.2",
"composer/ca-bundle": "1.1.1",
"composer/composer": "1.6.3",
"composer/semver": "1.4.2",
"composer/spdx-licenses": "1.3.0",
"craftcms/oauth2-craftid": "1.0.0.1",
"craftcms/plugin-installer": "1.5.2",
"craftcms/server-check": "1.1.1",
"creocoder/yii2-nested-sets": "0.9.0",
"danielstjules/stringy": "3.1.0",
"doctrine/lexer": "v1.0.1",
"egulias/email-validator": "2.1.4",
"elvanto/litemoji": "1.3.1",
"enshrined/svg-sanitize": "0.8.2",
"ezyang/htmlpurifier": "v4.10.0",
"guzzlehttp/guzzle": "6.3.3",
"guzzlehttp/promises": "v1.3.1",
"guzzlehttp/psr7": "1.4.2",
"justinrainbow/json-schema": "5.2.7",
"league/flysystem": "1.0.44",
"league/oauth2-client": "2.2.1",
"mikehaertl/php-shellcommand": "1.2.5",
"paragonie/random_compat": "v2.0.12",
"pixelandtonic/imagine": "v0.7.1.3",
"psr/http-message": "1.0.1",
"psr/log": "1.0.2",
"seld/cli-prompt": "1.0.3",
"seld/jsonlint": "1.7.1",
"seld/phar-utils": "1.0.1",
"swiftmailer/swiftmailer": "v6.0.2",
"symfony/console": "v3.3.6",
"symfony/debug": "v3.3.6",
"symfony/filesystem": "v3.3.6",
"symfony/finder": "v3.3.6",
"symfony/polyfill-mbstring": "v1.8.0",
"symfony/process": "v3.3.6",
"twig/twig": "v2.4.8",
"yiisoft/yii2": "2.0.15.1",
"yiisoft/yii2-bootstrap": "2.0.8",
"yiisoft/yii2-composer": "2.0.6",
"yiisoft/yii2-debug": "2.0.13",
"yiisoft/yii2-queue": "2.0.2",
"yiisoft/yii2-swiftmailer": "2.1.1",
"zendframework/zend-escaper": "2.6.0",
"zendframework/zend-feed": "2.8.0",
"zendframework/zend-stdlib": "3.2.0",
"solspace/craft3-freeform": "2.2.1"
},
"autoload": {
"psr-4": {
  "modules\\": "modules/"
}
},
"config": {
"optimize-autoloader": true,
"platform": {
"php": "7.0"
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@composer dump-autoload -o",
"@php craft setup/welcome"
]
}
}

So I removed "enshrined/svg-sanitize": "0.8.2", from the list in the compser file, and ran the update. The next error was given for Twig. So I deleted ""twig/twig": "v2.4.8" from the file, and ran the update again. This time it was successful, and the composer file now looks like this:

{
"name": "craftcms/craft",
"description": "Craft CMS",
"keywords": [
"craft",
"cms",
"craftcms",
"project"
],
"license": "MIT",
"homepage": "https://craftcms.com/",
"type": "project",
"support": {
"email": "support@craftcms.com",
"issues": "https://github.com/craftcms/cms/issues",
"forum": "https://craftcms.stackexchange.com/",
"source": "https://github.com/craftcms/cms",
"docs": "https://craftcms.com/docs",
"rss": "https://craftcms.com/changelog.rss"
},
"require": {
"craftcms/cms": "3.0.20",
"vlucas/phpdotenv": "^2.4.0",
"craftcms/redactor": "2.1.5"
},
"autoload": {
"psr-4": {
"modules\\": "modules/"
}
},
"config": {
"optimize-autoloader": true,
"platform": {
"php": "7.0"
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@composer dump-autoload -o",
"@php craft setup/welcome"
]
}
}

So the update seems to remove a lot of the required references in the composer file. I tried doing this on a backup install first before doing the same on the live install.

  • Which is the same result as Robin Schambach says above. Only Craft, vlucas/phpdotenv and the plugin, ie redactor, is needed in the composer file. – Andrew Aug 23 '18 at 14:06
  • Andrew, does this delete all your plugins as well? Or do you add them back in and do composer update again? – JMKelley Aug 23 '18 at 14:35
  • No it doesn't delete the plugins. I imagine that the 'required' list in the json file is a list of required assets that supports the update. For some reason items get added to the list that aren't actually required. If in doubt I would try a backup version first. Hope that helps. – Andrew Aug 23 '18 at 15:10
  • Doing the following removed all of my installed plugins also. – JMKelley Aug 25 '18 at 11:30

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