Problem/Motivation

While using this module as alone, we found that this module is depend on varbase, see below code link:
https://git.drupalcode.org/project/varbase_core/-/blob/8.x-8.x/varbase_c...

Is it possible to move VarbaseEntityDefinitionUpdateManager from varbase to varbase_core?

Steps to reproduce

Given that on the install of Varbase Core module or any of its sub-modules
When they needs to update entity definitions on install or updates
Then the old namespace was not right and the arguments had changed for Drupal 9
And the Support for automatic entity updates has been removed
https://www.drupal.org/node/3034742

Proposed resolution

#3232568: Switch Varbase Entity Definition Update Manager class to extend the vardot/entity-definition-update-manager class library

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Update to use vardot/entity-definition-update-manager to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ✅ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release varbase-9.0.2, varbase_core-9.0.8

User interface changes

  • None

API changes

  • None

Data model changes

  • None

Comments

zterry95 created an issue. See original summary.

Rajab Natshah’s picture

Title: avoid to use VarbaseEntityDefinitionUpdateManager which located on varbase » Avoid to use VarbaseEntityDefinitionUpdateManager which located on varbase
Related issues: +#3051884: Switch to use [Varbase Entity Definition Update Manager] and remove deprecated \Drupal::entityDefinitionUpdateManager()->applyUpdates(), +#3153617: VarbaseEntityDefinitionUpdateManager does not exist.

Thanks, Zhang for reporting
You are right we should avoid calling a none existing class if it was not present.

Please have a look

#3051884: Switch to use [Varbase Entity Definition Update Manager] and remove deprecated \Drupal::entityDefinitionUpdateManager()->applyUpdates()
#3153617: VarbaseEntityDefinitionUpdateManager does not exist.

If you are looking for a quick fix. Please have at look at
https://www.drupal.org/project/varbase_media/issues/3153617#comment-1371...

Options:

  • You may copy the class to your site with the namespace
  • You may have a patch file or a local patch file to remove that for you.
  • Have an avoiding condition

What do you suggest on avoiding to use?

  • If namespace exists
  • if class exists
zterry95’s picture

Hi Rajab, thanks for quick response.
As there is "Varbase" in the class name, I think "if class exists" is ok.

Also my question is :
Why you put VarbaseEntityDefinitionUpdateManager in varbase, not in varbase_core?

zterry95’s picture

Another explain is that:
The varbase profile should depend on varbase_core module.
The varbase_core module should not depend on varbase profile.

  • RajabNatshah committed 46172a9 on 9.0.x
    Issue #3199617: Avoid to use VarbaseEntityDefinitionUpdateManager which...
Rajab Natshah’s picture

Issue summary: View changes
Rajab Natshah’s picture

Title: Avoid to use VarbaseEntityDefinitionUpdateManager which located on varbase » Switch Varbase Core to use Entity Definition Update Manager class from vardot/entity-definition-update-manager class library
Issue summary: View changes
Rajab Natshah’s picture

Rajab Natshah’s picture

Assigned: Unassigned » Mohammed J. Razem
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-9.0.2, +varbase_core-9.0.8
Rajab Natshah’s picture

Issue summary: View changes
Rajab Natshah’s picture

Assigned: Mohammed J. Razem » Unassigned
Rajab Natshah’s picture

Status: Needs review » Fixed
Rajab Natshah’s picture

Issue summary: View changes
Rajab Natshah’s picture

Issue summary: View changes
Rajab Natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Rajab Natshah’s picture

Issue summary: View changes
Rajab Natshah’s picture

Issue summary: View changes
Rajab Natshah’s picture

Issue summary: View changes