localgovdrupal / localgov_project

Project template for Drupal 10 sites built with the LocalGov Drupal distribution.
https://localgovdrupal.org
GNU General Public License v2.0
10 stars 8 forks source link

Should we add patchlevel directive in this project composer.json? #150

Closed andybroomfield closed 5 months ago

andybroomfield commented 7 months ago

See https://github.com/cweagans/composer-patches/issues/423#issuecomment-1298697563

  "extra": {
    "patchLevel": {
      "drupal/core": "-p2"
    }
  }

I'm running into issues applying some patches after upgrading to macOS 14. Some repos include this already, but maybe it should be at the project level?

millnut commented 7 months ago

I agree with @andybroomfield that this should be included by default, it also fixes the issue I'm experiencing here https://github.com/localgovdrupal/localgov_services/pull/238#issuecomment-1915225964 with patches that create new files causing nesting.

stephen-cox commented 6 months ago

Tested this on Linux and the suggested change still works, so if this fixes things for Mac users looks fine to be made into a PR.

cweagans commented 6 months ago

FYI, this won't be necessary for composer-patches v2. drupal/core defaults to this value.

cweagans commented 6 months ago

(Testing with v2 is appreciated, btw! composer require cweagans/composer-patches:"2.0.0-beta2 as 1.7" is more or less all you'd need)