File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,21 @@ class ComposerCoreVersionsLeniency {
2929 * The event.
3030 */
3131 public static function prePoolCreate (PrePoolCreateEvent $ event ) {
32- // @todo Only act if the current branch of drupal/core is 11.x
32+ $ packages = $ event ->getPackages ();
33+
34+ // Only act if the current branch of drupal/core is 11.x
35+ /** @var \Composer\Package\BasePackage $package */
36+ foreach ($ packages as $ package ) {
37+ if ($ package ->getName () == 'drupal/core ' ) {
38+ if ($ package ->getPrettyVersion () != '11.x-dev ' ) {
39+ return ;
40+ }
41+ }
42+ }
3343
3444 $ version_parser = new VersionParser ();
3545
36- $ packages = $ event -> getPackages ();
46+ /** @var \Composer\Package\BasePackage $package */
3747 foreach ($ packages as $ package ) {
3848 $ type = $ package ->getType ();
3949 if ($ type === 'drupal-core ' ) {
You can’t perform that action at this time.
0 commit comments