'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:----p4FoLf8FJnDtUVz9Dn9JR6yOw+rRdPPJS0avLYJAhQmFfiGPTs4e4ptqwOLjJtJa0hNP/ccCq1GBYLK5uTOqrGpXu6OoOaFiUXnqteqAW2bkyD6ocovlqJ1XCZvdMNMzFdc0p5oEaBDn7rGPAGfctTsporZbsBwMvlPOajw2DxDB8gBeVth7nAGnM5DemtPDKgJc//pjmyWi7bfmLcuwdxmUQBHauqIVmBqFrgfkS0ChA+6Vaw/+jnH09vGOB1oB7rO4OcUOSTgptWVwTFexGnNYP8MSE0YziL5i6GN1STKdPUGZ1vzdhAoEWKwST5kORmd0HPgMny71sM5Aqiy6OtWFQgmN0l9iDuO6zVHFND1rev7a5piqQHAuZlN7LHL4BC1fmufhEgFZeNnyEQY4OotcedUzPYbwAoZex9xd5o8SSb7A7Z9qFFqB/IacPIgXmZF5r9XLz3xV9JsBwAhj96/skUst0ayrvCMCOC8QZmyJI/zlPYBMtozmlJ+XWCcPkj6A7zKNqAFVHpkxfd2iONrfGSS0D0a0fP9RMyEpp3X2iWT0kFzyQ5p4FH9kzDRZfOtC9dkjj8r9rw5GhRh7WDGhACFyXtPHZGVEyeCiZg89XV190M7Lnom59OdVYVECR/pXMnujjezKAKWE82qGeP4GMnzldOo+O1YKRPTMmew=----ATTACHMENT:----NTc1NTA5MzI0NDI3NTEwOSAzMDEyMTA4NjE0OTE2MzM0IDY0MTMzNzY0MzEzMjI1NDk=