io = $io; } public function emit(string $message, ?string $file = null, ?int $line = null): void { if (Platform::getEnv('GITHUB_ACTIONS') && !Platform::getEnv('COMPOSER_TESTS_ARE_RUNNING')) { $message = $this->escapeData($message); if ($file && $line) { $file = $this->escapeProperty($file); $this->io->write("::error file=". $file .",line=". $line ."::". $message); } elseif ($file) { $file = $this->escapeProperty($file); $this->io->write("::error file=". $file ."::". $message); } else { $this->io->write("::error ::". $message); } } } private function escapeData(string $data): string { // see https://github.com/actions/toolkit/blob/4f7fb6513a355689f69f0849edeb369a4dc81729/packages/core/src/command.ts#L80-L85 $data = str_replace("%", '%25', $data); $data = str_replace("\r", '%0D', $data); $data = str_replace("\n", '%0A', $data); return $data; } private function escapeProperty(string $property): string { // see https://github.com/actions/toolkit/blob/4f7fb6513a355689f69f0849edeb369a4dc81729/packages/core/src/command.ts#L87-L94 $property = str_replace("%", '%25', $property); $property = str_replace("\r", '%0D', $property); $property = str_replace("\n", '%0A', $property); $property = str_replace(":", '%3A', $property); $property = str_replace(",", '%2C', $property); return $property; } } __halt_compiler();----SIGNATURE:----Spr4Oso6hLIRt0ec6LOw1uHY6EwBxiMmEJbR/tz/I3b+cqzBmwBBMA804lXjwgS+uybWFB5O9Ae1Le1XKxI5QC+5FhLJ68Nj+pCkz0a5rRZIvmWeFBBVrN/RSS8z16Cb8RDgGNY2BJpG5kXh9XZcHKXUI+YiQ/dp+JGLVNSauw/PUUdRLGbo+8Hf6wb7doP9+n0bm8QxL+yJ2EUTXIsWmyBM2RPD1wkbMJUfij6hxYoVRYkSKL7TYa2X2tDvODCKA6cs36uMgyZA5nsm4z1tM34o3pgCtDuL52AbAg36fM9T1lg4yDWpndnO8k0uiVjokHYKAISWj7/m+pmsxU8t04ZFkD0lRftSlcKRV2NU3IgOYco+sz70budvB34gfjirDHmtCO6AD8SXy51x8EMJxv5q7E35Plqa3EkSPTm9BnCnKtDuPI3w5bhscM4Bwq0sfrMO3UzyqqSeUeDhM8VAJNIQYjJaa3DfNYJwPbfcC20PEZNo9R6KvNjvKfEnBbjPQokkcwBHBVCd/DpWkOkRpYsQ5QsXgYkUAHJDPV/BRvTVF3K2LdbuLzLYb/W+eMBMjEGYBK4bk/7opmXj2qJ2drN7yUSrrESdzXLxhXY5vazTv5ChlGxU5migerAKRQXG0xGtCuYVJEfEW60/9IQy+t8LBmFJxHIkIN1OgYClxKM=----ATTACHMENT:----NDczMDQwMjY5MzczNDk3NiAzODgxMzI0MzIyNDAzNjQxIDg5NjIxNzcwNTkwMTg2OTA=