0
votes

Hey so my hosting provider dropped support for anything below php 7 so need to update my drupal site from 8.4 to 8.6 so i wont break etc.

when trying to update running the 'composer outdated "drupal/*"' command nothing is returned at all even when I added '"drupal/core": "^8.6.1"' to the 'require' section of the 'composer.json'

and the site is mostly fine but i cant add any content and get the following error :

Fatal error: Declaration of Drupal\Core\TypedData\ComputedItemListTrait::getValue() must be compatible with Drupal\Core\Field\FieldItemList::getValue($include_computed = false) in \core\modules\path\src\Plugin\Field\FieldType\PathFieldItemList.php on line 13

and here is some of my composer.json which mentions drupal

"require": {
    "composer/installers": "^1.0.24",
    "wikimedia/composer-merge-plugin": "^1.4",
    "drupal/core": "^8.6.1"
},
"replace": {
    "drupal/core": "^8.4"
},

so i'm summary im not even sure my drupal has been updated but the site works fine apart from where I add content I get a php error saying a module is not compatible for the core.

1

1 Answers

1
votes

That error looks like a PHP 7 compatibility issue, so I would assume that your Drupal version has not been updated.

You can check your current version of Drupal on the status report page when logged-in - Reports > Status report (from the administrative toolbar) or https://yoursite.com/admin/reports/status

Running composer require directly (rather than editing composer.json) is the best way to ensure an appropriate version of Drupal core is correctly installed, as follows:

$ composer require drupal/core^8.6.1

This will ensure the composer.lock file is also updated when installing an appropriate version of Drupal core.