The final countdown to the Drupal 7 end-of-life has begun ticking after receiving its final extension. Why is upgrading from Drupal 7 to Drupal 10 so daunting? Three problems must be faced when upgrading from Drupal 7 to Drupal 10:
- Migrating existing site configuration, content models, and content to its new schema.
- Rewriting custom modules from legacy APIs to their modern API equivalents.
- Rewriting custom themes from the PHPTemplate template engine to Twig.
Those are three big tasks. The Drupal community has focused heavily on problem one with our bundled Migrate modules and efforts to provide migrations in popular contributed modules. However, points two and three have no tooling available for development teams. These sites built on Drupal 7 still have active bug tickets and feature requests. This puts development teams in a difficult position to maintain an existing platform while upgrading to a new major version and refactoring their existing code base.
Retrofit for Drupal solves that problem. Retrofit for Drupal allows organizations that invested in their platforms built on Drupal 7 to upgrade to Drupal 10 and beyond. Retrofit for Drupal supports the following Drupal 7 APIs and features:
- Global variables: Continue using the global
$userobject for the current user.
- Permissions: Your existing
hook_permissionwill be used; there is no need to convert it to a
- Menu system: No need to rewrite your
hook_menudefinitions to the new routing, menus, and links APIs.
- Block API: Keep your existing
hook_block_*definitions without refactoring to the new plugin format.
- Form API: Allows you to keep your existing form hooks and access form state as an array without migrating to the
- Theme functions: Keep your existing theme functions without converting them to Twig templates.
- PHPTemplate templates: Keep your existing PHPTemplate templates; they'll now be rendered through Twig!
And more to come! Active development is underway to support themes fully.
Want to stay informed about Retrofit for Drupal updates, including upcoming support options? Sign up for updates here: https://retrofit-drupal.com/stay-updated.
Want more? Sign up for my weekly newsletter