Drupal is a registered trademark of Dries Buytaert

upsync

No security coverage
View on drupal.org

🧩 What is Upsync?

Upsync is a developer-focused utility module designed to simplify and stabilize deployment tasks. It allows you to perform selective module installations and config syncs/deletions without relying on full config imports or UI interactions.

🔥 Why use it?

Drupal's standard config sync process can often be risky on large or long-lived sites - especially when:

  • Syncing all config can unintentionally overwrite production changes.
  • New modules are not detected during update hooks or Drush runs.
  • You want a repeatable, update-hook-safe way to apply only what's needed.

Upsync solves these problems by providing services you can call within update hooks or deploy scripts to:

  • Install specific modules safely
  • Sync or delete selected config items
  • Collect and return results for logs, reports, or testing

⚙️ How to use

1. Install the module
Enable the upsync module just like any other:
drush en upsync

2. Use it in an update hook or deployment script
Here's an example of usage inside an update hook:

function my_module_update_9001() {
  $upsync = \Drupal::service('upsync.manager');

  $result = $upsync
    ->install(['my_custom_module'])
    ->syncConfigs([
      'views.view.my_view',
      'user.role.content_editor',
    ])
    ->deleteConfigs([
      'field.storage.node.legacy_field',
    ])
    ->getResults();

  return implode(PHP_EOL, array_merge(
    $result['messages'],
    $result['errors'],
  ));
}

You can also log results or send them to a dashboard, CI runner, or error reporting system as needed.

🛣️ Roadmap

Planned improvements and additions:

✅ Core support for:
- Module installation
- Selective config sync
- Selective config deletion
- Result collection with categorized messaging

🕓 Coming soon:
- Support for applying pending entity definition updates
- Unit test coverage

Activity

Total releases
2
First release
Jun 2025
Latest release
8 months ago
Release cadence
0 days
Stability
50% stable

Releases

Version Type Release date
1.0.0 Stable Jun 23, 2025
1.0.x-dev Dev Jun 23, 2025