Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

drupal-commerce-9-to-10

БесплатноБез исполняемых скриптовНе проверен

Drupal Commerce 9-to-10 upgrade expertise. Use when upgrading Drupal Commerce sites from Drupal 9 to Drupal 10, resolving Commerce-specific update hooks, or…

madsnorgaardот madsnorgaard★ 53 звезды на GitHub

Об этом скилле

Drupal Commerce 9→10 Upgrade Expert

You are an expert in upgrading Drupal Commerce sites from Drupal 9 to Drupal 10, including diagnosing and recovering from Commerce-specific update hook failures.

When This Activates

  • Upgrading a Drupal 9 Commerce site to Drupal 10
  • Resolving failed drush updatedb runs involving Commerce modules
  • Debugging commerce_stripe, dblog, or system.schema update failures
  • Planning a major-version Drupal upgrade on a site with Commerce, Stripe, or payment modules

Upgrade Phases

The upgrade follows four phases: Inventory → Composer Upgrade → Database Updates & Recovery → Cutover. Expect blockers in Phase 3 — the recipes below are first-class recovery procedures, not edge cases.


Phase 1: Inventory

Before touching Composer, audit the current state.

Check Drupal and PHP Versions

ddev drush status --fields=drupal-version,php-version,db-driver

List Installed Modules and Versions

ddev drush pm:list --status=enabled --format=table
ddev composer show drupal/* --format=table

Identify Deprecated or Incompatible Modules

# Check for Drupal 10 compatibility
ddev exec vendor/bin/drupal-check -ad modules/contrib/
ddev exec vendor/bin/drupal-check -ad modules/custom/

If drupal-check is not installed:

ddev composer require --dev mglaman/drupal-check

Export Current Configuration

ddev drush config:export -y

Commit the config export — this is your rollback baseline.

Audit Migration Modules and Groups

Commerce sites frequently have active migration modules — from initial data imports, ongoing feeds, or a prior D7→D9 migration. These must be inventoried before upgrading.

# List all enabled migration modules
ddev drush pm:list --status=enabled --type=module | grep -i migrat

# List all registered migration groups
ddev drush migrate:status --group=all 2>/dev/null || ddev drush migrate:status

If migrate_tools is installed, list every migration group and its state:

ddev drush sqlq "SELECT id, label FROM config WHERE name LIKE 'migrate_plus.migration_group.%';" | cat

Check for Commerce-specific migration modules:

Module Purpose D10 Action
commerce_migrate Ubercart/Commerce 1.x → Commerce 2.x Check for D10-compatible release; remove if migration is complete
migrate_drupal_commerce D7 Commerce → D9/D10 Commerce Verify compatibility; may need patch for D10
commerce_feeds Product feed imports Check D10 release; consider replacement with migrate_plus
migrate_plus Config-based migrations, groups Update to D10-compatible version (^6)
migrate_tools Drush commands for migrations Update to D10-compatible version (^6)
migrate_file File migration handling Update to D10-compatible version

Check for In-Progress or Stuck Migrations

Migrations left in an "Importing" state will block updatedb:

# Show migration status — look for "Importing" or "Stopping" states
ddev drush migrate:status 2>/dev/null

# Reset any stuck migrations before upgrading
ddev drush migrate:reset-status <migration_id>

If you have many stuck migrations:

-- Find all migrations in a non-idle state
SELECT m.name, m.value FROM key_value m
WHERE m.collection = 'migrate_status'
  AND m.value != 'i:0;';

-- Reset all to idle (value 0)
UPDATE key_value
SET value = 'i:0;'
WHERE collection = 'migrate_status';

Decide: Keep or Remove Migration Modules

If the original migration is complete (all data is in D9 and verified):

# Uninstall migration modules cleanly before upgrading
ddev drush pm:uninstall commerce_migrate migrate_drupal migrate_drupal_ui -y
ddev drush cr

Uninstalling before the D10 upgrade avoids update hook failures from migration modules that lack D10 releases.

If migrations are still active (ongoing feeds, periodic imports):

Keep the modules but ensure every one has a D10-compatible release. Check each on drupal.org:

  • migrate_plus ≥ 6.0 for D10
  • migrate_tools ≥ 6.0 for D10
  • commerce_migrate — check issue queue for D10 status

Export Migration Group Configuration

If you are keeping migration modules, export their config so you can restore after upgrade:

# Export migration group and migration configs
ddev drush config:export --destination=/tmp/migration-config -y
ls /tmp/migration-config/migrate_plus.migration_group.* 2>/dev/null
ls /tmp/migration-config/migrate_plus.migration.* 2>/dev/null

Back these up separately — updatedb can alter or delete migration configuration.

Record Schema Versions

ddev drush php:eval '$schemas = \Drupal::keyValue("system.schema")->getAll(); ksort($schemas); foreach ($schemas as $name => $version) { echo $name . "\t" . $version . PHP_EOL; }' | cat

Save this output. You will need it to diagnose orphaned schema entries in Phase 3.


Phase 2:

Полный SKILL.md на GitHub

Установить drupal-commerce-9-to-10 в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл drupal-commerce-9-to-10?

Drupal Commerce 9-to-10 upgrade expertise. Use when upgrading Drupal Commerce sites from Drupal 9 to Drupal 10, resolving Commerce-specific update hooks, or recovering from failed database updates.

Как установить скилл drupal-commerce-9-to-10?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл drupal-commerce-9-to-10 запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить drupal-commerce-9-to-10 с