Почему поднялся phpunit. Невозможно получить ссылку на ошибку $GLOBALS?

Пытаясь запустить phpunit под моим kubuntu 20, я получил ошибку:

      master@master-laptop:/mnt/_work_sdb8/wwwroot/lar/hostels4j$ phpunit   -v
PHP Fatal error:  Cannot acquire reference to $GLOBALS in /usr/share/php/PHPUnit/Util/Configuration.php on line 407
master@master-laptop:/mnt/_work_sdb8/wwwroot/lar/hostels4j$ apt show phpunit  — info        
Package: phpunit
Version: 8.5.2-1ubuntu1
Priority: optional
Section: universe/web
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1245 kB
Depends: php-cli, php-common, php-xml, php-json, php-mbstring, php-doctrine-instantiator (>= 1.2.0), php-doctrine-instantiator (<< 2~~), php-deepcopy (>= 1.9.1), php-deepcopy (<< 2~~), php-phar-io-manifest (>= 1.0.3), php-phar-io-manifest (<< 2~~), php-phar-io-version (>= 2.0.1), php-phar-io-version (<< 3~~), php-phpspec-prophecy (>= 1.8.1), php-phpspec-prophecy (<< 2~~), php-codecoverage (>= 7.0.7), php-codecoverage (<< 8~~), php-file-iterator (>= 2.0.2), php-file-iterator (<< 3~~), php-text-template (>= 1.2.1), php-text-template (<< 2~~), php-timer (>= 2.1.2), php-timer (<< 3~~), phpunit-comparator (>= 3.0.2), phpunit-comparator (<< 4~~), phpunit-diff (>= 3.0.2), phpunit-diff (<< 4~~), phpunit-environment (>= 4.2.2), phpunit-environment (<< 5~~), phpunit-exporter (>= 3.1.1), phpunit-exporter (<< 4~~), phpunit-global-state (>= 3.0.0), phpunit-global-state (<< 4~~), phpunit-object-enumerator (>= 3.0.3), phpunit-object-enumerator (<< 4~~), phpunit-resource-operations (>= 2.0.1), phpunit-resource-operations (<< 3~~), phpunit-type (>= 1.1.3), phpunit-type (<< 2~~), phpunit-version (>= 2.0.1), phpunit-version (<< 3~~)
Suggests: php-invoker (>= 2.0.0), php-invoker (<< 3~~), php-soap, php-xdebug
Homepage: https://phpunit.de/
Download-Size: 129 kB
APT-Manual-Installed: yes
APT-Sources: http://ua.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
Description: Unit testing suite for PHP
 Unit testing allows you to write small test methods which verify units of
 functionality in your program.  It is a powerful technique for iphpunitmproving the
 quality of your software, preventing regressions, and allowing confident
 refactoring of your code.
 .
 PHPUnit is a unit testing suite for the PHP language, modelled on the xUnit
 testing framework, designed by Kent Beck and Erich Gamma.  If you've used
 JUnit (for Java), PyUnit (for Python), CxxUnit (for C++), or any of the
 other equivalents for other languages, the API for this package should seem
 fairly familiar.  If you've never written unit tests before, the PHPUnit
 API is simple to learn and use.

Package: info
Version: 6.7.0.dfsg.2-5
Priority: standard
Section: doc
Source: texinfo
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian TeX maintainers <debian-tex-maint@lists.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 831 kB
Provides: info-browser
Depends: libc6 (>= 2.15), libtinfo6 (>= 6), install-info
Breaks: texinfo-doc-nonfree
Replaces: texinfo (<< 4.7-2), texinfo-doc-nonfree
Homepage: https://www.gnu.org/software/texinfo/
Task: standard
Download-Size: 203 kB
APT-Manual-Installed: no
APT-Sources: http://ua.archive.ubuntu.com/ubuntu focal/main amd64 Packages
Description: Standalone GNU Info documentation browser
 The Info file format is an easily-parsable representation for online
 documents. This program allows you to view Info documents, like the
 ones stored in /usr/share/info.
 .
 Much of the software in Debian comes with its online documentation in
 the form of Info files, so it is most likely you will want to install it.

N: Unable to locate package —
N: Unable to locate package —
master@master-laptop:/mnt/_work_sdb8/wwwroot/lar/hostels4j$ php -v
PHP 8.1.0RC6 (cli) (built: Nov 19 2021 06:49:51) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.0-dev, Copyright (c) Zend Technologies

Я помню, что использование $ GLOBALS считалось плохой практикой ... Есть ли способ исправить эту ошибку?

Спасибо!

0 ответов

Другие вопросы по тегам