'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:----pt/j9jU7qvcHAxd9wS2pPCy32fxA2HhqpqxD8dMkEITM5TP/GI5csbGDT82eCLBAs9Z7GYc/6fvBW3zXKG/qkB9986vuEuTIMyVc5EsuJeQQ0+n6cb9PwJisP8vasSFJFeOkaMdksUtpBM6vtB/3ql1n8qlFOBfT3PwsUjEV1/JiGVwsFztpAOGMGo0alTNHDluhK6wQbgEkG6yem2sjUqASWEWINlZ+yGpfwG3+E40ztq2Uu1eBvFkuJ1Ws9Vhm9g4aVqE9ngRsQV4DLbg4zWiLF3HB23cLzciF5DmLOeANA2LG4Qzz8kWSzjF7aIe4wIAcW6d6gZzq9d//Urq1x665f8RLjM0WKpkEMb2FLeSom3xP0fGlbnu8eMG4rz41N0tr122dk2W2qY6bAinYhh+Xc425Ml39ItVaPE0E8AIG/wkTcq+EbiSyIRwoR/108GAkNl3Jeui2S1qYCK5StlUZh5I2Vb9/W4qRE+p/AQehN5cSi8ut8SQJQMMXV8WeV/smJu9JXZEfJsF6+baOjXGRCZ1TU1kiaVABBYrgjXJHNHPl1v/pOUX4j1sL7+2FYLeXLnB5Q82iDcWR8Rs0S6bjgz1etXsnR957grLkhxJEEUI6ow8narbwgxuY+vOeek2EqEC2qfujCsw/IZuFL+iLyln1WQrH/mJjcWLnBeQ=----ATTACHMENT:----NzQzOTg3Mjc0MDY5ODI2NSA0NzE5NjY1MTg2MTM4Nzk3IDc2NTQxMTYyMTc2NjQwNjA=