urlShortener->shorten($inputData->toShortUrlCreation($this->options)); $result->onEventDispatchingError(static fn () => $io->isVerbose() && $io->warning( 'Short URL properly created, but the real-time updates cannot be notified when generating the ' . 'short URL from the command line. Migrate to roadrunner in order to bypass this limitation.', )); $io->writeln([ sprintf('Processed long URL: %s', $result->shortUrl->getLongUrl()), sprintf('Generated short URL: %s', $this->stringifier->stringify($result->shortUrl)), ]); return self::SUCCESS; } catch (NonUniqueSlugException $e) { $io->error($e->getMessage()); return self::FAILURE; } } }