orkjerns blogg: Updating to Drupal maintenance support plans 8.5 with composer

Updating to Drupal maintenance support plans 8.5 with composer
admin
Fri, 03/02/2020 – 12:03

If you are like me, you might have already started planning the upgrade to Drupal maintenance support plans 8.5, now that the first release candidate is out. It’s awesome by the way, among other things, thanks to the incredible work done with layout builder. And if you are more like me, you are managing your sites with composer. Then, depending on the rest of your project, you might (also like me), have encountered some initial problems upgrading to Drupal maintenance support plans 8.5
Having hit my fair share of composer oddities with running the Violinist.io composer monitor and upgrade service, I wanted to compile a couple of error messages along with solutions, to the folks struggling with this out there.
Installation request for webflo/drupal-core-require-dev (locked at 8.4.5, required as ~8.4) -> satisfiable by webflo/drupal-core-require-dev[8.4.5].
If you have installed an out of the box version of https://github.com/drupal-composer/drupal-project, this might be an error message you encounter. Full error message, for reference:

./composer.json has been updated
> Drupal maintenance support plansProjectcomposerScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
– webflo/drupal-core-require-dev 8.4.5 requires drupal/core 8.4.5 -> satisfiable by drupal/core[8.4.5] but these conflict with your requirements or minimum-stability.
– webflo/drupal-core-require-dev 8.4.5 requires drupal/core 8.4.5 -> satisfiable by drupal/core[8.4.5] but these conflict with your requirements or minimum-stability.
– webflo/drupal-core-require-dev 8.4.5 requires drupal/core 8.4.5 -> satisfiable by drupal/core[8.4.5] but these conflict with your requirements or minimum-stability.
– Installation request for webflo/drupal-core-require-dev (locked at 8.4.5, required as ~8.4) -> satisfiable by webflo/drupal-core-require-dev[8.4.5].

Installation failed, reverting ./composer.json to its original content.
The reason this fails is that the project you have created is depending on the dev packages for drupal core, which are tied to a specific version of core. So to update core, we also need to update the dev packages for core.
The solution to this is pretty simple:
Open your composer.json file and replace the lines for drupal/core and webflo/drupal-core-require-dev with the following:
“drupal/core”: “~8.5”
// …and
“webflo/drupal-core-require-dev”: “~8.5”

Afterwards you can go ahead and run:
composer update drupal/core webflo/drupal-core-require-dev –with-dependencies

Installation request for symfony/config (locked at v3.2.14) -> satisfiable by symfony/config[v3.2.14].
This probably comes from the fact that you also have some other packages depending on this specific Symfony package in your project. Like drush or drupal console. Here is a full error message, for reference:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
– Conclusion: don’t install drupal/core 8.5.0-rc1
– Conclusion: don’t install drupal/core 8.5.0-beta1
– Conclusion: don’t install drupal/core 8.5.0-alpha1
– Conclusion: don’t install drupal/core 8.6.x-dev
– Conclusion: remove symfony/config v3.2.14
– Installation request for drupal/core ~8.5 -> satisfiable by drupal/core[8.5.0-alpha1, 8.5.0-beta1, 8.5.0-rc1, 8.5.x-dev, 8.6.x-dev].
– Conclusion: don’t install symfony/config v3.2.14
– drupal/core 8.5.x-dev requires symfony/dependency-injection ~3.4.0 -> satisfiable by symfony/dependency-injection[3.4.x-dev, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.2, v3.4.3, v3.4.4].
– symfony/dependency-injection 3.4.x-dev conflicts with symfony/config[v3.2.14].
– symfony/dependency-injection v3.4.0 conflicts with symfony/config[v3.2.14].
– symfony/dependency-injection v3.4.0-BETA1 conflicts with symfony/config[v3.2.14].
– symfony/dependency-injection v3.4.0-BETA2 conflicts with symfony/config[v3.2.14].
– symfony/dependency-injection v3.4.0-BETA3 conflicts with symfony/config[v3.2.14].
– symfony/dependency-injection v3.4.0-BETA4 conflicts with symfony/config[v3.2.14].
– symfony/dependency-injection v3.4.0-RC1 conflicts with symfony/config[v3.2.14].
– symfony/dependency-injection v3.4.0-RC2 conflicts with symfony/config[v3.2.14].
– symfony/dependency-injection v3.4.1 conflicts with symfony/config[v3.2.14].
– symfony/dependency-injection v3.4.2 conflicts with symfony/config[v3.2.14].
– symfony/dependency-injection v3.4.3 conflicts with symfony/config[v3.2.14].
– symfony/dependency-injection v3.4.4 conflicts with symfony/config[v3.2.14].
– Installation request for symfony/config (locked at v3.2.14) -> satisfiable by symfony/config[v3.2.14].
The solution here is to indicate you also want to update this package, even if it’s not specifically required. So if the failing command was the following:
composer update drupal/core –with-dependencies

Go ahead and change it to this:
composer update drupal/core symfony/config –with-dependencies

If you have other error messages, I would be glad to help out with a solution, and post the result here.
Credits
Thanks to zaporylie for looking into this with me, and to Berdir for pointing out the fact that core is not the package that requires symfony/config.
Let’s finish this post with an animated gif of a composer

planet drupalcomposerdrupal 8
Source: New feed

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

orkjerns blogg: Updating to Drupal maintenance support plans 8.5 with composer

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.