Visitar URL original
Embed/CHANGELOG.md at master · php-embed/Embed · GitHub
Skip to content

Latest commit

 

History

History
404 lines (339 loc) · 17.1 KB

CHANGELOG.md

File metadata and controls

404 lines (339 loc) · 17.1 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

4.6.0 - 2026-10-30

Added

  • mastodon:iframe setting (off by default). Mastodon oEmbed html (blockquote.mastodon-embed with data-embed-url) becomes a sandboxed <iframe> to the post's /embed page, so no embed.js is needed. Only same-host https embed URLs are used
  • Bilibili adapter: bilibili.com/video/BV... and av... URLs (also b23.tv short links) get a player.bilibili.com iframe built from the URL. The title, description and image of Bilibili's error pages ("出错啦!" and "视频去哪了呢?") are ignored, and so is a description template that was never filled #243
  • Youku adapter: v.youku.com/v_show/id_<ID>.html URLs get a player.youku.com/embed iframe built from the URL #243
  • NetEase Music adapter: songs, albums and playlists on music.163.com get an outchain/player iframe, and the author is read from the description. URLs with a #/ route are requested without it. MV pages (/mv?id= and /#/mv?id=) get metadata only, because NetEase has no official embeddable MV player #243
  • Extractor::normalizeUri(), used by adapters to rewrite a URL before it is requested

4.5.4 - 2026-10-30

Security

  • TLS verification is on by default. CurlClient now sends CURLOPT_SSL_VERIFYPEER true and CURLOPT_SSL_VERIFYHOST 2 unless told otherwise, so self-signed, expired and wrong-host certificates are rejected (curl error 60). Before, both checks were off when the settings were missing #575
  • A null ssl_verify_peer or ssl_verify_host now means the default (verification on). Explicit 0, false, '0' and '' still disable it

To disable verification, which is not recommended, pass the existing settings:

$client = new Embed\Http\CurlClient();
$client->setSettings(['ssl_verify_peer' => false, 'ssl_verify_host' => 0]);
$embed = new Embed\Embed(new Embed\Http\Crawler($client));

4.5.3 - 2026-10-30

Added

  • Kick adapter. Channel pages embed https://player.kick.com/<slug> (16:9). Video pages read the title, thumbnail and author name from Kick's public API. Clips have no embed code because Kick does not document a clip player

Fixed

  • An Open Graph video served as HLS (.m3u8, application/x-mpegURL or application/vnd.apple.mpegurl, also read from og:video:type) no longer produces an <iframe> pointing to the playlist
  • Twitch video iframes use the documented video=v<ID> parameter instead of id
  • Twitch clip URLs (clips.twitch.tv/<slug> and twitch.tv/<channel>/clip/<slug>) produce a clips.twitch.tv/embed iframe when twitch:parent is set

4.5.2 - 2026-10-27

Added

  • oEmbed responses of type photo without html now produce an <img> embed code from their url, width and height #584

4.5.1 - 2026-10-26

Security

  • JSON-LD remote contexts are never fetched. A page-supplied @context is not requested, so it cannot bypass the URL policy or follow redirects. schema.org contexts are resolved from a bundled vocabulary; any other remote context is skipped #573

4.5.0 - 2026-10-19

Security

  • Block requests to non-public addresses before they are sent, including redirects, page-declared oEmbed endpoints, adapter APIs, and meta-refresh targets. Private and loopback URLs are rejected unless UrlPolicy::allowPrivateNetworks() or withAllowedHosts() is used #573

Added

  • Embed\Http\UrlPolicy and Embed\Http\BlockedRequestException, configurable from Crawler::setUrlPolicy()

Changed

  • A negative max_redirs, which curl treated as unlimited, now follows at most 50 redirects
  • Reaching that limit is still curl error 47. The message is Number of redirects hit maximum amount rather than curl's Maximum (N) redirects followed

Fixed

  • resolveUri() dropped the port of the base URL
  • Read every curl_multi_info_read message in the parallel client instead of only one per iteration

4.4.19 - 2026-07-08

Changed

  • Access tokens are now optional with Meta (Facebook & Instagram) #577

Fixed

  • Updated tests

4.4.18 - 2026-06-19

Added

  • Add PHPStan Static Analysis (Level Max + Strict Rules) #562
  • Add support for Facebook reel URLs #572
  • Update oEmbed endpoints #574

Changed

  • Make snapshot updates possible without modifying test code #564

Removed

  • Remove support for discontinued services (chirb.it and sassmeister.com) #565

Fixed

  • Add PHPStan generic type annotations and simplify detector implementations #563
  • Update fixtures to pass PHPUnit #559
  • wrong mb_encoding_aliases() handling for PHP 8.0+ #560
  • Remove calls to curl_close and curl_multi_close on PHP 8.0 and later #569
  • Add phpstan.dist.neon to export-ignore in .gitattributes #571

4.4.17 - 2025-05-13

Fixed

  • Adapters hostname detection #556.

4.4.16 - 2025-05-09

Fixed

  • Adapters hostname detection #555.

4.4.15 - 2025-01-02

Fixed

4.4.14 - 2024-12-04

Fixed

  • Php 8.4 support #551.

4.4.13 - 2024-11-21

Fixed

  • Php 8.4 support #548.

4.4.12 - 2024-07-24

Fixed

  • X.com (Twitter) #540
  • Updated oembed resources.

4.4.11 - 2024-06-10

Fixed

  • Updated oEmbed entry points #537

4.4.10 - 2023-12-10

Fixed

  • PHP 7.4 support
  • Use correct method for string length #529

4.4.9 - 2023-12-01

Fixed

  • Performance and memory leak issues #525, #527.

4.4.8 - 2023-05-22

Fixed

  • Support for psr/http-message@2 #514, #515

4.4.7 - 2022-12-12

Fixed

  • Href attributes with undefined values #501, #502
  • Deprecated warning for var interpolation in PHP 8.2 #506
  • Prevent unsupported operand types exception #507

4.4.6 - 2022-10-02

Fixed

  • Some code issues detected by phpstan: #495, #496, #497, #498.
  • Fix for quotation marks in redirect URL #499

4.4.5 - 2022-09-06

Fixed

  • Updated oembed endpoints #494

4.4.4 - 2022-04-13

Fixed

  • Error getting data from Linked data #481.

4.4.3 - 2022-03-13

Fixed

  • PHP 8.1 deprecation notice #480.

4.4.2 - 2022-02-13

Added

  • Options to customize the CurlClient to perform http queries #474.

4.4.1 - 2022-02-06

Fixed

  • PHP 8.1 deprecation notice #473.

4.4.0 - 2022-01-08

Added

  • New settings option twitter:token to use Twitter API to get the data #364 #468.

Fixed

  • Headers not sent properly by curl #466, #467.

4.3.5 - 2021-10-10

Fixed

  • Updated oEmbed endpoints
  • Fixed embed code for Instagram #456, #459

Security

  • Fixed a possible XML Quadratic Blowup vulnerability.

4.3.4 - 2021-06-22

Fixed

  • Urls of images should include the same url for the $info->image value. #452

4.3.3 - 2021-06-22

Fixed

  • Facebook embed redirects to /login. #450, #451

4.3.2 - 2021-04-04

Fixed

  • Add configured oEmbed query parameters to all oEmbed endpoints #437
  • Updated oEmbed endpoints.
  • Replaced Travis with Github workflows for testing

4.3.1 - 2021-03-21

Added

  • Support for binary files (video, audio, images, etc) #412 #413

Fixed

  • Oembed for facebook photos #405 #406
  • Oembed for facebook videos #432 #433
  • Added more ways to detect data using meta tags #427
  • Bandcamp provider name #429 #430

4.3.0 - 2020-11-04

Added

  • New function $embed->setSettings() to pass the settings before get the site info

Fixed

  • PHP 8 compatibility #394
  • Facebook and Instagram adapted to the new API changes #392 #399

4.2.7 - 2020-09-23

Added

  • New option twitch:parent to fix Twitch embed with iframes #384

Fixed

  • Added datePublished check to PublishedTime extractor #385 #386
  • Added @property-read for IDE suppport #387 #388

4.2.6 - 2020-08-28

Fixed

  • Code width and height when the provided value is not numeric (ex: 100%) #380

4.2.5 - 2020-08-01

Fixed

  • Github TypeError exception with some urls #375

4.2.4 - 2020-07-06

Fixed

  • Ignore invalid urls instead throw an exception
  • Updated oembed list of endpoints

4.2.3 - 2020-06-12

Fixed

  • Suppport for other non-latin alphabets such Persian or Arabic #366

4.2.2 - 2020-05-31

Fixed

  • Provided a fallback for oEmbed compatible sites like Instagram that redirects to login page #357

4.2.1 - 2020-05-25

Fixed

  • Redirect urls like t.co.

4.2.0 - 2020-05-23

Added

  • Added the ignored_errors settings to ignore some curls errors instead throw an exception #355
  • Support for Twitch embeds #332

Fixed

  • Ignored linkedData errors #356

4.1.1 - 2020-04-24

Added

  • Updated oembed endpoints from oembed.com
  • Add support for tiktok.com

4.1.0 - 2020-04-19

Added

  • Ability to send settings to CurlClient. Added the cookies_path setting to customize the file used for cookies. #345
  • Document::selectCss() function to select elements using css selectors instead xpath (it requires symfony/css-selector)
  • Document::removeCss() function to remove elements using css selectors instead xpath (it requires symfony/css-selector)
  • Ability to configure OEmbed parameters from the outside using the oembed:query_parameters setting #346

4.0.0 - 2020-03-13

Full library refactoring.

Added

  • Support for multiple parallel request with curl_multi
  • Support for PSR-7 Http Messages, PSR-17 Http Factories and PSR-18 Http Client
  • cms value
  • language to detect the page language
  • languages to detect urls to versions in different languages
  • favicon to detect small favicons (16 or 32px)
  • icon to detect big icons (from 48px)

Changed

  • Changed providers (oEmbed, Html, OpenGraph etc) by independent detectors (title, url, language etc).
  • The tags value is renamed to keywords
  • Use Psr standards instead custom interfaces.
  • Improved tests using cached responses.

Removed

  • Support for PHP<7.4
  • type value (is was very confusing)
  • images value
  • providerImage (use favicon or icon instead)
  • Support for files (pdf, jpg, video, etc).