- Issue created by @phenaproxima
-
jurgenhaas β
committed 0dbaca91 on 2.1.x
Issue #3501480 by phenaproxima, jurgenhaas: Create an action that can...
-
jurgenhaas β
committed 0dbaca91 on 2.1.x
- πΊπΈUnited States phenaproxima Massachusetts
We are going to need to be able to pass a package name to this action, because we cannot rely on any particular path. Even though Drupal CMS provides a default path of
recipes/FOO
, that can be overridden by developers and vary by recipe.Having Composer resolve the package path using its runtime API, which is completely safe to rely on, should solve this problem. Here's some more info about that: https://getcomposer.org/doc/07-runtime.md#knowing-the-path-in-which-a-pa...
A little bit about InstalledVersions: https://getcomposer.org/doc/07-runtime.md#knowing-the-path-in-which-a-pa.... Specifically, it is completely safe to rely on as long as we have the autoloader, which we very definitely do, or Drupal wouldn't boot up in the first place. Quoth Composer's docs:
composer-runtime-api 2.0 introduced a new Composer\InstalledVersions class which offers a few static methods to inspect which versions are currently installed. This is automatically available to your code as long as you include the Composer autoloader.
(
composer-runtime-api
is not a real package; it's just a symbol used by Composer to ensure compatibility.) - π©πͺGermany jurgenhaas Gottmadingen
Thank you @phenaproxima for that improvement in the MR. I've moved this forward and changed the action config such that it only accepts the package name, and not the optional path directly, as that wouldn't really make sense.
Will merge this, if test remain green. I think that's really exciting.
-
jurgenhaas β
committed 538e9b09 on 2.1.x authored by
phenaproxima β
Issue #3501480 by phenaproxima, jurgenhaas: Create an action that can...
-
jurgenhaas β
committed 538e9b09 on 2.1.x authored by
phenaproxima β
- π©πͺGermany jurgenhaas Gottmadingen
Tests are green and I've also tested this locally, it works as expected.