mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Drop support for openswoole
This commit is contained in:
@@ -20,7 +20,6 @@ use Shlinkio\Shlink\IpGeolocation\GeoLite2\DbUpdater;
|
||||
use Shlinkio\Shlink\IpGeolocation\GeoLite2\GeoLite2Options;
|
||||
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
|
||||
|
||||
use function Shlinkio\Shlink\Config\runningInOpenswoole;
|
||||
use function Shlinkio\Shlink\Config\runningInRoadRunner;
|
||||
|
||||
return (static function (): array {
|
||||
@@ -47,7 +46,7 @@ return (static function (): array {
|
||||
];
|
||||
|
||||
// Send visits to matomo asynchronously if the runtime allows it
|
||||
if (runningInRoadRunner() || runningInOpenswoole()) {
|
||||
if (runningInRoadRunner()) {
|
||||
$asyncEvents[EventDispatcher\Event\VisitLocated::class][] = EventDispatcher\Matomo\SendVisitToMatomo::class;
|
||||
} else {
|
||||
$regularEvents[EventDispatcher\Event\VisitLocated::class] = [EventDispatcher\Matomo\SendVisitToMatomo::class];
|
||||
|
||||
@@ -57,7 +57,7 @@ class UrlShortener implements UrlShortenerInterface
|
||||
$this->eventDispatcher->dispatch(new ShortUrlCreated($newShortUrl->getId()));
|
||||
} catch (ContainerExceptionInterface $e) {
|
||||
// Ignore container errors when dispatching the event.
|
||||
// When using openswoole, this event will try to enqueue a task, which cannot be done outside an HTTP
|
||||
// When using RoadRunner, this event will try to enqueue a task, which cannot be done outside an HTTP
|
||||
// request.
|
||||
// If the short URL is created from CLI, the event dispatching will fail.
|
||||
return UrlShorteningResult::withErrorOnEventDispatching($newShortUrl, $e);
|
||||
|
||||
Reference in New Issue
Block a user