Change record status: 
Project: 
Introduced in branch: 
8.5.x
Introduced in version: 
8.5.0
Description: 

Use \Drupal\Core\Extension\ExtensionDiscovery::PHP_FUNCTION_PATTERN instead

Impacts: 
Module developers

Comments

donquixote’s picture

It should be mentioned that ExtensionDiscovery::PHP_FUNCTION_PATTERN is NOT identical with DRUPAL_PHP_FUNCTION_PATTERN.

ExtensionDiscovery::PHP_FUNCTION_PATTERN contains regex delimiters and start/end symbols.
DRUPAL_PHP_FUNCTION_PATTERN does/did not have delimiters and start/end symbols.

DRUPAL_PHP_FUNCTION_PATTERN could be used as a fragment of a bigger regular expression.
ExtensionDiscovery::PHP_FUNCTION_PATTERN cannot be used as a fragment of a bigger regular expression.