Skip to content

fix(chunks): guard views/chunks for Apache 2.4 and build the store without bootstrap constants - #2468

Merged
Seiger merged 1 commit into
evolution-cms:3.5.xfrom
elcreator:fix-chunk-file-store-tests
Sep 21, 2026
Merged

Seiger merged 1 commit into
evolution-cms:3.5.xfrom
elcreator:fix-chunk-file-store-tests

Conversation

@elcreator

Copy link
Copy Markdown

Summary

CI on 3.5.x has been red since #2447 merged (Unit tests (PHP 8.3) and (PHP 8.4) on every run after a305e02ba), with two failures that never showed on the PR itself because the tests were added to 3.5.x after that branch was cut:

  • ApacheConfigHardeningTestviews/chunks/.htaccess (and the guard ChunkFileStore::ensureDirectory() writes) used the Apache 2.2 dialect only, which is a 500 on 2.4 without mod_access_compat. Both now carry the <IfModule mod_authz_core.c> / <IfModule !mod_authz_core.c> pair like every other shipped .htaccess.
  • CacheDocumentRefreshTestChunkFileStore::make() read EVO_BASE_PATH unconditionally, so the cache refresh worker (a process without the bootstrap) died in Cache::buildCache(). make() and displayDirectory() now go through a basePath() helper that falls back to the installation root.

Test plan

  • New ChunkFileStoreGuardsTest pins both: the written guard matches the shipped file and has no bare 2.2 directive, and a fresh PHP process without the constants resolves views/chunks/
  • Full Pest suite green locally (841 passed, 0 failed)
  • composer analyze — no errors

🤖 Generated with Claude Code

…thout bootstrap constants

views/chunks/.htaccess and the guard ChunkFileStore writes were Apache 2.2 only, which
ApacheConfigHardeningTest refuses. ChunkFileStore::make() also read EVO_BASE_PATH
unconditionally, so the cache refresh worker (and any other process without the bootstrap)
died in Cache::buildCache(). Both broke CI on 3.5.x once evolution-cms#2447 merged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Seiger
Seiger merged commit 9e36a6d into evolution-cms:3.5.x Sep 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants