2

I am having trouble updating from Drupal 8.3.7.

When running composer why-not drupal/core 8.4.0 I get the following results:

drupal/core 8.4.0 requires symfony/class-loader (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/class-loader (but v2.8.28 is installed)
drupal/core 8.4.0 requires symfony/console (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/console (but v2.8.28 is installed)
drupal/core 8.4.0 requires symfony/dependency-injection (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/dependency-injection (but v2.8.28 is installed)
drupal/core 8.4.0 requires symfony/event-dispatcher (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/event-dispatcher (but v2.8.28 is installed)
drupal/core 8.4.0 requires symfony/http-foundation (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/http-foundation (but v2.8.28 is installed)
drupal/core 8.4.0 requires symfony/http-kernel (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/http-kernel (but v2.8.28 is installed)
drupal/core 8.4.0 requires symfony/process (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/process (but v2.8.28 is installed)
drupal/core 8.4.0 requires symfony/routing (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/routing (but v2.8.28 is installed)
drupal/core 8.4.0 requires symfony/serializer (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/serializer (but v2.8.28 is installed)
drupal/core 8.4.0 requires symfony/translation (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/translation (but v2.8.28 is installed)
drupal/core 8.4.0 requires symfony/validator (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/validator (but v2.8.28 is installed)
drupal/core 8.4.0 requires symfony/yaml (~3.2.8)
andeersg/bouvet-d8-project dev-Stinis does not require symfony/yaml (but v2.8.28 is installed)

Trying to update one of the mentioned packages just results in composer telling me I can't because Drupal 8.3.7 needs a lower version. So I can't update the packages and I can't update Drupal. Am I stuck in a catch22?

Does anybody know what the problem might be? When I run composer update drupal/core --with-dependencies it says that everything is up to date even though it is still at 8.3.7.

3

I had the same issue and here is what worked for me

Requirement : PHP 7.1
Explanation :
1. Doctrire, a dependancy of Drupal core, requires PHP 7.1. Doctrine uses the latest PHP 7.1 syntax to declare the methods' return type eg. function my_function() : void {...}. There is a core bug concerning this issue with status "Needs work". Even if this bug is patched, 8.4 requires PHP 7.
2. webflo breaks the chain of dependencies
3. Drupal 8.4 requires Drush 9.0

If you have PHP 7.1 on your server you can do the following:

  1. edit the composer.json file: "drupal/core": "~8.4" and "drush/drush": "~9.0"
  2. delete composer.lock
  3. delete vendor
  4. update webflo: composer require "webflo/drupal-finder ~1.0.0"
  5. update the database: ../vendor/bin/drush updb -y
  6. update the entities schemas: ../vendor/bin/drush entup -y

Applied on three different production servers (Linux + Apache) and on local environments (macOS + Apach, Ubuntu + Apache). Not tested with Vagrant.

The two entity updates are concerning "paragraph entity type" : (1) The Published field needs to be updated. (2) The Behavior settings field needs to be updated.

15
  • The OP probably only needs point 1 (updating drush). About PHP 7.1 you can change the PHP version in composer.json Doctrine/Common 2.8 requires PHP ~7.1, this is helpful if your dev server has PHP 7.1 and production a lower version. You don't need to delete composer.lock, a composer update should do it. And don't run drush entup when updating, you can lose data.
    – 4k4
    Oct 13 '17 at 6:45
  • 1
    @4k4 Concerning the PHP version : PHP version required link Requiring PHP 7.1 in Drupal 8.4.0 is a bug and will be resolved. Drupal 8.4 requirements will be brought in line with the previous releases. See #2898119: Doctrine/Common 2.8 requires PHP ~7.1 (drupal.org/node/2898119) Status : Needs work
    – Rockabelly
    Oct 13 '17 at 7:09
  • Yes, now we linked all of the discussions, but the OP didn't asked about this and it might be confusing for others who only need to update drush.
    – 4k4
    Oct 13 '17 at 7:17
  • I believe that the question is how to update Drupal Core 8.3.7 to 8.4.0 with composer and not how to update Drush.
    – Rockabelly
    Oct 13 '17 at 7:20
  • @4k4 Concerning the entities update, of course there is a risk of losing data, if the entity schema changes entirely and does not handle compatibility with it's previous version. I didn't mention that you need to make a db backup because this is obvious. In any way, you have to update the entities schemas or else you are going to end up with a corrupted database. This is also covered by the Drupal 8 documentation. I'm sorry to say that, but I think that your comments are inappropriate and misleading.
    – Rockabelly
    Oct 13 '17 at 7:41
1

Try something like this:

composer require drupal/core:^8.4.0 drush/drush:^8.1.15 drupal/console:^1.0 --update-with-dependencies

Also: Drupal 8.4 requires drush newer than 8.1.12 or so, not 9.0. Some people have reported issues with drush 9 in some environments YMMV.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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