我在ubuntu上使用,不知何故我得到了以下错误:
致命错误:在第0行的Zend\ServiceManager\AbstractPluginManager::get($name,mvc/src/Controller/PluginManager.php中,Zend\mvc\Controller\PluginManager:get($name,?array $options = NULL)的声明必须与/home/nginad/upload/vendor/zendframework/zend- $options = Array,$usePeeringServiceManagers =true兼容
我检查了两个文件,这是不一样的参数,我还检查了Zend-Framework3在github下的servicemanager和mvc,这两个文件都有相同的参数。
因此,我需要更新zend框架,使其与php7.2兼容,不知道如何正确执行,我使用了apt install。
当我进一步安装zendframework时,使用: composer需要zendframework/.
上面写着:
问题1
当我进一步使用以下方法安装zend-framework时:
composer require zendframework/...上面写着:
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.发布于 2018-02-15 20:25:53
我也有类似的问题,但使用Magento2与php7.1,安装php7.1-bcmatch和php7.1-xml之后,问题就解决了。
确保您也安装了zend框架中常用的扩展: php7.1-mbstring php7.1-mcrypt php7.1-cli php7.1-json php7.1-curl
发布于 2018-02-07 08:07:27
您也有zend,这就是phpunit在composer.json中的原因。您需要php扩展来运行它。扩展是phpunit的招聘。如果您不需要zend,您可以从composer.json文件中删除zend-这就是测试所需要的--或者可以安装扩展名。
签出this question以安装扩展。
发布于 2018-03-18 04:41:41
谢谢,在我用php7.1 .*和apt-get安装php7.1和其他4个模块之后,它就可以工作了。
但是找不到php视图(文件)的/user/xxx或/signup/xxx,我发现了以下内容,不知道路径在哪里,它在upload/公用文件夹和具有视图的upload/module文件夹下有根目录,但是它是如何找到的呢?
'users' => array(
'type' => 'segment',
'options' => array(
'route' => '/users[/[:action[/[:param1[/]]]]]',
'defaults' => array(
'controller' =>
'DashboardManager\Controller\Signup',
'action' => 'account',
),
),
),
'signup' => array(
'type' => 'segment',
'options' => array(
'route' => '/signup[/[:action[/[:param1[/]]]]]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'param1' => '[0-9]+',
),
'defaults' => array(
'__NAMESPACE__' => 'DashboardManager\Controller',
'controller' => 'DashboardManager\Controller\Signup',
'action' => 'index',
),
),
),
...有日志文件吗?
谢谢!
https://stackoverflow.com/questions/48656625
复制相似问题