From 7db3edd0f51eccc0fc64c631dcdf7afe7515add5 Mon Sep 17 00:00:00 2001 From: Brian Canini <canini.16@osu.edu> Date: Wed, 27 Jan 2021 15:51:01 -0500 Subject: [PATCH] Updating drupal/libraries (3.0.0-alpha6 => 3.0.0-beta1) --- composer.json | 2 +- composer.lock | 24 +++++++++++-------- vendor/composer/installed.json | 24 +++++++++++-------- web/modules/libraries/composer.json | 2 +- web/modules/libraries/libraries.info.yml | 6 ++--- .../InvalidLibraryDependencyException.php | 6 +++-- .../Local/LocalLibraryTrait.php | 4 ++-- .../Plugin/libraries/Locator/UriLocator.php | 2 +- .../libraries/Type/AssetLibraryType.php | 2 +- .../Type/MultipleAssetLibraryType.php | 2 +- .../LibraryDefinitionsStream.php | 7 +++--- .../libraries/src/Tests/LibrariesWebTest.php | 2 +- .../example_info_file.libraries.info.yml | 6 ++--- .../libraries_test/libraries_test.info.yml | 8 +++---- .../DefinitionDiscoveryFactoryTest.php | 6 ++--- 15 files changed, 57 insertions(+), 46 deletions(-) diff --git a/composer.json b/composer.json index 6c97470805..c3332f8042 100644 --- a/composer.json +++ b/composer.json @@ -132,7 +132,7 @@ "drupal/honeypot": "1.30", "drupal/image_popup": "1.1", "drupal/inline_entity_form": "1.0-rc8", - "drupal/libraries": "3.0.0-alpha6", + "drupal/libraries": "3.0-beta1", "drupal/link_attributes": "1.11", "drupal/linkit": "5.0-beta12", "drupal/magnific_popup": "1.3", diff --git a/composer.lock b/composer.lock index 3cfc95e144..9572411df5 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": "483958ad644d5bd3351af88c32212e2b", + "content-hash": "6757355e5e9f7fa2ff464b1842a5f2bd", "packages": [ { "name": "alchemy/zippy", @@ -5476,17 +5476,17 @@ }, { "name": "drupal/libraries", - "version": "3.0.0-alpha6", + "version": "3.0.0-beta1", "source": { "type": "git", "url": "https://git.drupalcode.org/project/libraries.git", - "reference": "8.x-3.0-alpha6" + "reference": "8.x-3.0-beta1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/libraries-8.x-3.0-alpha6.zip", - "reference": "8.x-3.0-alpha6", - "shasum": "d2aaf7f0968a1864457a7741b7e38ab11ef83e2c" + "url": "https://ftp.drupal.org/files/projects/libraries-8.x-3.0-beta1.zip", + "reference": "8.x-3.0-beta1", + "shasum": "7843870c52251cc5290e1cdca94524f71edbf016" }, "require": { "drupal/core": "^8 || ^9" @@ -5494,17 +5494,17 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-3.0-alpha6", - "datestamp": "1608099124", + "version": "8.x-3.0-beta1", + "datestamp": "1609758293", "security-coverage": { "status": "not-covered", - "message": "Alpha releases are not covered by Drupal security advisories." + "message": "Beta releases are not covered by Drupal security advisories." } } }, "notification-url": "https://packages.drupal.org/8/downloads", "license": [ - "GPL-2.0+" + "GPL-2.0-or-later" ], "authors": [ { @@ -5515,6 +5515,10 @@ "name": "joseph.olstad", "homepage": "https://www.drupal.org/user/1321830" }, + { + "name": "podarok", + "homepage": "https://www.drupal.org/user/116002" + }, { "name": "rjacobs", "homepage": "https://www.drupal.org/user/422459" diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index e0aade52f2..3212c3fcb6 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -5640,18 +5640,18 @@ }, { "name": "drupal/libraries", - "version": "3.0.0-alpha6", - "version_normalized": "3.0.0.0-alpha6", + "version": "3.0.0-beta1", + "version_normalized": "3.0.0.0-beta1", "source": { "type": "git", "url": "https://git.drupalcode.org/project/libraries.git", - "reference": "8.x-3.0-alpha6" + "reference": "8.x-3.0-beta1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/libraries-8.x-3.0-alpha6.zip", - "reference": "8.x-3.0-alpha6", - "shasum": "d2aaf7f0968a1864457a7741b7e38ab11ef83e2c" + "url": "https://ftp.drupal.org/files/projects/libraries-8.x-3.0-beta1.zip", + "reference": "8.x-3.0-beta1", + "shasum": "7843870c52251cc5290e1cdca94524f71edbf016" }, "require": { "drupal/core": "^8 || ^9" @@ -5659,18 +5659,18 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-3.0-alpha6", - "datestamp": "1608099124", + "version": "8.x-3.0-beta1", + "datestamp": "1609758293", "security-coverage": { "status": "not-covered", - "message": "Alpha releases are not covered by Drupal security advisories." + "message": "Beta releases are not covered by Drupal security advisories." } } }, "installation-source": "dist", "notification-url": "https://packages.drupal.org/8/downloads", "license": [ - "GPL-2.0+" + "GPL-2.0-or-later" ], "authors": [ { @@ -5681,6 +5681,10 @@ "name": "joseph.olstad", "homepage": "https://www.drupal.org/user/1321830" }, + { + "name": "podarok", + "homepage": "https://www.drupal.org/user/116002" + }, { "name": "rjacobs", "homepage": "https://www.drupal.org/user/422459" diff --git a/web/modules/libraries/composer.json b/web/modules/libraries/composer.json index 4af11e12e8..a1807ddcb8 100644 --- a/web/modules/libraries/composer.json +++ b/web/modules/libraries/composer.json @@ -10,5 +10,5 @@ "irc": "irc://irc.freenode.org/drupal-contribute", "source": "http://cgit.drupalcode.org/libraries" }, - "license": "GPL-2.0+" + "license": "GPL-2.0-or-later" } diff --git a/web/modules/libraries/libraries.info.yml b/web/modules/libraries/libraries.info.yml index 68ea958a3f..d0d9423667 100644 --- a/web/modules/libraries/libraries.info.yml +++ b/web/modules/libraries/libraries.info.yml @@ -4,7 +4,7 @@ description: Allows version-dependent and shared usage of external libraries. core: 8.x core_version_requirement: ^8 || ^9 -# Information added by Drupal.org packaging script on 2020-12-16 -version: '8.x-3.0-alpha6' +# Information added by Drupal.org packaging script on 2021-01-04 +version: '8.x-3.0-beta1' project: 'libraries' -datestamp: 1608099126 +datestamp: 1609758296 diff --git a/web/modules/libraries/src/ExternalLibrary/Exception/InvalidLibraryDependencyException.php b/web/modules/libraries/src/ExternalLibrary/Exception/InvalidLibraryDependencyException.php index 7ab3eeb7e4..e307846c3e 100644 --- a/web/modules/libraries/src/ExternalLibrary/Exception/InvalidLibraryDependencyException.php +++ b/web/modules/libraries/src/ExternalLibrary/Exception/InvalidLibraryDependencyException.php @@ -12,8 +12,10 @@ */ class InvalidLibraryDependencyException extends \UnexpectedValueException implements LibraryAccessorInterface { - use LibraryAccessorTrait; - use DependencyAccessorTrait; + use LibraryAccessorTrait, DependencyAccessorTrait { + LibraryAccessorTrait::getLibrary insteadof DependencyAccessorTrait; + DependencyAccessorTrait::getLibrary as libraryAccessor; + } /** * Constructs a library exception. diff --git a/web/modules/libraries/src/ExternalLibrary/Local/LocalLibraryTrait.php b/web/modules/libraries/src/ExternalLibrary/Local/LocalLibraryTrait.php index 3f08e4ba4c..3cb7529029 100644 --- a/web/modules/libraries/src/ExternalLibrary/Local/LocalLibraryTrait.php +++ b/web/modules/libraries/src/ExternalLibrary/Local/LocalLibraryTrait.php @@ -92,8 +92,8 @@ public function setLocalPath($path) { $this->installed = TRUE; $this->localPath = (string) $path; - assert('$this->localPath !== ""'); - assert('$this->localPath[0] !== "/"'); + assert($this->localPath !== ""); + assert($this->localPath[0] !== "/"); } } diff --git a/web/modules/libraries/src/Plugin/libraries/Locator/UriLocator.php b/web/modules/libraries/src/Plugin/libraries/Locator/UriLocator.php index 348be0c247..2732505021 100644 --- a/web/modules/libraries/src/Plugin/libraries/Locator/UriLocator.php +++ b/web/modules/libraries/src/Plugin/libraries/Locator/UriLocator.php @@ -73,7 +73,7 @@ public static function create(ContainerInterface $container, array $configuratio public function locate(LocalLibraryInterface $library) { /** @var \Drupal\Core\StreamWrapper\LocalStream $stream_wrapper */ $stream_wrapper = $this->streamWrapperManager->getViaUri($this->uri); - assert('$stream_wrapper instanceof \Drupal\Core\StreamWrapper\LocalStream'); + assert($stream_wrapper instanceof \Drupal\Core\StreamWrapper\LocalStream); // Calling LocalStream::getDirectoryPath() explicitly avoids the realpath() // usage in LocalStream::getLocalPath(), which breaks if Libraries API is // symbolically linked into the Drupal installation. diff --git a/web/modules/libraries/src/Plugin/libraries/Type/AssetLibraryType.php b/web/modules/libraries/src/Plugin/libraries/Type/AssetLibraryType.php index ce0b276b17..a92f27daa0 100644 --- a/web/modules/libraries/src/Plugin/libraries/Type/AssetLibraryType.php +++ b/web/modules/libraries/src/Plugin/libraries/Type/AssetLibraryType.php @@ -24,7 +24,7 @@ public function getLibraryClass() { * {@inheritdoc} */ public function getAttachableAssetLibraries(LibraryInterface $library, LibraryManagerInterface $library_manager) { - assert('$library instanceof \Drupal\libraries\ExternalLibrary\Asset\AssetLibraryInterface'); + assert($library instanceof \Drupal\libraries\ExternalLibrary\Asset\AssetLibraryInterface); /** @var \Drupal\libraries\ExternalLibrary\Asset\AssetLibraryInterface $library */ return [$library->getId() => $library->getAttachableAssetLibrary($library_manager)]; } diff --git a/web/modules/libraries/src/Plugin/libraries/Type/MultipleAssetLibraryType.php b/web/modules/libraries/src/Plugin/libraries/Type/MultipleAssetLibraryType.php index 31ec6a62c6..f73887e917 100644 --- a/web/modules/libraries/src/Plugin/libraries/Type/MultipleAssetLibraryType.php +++ b/web/modules/libraries/src/Plugin/libraries/Type/MultipleAssetLibraryType.php @@ -25,7 +25,7 @@ public function getLibraryClass() { * {@inheritdoc} */ public function getAttachableAssetLibraries(LibraryInterface $external_library, LibraryManagerInterface $library_manager) { - assert('$external_library instanceof \Drupal\libraries\ExternalLibrary\Asset\MultipleAssetLibraryInterface'); + assert($external_library instanceof \Drupal\libraries\ExternalLibrary\Asset\MultipleAssetLibraryInterface); /** @var \Drupal\libraries\ExternalLibrary\Asset\MultipleAssetLibraryInterface $external_library */ $attachable_libraries = []; foreach ($external_library->getAttachableAssetLibraries($library_manager) as $component_name => $attachable_library) { diff --git a/web/modules/libraries/src/StreamWrapper/LibraryDefinitionsStream.php b/web/modules/libraries/src/StreamWrapper/LibraryDefinitionsStream.php index 7cf0764ec0..eff3146ae7 100644 --- a/web/modules/libraries/src/StreamWrapper/LibraryDefinitionsStream.php +++ b/web/modules/libraries/src/StreamWrapper/LibraryDefinitionsStream.php @@ -3,6 +3,7 @@ namespace Drupal\libraries\StreamWrapper; use Drupal\Core\StreamWrapper\LocalStream; +use Drupal\Core\Config\ConfigFactory; /** * Provides a stream wrapper for library definitions. @@ -33,7 +34,7 @@ class LibraryDefinitionsStream extends LocalStream { use PrivateStreamTrait; /** - * The config factory + * The config factory. * * @var \Drupal\Core\Config\ConfigFactoryInterface */ @@ -44,8 +45,8 @@ class LibraryDefinitionsStream extends LocalStream { * * @todo Dependency injection. */ - public function __construct() { - $this->configFactory = \Drupal::configFactory(); + public function __construct(ConfigFactory $config_factory) { + $this->configFactory = $config_factory; } /** diff --git a/web/modules/libraries/src/Tests/LibrariesWebTest.php b/web/modules/libraries/src/Tests/LibrariesWebTest.php index 2c9254c453..f0a0da04f7 100644 --- a/web/modules/libraries/src/Tests/LibrariesWebTest.php +++ b/web/modules/libraries/src/Tests/LibrariesWebTest.php @@ -54,7 +54,7 @@ protected function setUp() { function testLibrariesDetectDependencies() { $library = array( 'name' => 'Example', - 'dependencies' => array('example_missing'), + 'dependencies' => array('Example missing'), ); libraries_detect_dependencies($library); $this->assertEqual($library['error'], 'missing dependency', 'libraries_detect_dependencies() detects missing dependency'); diff --git a/web/modules/libraries/tests/example/example_info_file.libraries.info.yml b/web/modules/libraries/tests/example/example_info_file.libraries.info.yml index d0ffc711a3..90d4246681 100644 --- a/web/modules/libraries/tests/example/example_info_file.libraries.info.yml +++ b/web/modules/libraries/tests/example/example_info_file.libraries.info.yml @@ -1,7 +1,7 @@ # This is an example info file of a library used for testing purposes. name: Example info file -# Information added by Drupal.org packaging script on 2020-12-16 -version: '8.x-3.0-alpha6' +# Information added by Drupal.org packaging script on 2021-01-04 +version: '8.x-3.0-beta1' project: 'libraries' -datestamp: 1608099126 +datestamp: 1609758296 diff --git a/web/modules/libraries/tests/modules/libraries_test/libraries_test.info.yml b/web/modules/libraries/tests/modules/libraries_test/libraries_test.info.yml index f2bb897e8a..6a9118db10 100644 --- a/web/modules/libraries/tests/modules/libraries_test/libraries_test.info.yml +++ b/web/modules/libraries/tests/modules/libraries_test/libraries_test.info.yml @@ -3,13 +3,13 @@ type: module description: Tests library detection and loading. core: 8.x dependencies: - - libraries + - libraries:libraries hidden: TRUE library_dependencies: - test_asset_library - test_asset_multiple_library -# Information added by Drupal.org packaging script on 2020-12-16 -version: '8.x-3.0-alpha6' +# Information added by Drupal.org packaging script on 2021-01-04 +version: '8.x-3.0-beta1' project: 'libraries' -datestamp: 1608099126 +datestamp: 1609758296 diff --git a/web/modules/libraries/tests/src/Functional/ExternalLibrary/Definition/DefinitionDiscoveryFactoryTest.php b/web/modules/libraries/tests/src/Functional/ExternalLibrary/Definition/DefinitionDiscoveryFactoryTest.php index 14bf74e4f6..0b049bfdab 100644 --- a/web/modules/libraries/tests/src/Functional/ExternalLibrary/Definition/DefinitionDiscoveryFactoryTest.php +++ b/web/modules/libraries/tests/src/Functional/ExternalLibrary/Definition/DefinitionDiscoveryFactoryTest.php @@ -108,11 +108,11 @@ public function testDiscovery() { /** @var \Drupal\libraries\ExternalLibrary\Definition\DefinitionDiscoveryInterface $discovery */ $discovery = $this->container->get($discovery_service_id); $definition_file = "$definitions_directory/$library_id.json"; - $this->assertFalse(file_exists($definition_file)); + $this->assertFileNotExists($definition_file); $this->assertTrue($discovery->hasDefinition($library_id)); - $this->assertFalse(file_exists($definition_file)); + $this->assertFileNotExists($definition_file); $this->assertEquals($discovery->getDefinition($library_id), $expected_definition); - $this->assertTrue(file_exists($definition_file)); + $this->assertFileExists($definition_file); } } -- GitLab