diff --git a/composer.json b/composer.json index b5779e385619ee9523b7af03e56f1b1e0f72622f..1e882992f822c349c5caec079b4ee3a65b8e957a 100644 --- a/composer.json +++ b/composer.json @@ -165,7 +165,7 @@ "drupal/twitter_block": "3.0-alpha1", "drupal/ultimate_cron": "^2.0@alpha", "drupal/userprotect": "1.1", - "drupal/video_embed_field": "2.4", + "drupal/video_embed_field": "2.5", "drupal/view_unpublished": "1.0", "drupal/views_ajax_history": "1.7", "drupal/views_autocomplete_filters": "1.3", diff --git a/composer.lock b/composer.lock index d2ce6f94d0bc8ffc3c57afddbe2551fefc744d29..9db35f1665eb9432ca99e9e225bfea6d4612df95 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "12bd67cbe8783bcbbc1e4c2879d4a532", + "content-hash": "eb946465456843157a6b08ca3538cf84", "packages": [ { "name": "alchemy/zippy", @@ -7437,31 +7437,31 @@ }, { "name": "drupal/video_embed_field", - "version": "2.4.0", + "version": "2.5.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/video_embed_field.git", - "reference": "8.x-2.4" + "reference": "8.x-2.5" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/video_embed_field-8.x-2.4.zip", - "reference": "8.x-2.4", - "shasum": "96b14bb93c1bb6a07b84315a4f87367870f8b574" + "url": "https://ftp.drupal.org/files/projects/video_embed_field-8.x-2.5.zip", + "reference": "8.x-2.5", + "shasum": "997ed67b6873e822fe628f87f65bd6da67e7350c" }, "require": { - "drupal/core": "^8.8 || ^9" + "drupal/core": "^9.2 || ^10" }, "require-dev": { - "drupal/ckeditor": "*", - "drupal/colorbox": "^1.0", + "drupal/ckeditor": "^1", + "drupal/colorbox": "^2", "drupal/video_embed_media": "*" }, "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-2.4", - "datestamp": "1587686337", + "version": "8.x-2.5", + "datestamp": "1671413311", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -7470,7 +7470,7 @@ }, "notification-url": "https://packages.drupal.org/8/downloads", "license": [ - "GPL-2.0+" + "GPL-2.0-or-later" ], "authors": [ { diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index a72151c77c8eb0c43635bfb2ac1ca2d834ac01a7..7824d8f7eafe8db890975f0fa2dfab31435900da 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -45,35 +45,34 @@ class ClassLoader /** @var \Closure(string):void */ private static $includeFile; - /** @var ?string */ + /** @var string|null */ private $vendorDir; // PSR-4 /** - * @var array[] - * @psalm-var array<string, array<string, int>> + * @var array<string, array<string, int>> */ private $prefixLengthsPsr4 = array(); /** - * @var array[] - * @psalm-var array<string, array<int, string>> + * @var array<string, list<string>> */ private $prefixDirsPsr4 = array(); /** - * @var array[] - * @psalm-var array<string, string> + * @var list<string> */ private $fallbackDirsPsr4 = array(); // PSR-0 /** - * @var array[] - * @psalm-var array<string, array<string, string[]>> + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array<string, array<string, list<string>>> */ private $prefixesPsr0 = array(); /** - * @var array[] - * @psalm-var array<string, string> + * @var list<string> */ private $fallbackDirsPsr0 = array(); @@ -81,8 +80,7 @@ class ClassLoader private $useIncludePath = false; /** - * @var string[] - * @psalm-var array<string, string> + * @var array<string, string> */ private $classMap = array(); @@ -90,21 +88,20 @@ class ClassLoader private $classMapAuthoritative = false; /** - * @var bool[] - * @psalm-var array<string, bool> + * @var array<string, bool> */ private $missingClasses = array(); - /** @var ?string */ + /** @var string|null */ private $apcuPrefix; /** - * @var self[] + * @var array<string, self> */ private static $registeredLoaders = array(); /** - * @param ?string $vendorDir + * @param string|null $vendorDir */ public function __construct($vendorDir = null) { @@ -113,7 +110,7 @@ public function __construct($vendorDir = null) } /** - * @return string[] + * @return array<string, list<string>> */ public function getPrefixes() { @@ -125,8 +122,7 @@ public function getPrefixes() } /** - * @return array[] - * @psalm-return array<string, array<int, string>> + * @return array<string, list<string>> */ public function getPrefixesPsr4() { @@ -134,8 +130,7 @@ public function getPrefixesPsr4() } /** - * @return array[] - * @psalm-return array<string, string> + * @return list<string> */ public function getFallbackDirs() { @@ -143,8 +138,7 @@ public function getFallbackDirs() } /** - * @return array[] - * @psalm-return array<string, string> + * @return list<string> */ public function getFallbackDirsPsr4() { @@ -152,8 +146,7 @@ public function getFallbackDirsPsr4() } /** - * @return string[] Array of classname => path - * @psalm-return array<string, string> + * @return array<string, string> Array of classname => path */ public function getClassMap() { @@ -161,8 +154,7 @@ public function getClassMap() } /** - * @param string[] $classMap Class to filename map - * @psalm-param array<string, string> $classMap + * @param array<string, string> $classMap Class to filename map * * @return void */ @@ -179,24 +171,25 @@ public function addClassMap(array $classMap) * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix + * @param list<string>|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories * * @return void */ public function add($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, - (array) $paths + $paths ); } @@ -205,19 +198,19 @@ public function add($prefix, $paths, $prepend = false) $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; + $this->prefixesPsr0[$first][$prefix] = $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], - (array) $paths + $paths ); } } @@ -226,9 +219,9 @@ public function add($prefix, $paths, $prepend = false) * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list<string>|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException * @@ -236,17 +229,18 @@ public function add($prefix, $paths, $prepend = false) */ public function addPsr4($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, - (array) $paths + $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { @@ -256,18 +250,18 @@ public function addPsr4($prefix, $paths, $prepend = false) throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; + $this->prefixDirsPsr4[$prefix] = $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], - (array) $paths + $paths ); } } @@ -276,8 +270,8 @@ public function addPsr4($prefix, $paths, $prepend = false) * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 base directories + * @param string $prefix The prefix + * @param list<string>|string $paths The PSR-0 base directories * * @return void */ @@ -294,8 +288,8 @@ public function set($prefix, $paths) * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list<string>|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException * @@ -481,9 +475,9 @@ public function findFile($class) } /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. + * Returns the currently registered loaders keyed by their corresponding vendor directories. * - * @return self[] + * @return array<string, self> */ public static function getRegisteredLoaders() { diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index c6b54af7ba2e1e3e960134233321efe47aa4528c..51e734a774b3ed9ca110a921cb40a74f8c7905c2 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -98,7 +98,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true) { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; } } @@ -119,7 +119,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true) */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { - $constraint = $parser->parseConstraints($constraint); + $constraint = $parser->parseConstraints((string) $constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); @@ -328,7 +328,9 @@ private static function getInstalled() if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ + $required = require $vendorDir.'/composer/installed.php'; + $installed[] = self::$installedByVendor[$vendorDir] = $required; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { self::$installed = $installed[count($installed) - 1]; } @@ -340,12 +342,17 @@ private static function getInstalled() // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = require __DIR__ . '/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; } else { self::$installed = array(); } } - $installed[] = self::$installed; + + if (self::$installed !== array()) { + $installed[] = self::$installed; + } return $installed; } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 2fcf345706031890568443c3e9832cd2f0981fd7..002646feece3b0b88ded6de5114bcb27835a907e 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -7703,31 +7703,32 @@ }, { "name": "drupal/video_embed_field", - "version": "2.4.0", - "version_normalized": "2.4.0.0", + "version": "2.5.0", + "version_normalized": "2.5.0.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/video_embed_field.git", - "reference": "8.x-2.4" + "reference": "8.x-2.5" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/video_embed_field-8.x-2.4.zip", - "reference": "8.x-2.4", - "shasum": "96b14bb93c1bb6a07b84315a4f87367870f8b574" + "url": "https://ftp.drupal.org/files/projects/video_embed_field-8.x-2.5.zip", + "reference": "8.x-2.5", + "shasum": "997ed67b6873e822fe628f87f65bd6da67e7350c" }, "require": { - "drupal/core": "^8.8 || ^9" + "drupal/core": "^9.2 || ^10" }, "require-dev": { - "drupal/colorbox": "^1.0", + "drupal/ckeditor": "^1", + "drupal/colorbox": "^2", "drupal/video_embed_media": "*" }, "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-2.4", - "datestamp": "1587686284", + "version": "8.x-2.5", + "datestamp": "1671413311", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -7737,12 +7738,12 @@ "installation-source": "dist", "notification-url": "https://packages.drupal.org/8/downloads", "license": [ - "GPL-2.0+" + "GPL-2.0-or-later" ], "authors": [ { - "name": "Sam152", - "homepage": "https://www.drupal.org/user/1485048" + "name": "abhinesh", + "homepage": "https://www.drupal.org/user/3645979" }, { "name": "jec006", @@ -7751,6 +7752,10 @@ { "name": "plopesc", "homepage": "https://www.drupal.org/user/282415" + }, + { + "name": "Sam152", + "homepage": "https://www.drupal.org/user/1485048" } ], "description": "A pluggable field type for storing videos from external video hosts such as Vimeo and YouTube.", diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 088738fa4f9f88fb0a0eef9bf580568f0ad8f777..19d1f4e1c34043ec02b2805b65a10843da628ab4 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'osu-asc-webservices/d8-upstream', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'bbc324b913982bc5f7acfcabab8daa2200f6622b', + 'reference' => '52c5f239f26a10cfa3c2d3933c105ad12c2230cf', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -1229,9 +1229,9 @@ 'dev_requirement' => false, ), 'drupal/video_embed_field' => array( - 'pretty_version' => '2.4.0', - 'version' => '2.4.0.0', - 'reference' => '8.x-2.4', + 'pretty_version' => '2.5.0', + 'version' => '2.5.0.0', + 'reference' => '8.x-2.5', 'type' => 'drupal-module', 'install_path' => __DIR__ . '/../../web/modules/video_embed_field', 'aliases' => array(), @@ -1549,7 +1549,7 @@ 'osu-asc-webservices/d8-upstream' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'bbc324b913982bc5f7acfcabab8daa2200f6622b', + 'reference' => '52c5f239f26a10cfa3c2d3933c105ad12c2230cf', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/web/modules/video_embed_field/composer.json b/web/modules/video_embed_field/composer.json index d68064ed002238c76562170425d1b769b9233b55..2ac92ff06bf0d232ab25d35d1d29ccefe8628a87 100644 --- a/web/modules/video_embed_field/composer.json +++ b/web/modules/video_embed_field/composer.json @@ -3,10 +3,7 @@ "description": "A pluggable field type for storing videos from external video hosts such as Vimeo and YouTube.", "type": "drupal-module", "homepage": "https://www.drupal.org/project/video_embed_field", - "license": "GPL-2.0+", - "require": { - "drupal/core": "^8.8 || ^9" - }, + "license": "GPL-2.0-or-later", "repositories": { "drupal": { "type": "composer", @@ -14,6 +11,7 @@ } }, "require-dev": { - "drupal/colorbox": "^1.0" + "drupal/ckeditor": "^1", + "drupal/colorbox": "^2" } } diff --git a/web/modules/video_embed_field/js/video-embed-field.colorbox.js b/web/modules/video_embed_field/js/video-embed-field.colorbox.js index 76b3809b00bb55719b58075d58ddf3126e1423b1..61cb4f6f845ce53ce906f90b01ee1ec60d36ded0 100644 --- a/web/modules/video_embed_field/js/video-embed-field.colorbox.js +++ b/web/modules/video_embed_field/js/video-embed-field.colorbox.js @@ -3,10 +3,10 @@ * The video_embed_field colorbox integration. */ -(function($) { +(function($, once) { Drupal.behaviors.video_embed_field_colorbox = { attach: function (context, settings) { - $('.video-embed-field-launch-modal', context).once().click(function(e) { + $(once('video-embed-field-launch-modal', '.video-embed-field-launch-modal', context)).click(function(e) { // Allow the thumbnail that launches the modal to link to other places // such as video URL, so if the modal is sidestepped things degrade // gracefully. @@ -15,4 +15,4 @@ }); } }; -})(jQuery); +})(jQuery, once); diff --git a/web/modules/video_embed_field/js/video-embed-field.lazyLoad.js b/web/modules/video_embed_field/js/video-embed-field.lazyLoad.js index b22292022a5242e906581b9d423d382147c93ef0..21f1e82387f1f331379a460827444288fe7b2cb8 100644 --- a/web/modules/video_embed_field/js/video-embed-field.lazyLoad.js +++ b/web/modules/video_embed_field/js/video-embed-field.lazyLoad.js @@ -3,10 +3,10 @@ * The video_embed_field lazy loading videos. */ -(function($) { +(function($, once) { Drupal.behaviors.video_embed_field_lazyLoad = { attach: function (context, settings) { - $('.video-embed-field-lazy', context).once().click(function(e) { + $(once('video-embed-field-lazy', '.video-embed-field-lazy', context)).click(function(e) { // Swap the lightweight image for the heavy JavaScript. e.preventDefault(); var $el = $(this); @@ -14,4 +14,4 @@ }); } }; -})(jQuery); +})(jQuery, once); diff --git a/web/modules/video_embed_field/modules/video_embed_media/modules/vem_migrate_oembed/tests/src/Functional/oEmbedUpdateTest.php b/web/modules/video_embed_field/modules/video_embed_media/modules/vem_migrate_oembed/tests/src/Functional/oEmbedUpdateTest.php index 5f8aecdb2f24ab2370b7ecfc18cde8d6531dc815..2350b89d91a03b0b6a0d424b9d84be0b1bc9f58a 100644 --- a/web/modules/video_embed_field/modules/video_embed_media/modules/vem_migrate_oembed/tests/src/Functional/oEmbedUpdateTest.php +++ b/web/modules/video_embed_field/modules/video_embed_media/modules/vem_migrate_oembed/tests/src/Functional/oEmbedUpdateTest.php @@ -31,10 +31,10 @@ class oEmbedUpdateTest extends BrowserTestBase { public function testOEmbedUpdate() { $mediaType = $this->createMediaType('video_embed_field'); - $this->assertEqual($mediaType->getSource()->getPluginId(), 'video_embed_field'); + $this->assertEquals($mediaType->getSource()->getPluginId(), 'video_embed_field'); $sourceField = $mediaType->getSource()->getSourceFieldDefinition($mediaType); - $this->assertEqual($sourceField->getType(), 'video_embed_field'); + $this->assertEquals($sourceField->getType(), 'video_embed_field'); /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository */ $display_repository = $this->container->get('entity_display.repository'); @@ -42,7 +42,7 @@ public function testOEmbedUpdate() { $formDisplay = $display_repository->getFormDisplay('media', $mediaType->id()); $formField = $formDisplay->getComponent($sourceField->getName()); - $this->assertEqual($formField['type'], 'video_embed_field_textfield'); + $this->assertEquals($formField['type'], 'video_embed_field_textfield'); /** @var \Drupal\vem_migrate_oembed\VemMigrate $vemService */ $vemService = \Drupal::service('vem_migrate_oembed.migrate'); @@ -50,15 +50,15 @@ public function testOEmbedUpdate() { /** @var \Drupal\media\Entity\MediaType $mediaType */ $mediaType = MediaType::load($mediaType->id()); - $this->assertEqual($mediaType->getSource()->getPluginId(), 'oembed:video'); + $this->assertEquals($mediaType->getSource()->getPluginId(), 'oembed:video'); $sourceField = $mediaType->getSource()->getSourceFieldDefinition($mediaType); - $this->assertEqual($sourceField->getType(), 'string'); + $this->assertEquals($sourceField->getType(), 'string'); $formDisplay = $display_repository->getFormDisplay('media', $mediaType->id()); $formField = $formDisplay->getComponent($sourceField->getName()); - $this->assertEqual($formField['type'], 'oembed_textfield'); + $this->assertEquals($formField['type'], 'oembed_textfield'); } } diff --git a/web/modules/video_embed_field/modules/video_embed_media/modules/vem_migrate_oembed/vem_migrate_oembed.info.yml b/web/modules/video_embed_field/modules/video_embed_media/modules/vem_migrate_oembed/vem_migrate_oembed.info.yml index 97f2526523d168c999436e2cb1f0e9e525889aa7..cbb4020d714e181dfb14b6b1f57aae937c82f722 100644 --- a/web/modules/video_embed_field/modules/video_embed_media/modules/vem_migrate_oembed/vem_migrate_oembed.info.yml +++ b/web/modules/video_embed_field/modules/video_embed_media/modules/vem_migrate_oembed/vem_migrate_oembed.info.yml @@ -2,12 +2,12 @@ name: Video Embed Media - Migrate to core oEmbed type: module description: 'Provides a drush command to migrate to cores oEmbed' package: Video Embed Field -core_version_requirement: ^8.8 || ^9 +core_version_requirement: ^9.2 || ^10 dependencies: - drupal:media (>= 8.6) - video_embed_field:video_embed_media -# Information added by Drupal.org packaging script on 2020-04-23 -version: '8.x-2.4' +# Information added by Drupal.org packaging script on 2022-12-19 +version: '8.x-2.5' project: 'video_embed_field' -datestamp: 1587686287 +datestamp: 1671413313 diff --git a/web/modules/video_embed_field/modules/video_embed_media/tests/src/Functional/BundleTest.php b/web/modules/video_embed_field/modules/video_embed_media/tests/src/Functional/BundleTest.php index 833cf5bd0c32179d29eb2c050f2b8d6bbf69a812..23071d8190783faa0db35ae25436e165db08548c 100644 --- a/web/modules/video_embed_field/modules/video_embed_media/tests/src/Functional/BundleTest.php +++ b/web/modules/video_embed_field/modules/video_embed_media/tests/src/Functional/BundleTest.php @@ -24,7 +24,7 @@ class BundleTest extends MediaFunctionalTestBase { * * @var array */ - public static $modules = [ + protected static $modules = [ 'video_embed_field', 'video_embed_media', ]; @@ -63,7 +63,7 @@ public function testMediaBundleCreation() { 'field_media_video_embed_field[0][value]' => 'https://www.youtube.com/watch?v=XgYu7-DQjDQ', ], 'Save'); // We should see the video thumbnail on the media page. - $this->assertContains('video_thumbnails/XgYu7-DQjDQ.jpg', $this->getSession()->getPage()->getHtml()); + $this->assertStringContainsString('video_thumbnails/XgYu7-DQjDQ.jpg', $this->getSession()->getPage()->getHtml()); } } diff --git a/web/modules/video_embed_field/modules/video_embed_media/tests/src/Kernel/DefaultNameTest.php b/web/modules/video_embed_field/modules/video_embed_media/tests/src/Kernel/DefaultNameTest.php index 71503730dbb477b96da3055cdf0a9b35fe7dd241..8bd73ced92c809734c098ebc077915edd9613646 100644 --- a/web/modules/video_embed_field/modules/video_embed_media/tests/src/Kernel/DefaultNameTest.php +++ b/web/modules/video_embed_field/modules/video_embed_media/tests/src/Kernel/DefaultNameTest.php @@ -31,7 +31,7 @@ class DefaultNameTest extends MediaKernelTestBase { * * @var array */ - public static $modules = [ + protected static $modules = [ 'video_embed_field', 'video_embed_media', 'media', @@ -73,7 +73,7 @@ public function testDefaultName($input, $expected) { /** * {@inheritdoc} */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->installConfig(['video_embed_field', 'video_embed_media']); diff --git a/web/modules/video_embed_field/modules/video_embed_media/tests/src/Kernel/ProvidedFieldsTest.php b/web/modules/video_embed_field/modules/video_embed_media/tests/src/Kernel/ProvidedFieldsTest.php index b7ef9e8883b20fe8be705f83ab208dae005dfd15..8b349fad277a362dccea072b7de04db01e77c41b 100644 --- a/web/modules/video_embed_field/modules/video_embed_media/tests/src/Kernel/ProvidedFieldsTest.php +++ b/web/modules/video_embed_field/modules/video_embed_media/tests/src/Kernel/ProvidedFieldsTest.php @@ -32,7 +32,7 @@ class ProvidedFieldsTest extends MediaKernelTestBase { * * @var array */ - public static $modules = [ + protected static $modules = [ 'video_embed_media', 'video_embed_field', ]; @@ -114,7 +114,7 @@ public function testProvidedFields($input, $field, $expected) { /** * {@inheritdoc} */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->entityType = $this->createMediaType('video_embed_field'); diff --git a/web/modules/video_embed_field/modules/video_embed_media/video_embed_media.info.yml b/web/modules/video_embed_field/modules/video_embed_media/video_embed_media.info.yml index 6f6fd480f9a2574df5abc80c96cfad859b5f602d..5d0bee9a434209cbefd603a81f14969fa82bcb14 100644 --- a/web/modules/video_embed_field/modules/video_embed_media/video_embed_media.info.yml +++ b/web/modules/video_embed_field/modules/video_embed_media/video_embed_media.info.yml @@ -2,12 +2,12 @@ name: Video Embed Media type: module description: 'Integrates video_embed_field with the Media module, creating a new media type tailored to display embedded videos. Useful for websites which are using the media suite of modules.' package: Video Embed Field -core_version_requirement: ^8.8 || ^9 +core_version_requirement: ^9.2 || ^10 dependencies: - drupal:media (>= 8.4) - video_embed_field:video_embed_field -# Information added by Drupal.org packaging script on 2020-04-23 -version: '8.x-2.4' +# Information added by Drupal.org packaging script on 2022-12-19 +version: '8.x-2.5' project: 'video_embed_field' -datestamp: 1587686287 +datestamp: 1671413313 diff --git a/web/modules/video_embed_field/modules/video_embed_media/video_embed_media.install b/web/modules/video_embed_field/modules/video_embed_media/video_embed_media.install index 144423bc1636863f313efafce233686f6c600b8e..3e1913f8b6a68749a2227d0473aabe901489fdb6 100644 --- a/web/modules/video_embed_field/modules/video_embed_media/video_embed_media.install +++ b/web/modules/video_embed_field/modules/video_embed_media/video_embed_media.install @@ -14,7 +14,7 @@ function video_embed_media_install() { /** @var \Drupal\Core\File\FileSystemInterface $file_system */ $file_system = \Drupal::service('file_system'); // Copy the video icons into the right place. - $icon_folder = drupal_get_path('module', 'video_embed_media') . '/images/icons'; + $icon_folder = \Drupal::service('extension.list.module')->getPath('video_embed_media') . '/images/icons'; $destination = \Drupal::config('media.settings')->get('icon_base_uri'); $file_system->prepareDirectory($destination, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS); diff --git a/web/modules/video_embed_field/modules/video_embed_wysiwyg/src/Plugin/CKEditorPlugin/VideoEmbedWysiwyg.php b/web/modules/video_embed_field/modules/video_embed_wysiwyg/src/Plugin/CKEditorPlugin/VideoEmbedWysiwyg.php index 096621004f8dd6810c4382e752059d6c3becd74f..7cb37eaca5816a3ed267529a62c01f8f4402e947 100644 --- a/web/modules/video_embed_field/modules/video_embed_wysiwyg/src/Plugin/CKEditorPlugin/VideoEmbedWysiwyg.php +++ b/web/modules/video_embed_field/modules/video_embed_wysiwyg/src/Plugin/CKEditorPlugin/VideoEmbedWysiwyg.php @@ -24,7 +24,7 @@ class VideoEmbedWysiwyg extends CKEditorPluginBase implements CKEditorPluginConf * {@inheritdoc} */ public function getFile() { - return drupal_get_path('module', 'video_embed_wysiwyg') . '/plugin/plugin.js'; + return \Drupal::service('extension.list.module')->getPath('video_embed_wysiwyg') . '/plugin/plugin.js'; } /** @@ -34,7 +34,7 @@ public function getButtons() { return [ 'video_embed' => [ 'label' => $this->t('Video Embed'), - 'image' => drupal_get_path('module', 'video_embed_wysiwyg') . '/plugin/icon.png', + 'image' => \Drupal::service('extension.list.module')->getPath('video_embed_wysiwyg') . '/plugin/icon.png', ], ]; } diff --git a/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/Functional/TextFormatConfigurationTest.php b/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/Functional/TextFormatConfigurationTest.php index 6eb18e0898acd879bcbf74a3c8d915b1cdd35e74..b4fdc049f68371e776a032f93f80fc988065dff7 100644 --- a/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/Functional/TextFormatConfigurationTest.php +++ b/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/Functional/TextFormatConfigurationTest.php @@ -22,7 +22,7 @@ class TextFormatConfigurationTest extends BrowserTestBase { /** * {@inheritdoc} */ - public static $modules = [ + protected static $modules = [ 'video_embed_field', 'video_embed_wysiwyg', 'editor', @@ -42,7 +42,7 @@ class TextFormatConfigurationTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->drupalLogin($this->createAdminUser()); diff --git a/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/FunctionalJavascript/EmbedDialogTest.php b/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/FunctionalJavascript/EmbedDialogTest.php index 0056748b4b2e5da8adb0360ab46a3af3c806f8c3..7f87916d5658ffa5ae69117d74464a957689dbfa 100644 --- a/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/FunctionalJavascript/EmbedDialogTest.php +++ b/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/FunctionalJavascript/EmbedDialogTest.php @@ -24,7 +24,7 @@ class EmbedDialogTest extends WebDriverTestBase { * * @var array */ - public static $modules = [ + protected static $modules = [ 'video_embed_field', 'video_embed_wysiwyg', 'editor', @@ -44,7 +44,7 @@ class EmbedDialogTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->adminUser = $this->drupalCreateUser(array_keys($this->container->get('user.permissions')->getPermissions())); $this->drupalLogin($this->adminUser); @@ -96,7 +96,7 @@ public function testEmbedDialog() { $this->find('button.form-submit')->click(); $this->assertSession()->assertWaitOnAjaxRequest(); $this->assertSession()->pageTextContains('Could not find a video provider to handle the given URL.'); - $this->assertContains('http://example.com/', $this->getSession()->getPage()->getHtml()); + $this->assertStringContainsString('http://example.com/', $this->getSession()->getPage()->getHtml()); // Submit a valid URL. $this->find('input[name="video_url"]')->setValue('https://www.youtube.com/watch?v=iaf3Sl2r3jE&t=1553s'); diff --git a/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/Kernel/FilterTest.php b/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/Kernel/FilterTest.php index 417236cd4d77313fa97c360f6e00e9535f2e557e..41cdc1774be8d65766c3264cb7ded1f9f717a417 100644 --- a/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/Kernel/FilterTest.php +++ b/web/modules/video_embed_field/modules/video_embed_wysiwyg/tests/src/Kernel/FilterTest.php @@ -17,7 +17,7 @@ class FilterTest extends KernelTestBase { * * @var array */ - public static $modules = [ + protected static $modules = [ 'user', 'system', 'field', @@ -104,7 +104,7 @@ public function testVideoFilter($content, $expected) { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->filter = FilterFormat::create([ 'format' => 'test_format', diff --git a/web/modules/video_embed_field/modules/video_embed_wysiwyg/video_embed_wysiwyg.info.yml b/web/modules/video_embed_field/modules/video_embed_wysiwyg/video_embed_wysiwyg.info.yml index b3faea29fa521c23e922c9e2bbb62d0290b606ac..bd88082f08dd370543c1165f6ea50e076ba5fbc4 100644 --- a/web/modules/video_embed_field/modules/video_embed_wysiwyg/video_embed_wysiwyg.info.yml +++ b/web/modules/video_embed_field/modules/video_embed_wysiwyg/video_embed_wysiwyg.info.yml @@ -2,13 +2,13 @@ name: Video Embed WYSIWYG type: module description: 'Integrates video_embed_field directly into ckeditor. Useful for websites not using the media suite of modules that need WYSIWYG support.' package: Video Embed Field -core_version_requirement: ^8.8 || ^9 +core_version_requirement: ^9.2 || ^10 dependencies: - drupal:field - drupal:ckeditor - video_embed_field:video_embed_field -# Information added by Drupal.org packaging script on 2020-04-23 -version: '8.x-2.4' +# Information added by Drupal.org packaging script on 2022-12-19 +version: '8.x-2.5' project: 'video_embed_field' -datestamp: 1587686287 +datestamp: 1671413313 diff --git a/web/modules/video_embed_field/modules/video_embed_wysiwyg/video_embed_wysiwyg.module b/web/modules/video_embed_field/modules/video_embed_wysiwyg/video_embed_wysiwyg.module index 71bc01ab9fd161b858f7a2bc69619c7d7b1f79f1..bd05974329452f13c282222200c2e7f18501be8f 100644 --- a/web/modules/video_embed_field/modules/video_embed_wysiwyg/video_embed_wysiwyg.module +++ b/web/modules/video_embed_field/modules/video_embed_wysiwyg/video_embed_wysiwyg.module @@ -15,7 +15,7 @@ * Implements hook_ckeditor_css_alter(). */ function video_embed_wysiwyg_ckeditor_css_alter(array &$css, Editor $editor) { - $css[] = drupal_get_path('module', 'video_embed_wysiwyg') . '/plugin/plugin.css'; + $css[] = \Drupal::service('extension.list.module')->getPath('video_embed_wysiwyg') . '/plugin/plugin.css'; } /** @@ -32,7 +32,8 @@ function video_embed_wysiwyg_form_filter_format_form_alter(&$form, $form_state, function video_embed_wysiwyg_toolbar_filter_validate($form, FormStateInterface $form_state) { $filter_enabled = !empty($form_state->getValue(['filters', 'video_embed_wysiwyg', 'status'])); $button_enabled = FALSE; - $button_rows = json_decode($form_state->getValue(['editor', 'settings', 'toolbar', 'button_groups']), TRUE); + $key = ['editor', 'settings', 'toolbar', 'button_groups']; + $button_rows = $form_state->hasValue($key) ? json_decode($form_state->getValue($key), TRUE) : []; if (!empty($button_rows)) { foreach ($button_rows as $button_row) { foreach ($button_row as $button_group) { diff --git a/web/modules/video_embed_field/tests/modules/video_embed_field_mock_provider/video_embed_field_mock_provider.info.yml b/web/modules/video_embed_field/tests/modules/video_embed_field_mock_provider/video_embed_field_mock_provider.info.yml index ced80a9b34e1184c7802ef3c587546fa3e8b6a11..9cd089b065622cd855031afc77d2790dad89ae4a 100644 --- a/web/modules/video_embed_field/tests/modules/video_embed_field_mock_provider/video_embed_field_mock_provider.info.yml +++ b/web/modules/video_embed_field/tests/modules/video_embed_field_mock_provider/video_embed_field_mock_provider.info.yml @@ -4,7 +4,7 @@ type: module hidden: true package: Testing -# Information added by Drupal.org packaging script on 2020-04-23 -version: '8.x-2.4' +# Information added by Drupal.org packaging script on 2022-12-19 +version: '8.x-2.5' project: 'video_embed_field' -datestamp: 1587686287 +datestamp: 1671413313 diff --git a/web/modules/video_embed_field/tests/src/Functional/AutoplayPermissionTest.php b/web/modules/video_embed_field/tests/src/Functional/AutoplayPermissionTest.php index e66e03879214e2bffd13ee17ed228cd39cba1bec..4a4b7d430a2e94e47caf5ef03e73cc44218a609f 100644 --- a/web/modules/video_embed_field/tests/src/Functional/AutoplayPermissionTest.php +++ b/web/modules/video_embed_field/tests/src/Functional/AutoplayPermissionTest.php @@ -17,7 +17,7 @@ class AutoplayPermissionTest extends BrowserTestBase { */ protected $defaultTheme = 'stark'; - public static $modules = [ + protected static $modules = [ 'video_embed_field', 'node', ]; diff --git a/web/modules/video_embed_field/tests/src/Functional/FieldConfigurationTest.php b/web/modules/video_embed_field/tests/src/Functional/FieldConfigurationTest.php index 25a4e4a0beee298dbc4faac34d0c8c64bd19418f..e2f111f660bb5d790fa901c9fd05f528a79db8f0 100644 --- a/web/modules/video_embed_field/tests/src/Functional/FieldConfigurationTest.php +++ b/web/modules/video_embed_field/tests/src/Functional/FieldConfigurationTest.php @@ -22,7 +22,7 @@ class FieldConfigurationTest extends BrowserTestBase { /** * {@inheritdoc} */ - public static $modules = [ + protected static $modules = [ 'field_ui', 'node', 'video_embed_field', diff --git a/web/modules/video_embed_field/tests/src/Functional/FormatterConfigurationTest.php b/web/modules/video_embed_field/tests/src/Functional/FormatterConfigurationTest.php index 016d5ba2511e251ab9b851c90620864e9f6ffcef..d7714fdeaf763525b2d58fcda7e9b09c4be51c5c 100644 --- a/web/modules/video_embed_field/tests/src/Functional/FormatterConfigurationTest.php +++ b/web/modules/video_embed_field/tests/src/Functional/FormatterConfigurationTest.php @@ -23,7 +23,7 @@ class FormatterConfigurationTest extends BrowserTestBase { /** * {@inheritdoc} */ - public static $modules = [ + protected static $modules = [ 'video_embed_field', 'node', 'field_ui', @@ -40,7 +40,7 @@ class FormatterConfigurationTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->drupalLogin($this->createAdminUser()); $this->setupEntityDisplays(); diff --git a/web/modules/video_embed_field/tests/src/Functional/InstallationTest.php b/web/modules/video_embed_field/tests/src/Functional/InstallationTest.php index 735e741da7bb66caa45f801f51b12bbdeafc48a1..1e21c9937035a103c5e4a36fb0bf6cad108d7417 100644 --- a/web/modules/video_embed_field/tests/src/Functional/InstallationTest.php +++ b/web/modules/video_embed_field/tests/src/Functional/InstallationTest.php @@ -21,7 +21,7 @@ class InstallationTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->drupalLogin($this->createAdminUser()); } @@ -58,11 +58,13 @@ protected function assertInstallationStatus($installed) { * Uninstall the module using the UI. */ protected function uninstallModules() { - $this->drupalPostForm('admin/modules/uninstall', [ + $this->drupalGet('admin/modules/uninstall'); + $this->submitForm([ 'uninstall[video_embed_wysiwyg]' => TRUE, ], 'Uninstall'); $this->getSession()->getPage()->pressButton('Uninstall'); - $this->drupalPostForm('admin/modules/uninstall', [ + $this->drupalGet('admin/modules/uninstall'); + $this->submitForm([ 'uninstall[video_embed_field]' => TRUE, ], 'Uninstall'); $this->getSession()->getPage()->pressButton('Uninstall'); @@ -72,7 +74,8 @@ protected function uninstallModules() { * Install the modules using the UI. */ protected function installModules() { - $this->drupalPostForm('admin/modules', [ + $this->drupalGet('admin/modules'); + $this->submitForm([ 'modules[video_embed_field][enable]' => TRUE, 'modules[video_embed_wysiwyg][enable]' => TRUE, ], 'Install'); diff --git a/web/modules/video_embed_field/tests/src/Functional/WidgetTest.php b/web/modules/video_embed_field/tests/src/Functional/WidgetTest.php index 3b0be3f5907b6b36d13e666c5a71d24e734270f3..197650548ba6f46043e04f56ddf7483647b439be 100644 --- a/web/modules/video_embed_field/tests/src/Functional/WidgetTest.php +++ b/web/modules/video_embed_field/tests/src/Functional/WidgetTest.php @@ -23,7 +23,7 @@ class WidgetTest extends BrowserTestBase { /** * {@inheritdoc} */ - public static $modules = [ + protected static $modules = [ 'field_ui', 'node', 'video_embed_field', diff --git a/web/modules/video_embed_field/tests/src/FunctionalJavascript/ColorboxFormatterTest.php b/web/modules/video_embed_field/tests/src/FunctionalJavascript/ColorboxFormatterTest.php index 3c6acabac106d95f5d1cc5eac72bf267a4defe06..7c9feca06c7f51cb2fc1b0d7f0a1ca9b88a94a1f 100644 --- a/web/modules/video_embed_field/tests/src/FunctionalJavascript/ColorboxFormatterTest.php +++ b/web/modules/video_embed_field/tests/src/FunctionalJavascript/ColorboxFormatterTest.php @@ -22,7 +22,7 @@ class ColorboxFormatterTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public static $modules = [ + protected static $modules = [ 'node', 'colorbox', 'video_embed_field', @@ -38,7 +38,7 @@ class ColorboxFormatterTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->setupEntityDisplays(); } diff --git a/web/modules/video_embed_field/tests/src/FunctionalJavascript/LazyLoadFormatterTest.php b/web/modules/video_embed_field/tests/src/FunctionalJavascript/LazyLoadFormatterTest.php index f01db68cdd39ab0d8574355d673262a8e680e8bc..58137d1a9473036f1cb76b1298a49c5506e63552 100644 --- a/web/modules/video_embed_field/tests/src/FunctionalJavascript/LazyLoadFormatterTest.php +++ b/web/modules/video_embed_field/tests/src/FunctionalJavascript/LazyLoadFormatterTest.php @@ -22,7 +22,7 @@ class LazyLoadFormatterTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public static $modules = [ + protected static $modules = [ 'node', 'video_embed_field', 'video_embed_field_mock_provider', @@ -31,7 +31,7 @@ class LazyLoadFormatterTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->setupEntityDisplays(); } diff --git a/web/modules/video_embed_field/tests/src/Kernel/ConstraintTest.php b/web/modules/video_embed_field/tests/src/Kernel/ConstraintTest.php index b96e432944123dc85ec44467a7994282d11e1d91..afa3fd6ee9f01548f1035cf46bd98836e30d6526 100644 --- a/web/modules/video_embed_field/tests/src/Kernel/ConstraintTest.php +++ b/web/modules/video_embed_field/tests/src/Kernel/ConstraintTest.php @@ -25,7 +25,7 @@ class ConstraintTest extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); diff --git a/web/modules/video_embed_field/tests/src/Kernel/Drupal6EmfieldMigrationTest.php b/web/modules/video_embed_field/tests/src/Kernel/Drupal6EmfieldMigrationTest.php index d52453608d19e7ec652e8644ad4f8e92988ed716..c8ac14be43ffee45a0befa3a76620fc245bbd748 100644 --- a/web/modules/video_embed_field/tests/src/Kernel/Drupal6EmfieldMigrationTest.php +++ b/web/modules/video_embed_field/tests/src/Kernel/Drupal6EmfieldMigrationTest.php @@ -21,7 +21,7 @@ class Drupal6EmfieldMigrationTest extends MigrateDrupal6TestBase { /** * {@inheritdoc} */ - public static $modules = [ + protected static $modules = [ 'video_embed_field', ]; diff --git a/web/modules/video_embed_field/tests/src/Kernel/Drupal7MigrationTest.php b/web/modules/video_embed_field/tests/src/Kernel/Drupal7MigrationTest.php index 75d763fe2cfea256950ae0df251dc3cf8bac4f63..b18bf1ef0a3e784303b3661ca2ff5518cfeae96a 100644 --- a/web/modules/video_embed_field/tests/src/Kernel/Drupal7MigrationTest.php +++ b/web/modules/video_embed_field/tests/src/Kernel/Drupal7MigrationTest.php @@ -21,7 +21,7 @@ class Drupal7MigrationTest extends MigrateDrupal7TestBase { /** * {@inheritdoc} */ - public static $modules = [ + protected static $modules = [ 'video_embed_field', 'comment', 'datetime', @@ -44,7 +44,7 @@ protected function getFixtureFilePath() { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('node'); diff --git a/web/modules/video_embed_field/tests/src/Kernel/EntityLoadTrait.php b/web/modules/video_embed_field/tests/src/Kernel/EntityLoadTrait.php index 2089e8922e16b5a7e880665ece4638156a8b1a11..b2e6338c74f445d460085c4e6b1de99faa3c1268 100644 --- a/web/modules/video_embed_field/tests/src/Kernel/EntityLoadTrait.php +++ b/web/modules/video_embed_field/tests/src/Kernel/EntityLoadTrait.php @@ -21,7 +21,10 @@ trait EntityLoadTrait { protected function loadEntityByLabel($label, $entity_type = 'node') { $type_manager = \Drupal::entityTypeManager(); $label_key = $type_manager->getDefinition($entity_type)->getKey('label'); - $entities = \Drupal::entityQuery($entity_type)->condition($label_key, $label, '=')->execute(); + $entities = \Drupal::entityQuery($entity_type) + ->accessCheck(TRUE) + ->condition($label_key, $label, '=') + ->execute(); return $type_manager->getStorage($entity_type)->load(array_shift($entities)); } diff --git a/web/modules/video_embed_field/tests/src/Kernel/FormatterDependenciesTest.php b/web/modules/video_embed_field/tests/src/Kernel/FormatterDependenciesTest.php index 27f579aba069464b70491cbedc53bb8321398b16..d685fd40f62456898a55c79100cef4ce37670e42 100644 --- a/web/modules/video_embed_field/tests/src/Kernel/FormatterDependenciesTest.php +++ b/web/modules/video_embed_field/tests/src/Kernel/FormatterDependenciesTest.php @@ -35,7 +35,7 @@ class FormatterDependenciesTest extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->style = ImageStyle::create(['name' => 'style_foo', 'label' => $this->randomString()]); diff --git a/web/modules/video_embed_field/tests/src/Kernel/KernelTestBase.php b/web/modules/video_embed_field/tests/src/Kernel/KernelTestBase.php index 3276290f875670f6cf506c3155a27a76b5d8d9d7..961f383de0c97367a9c12b4c4bb408793505516d 100644 --- a/web/modules/video_embed_field/tests/src/Kernel/KernelTestBase.php +++ b/web/modules/video_embed_field/tests/src/Kernel/KernelTestBase.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\video_embed_field\Kernel; +use Drupal\colorbox\ColorboxAttachment; use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\Core\File\FileSystemInterface; use Drupal\field\Entity\FieldConfig; @@ -32,7 +33,7 @@ abstract class KernelTestBase extends CoreKernelTestBase { * * @var array */ - public static $modules = [ + protected static $modules = [ 'colorbox', 'user', 'system', @@ -47,7 +48,7 @@ abstract class KernelTestBase extends CoreKernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema($this->entityTypeId); @@ -75,7 +76,7 @@ protected function setUp() { $this->container->set('http_client', new MockHttpClient()); // Shim in a service required from the colorbox module. - $colorbox_mock = $this->getMockBuilder('ColorboxAttachment')->setMethods(['attach'])->getMock(); + $colorbox_mock = $this->createMock(ColorboxAttachment::class); $this->container->set('colorbox.attachment', $colorbox_mock); } diff --git a/web/modules/video_embed_field/tests/src/Kernel/MockHttpClient.php b/web/modules/video_embed_field/tests/src/Kernel/MockHttpClient.php index 58ade66ad82b2b22d399a60bc9517e4d453c7711..d555d1f6a6a555262221a9ee25cb523d4f82d33f 100644 --- a/web/modules/video_embed_field/tests/src/Kernel/MockHttpClient.php +++ b/web/modules/video_embed_field/tests/src/Kernel/MockHttpClient.php @@ -3,7 +3,9 @@ namespace Drupal\Tests\video_embed_field\Kernel; use GuzzleHttp\ClientInterface; +use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; /** * An exceptional HTTP client mock. @@ -18,35 +20,35 @@ class MockHttpClient implements ClientInterface { /** * {@inheritdoc} */ - public function send(RequestInterface $request, array $options = []) { + public function send(RequestInterface $request, array $options = []): ResponseInterface { throw new \Exception(static::EXCEPTION_MESSAGE); } /** * {@inheritdoc} */ - public function sendAsync(RequestInterface $request, array $options = []) { + public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface { throw new \Exception(static::EXCEPTION_MESSAGE); } /** * {@inheritdoc} */ - public function request($method, $uri, array $options = []) { + public function request($method, $uri, array $options = []): ResponseInterface { throw new \Exception(static::EXCEPTION_MESSAGE); } /** * {@inheritdoc} */ - public function requestAsync($method, $uri, array $options = []) { + public function requestAsync($method, $uri, array $options = []): PromiseInterface { throw new \Exception(static::EXCEPTION_MESSAGE); } /** * {@inheritdoc} */ - public function getConfig($option = NULL) { + public function getConfig(?string $option = NULL) { throw new \Exception(static::EXCEPTION_MESSAGE); } diff --git a/web/modules/video_embed_field/tests/src/Unit/ProviderManagerTest.php b/web/modules/video_embed_field/tests/src/Unit/ProviderManagerTest.php index 65e5bf2fdf779c3a932c8cf952a8ece81c4495c5..57151f93c8d0e4987c7f1f6d9672f0e6e5dcdc99 100644 --- a/web/modules/video_embed_field/tests/src/Unit/ProviderManagerTest.php +++ b/web/modules/video_embed_field/tests/src/Unit/ProviderManagerTest.php @@ -104,7 +104,7 @@ protected function getManagerMock() { $definitions = $this->mockProviders; $manager = $this->getMockBuilder('Drupal\video_embed_field\ProviderManager') ->disableOriginalConstructor() - ->setMethods(['getDefinitions', 'getDefinition', 'createInstance']) + ->onlyMethods(['getDefinitions', 'getDefinition', 'createInstance']) ->getMock(); $manager ->method('getDefinitions') diff --git a/web/modules/video_embed_field/video_embed_field.info.yml b/web/modules/video_embed_field/video_embed_field.info.yml index 35254ab046685ccd50c206b42c14faaccfafbc03..02218b7263e0f0bab1cf6ab5f0ace426ae0ff5e6 100644 --- a/web/modules/video_embed_field/video_embed_field.info.yml +++ b/web/modules/video_embed_field/video_embed_field.info.yml @@ -2,7 +2,7 @@ name: Video Embed Field type: module description: 'Provides a field type for displaying videos from 3rd party providers such as YouTube and Vimeo.' package: Video Embed Field -core_version_requirement: ^8.8 || ^9 +core_version_requirement: ^9.2 || ^10 dependencies: - drupal:field - drupal:image @@ -11,7 +11,7 @@ dependencies: test_dependencies: - colorbox:colorbox -# Information added by Drupal.org packaging script on 2020-04-23 -version: '8.x-2.4' +# Information added by Drupal.org packaging script on 2022-12-19 +version: '8.x-2.5' project: 'video_embed_field' -datestamp: 1587686287 +datestamp: 1671413313 diff --git a/web/modules/video_embed_field/video_embed_field.libraries.yml b/web/modules/video_embed_field/video_embed_field.libraries.yml index b8728f5f2963b74573c614b8023fd9d8a7c61065..4981b514e15552c8f374bbda6e1544f5191f8542 100644 --- a/web/modules/video_embed_field/video_embed_field.libraries.yml +++ b/web/modules/video_embed_field/video_embed_field.libraries.yml @@ -4,6 +4,7 @@ colorbox: dependencies: - system/drupal.system - colorbox/colorbox + - core/once lazy-load: js: @@ -11,6 +12,7 @@ lazy-load: dependencies: - system/drupal.system - video_embed_field/responsive-video + - core/once responsive-video: css: