codeigniter - CI4 Getting started issues
问题描述
Decide to give the newly released CI4 a try.
Ubuntu operating system with php 7.4.3.
Following the docs at https://codeigniter4.github.io/userguide/installation/index.html
composer create-project codeigniter4/appstarter c400
cd c400
# Not sure if this is needed
php builds development
composer update # per the build's output
php spark serve
Which results in:
CodeIgniter CLI Tool - Version 4.0.1 - Server-Time: 2020-02-24 10:41:36am
PHP Fatal error: Cannot declare class CodeIgniter\Commands\CommandsTestStreamFilter, because the name is already in use in /home/ahundiak/zayso2020/c400/tests/_support/Commands/CommandsTestStreamFilter.php on line 3
PHP Stack trace:
PHP 1. {main}() /home/ahundiak/zayso2020/c400/spark:0
PHP 2. CodeIgniter\CLI\Console->run() /home/ahundiak/zayso2020/c400/spark:57
PHP 3. CodeIgniter\CodeIgniter->run() /home/ahundiak/zayso2020/c400/vendor/codeigniter4/codeigniter4/system/CLI/Console.php:86
PHP 4. CodeIgniter\CodeIgniter->handleRequest() /home/ahundiak/zayso2020/c400/vendor/codeigniter4/codeigniter4/system/CodeIgniter.php:306
PHP 5. CodeIgniter\CodeIgniter->runController() /home/ahundiak/zayso2020/c400/vendor/codeigniter4/codeigniter4/system/CodeIgniter.php:398
PHP 6. CodeIgniter\CLI\CommandRunner->_remap() /home/ahundiak/zayso2020/c400/vendor/codeigniter4/codeigniter4/system/CodeIgniter.php:906
PHP 7. CodeIgniter\CLI\CommandRunner->index() /home/ahundiak/zayso2020/c400/vendor/codeigniter4/codeigniter4/system/CLI/CommandRunner.php:86
PHP 8. CodeIgniter\CLI\CommandRunner->createCommandList() /home/ahundiak/zayso2020/c400/vendor/codeigniter4/codeigniter4/system/CLI/CommandRunner.php:103
PHP 9. class_exists() /home/ahundiak/zayso2020/c400/vendor/codeigniter4/codeigniter4/system/CLI/CommandRunner.php:167
PHP 10. spl_autoload_call() /home/ahundiak/zayso2020/c400/vendor/codeigniter4/codeigniter4/system/CLI/CommandRunner.php:167
PHP 11. Composer\Autoload\ClassLoader->loadClass() /home/ahundiak/zayso2020/c400/vendor/codeigniter4/codeigniter4/system/CLI/CommandRunner.php:167
PHP 12. Composer\Autoload\includeFile() /home/ahundiak/zayso2020/c400/vendor/composer/ClassLoader.php:322
PHP 13. include() /home/ahundiak/zayso2020/c400/vendor/composer/ClassLoader.php:444
An uncaught Exception was encountered
Type: ErrorException
Message: Cannot declare class CodeIgniter\Commands\CommandsTestStreamFilter, because the name is already in use
Filename: /home/ahundiak/zayso2020/c400/tests/_support/Commands/CommandsTestStreamFilter.php
Line Number: 3
The error is not unlike some of the errors Symfony was generating when preloading was first introduced. But 7.4.3 has resolved those for Symfony at least.
I started to step my way through the spark console code but thought I would see if anyone else had run into this.
Update: From https://forum.codeigniter.com/thread-75587.html, it appears that this issue is being worked. I'll come back and close this when the fix is released.
解决方案
等了几天才发布补丁。做了一个作曲家更新,将我从 CLI 4.0.1 移到 4.0.2,但问题仍然存在。
做了一个新项目,一切都按预期工作。
不确定作曲家更新是否应该工作,但至少现在显示欢迎页面。
推荐阅读
- c - 放大 API:重绘期间闪烁
- c# - 无法输出到标签(C#)
- python - Tensorflow - 有条件地为张量赋值
- python - 计算向量中所有条目组合之间的差异
- google-bigquery - 大查询从多条记录创建子结构
- apache - 具有过滤的行级数据的 AWS DMS
- r - 逐列聚合数据,过滤不同的列
- pandas - Pandas Groupby:获取最早日期的 ID 的所有行(具有许多 ID 的大型数据集)
- arrays - 在 linux 中将 txt 文件的行按顺序排列
- java - 如何从 android studio 中的本地 JSON 文件中读取并添加到 ArrayList?