 [ ← blog / drupal ](/) Aug 15, 2023  ·  \#drupal  ·  2 min read 

# Protect your investment in Drupal 7 with Retrofit for Drupal



The final countdown to the Drupal 7 end-of-life has begun ticking after [receiving its final extension](https://www.drupal.org/psa-2023-06-07). 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](https://retrofit-drupal.com/) 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 `$user` object for the current user.
- **Permissions**: Your existing `hook_permission` will be used; there is no need to convert it to a `permissions.yml` file.
- **Menu system**: No need to rewrite your `hook_menu` definitions 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 `Drupal\Core\Form\FormStateInterface` object.
- **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>.

 

  ![](/themes/custom/mglaman/images/headshot.webp)Thanks for reading

I write about Drupal, PHP, and the quiet infrastructure behind large sites — caching, config, and testing. New posts land every week or two.

 [Subscribe via RSS →](/rss.xml) [About me →](/about-me) 

 



 

  [← Older

Parallels of typing with PHP and TypeScript 

 ](/blog/parallels-typing-php-and-typescript) [Newer →

How do theme template overrides in Drupal work?

 ](/blog/how-do-theme-template-overrides-drupal-work)