![]() |
Error: Use of undefined constant ENVIRONMENT - CI 4.1.5 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Error: Use of undefined constant ENVIRONMENT - CI 4.1.5 (/showthread.php?tid=80608) |
Error: Use of undefined constant ENVIRONMENT - CI 4.1.5 - Mobostar - 11-20-2021 Hello, I am getting this error when I run "spark" to create a migration. Code: $ php spark migrate:create create_posts_table The migration is created anyway, but I wonder what this is about. PHP 7.4.3 CI 4.1.5 Thanks RE: Error: Use of undefined constant ENVIRONMENT - CI 4.1.5 - kenjis - 11-20-2021 I can't reproduce it. See vendor/codeigniter4/framework/system/Config/Factories.php line 110. RE: Error: Use of undefined constant ENVIRONMENT - CI 4.1.5 - Mobostar - 11-20-2021 The following is the "PHP stack trace" for the same error in case it helps. Code: PHP Stack trace: RE: Error: Use of undefined constant ENVIRONMENT - CI 4.1.5 - donpwinston - 11-21-2021 Line 110 of Factories.php is: self::$instances[$options['component']][$class] = new $class(...$arguments); I believe there is something messed up with your installation. RE: Error: Use of undefined constant ENVIRONMENT - CI 4.1.5 - Mobostar - 11-22-2021 I did a fresh CI4 installation via Composer and that error disappeared. |