diff --git a/composer.json b/composer.json index c8d15af..5b8c548 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "ext-json": "*" }, "require-dev": { - "orchestra/testbench": "3.*||4.*||5.*", + "orchestra/testbench": "3.*||4.*||5.*||6.*", "phpunit/phpunit": "^8.5.12" }, "autoload": { diff --git a/src/VideoPlatformsParser.php b/src/VideoPlatformsParser.php index 12d3999..4c3667f 100644 --- a/src/VideoPlatformsParser.php +++ b/src/VideoPlatformsParser.php @@ -165,7 +165,10 @@ public function detectURL($url) 'id' => $params_url['v'] ]; } - } else if (strpos($parsed_url['host'], 'twitter.com') !== false) { + } elseif ( + strpos($parsed_url['host'], 'twitter.com') !== false || + strpos($parsed_url['host'], 'x.com') !== false + ) { if (empty($parsed_url['path'])) return false; $path = explode('/', $parsed_url['path']); if (!is_numeric(end($path))) return false;