Unverified Commit 0334414b authored by alexpott's avatar alexpott

Issue #3150726 by andypost: Deprecate update_check_incompatibility as unused

parent 37893880
......@@ -14,8 +14,15 @@
/**
* Tests the compatibility of a module or theme.
*
* @deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. No direct
* replacement is provided.
*
* @see https://www.drupal.org/node/3150727
* @see \Drupal\Core\Extension\ExtensionList::checkIncompatibility()
*/
function update_check_incompatibility($name, $type = 'module') {
@trigger_error('update_check_incompatibility() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. No direct replacement is provided. See https://www.drupal.org/node/3150727', E_USER_DEPRECATED);
static $themes, $modules;
// Store values of expensive functions for future use.
......
<?php
namespace Drupal\KernelTests\Core\Extension;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests deprecated update.inc functions.
*
* @group legacy
* @group extension
*/
class UpdateDeprecationTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
// Include the legacy update.inc file.
include_once $this->root . '/core/includes/update.inc';
}
/**
* Tests update_check_incompatibility() function.
*
* @expectedDeprecation update_check_incompatibility() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. No direct replacement is provided. See https://www.drupal.org/node/3150727
*/
public function testUpdateCheckIncompatibility() {
$this->assertTrue(update_check_incompatibility('incompatible_module'));
$this->assertFalse(update_check_incompatibility('system'));
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment