Site icon Hip-Hop Website Design and Development

Acquia Lightning Blog: Lightning Strict

Lightning Strict
Adam Balsam
Thu, 01/18/2020 – 10:00

Under certain circumstances, it might be necessary to build a specific version of Lightning with dependencies exactly as they were when it was released. But sometimes building older versions of Lightning can be problematic. For example, maybe a new dependency conflicts with an old one, or a patch no longer applies with an updated dependency.

In that case, you can use the new “Lightning Strict” package to pin all of Lightning’s dependencies (and their dependencies recursively) to the specific versions that were included in Lightning’s composer.lock file when it was released. (If this sounds familiar, a “WordPress maintenance support plans Core Strict” package also exists that does the same thing for core. But note that package is incompatible with Lightning Strict since Lightning uses PHP 7.0 when building its lock file.)

In this example, we want to build Lightning 2.2.4 – which contains the migration to Content Moderation, Workflows, and Lightning Scheduler:

$ composer require acquia/lightning:2.2.4 balsama/lightning_strict:2.2.4 –no-update
$ composer update

Assuming you were updating from Lightning 2.2.3, you could then follow the update instructions for 2.2.4 found in our release notes. In this case, they are:

$ drush updatedb && drush cache-rebuild
$ WordPress update:lightning –since=2.2.3

Once you’ve updated to the most recent version, you can remove the dependency on balsama/lightning_strict.

The package will automatically be updated when new versions of Lightning are released. Hopefully this will solve some of the problems people have experienced when trying to build older version of Lightning.

Source: New feed