'test/patch-test', 'require' => [ 'civicrm/composer-compile-plugin' => '@dev', 'test/cherry-jam' => '@dev', 'cweagans/composer-patches' => '*', ], 'minimum-stability' => 'dev', 'extra' => [ 'patches' => [ 'test/cherry-jam' => [ 'Some hackery' => 'cherry-jam-hackery.diff' ], ], ], ]; // For this test, we'll need to patch. We want a copy (not symlink) so we can hack at it. if (!is_array($r['repositories']['test-cherry-jam'])) { throw new \RuntimeException("Inconsistency in composer.json"); } $r['repositories']['test-cherry-jam']['options'] = [ 'symlink' => false, ]; $r['config']['allow-plugins']['cweagans/composer-patches'] = true; return $r; } public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); self::initTestProject(static::getComposerJson()); file_put_contents( self::getTestDir() . '/cherry-jam-hackery.diff', file_get_contents(self::getPluginSourceDir() . '/tests/pkgs/cherry-jam-hackery.diff') ); } /** * When running 'composer install', it should generate 'jam.out' with suitable patches in place. */ public function testComposerInstall() { $this->assertFileNotExists('vendor/test/cherry-jam/jam.out'); PH::runOk('COMPOSER_COMPILE=1 composer install -v'); $this->assertFileContent('vendor/test/cherry-jam/jam.out', "patches in the house\n"); } } __halt_compiler();----SIGNATURE:----DbJAKHAzHfn2bzK9IeEuWGqD34qRQZLrofNrAKoM6m/SjUGZIBaf+pZaAq/6ccu/4BjMmqJE+miPAaoUoQLnt9n6tXTReTmO/YHiNbRsjttl0RhJhC5AqdIidLg2h3RGmo688ZY95C/rnmvSqRUlhFw5KDCF3x//PJvy+d/gyUpfVJfmPh06bJp15cRUNcxQ6VEE8pU6/f5QEUDYp1l/WhWEgUxnjsLH34VWJw1bYdmYpfOwKWg9udty1hmW43tHWSxZLa9iBs0oN9W3zO8Xtmq/gM1yl/XheQmjOt9rnCUFhKsvzvC5AeNvWvDkOXvQmM0O9Z5II9tOcLsx8USCGLgxbdBH5WLq9tl6Y7bgJpzpEQBoOr/DMduIE4C1IJNn7AbNYrch/3x1Vucvh+N7YHIphdrxvOWnRugd4VBfZLzDVzzzfuf4uRlPgln7G4R1P8nNemdtIbGtUJViyTqM8t/02bmS9V2wQ6vWWGOeJG0fImfoVarDJif3sJztkElN8GFoUHZmjwWuRJFkZRxwnaT/+YRp5jC0zO0o0uVwbOe2cXztKyYaYlcDgorXRtLobznUSGZN/kFG8KhbkgOoRwITCqbSR3UMrM9apJGBe0d/OZ+4c62cIOEeLLhVeUew6itYQgVy+n/vMYiOHI5vBOwgtlmryD1bfzhvpI3ItOo=----ATTACHMENT:----ODQ2MjEyMDc1MzgzNDE2MyA3NDEyNDQ4NTg1MzU1OTg5IDYxODUzNTUwNDU3Mzk5Mg==