通过 .phar 安装 Codeception 效果很好,但我决定将我所有的依赖项移到 composer 中。当我尝试引导代码接收时,这是我的错误:
(dev) stagl [/var/www/dev] (master) > vendor/bin/codecept bootstrap
Initializing Codeception in /var/www/dev
File codeception.yml created <- global configuration
tests/unit created <- unit tests
tests/functional created <- functional tests
tests/acceptance created <- acceptance tests
tests/unit.suite.yml written <- unit tests suite configuration
tests/functional.suite.yml written <- functional tests suite configuration
tests/acceptance.suite.yml written <- acceptance tests suite configuration
tests/_bootstrap.php written <- global bootstrap file
Building initial Guy classes
Building Guy classes for suites: unit, functional, acceptance
CodeGuy includes modules: CodeHelper
CodeGuy.php generated successfully. 1 methods added
TestGuy includes modules: Filesystem, TestHelper
TestGuy.php generated successfully. 12 methods added
PHP Notice: Use of undefined constant CURLOPT_CERTINFO - assumed 'CURLOPT_CERTINFO' in /var/www/dev/vendor/codeception/codeception/src/Codeception/Configuration.php on line 189
PHP Stack trace:
PHP 1. {main}() /var/www/dev/vendor/codeception/codeception/codecept:0
PHP 2. Symfony\Component\Console\Application->run() /var/www/dev/vendor/codeception/codeception/codecept:29
PHP 3. Symfony\Component\Console\Application->doRun() /var/www/dev/vendor/symfony/console/Symfony/Component/Console/Application.php:121
PHP 4. Symfony\Component\Console\Application->doRunCommand() /var/www/dev/vendor/symfony/console/Symfony/Component/Console/Application.php:191
PHP 5. Symfony\Component\Console\Command\Command->run() /var/www/dev/vendor/symfony/console/Symfony/Component/Console/Application.php:892
PHP 6. Codeception\Command\Bootstrap->execute() /var/www/dev/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:241
PHP 7. Symfony\Component\Console\Command\Command->run() /var/www/dev/vendor/codeception/codeception/src/Codeception/Command/Bootstrap.php:80
PHP 8. Codeception\Command\Build->execute() /var/www/dev/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:241
PHP 9. Codeception\Configuration::modules() /var/www/dev/vendor/codeception/codeception/src/Codeception/Command/Build.php:77
WebGuy includes modules: PhpBrowser, WebHelper
WebGuy.php generated successfully. 47 methods added
Bootstrap is done. Check out /var/www/dev/tests directory
我觉得奇怪的是这适用于 phar,但不是这样?我肯定在我的 php-cli 设置中启用了 curl:
(dev) stagl [/var/www/dev] (master) > php -m
[PHP Modules]
apc
bz2
Core
ctype
curl