As the method token_replace() is removed from Drupal 8, please remove all documentation references to it. I see token_replace() documentation reference in EntityTest.php file.

$this->assertIdentical($mapper->getTokenTypeForEntityType('invalid'), FALSE);
$this->assertIdentical($mapper->getTokenTypeForEntityType('invalid', TRUE), 'invalid');

// Test that when we send the mis-matched entity type into token_replace()
// that we still get the tokens replaced.
$vocabulary = entity_load('taxonomy_vocabulary', 'tags');


Link to Token API for Drupal 8

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

vishwac9 created an issue. See original summary.

vishwac9’s picture

Please find attached patch, thanks :)

priyanka.attarde’s picture

Status: Needs review » Reviewed & tested by the community

@vishwac9, patch applied cleanly. Thanks for updating the documentation as per Drupal 8 guideline. Changing the issue staus to RTBC.

Berdir’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -Needs Update Documentation

Thanks for the patch.

Since we touch and fix it anyway, this shoud use the full namespace.

arunkumark’s picture

I have re-rolled patch for detailed Documentation as per the comment #4.

@Berdir thanks for your comment.

hgunicamp’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +ciandt-contrib

Before applying the 'token_change-documentation-reference-2859671-2.patch' patch a command to list all 'token_replace' occurrences:

find . -type f -exec grep -i --color=auto token_replace {} \+
./tests/src/Kernel/EntityTest.php: // Test that when we send the mis-matched entity type into token_replace()

After applying the patch this occurrence disappeared.

So the patch worked for me.