diff --git a/core/core.libraries.yml b/core/core.libraries.yml index e973b51b36d69177500dbef0969039e82c9092f9..2f48b0073f3fe2fb0030076787bed4a83c4ce7c0 100644 --- a/core/core.libraries.yml +++ b/core/core.libraries.yml @@ -481,6 +481,7 @@ jquery.ui.accordion: dependencies: - core/jquery.ui - core/jquery.ui.widget + deprecated: &jquery_ui_unused_deprecated The "%library_id%" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 jquery.ui.autocomplete: version: *jquery_ui_version @@ -523,6 +524,7 @@ jquery.ui.checkboxradio: dependencies: - core/jquery.ui - core/jquery.ui.widget + deprecated: *jquery_ui_unused_deprecated jquery.ui.controlgroup: version: *jquery_ui_version @@ -535,6 +537,7 @@ jquery.ui.controlgroup: dependencies: - core/jquery.ui - core/jquery.ui.widget + deprecated: *jquery_ui_unused_deprecated jquery.ui.datepicker: version: *jquery_ui_version @@ -584,12 +587,14 @@ jquery.ui.droppable: - core/jquery.ui.widget - core/jquery.ui.mouse - core/jquery.ui.draggable + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.core: version: *jquery_ui_version license: *jquery_ui_license js: assets/vendor/jquery.ui/ui/effect-min.js: { weight: -9, minified: true } + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.blind: version: *jquery_ui_version @@ -598,6 +603,7 @@ jquery.ui.effects.blind: assets/vendor/jquery.ui/ui/effects/effect-blind-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.bounce: version: *jquery_ui_version @@ -606,6 +612,7 @@ jquery.ui.effects.bounce: assets/vendor/jquery.ui/ui/effects/effect-bounce-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.clip: version: *jquery_ui_version @@ -614,6 +621,7 @@ jquery.ui.effects.clip: assets/vendor/jquery.ui/ui/effects/effect-clip-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.drop: version: *jquery_ui_version @@ -622,6 +630,7 @@ jquery.ui.effects.drop: assets/vendor/jquery.ui/ui/effects/effect-drop-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.explode: version: *jquery_ui_version @@ -630,6 +639,7 @@ jquery.ui.effects.explode: assets/vendor/jquery.ui/ui/effects/effect-explode-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.fade: version: *jquery_ui_version @@ -638,6 +648,7 @@ jquery.ui.effects.fade: assets/vendor/jquery.ui/ui/effects/effect-fade-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.fold: version: *jquery_ui_version @@ -646,6 +657,7 @@ jquery.ui.effects.fold: assets/vendor/jquery.ui/ui/effects/effect-fold-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.highlight: version: *jquery_ui_version @@ -654,6 +666,7 @@ jquery.ui.effects.highlight: assets/vendor/jquery.ui/ui/effects/effect-highlight-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.puff: version: *jquery_ui_version @@ -663,6 +676,7 @@ jquery.ui.effects.puff: dependencies: - core/jquery.ui.effects.core - core/jquery.ui.effects.scale + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.pulsate: version: *jquery_ui_version @@ -671,6 +685,7 @@ jquery.ui.effects.pulsate: assets/vendor/jquery.ui/ui/effects/effect-pulsate-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.scale: version: *jquery_ui_version @@ -680,6 +695,7 @@ jquery.ui.effects.scale: dependencies: - core/jquery.ui.effects.core - core/jquery.ui.effects.size + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.shake: version: *jquery_ui_version @@ -688,6 +704,7 @@ jquery.ui.effects.shake: assets/vendor/jquery.ui/ui/effects/effect-shake-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.size: version: *jquery_ui_version @@ -696,6 +713,7 @@ jquery.ui.effects.size: assets/vendor/jquery.ui/ui/effects/effect-size-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.slide: version: *jquery_ui_version @@ -704,6 +722,7 @@ jquery.ui.effects.slide: assets/vendor/jquery.ui/ui/effects/effect-slide-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.effects.transfer: version: *jquery_ui_version @@ -712,6 +731,7 @@ jquery.ui.effects.transfer: assets/vendor/jquery.ui/ui/effects/effect-transfer-min.js: { minified: true } dependencies: - core/jquery.ui.effects.core + deprecated: *jquery_ui_unused_deprecated jquery.ui.menu: version: *jquery_ui_version @@ -754,6 +774,7 @@ jquery.ui.progressbar: dependencies: - core/jquery.ui - core/jquery.ui.widget + deprecated: *jquery_ui_unused_deprecated jquery.ui.resizable: version: *jquery_ui_version @@ -780,6 +801,7 @@ jquery.ui.selectable: - core/jquery.ui - core/jquery.ui.mouse - core/jquery.ui.widget + deprecated: *jquery_ui_unused_deprecated jquery.ui.selectmenu: version: *jquery_ui_version @@ -796,6 +818,7 @@ jquery.ui.selectmenu: - core/jquery.ui.menu - core/jquery.ui.position - core/jquery.ui.widget + deprecated: *jquery_ui_unused_deprecated jquery.ui.slider: version: *jquery_ui_version @@ -809,6 +832,7 @@ jquery.ui.slider: - core/jquery.ui - core/jquery.ui.mouse - core/jquery.ui.widget + deprecated: *jquery_ui_unused_deprecated jquery.ui.sortable: version: *jquery_ui_version @@ -832,6 +856,7 @@ jquery.ui.spinner: - core/jquery.ui - core/jquery.ui.widget - core/jquery.ui.button + deprecated: *jquery_ui_unused_deprecated jquery.ui.tabs: version: *jquery_ui_version @@ -844,6 +869,7 @@ jquery.ui.tabs: dependencies: - core/jquery.ui - core/jquery.ui.widget + deprecated: *jquery_ui_unused_deprecated jquery.ui.tooltip: version: *jquery_ui_version @@ -857,6 +883,7 @@ jquery.ui.tooltip: - core/jquery.ui - core/jquery.ui.widget - core/jquery.ui.position + deprecated: *jquery_ui_unused_deprecated jquery.ui.touch-punch: remote: https://github.com/furf/jquery-ui-touch-punch diff --git a/core/tests/Drupal/KernelTests/Core/Asset/LegacyLibraryDiscoveryTest.php b/core/tests/Drupal/KernelTests/Core/Asset/LegacyLibraryDiscoveryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8fbbe2851f5c189ff7fb8c7a359786fbaad8aaef --- /dev/null +++ b/core/tests/Drupal/KernelTests/Core/Asset/LegacyLibraryDiscoveryTest.php @@ -0,0 +1,300 @@ +<?php + +namespace Drupal\KernelTests\Core\Asset; + +use Drupal\KernelTests\KernelTestBase; + +/** + * Tests that deprecated asset libraries trigger a deprecation error. + * + * @group Asset + * @group legacy + */ +class LegacyLibraryDiscoveryTest extends KernelTestBase { + + /** + * The library discovery service. + * + * @var \Drupal\Core\Asset\LibraryDiscoveryInterface + */ + protected $libraryDiscovery; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->libraryDiscovery = $this->container->get('library.discovery'); + } + + /** + * Tests that the jquery.ui.accordion library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.accordion" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiAccordion() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.accordion'); + } + + /** + * Tests that the jquery.ui.checkboxradio library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.checkboxradio" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiCheckboxradio() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.checkboxradio'); + } + + /** + * Tests that the jquery.ui.controlgroup library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.controlgroup" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiControlgroup() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.controlgroup'); + } + + /** + * Tests that the jquery.ui.droppable library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.droppable" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiDroppable() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.droppable'); + } + + /** + * Tests that the jquery.ui.effects.core library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.core" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsCore() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.core'); + } + + /** + * Tests that the jquery.ui.effects.blind library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.blind" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsBlind() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.blind'); + } + + /** + * Tests that the jquery.ui.effects.bounce library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.bounce" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsBounce() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.bounce'); + } + + /** + * Tests that the jquery.ui.effects.clip library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.clip" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsClip() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.clip'); + } + + /** + * Tests that the jquery.ui.effects.drop library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.drop" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsDrop() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.drop'); + } + + /** + * Tests that the jquery.ui.effects.explode library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.explode" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsExplode() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.explode'); + } + + /** + * Tests that the jquery.ui.effects.fade library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.fade" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsFade() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.fade'); + } + + /** + * Tests that the jquery.ui.effects.fold library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.fold" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsFold() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.fold'); + } + + /** + * Tests that the jquery.ui.effects.highlight library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.highlight" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsHighlight() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.highlight'); + } + + /** + * Tests that the jquery.ui.effects.puff library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.puff" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsPuff() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.puff'); + } + + /** + * Tests that the jquery.ui.effects.pulsate library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.pulsate" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsPulsate() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.pulsate'); + } + + /** + * Tests that the jquery.ui.effects.scale library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.scale" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsScale() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.scale'); + } + + /** + * Tests that the jquery.ui.effects.shake library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.shake" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsShake() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.shake'); + } + + /** + * Tests that the jquery.ui.effects.size library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.size" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsSize() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.size'); + } + + /** + * Tests that the jquery.ui.effects.slide library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.slide" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsSlide() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.slide'); + } + + /** + * Tests that the jquery.ui.effects.transfer library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.effects.transfer" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiEffectsTransfer() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.effects.transfer'); + } + + /** + * Tests that the jquery.ui.progressbar library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.progressbar" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiProgressbar() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.progressbar'); + } + + /** + * Tests that the jquery.ui.selectable library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.selectable" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiSelectable() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.selectable'); + } + + /** + * Tests that the jquery.ui.selectmenu library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.selectmenu" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiSelectmenu() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.selectmenu'); + } + + /** + * Tests that the jquery.ui.slider library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.slider" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiSlider() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.slider'); + } + + /** + * Tests that the jquery.ui.spinner library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.spinner" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiSpinner() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.spinner'); + } + + /** + * Tests that the jquery.ui.tabs library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.tabs" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiTabs() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.tabs'); + } + + /** + * Tests that the jquery.ui.tooltip library is deprecated. + * + * @expectedDeprecation The "core/jquery.ui.tooltip" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969 + * @doesNotPerformAssertions + */ + public function testJqueryUiTooltip() { + $this->libraryDiscovery->getLibraryByName('core', 'jquery.ui.tooltip'); + } + +} diff --git a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php index 1d5d4b9ec4a64a791d7ba61efe5d2c8b613527fc..6809f1b4f9560cb935daf15488c37cc116973f89 100644 --- a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php +++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php @@ -140,6 +140,8 @@ public static function getSkippedDeprecations() { // This deprecation comes from behat/mink-browserkit-driver when updating // symfony/browser-kit to 4.3+. 'The "Symfony\Component\BrowserKit\Response::getStatus()" method is deprecated since Symfony 4.3, use getStatusCode() instead.', + 'The "core/jquery.ui.checkboxradio" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969', + 'The "core/jquery.ui.controlgroup" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969', // @todo Remove in https://www.drupal.org/project/drupal/issues/3082655 'Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. See https://www.drupal.org/node/2352949, which includes recommendations on which theme to use.', 'The "core/html5shiv" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3086383',