When it will be possible to run testing environment? |
Hello,
I tried to google out the answer for my issue, and I found exact issue here: Session issue with CI Environment set to Testing (CI4) (codeigniter.com) However, proposed solution to use "test" instead of "testing" is not valid (because CI then shows "The application environment is not set correctly."). I've set all params for testing environment according to documentation, it connects to DB successfully, however, session is never written to db. $_SESSION parameter also empty after each refresh. If I set environment to DEVELOPMENT or PRODUCTION - everything is fine. I couldn't believe that there is a known bug and nobody addresses it for a half year, there should be at least someone who used CI4 on testing environment. When this bug will be solved?
Hi,
what do you want to achieve? The behaviour is intended, as described here: https://forum.codeigniter.com/thread-778...#pid384228
I simply want to run project in testing environment. Currently, I have to set environment to "development" or "production" in order to run it.
You can't use `testing` for your development. It is the specification, not a bug.
> The environment testing is the special one for PHPUnit testing. It has special conditions built into the framework at various places to assist with that. You can’t use it for your development. https://codeigniter4.github.io/CodeIgnit...t-constant What's wrong with useing `development`? (11-05-2021, 01:18 AM)kenjis Wrote: You can't use `testing` for your development. It is the specification, not a bug. I assume wrong is that I'm using development env on my test server. I mean, I'm updating from v3 where there was 3 different environments with different settings: development (for local usage on my machine), testing - to use on test server, and production. I want to replicate the same scenario. Or... since v4 there are basically 2 environments? 'development' for any non-prod environment, and 'production' for prod environment? I probably didn't get right this new 'testing' environment idea, correct?
Probably you want to use more than 2 environments for your development.
In that case, 1. copy `app/Config/Boot/development.php` to `whateveryouwant.php`. 2. set CI_ENVIRONMENT = whateveryouwant |
Welcome Guest, Not a member yet? Register Sign In |