Topic on Extension talk:SyntaxHighlight

Call to undefined method MediaWiki\Shell\Command::input()

1
77.88.121.37 (talkcontribs)
Product Version
MediaWiki 1.31.0-alpha
HHVM 3.21.3 (srv)
MariaDB 10.0.32-MariaDB-0+deb8u1
ICU 52.1
SyntaxHighlight 2.0 (330ac62)12:31, 25 February 2018 GPL-2.0-or-later Provides syntax highlighting <syntaxhighlight> using Pygments - Python syntax highlighter Brion Vibber, Tim Starling, Rob Church, Niklas Laxström, Ori Livneh and Ed Sanders

# /usr/share/nginx/html/wiki/extensions/SyntaxHighlight_GeSHi/pygments/pygmentize -V

Pygments version 2.2.0, (c) 2006-2017 by Georg Brandl. -- PS! I also tried v2.0.2 and specifying the path in LocalSettings.

[error] 683#683: *648 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined method MediaWiki\Shell\Command::input() in /usr/share/nginx/html/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php on line 320" while reading response header from upstream, client: 1.2.3.4, server: mycoolhost.net, request: "POST /wiki/api.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "mycoolhost.net"   

                $output = $cache->getWithSetCallback(

                        $cache->makeGlobalKey( 'highlight', self::makeCacheKeyHash( $code, $lexer, $options ) ),

                        $cache::TTL_MONTH,

                        function ( $oldValue, &$ttl ) use ( $code, $lexer, $options, &$error ) {

                                $optionPairs = [];

                                foreach ( $options as $k => $v ) {

                                        $optionPairs[] = "{$k}={$v}";

                                }

                                $result = Shell::command(

                                        self::getPygmentizePath(),

                                        '-l', $lexer,

                                        '-f', 'html',

                                        '-O', implode( ',', $optionPairs )

                                )

                                        ->input( $code )

                                        ->restrict( Shell::RESTRICT_DEFAULT | Shell::NO_NETWORK )

                                        ->execute();

                                if ( $result->getExitCode() != 0 ) {

                                        $ttl = WANObjectCache::TTL_UNCACHEABLE;

                                        $error = $result->getStderr();

                                        return null;

                                }

                                return $result->getStdout();

                        }

                );

Any tips?

Reply to "Call to undefined method MediaWiki\Shell\Command::input()"