sebastianbergmann / phploc

A tool for quickly measuring the size of a PHP project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xdebug_disable() call fails with Xdebug 3

dorianfm opened this issue · comments

PHP Fatal error: Uncaught Error: Call to undefined function xdebug_disable() PHPLOC/CLI/Application.php:112

This is caused because Xdebug 3 no longer has this function, see: https://xdebug.org/docs/upgrade_guide

xdebug_disable()

Has been removed.

To prevent Xdebug from showing stack traces, do not configure Xdebug's develop mode in xdebug.mode, or turn off PHP's html_errors INI setting.

I will attempt a fix and issue a PR.

This function is not used in current versions of this tool.

What is the process for pushing apt packages? I know nothing about that ecosystem at all. The one that I got on a fresh install is causing this issue.

Same here, have to remove apt Package phpcpd :-(

xdebug is installed.

sudo apt install phpcpd

phpcpd -v

PHP Fatal error:  Uncaught Error: Call to undefined function xdebug_disable() in /usr/share/php/SebastianBergmann/PHPCPD/CLI/Application.php:98
Stack trace:
#0 /usr/share/php/SebastianBergmann/PHPCPD/CLI/Application.php(44): SebastianBergmann\PHPCPD\CLI\Application->disableXdebug()
#1 /usr/share/php/Symfony/Component/Console/Application.php(149): SebastianBergmann\PHPCPD\CLI\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /usr/bin/phpcpd(51): Symfony\Component\Console\Application->run()
#3 {main}
  thrown in /usr/share/php/SebastianBergmann/PHPCPD/CLI/Application.php on line 98