I am using zend-framework on ubuntu, somehow I got this error:
Fatal error: Declaration of Zend\Mvc\Controller\PluginManager::get($name, ?array $options = NULL) must be compatible with Zend\ServiceManager\AbstractPluginManager::get($name, $options = Array, $usePeeringServiceManagers = true) in /home/nginad/upload/vendor/zendframework/zend- mvc/src/Controller/PluginManager.php on line 0
I checked tow files, it's not same parameters, I also checked zend-framework 3 at github under servicemanager and mvc, both files has the same parameters.
So I need to update zend-framework to be compatible with php7.2, not sure how to do it correctly, I used apt install composer.
When I further to install zend-framework using: composer require zendframework/...
It says:
Problem 1
- phpunit/phpunit 4.8.27 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 4.8.27 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 4.8.27 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- Installation request for phpunit/phpunit == 4.8.27.0 -> satisfiable by phpunit/phpunit[4.8.27].
When I further to install zend-framework using:
composer require zendframework/...
It says:
Problem 1
- phpunit/phpunit 4.8.27 requires ext-dom * -> the requested PHP extension
dom is missing from your system.
- phpunit/phpunit 4.8.27 requires ext-dom * -> the requested PHP extension
dom is missing from your system.
- phpunit/phpunit 4.8.27 requires ext-dom * -> the requested PHP extension
dom is missing from your system.
- Installation request for phpunit/phpunit == 4.8.27.0 -> satisfiable by
phpunit/phpunit[4.8.27].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.2/cli/php.ini
- /etc/php/7.2/cli/conf.d/10-opcache.ini
- /etc/php/7.2/cli/conf.d/10-pdo.ini
- /etc/php/7.2/cli/conf.d/20-calendar.ini
- /etc/php/7.2/cli/conf.d/20-ctype.ini
- /etc/php/7.2/cli/conf.d/20-exif.ini
- /etc/php/7.2/cli/conf.d/20-fileinfo.ini
- /etc/php/7.2/cli/conf.d/20-ftp.ini
- /etc/php/7.2/cli/conf.d/20-gettext.ini
- /etc/php/7.2/cli/conf.d/20-iconv.ini
- /etc/php/7.2/cli/conf.d/20-json.ini
- /etc/php/7.2/cli/conf.d/20-phar.ini
- /etc/php/7.2/cli/conf.d/20-posix.ini
- /etc/php/7.2/cli/conf.d/20-readline.ini
- /etc/php/7.2/cli/conf.d/20-shmop.ini
- /etc/php/7.2/cli/conf.d/20-sockets.ini
- /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.2/cli/conf.d/20-sysvsem.ini
- /etc/php/7.2/cli/conf.d/20-sysvshm.ini
- /etc/php/7.2/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.