As demonstrated by #357970: Undefined function token_get_all, Drupal suffers a fatal error when the php_tokenizer extension is not enabled (it's required by the code registry to parse PHP sources).
[#444718] therefore calls for this extension to be checked for during the install process. The obvious place for this central requirement is the system module, so this patch adds it to system_requirements.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | Screenshot from 2015-11-11 19-18-19.png | 120.77 KB | fizk |
| #7 | drupal.tokenizer-revert.patch | 1.16 KB | sun |
| #3 | system-requirements-tokenizer-445062-3.patch | 1.16 KB | cburschka |
| system-requirements-tokenizer.patch | 1.16 KB | cburschka |
Comments
Comment #1
cburschkaIt appears the filter will really only take project issue nodes.
#444718: 2009-04-25 & 26 Core patch review sprint
Comment #3
cburschkaWow, I must have been tired. That, or having a testbot around made me lazy. :P
Here's a fix for the syntax error.
Comment #4
dropcube commentedThis looks good to me. Just to point out, this requirement check at this point is OK, but we should include this requirement check at other points where hook_requirements is not reachable yet, the registry is not able to run if this extension is not enabled.
Comment #5
dries commentedMade some minor changes and committed this to CVS HEAD. Thanks!
Comment #6
sunThis requirement should be limited to the phases 'install' and 'update'. There's no point in showing it later on at runtime, because you won't see the status report page without Tokenizer.
Comment #7
sunThe registry is gone, and chx confirmed in IRC that class names are now identified with a regular expression.
So let's revert this requirement.
Comment #8
dawehnerThis makes sense. token_get_all is not used anymore in core.
Perhaps coder_review module would need this requirement, because it uses this function.
Comment #9
dries commentedCommitted to CVS HEAD. Thanks.
Comment #12
fizk commentedI'm still seeing this error in Drupal 8 RC3:
Fatal error: Call to undefined function Doctrine\Common\Annotations\token_get_all() in /var/www/drupal-sites/8/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php on line 56
Comment #13
fizk commentedComment #27
catchThis is still an issue, and token_get_all() is used in the installer.
Comment #28
catchComment #29
lendudeOpened #3222618: system_requirements should check for tokenizer extension so this one can go back to fixed since it was already committed twice.