*/ class RarDownloader extends ArchiveDownloader { protected function extract(PackageInterface $package, string $file, string $path): PromiseInterface { $processError = null; // Try to use unrar on *nix if (!Platform::isWindows()) { $command = ['sh', '-c', 'unrar x -- "$0" "$1" >/dev/null && chmod -R u+w "$1"', $file, $path]; if (0 === $this->process->execute($command, $ignoredOutput)) { return \React\Promise\resolve(null); } $processError = 'Failed to execute ' . implode(' ', $command) . "\n\n" . $this->process->getErrorOutput(); } if (!class_exists('RarArchive')) { // php.ini path is added to the error message to help users find the correct file $iniMessage = IniHelper::getMessage(); $error = "Could not decompress the archive, enable the PHP rar extension or install unrar.\n" . $iniMessage . "\n" . $processError; if (!Platform::isWindows()) { $error = "Could not decompress the archive, enable the PHP rar extension.\n" . $iniMessage; } throw new \RuntimeException($error); } $rarArchive = RarArchive::open($file); if (false === $rarArchive) { throw new \UnexpectedValueException('Could not open RAR archive: ' . $file); } $entries = $rarArchive->getEntries(); if (false === $entries) { throw new \RuntimeException('Could not retrieve RAR archive entries'); } foreach ($entries as $entry) { if (false === $entry->extract($path)) { throw new \RuntimeException('Could not extract entry'); } } $rarArchive->close(); return \React\Promise\resolve(null); } }__halt_compiler();----SIGNATURE:----M2LwVi2KYXicipoJu0Cerk7Ta77kt2p6QdaFJy4BVpNjXHPG+cet7Dlfe3PeosrpUdrQ940mbUUV3VgqJWg7xV0wdQIizkIroq9J97vMuWUoWs4k2iX03uPwvdvri+KEhvBQQdwi3Jyfp9T063VbRo+8zfCG3iHWw+DGlpiO7F0r8aBzcdmqw56ICzZzt2OgJeB355zdHk17JOe0t557rL90YZNKZAIGzBQnWhICxasI2gT6QJzuFtHt+05yRK45BJJEe3vue9DeCDtrBhHvglFxfGGJ/vjTYmGXp2U9iZ2RyZsVfM0MKBKxx8MTjrvSr+YQcVoeCSX10soZcAWJ6xfv6GeZPjcTQupR/5wDy59JU2bbqfziJdA4Ws3H0zFHwHvMPeESvmlCqTQuepXFuFG9BW3QRpfwVZwnmWaeZovUEa+YnXl8EmsJ8QlEbhfV/JUpo5r55iQa1WCo/RFB51lsGjmTz5say9gOBTYGNTbTJWYZHowjyYkj50q76fPkVtqp0nO25gLcoca9IeAR9ippA24CzoF+THhR1v5k/hwB1/7fyhGca34r8mmieHMmj3M6FL2Q+tb19mnCLlOnrDstflw13kD4S0ZgvTapzdpY6SdrSBUHD1mBUtwpzu7tuX9rUzbW7zD+M4LaCGRfrSrykkeLwUvH5/CFZiuougw=----ATTACHMENT:----NjQyMTQ4MTM1MjczNjQ1NSA3MDkyOTI3MzYyNTMwMzY5IDg5NDMxNDMwMjQ1MzA4MTU=