使用未定义的常量SIGTERM->假设为"SIGTERM" [英] Use of undefined constant SIGTERM - > assumed 'SIGTERM'

查看:167
本文介绍了使用未定义的常量SIGTERM->假设为"SIGTERM"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前在Windows计算机上运行 PHPUnit Codeception 时,出现错误:

Currently running PHPUnit with Codeception on my Windows machine gives me an error:

[PHPUnit_Framework_Exception]
使用未定义的常量SIGTERM- 假定为"SIGTERM"

[PHPUnit_Framework_Exception]
Use of undefined constant SIGTERM - assumed 'SIGTERM'

据我所知,SIGTERM是由 PCNTL ,Windows不支持.这样,该常数就不能用于Windows env上运行的测试.完全没有.

As far as I know is that SIGTERM is a constant provided by PCNTL, which is not supported in Windows. In that way this CONSTANT shouldnt be used for a test running on Windows env. at all.

PHP 5.6.17 (cli) (built: Jan  6 2016 13:28:38)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

PHPUnit

PHPUnit 5.7.15 

密码接收

Codeception PHP Testing Framework v2.2.9

phiremock-codeception-extension

phiremock-codeception-extension v1.2.2

推荐答案

问题取决于使用SIGTERMphiremock-codeception-extension而不检查OS/PCNTL扩展是否可用.因此,我在GitHub https://github.com/mcustiel/phiremock-codeception-extension/问题/4 ..

The problem is depending on phiremock-codeception-extension which uses SIGTERM without checking the OS/PCNTL extension is available. So I created a Bug report at GitHub https://github.com/mcustiel/phiremock-codeception-extension/issues/4..

这是受感染的代码行-

This are the infected code lines - https://github.com/mcustiel/phiremock-codeception-extension/blob/master/src/Extension/PhiremockProcess.php#L74

/**
 * Stops the process.
 */
public function stop()
{
    $this->process->signal(SIGTERM);
    $this->process->stop(3, SIGKILL);
}

开发人员解决问题后,我将更新此答案.

I will update this answer once the problem has been fixed by the developer.

此问题已在.

This issue has beend fixed in phiremock-codeception-extension v.1.2.3.

这篇关于使用未定义的常量SIGTERM->假设为"SIGTERM"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆