DO NOT upgrade to this release without reading this page first, or you may break your site!

What's changed?

Lightning Media 5 provides no new features or functionality over Lightning Media 4. The main difference is that Lightning Media 5 removes all hard dependencies on contributed modules, so you no longer need to keep modules you aren't using.

Lightning Media 5 also removes all previous database updates. This means you'll need to be fully up-to-date on Lightning Media 4 before you upgrade to Lightning Media 5.

This release also drops support for Video Embed Field, which is an obsolete module. If you are still using it, you should migrate media which uses Video Embed Field to the core oEmbed system.

Do I need to upgrade right now?

No, there's no rush. Lightning Media 4 supports Drupal 9 and 10. However, only Lightning Media 5 will support Drupal 11, so if you want to keep using Lightning Media's functionality on Drupal 11, you'll need to upgrade at some point.

The main advantage of upgrading sooner is to remove contributed modules that Lightning Media 4 requires, but that you're not using. Lightning Media 4 will reach its end-of-life at the same time that Drupal 10 does.

Anything else I should know?

All of the Lightning components have released new major versions which drop hard dependencies. Because this kind of change can break your site, you must upgrade all the Lightning components at the same time. The good news is that they can all be upgraded in the same way, so you only need to do this process once, no matter which Lightning component(s) you're using.

Upgrade Instructions

You'll need Composer 2 or later, and Drush 10 or later.

There are two parts to this process: bringing the Lightning components up-to-date, then upgrading them to the next major versions.

Part 1: Get the Lightning components up to date

  1. Update the Lightning components to their latest versions:

    composer update 'drupal/lightning_*' โ€“with-all-dependencies

  2. Run database updates (drush updatedb, or visit update.php).
  3. At this point, you should be running Lightning Media 4.10. Export config if needed, commit changes, and deploy to your dev, staging, and production environments. Be sure to run database updates on those environments too.

Part 2: Upgrade the Lightning components to the next major version

At this point, all environments should be running Lightning Media 4.10.

  1. Back in your local environment, clear all caches:

    drush cache:rebuild

  2. Run drush update:lightning --upgrade. This will automatically move all the Lightning components' dependencies into the project's composer.json, and bump the components themselves to their next major versions. You can use the --commands-only option to leave composer.json untouched and only display the equivalent Composer commands. (This will happen automatically if composer.json isn't writable.)
  3. Run composer update 'drupal/lightning_*' --with-all-dependencies.
  4. Run database updates again (drush updatedb, or visit update.php).
  5. Export config if needed, commit changes, and deploy again, running database updates on target environments as well.

Technical Info

This information is meant for technical users who are comfortable working directly with composer.json. If that's not you, you may cheerfully ignore this section. ๐Ÿ™‚

What is this doing?

The goal of this upgrade path is to "transfer" dependencies from the control of the Lightning components, to the control of the site owner. So this upgrade path simply moves the dependencies of the Lightning components you have, to your project's composer.json. To minimize the chances of things breaking, the update:lightning command will try to pin the dependencies to their currently-installed versions; if that's not possible, it will use the same unpinned version constraints defined by the components.

With dependencies controlled by the site, rather than by the components, it becomes possible for the site owner to update modules independently of the Lightning components, or uninstall modules that aren't needed. This can also allow for easier upgrading to new major versions of Drupal, since sites won't need to wait for all of the Lightning components' dependencies to become compatible.

What changes should I expect to see in composer.json?

You'll see a lot of new dependencies in the require section. In fact, these things were already installed -- it's just that the Lightning components were installing them for you, rather than your site requiring them directly.

To minimize the possibility of your site breaking, all of the components' dependencies are moved into composer.json, rather than the upgrade script trying to detect which ones are actually in use. You can remove the ones you don't need.

You should also see an installer path for the enyo/dropzone package listed in the extra.installer-paths section. You'll want to be sure that the installer path matches the libraries directory in your Drupal site.

If you have Lightning Layout installed, you'll see some patches for Panels and Panelizer listed in the extra section, along with a dependency on the cweagans/composer-patches plugin. You can remove these patches if your site doesn't use those modules. (If you don't need to patch modules at all, you can also remove the dependency on cweagans/composer-patches.)

VCS Label
5.0.0
Short description
Drops hard contributed dependencies. Read release notes before upgrading!
Packaged Git sha1
d4b0f46cf6dd2e63e44bc3a5039751bb2e86c5e2
Release files
7fbd8563d5258baab7f42b96c52535a5
Release file SHA-1 hash
944eea8736bc92e77ab4ca4566c2636ba1e29802
Release file SHA-256 hash
dfaa5b203f44ba231a115484f795840e8d19e94264b16e84126f15fcdc30aa18
0644037ba1da2e5c0fd47239226bff1d
Release file SHA-1 hash
2592cb0aeac68e58b2c2a6044a4fb57f5d3f418f
Release file SHA-256 hash
094e0c36ed84eaaafa0a8c054794e83f5596624f86c25950dfcdba4a7dd610ee