• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codeigniter4 / CodeIgniter4 / 40948877722
91%
develop: 90%

Build:
Build:
LAST BUILD BRANCH: 4.8
DEFAULT BRANCH: develop
Ran 29 Oct 2026 08:41PM UTC
Jobs 1
Files 438
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Oct 2026 08:25PM UTC coverage: 91.025% (+0.01%) from 91.011%
40948877722

push

github

web-flow
perf: scan the environment once when building config classes (#10657)

* perf(#10615): scan the environment once when building config classes

`BaseConfig::__construct()` checked every leaf property against `$_ENV`,
`$_SERVER` and four `getenv()` calls, so the common no-override path was
also the slowest. The environment is now indexed once, grouped by the text
before the first "." or "_", and each class only walks the keys that match
its prefixes. The index is rebuilt when `$_ENV` or `$_SERVER` changes
(once per request in Worker Mode) or on `BaseConfig::reset()`.

PHP's `getenv()` array omits names containing ".", " " or "[", so those
are looked up with `getenv()` on each class's first build and cached for
the process. Classes that override `getEnvValue()` or `initEnvValue()`
keep the previous live lookups. Lookup precedence is unchanged.

Building 20 core config classes (PHP 8.3 CLI, no opcache, median):

| Scenario                              | Before   | After    |
|---------------------------------------|----------|----------|
| Warm, no overrides, new $_SERVER      | 0.456 ms | 0.073 ms |
| Warm, no overrides, unchanged env     | 0.456 ms | 0.031 ms |
| Warm, 5 overrides, new $_SERVER       | 0.467 ms | 0.110 ms |
| Warm, 5 overrides, unchanged env      | 0.471 ms | 0.067 ms |
| Cold first build, no overrides        | 0.493 ms | 0.205 ms |
| Cold first build, 5 overrides         | 0.505 ms | 0.267 ms |

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(#10615): re-read live env vars on every config build

Cache only the names of env vars found with live getenv() calls, per
leaf, and re-read their values on each build, so removed or changed
values are not reused. Leaves first seen on a later instance are now
probed too. On Windows, probe the underscore forms live as well, so
they keep matching case-insensitively.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(#10615): probe underscore env names live under Apache mo... (continued)

92 of 93 new or added lines in 1 file covered. (98.92%)

2 existing lines in 1 file now uncovered.

26561 of 29180 relevant lines covered (91.02%)

259.96 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
95.17
1.13% system/Config/BaseConfig.php

Coverage Regressions

Lines Coverage ∆ File
2
95.17
1.13% system/Config/BaseConfig.php
Jobs
ID Job ID Ran Files Coverage
1 40948877722.1 29 Oct 2026 08:41PM UTC 438
91.02
GitHub Action Run
Source Files on build 40948877722
  • Tree
  • List 438
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 95e2534b on github
  • Prev Build on 4.8 (#40835395907)
  • Next Build on 4.8 (#41013538108)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc