Dears,
using Drupal Version 8.8.8, and After updating to the latest version 7.22.0 and when I trying to do drush updb, I have the following error as attached screenshot.

Comments

3eidoz created an issue. See original summary.

rajab natshah’s picture

Thanks Ahmed for reporting.

Are you using Varbase Media in other systems or Drupal standard profile, not with Varbase profile?

#3051884: Switch to use [Varbase Entity Definition Update Manager] and remove deprecated \Drupal::entityDefinitionUpdateManager()->applyUpdates()
We do have that included and fixed under Varbase profile

You will need to have the class VarbaseEntityDefinitionUpdateManager and use Drupal\varbase\Entity\VarbaseEntityDefinitionUpdateManager;

https://git.drupalcode.org/project/varbase/-/blob/8.x-8.x/src/Entity/Var...

---
Quick solution for none varbase systems
comment the following in varbase_media_update_8708

  if (isset($query)) {
    // Entity updates to clear up any mismatched entity and/or field definitions
    // And Fix changes were detected in the entity type and field definitions.
    \Drupal::classResolver()
      ->getInstanceFromDefinition(VarbaseEntityDefinitionUpdateManager::class)
      ->applyUpdates();
  }

and

use Drupal\varbase\Entity\VarbaseEntityDefinitionUpdateManager;

But you still need to use Devel Entity Updates

We had that in #3051884: Switch to use [Varbase Entity Definition Update Manager] and remove deprecated \Drupal::entityDefinitionUpdateManager()->applyUpdates()
Support for automatic entity updates has been removed
https://www.drupal.org/node/3034742

User deprecated function: EntityDefinitionUpdateManagerInterface::applyUpdates() is deprecated in 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface::getChangeList() and execute each entity type and field storage update manually instead.

Varbase Entity Definition Update Manager
Customized class from the Devel Entity Updates module
Development version of the entity definition update manager.

3eidoz’s picture

You are welcomed Rajab, yes I use Drupal standard profile, not with the Varbase profile.
Thanks for your response. I'll check Devel Entity Updates

rajab natshah’s picture

Status: Active » Closed (works as designed)
generalredneck’s picture

@RajabNatshah,
I'm adding a patch as this helped me since I had to deploy this change in a composer build. I hope it helps others. I know having devel_entity_updates is frowned upon having installed on production so I install and uninstall it. It does require you to have it in the dependencies of the project though... so anyone else using this will need to do a composer require drupal/devel_entity_updates.

rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Category: Bug report » Feature request
Priority: Critical » Normal
Status: Closed (works as designed) » Needs review

Thank you, Allan for the patch
Grate idea and nice patch for it too
This could be implemented in other Varbase components

rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Fixed » Closed (fixed)