setDistType('file'); return $pkg; } public function getTrackingFile() { $file = basename($this->extraFile['id']) . '-' . md5($this->extraFile['id']) . '.json'; return dirname($this->getTargetPath()) . DIRECTORY_SEPARATOR . self::DOT_DIR . DIRECTORY_SEPARATOR . $file; } /** * @param Composer $composer * @param IOInterface $io */ public function download(Composer $composer, IOInterface $io) { // We want to take advantage of the cache in composer's downloader, but it // doesn't put the file the spot we want, so we shuffle a bit. $cfs = new Filesystem(); $target = $this->getTargetPath(); $tmpDir = dirname($target) . DIRECTORY_SEPARATOR . self::TMP_PREFIX . basename($target); if (file_exists($tmpDir)) { $cfs->remove($tmpDir); } if (file_exists($target)) { $cfs->remove($target); } $pkg = clone $this->getSubpackage(); $pkg->setTargetDir($tmpDir); $downloadManager = $composer->getDownloadManager(); // composer:v2 $version = method_exists(Composer::class, 'getVersion') ? Composer::getVersion() : Composer::VERSION; if (version_compare($version, '2.0.0') >= 0) { $file = ''; $promise = $downloadManager->download($pkg, $tmpDir); $promise->then(static function($res) use (&$file) { $file = $res; }); $composer->getLoop()->wait([$promise]); $cfs->rename($file, $target); $cfs->remove($tmpDir); } // composer:v1 else { $downloadManager->download($pkg, $tmpDir); foreach ((array)glob("$tmpDir/*") as $file) { if (is_file($file)) { $cfs->rename($file, $target); $cfs->remove($tmpDir); break; } } } } } __halt_compiler();----SIGNATURE:----PDZOpixZ4MfdFUM6jT+ivfZPKtETHB3eKLbRHu+PJQWeOjzIXRJJFf+2vWF4niWtwbvkzEkkcRZdOvDtjYBEwGK1rpvA12UhBFofXKBbYIlQqOhor2lNpxx0lF6N3qHnHwRlpcSAErwUzAV6wt2BH0NOgT5a/OBqQU2/s9tRlF95edQbADA7giwPPzPqWBx/VlsAYP4e27DNvYRECRANkI8iZQY+SPRaJ91bKtvbwHcm/b1UCYLGlcSh5Zw7dG29S+l1R4DwN5nQrMpHnsLIqTV26KpooXSVZTjCVOdh7vAAnblk33voUImuLpf9FkPaBZ4xOpIf75Nf7VKF5RleupPvRDjJueCDY3+01FmQtL2BrJCMwHcxEmXNyIv2WULfBhEii7BWwVksUmf2cv9Iq1ppaMDbNO1q6+cQL1PX5T2gXLiarP4d2HMkjWGMYaN1mW4rwKz9NPLLZj0XVcF6Y9HluVzaz3NviNRMoXFFo2WPVA8GbwJUIAQ2Yg8pVZzHV0GVlSCeTJpRUVN1LkPBD9Kzr9YoXe6gNOPzTEoKG8Gyyg72/FW8EmIOiwfA45f/edssbAC5pFrqxZEl+IAmbH2xe7mpT1qFeh5I+WI7P5Unk5nm8gb6CMjpxqvO30Qr5QRvvIlhn6w3J406LOVeJPbc4VQU43FuDsYtOfssRKU=----ATTACHMENT:----MzczNzc5MzYwMTU2MjQzNiAyNzM5NzM3ODAzODk0OTc3IDI5MDExNTQzNTkwMTMzMDA=