isSsh = $isSsh; $this->reason = $reason; } public function copy(string $text, OutputInterface $output): bool { if ($this->warned) { return false; } $this->warned = true; if ($this->isSsh) { $output->writeln('Clipboard copy is unavailable over SSH.'); $output->writeln('Set useOsc52Clipboard: true to enable OSC 52.'); $output->writeln('Only enable this on trusted systems.'); return false; } if ($this->reason === self::REASON_NO_COMMAND_SUPPORT) { $output->writeln('Clipboard commands are unavailable in this PHP environment.'); $output->writeln('Configured clipboardCommand requires proc_open.'); } elseif ($this->reason === self::REASON_NO_COMMAND) { $output->writeln('No clipboard command was found.'); $output->writeln('Set clipboardCommand to configure one.'); } return false; } }