Issue #3345272 by Rassoni, elber, Ranjit1032002, Rishabh Vishwakarma, Liam Morland, smustgrave: Fix deprecation documentation for node_revision_load()
parent
3b7dc0f28b
commit
0dc53e4f69
|
@ -354,7 +354,7 @@ function node_entity_extra_field_info() {
|
||||||
* @see https://www.drupal.org/node/3323340
|
* @see https://www.drupal.org/node/3323340
|
||||||
*/
|
*/
|
||||||
function node_type_update_nodes($old_id, $new_id) {
|
function node_type_update_nodes($old_id, $new_id) {
|
||||||
@trigger_error(__METHOD__ . ' is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::updateType instead. See https://www.drupal.org/node/3323340', E_USER_DEPRECATED);
|
@trigger_error(__METHOD__ . ' is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::updateType instead. See https://www.drupal.org/node/3294237', E_USER_DEPRECATED);
|
||||||
return \Drupal::entityTypeManager()->getStorage('node')->updateType($old_id, $new_id);
|
return \Drupal::entityTypeManager()->getStorage('node')->updateType($old_id, $new_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,12 +368,12 @@ function node_type_update_nodes($old_id, $new_id) {
|
||||||
* A fully-populated node entity, or NULL if the node is not found.
|
* A fully-populated node entity, or NULL if the node is not found.
|
||||||
*
|
*
|
||||||
* @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
|
* @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
|
||||||
* \Drupal\Core\Entity\EntityStorageInterface::loadRevision instead.
|
* \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead.
|
||||||
*
|
*
|
||||||
* @see https://www.drupal.org/node/3323340
|
* @see https://www.drupal.org/node/3323340
|
||||||
*/
|
*/
|
||||||
function node_revision_load($vid = NULL) {
|
function node_revision_load($vid = NULL) {
|
||||||
@trigger_error(__METHOD__ . ' is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::loadRevision instead. See https://www.drupal.org/node/3323340', E_USER_DEPRECATED);
|
@trigger_error(__METHOD__ . ' is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead. See https://www.drupal.org/node/3294237', E_USER_DEPRECATED);
|
||||||
return \Drupal::entityTypeManager()->getStorage('node')->loadRevision($vid);
|
return \Drupal::entityTypeManager()->getStorage('node')->loadRevision($vid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,12 +384,12 @@ function node_revision_load($vid = NULL) {
|
||||||
* The revision ID to delete.
|
* The revision ID to delete.
|
||||||
*
|
*
|
||||||
* @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
|
* @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
|
||||||
* \Drupal\Core\Entity\EntityStorageInterface::deleteRevision instead.
|
* \Drupal\Core\Entity\RevisionableStorageInterface::deleteRevision instead.
|
||||||
*
|
*
|
||||||
* @see https://www.drupal.org/node/3323340
|
* @see https://www.drupal.org/node/3323340
|
||||||
*/
|
*/
|
||||||
function node_revision_delete($revision_id) {
|
function node_revision_delete($revision_id) {
|
||||||
@trigger_error(__METHOD__ . ' is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::deleteRevision instead. See https://www.drupal.org/node/3323340', E_USER_DEPRECATED);
|
@trigger_error(__METHOD__ . ' is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\RevisionableStorageInterface::deleteRevision instead. See https://www.drupal.org/node/3294237', E_USER_DEPRECATED);
|
||||||
\Drupal::entityTypeManager()->getStorage('node')->deleteRevision($revision_id);
|
\Drupal::entityTypeManager()->getStorage('node')->deleteRevision($revision_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class NodeDeprecationTest extends KernelTestBase {
|
||||||
*/
|
*/
|
||||||
public function testNodeRevisionLoadDeprecation(): void {
|
public function testNodeRevisionLoadDeprecation(): void {
|
||||||
$this->installEntitySchema('node');
|
$this->installEntitySchema('node');
|
||||||
$this->expectDeprecation('node_revision_load is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::loadRevision instead. See https://www.drupal.org/node/3323340');
|
$this->expectDeprecation('node_revision_load is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead. See https://www.drupal.org/node/3294237');
|
||||||
node_revision_load(1);
|
node_revision_load(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class NodeDeprecationTest extends KernelTestBase {
|
||||||
*/
|
*/
|
||||||
public function testNodeRevisionDeleteDeprecation(): void {
|
public function testNodeRevisionDeleteDeprecation(): void {
|
||||||
$this->installEntitySchema('node');
|
$this->installEntitySchema('node');
|
||||||
$this->expectDeprecation('node_revision_delete is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::deleteRevision instead. See https://www.drupal.org/node/3323340');
|
$this->expectDeprecation('node_revision_delete is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\RevisionableStorageInterface::deleteRevision instead. See https://www.drupal.org/node/3294237');
|
||||||
node_revision_delete(1);
|
node_revision_delete(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class NodeDeprecationTest extends KernelTestBase {
|
||||||
*/
|
*/
|
||||||
public function testNodeTypeUpdateNodesDeprecation(): void {
|
public function testNodeTypeUpdateNodesDeprecation(): void {
|
||||||
$this->installEntitySchema('node');
|
$this->installEntitySchema('node');
|
||||||
$this->expectDeprecation('node_type_update_nodes is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::updateType instead. See https://www.drupal.org/node/3323340');
|
$this->expectDeprecation('node_type_update_nodes is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::updateType instead. See https://www.drupal.org/node/3294237');
|
||||||
node_type_update_nodes(1, 2);
|
node_type_update_nodes(1, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue