Page MenuHomeDevCentral

Tokenizer extension missing on Ysul after PHP 7.1.12 to PHP 7.1.14 update
Closed, ResolvedPublic

Description

Ysul
$ phpcs
ERROR: PHP_CodeSniffer requires the tokenizer extension to be enabled.

$ psysh                                                                                               

Fatal error: Uncaught Error: Call to undefined function PhpParser\token_name() in phar:///opt/psysh/psysh/build-vendor/nikic/php-parser/lib/PhpParser/Lexer.php:359
Stack trace:
#0 phar:///opt/psysh/psysh/build-vendor/nikic/php-parser/lib/PhpParser/Lexer.php(32): PhpParser\Lexer->createTokenMap()
#1 phar:///opt/psysh/psysh/build-vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php(24): PhpParser\Lexer->__construct(Array)
#2 phar:///opt/psysh/psysh/build-vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php(22): PhpParser\Lexer\Emulative->__construct()
#3 phar:///opt/psysh/psysh/src/Psy/ParserFactory.php(80): PhpParser\ParserFactory->create(3)
#4 phar:///opt/psysh/psysh/src/Psy/CodeCleaner.php(64): Psy\ParserFactory->createParser()
#5 phar:///opt/psysh/psysh/src/Psy/Configuration.php(761): Psy\CodeCleaner->__construct()
#6 phar:///opt/psysh/psysh/src/Psy/Shell.php(79): Psy\Configuration->getCodeCleaner()
#7 phar:///opt/psysh/psysh/src/Psy/functions.php(286): Psy\Shell->__construct(Object(Psy\Configuration))
#8 /opt/p in phar:///opt/psysh/psysh/build-vendor/nikic/php-parser/lib/PhpParser/Lexer.php on line 359

phpcs prints this message if extension_loaded('tokenizer') returns False.

Event Timeline

dereckson triaged this task as High priority.Feb 17 2018, 14:02
dereckson created this task.
dereckson closed this task as Resolved.Feb 17 2018, 14:45
dereckson claimed this task.

I compared the phpinfo output of PHP 7.1.12 (from https://ysul.nasqueron.org/phpinfo.php) and PHP 7.1.14 (from php -i).

Four extensions configuration files are missing:

  • ctype
  • simplexml
  • tokenizer
  • xmlwriter

To deinstall and reinstall the packages fixed the issue.