Skip to content

Use CakePHP attribute metadata cache for discovery - #28

Merged
josbeir merged 2 commits into
mainfrom
fix/attribute-cache-defaults
Oct 17, 2026
Merged

josbeir merged 2 commits into
mainfrom
fix/attribute-cache-defaults

Conversation

@josbeir

@josbeir josbeir commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

FormCompose discovery currently forces _cake_core_, bypassing CakePHP 6's dedicated attribute metadata cache. Use the application's _cake_attributes_ cache in production so its configured PhpEngine can load metadata through OPcache.

Disable persistent caching in debug mode and source-file validation by default. Preserve application-supplied resolver settings in both modes. Keep the merged src/Form/ discovery paths, including application types under src/Form/Field/, and update the configuration example and deployment clear/warm instructions.

Aligns with cakephp/app#1109.

Validation:

  • composer validate --strict and composer check: 686 PHP tests, 2525 assertions; analysis, lint, Rector, and formatting pass.
  • Xdebug coverage: 99.79% (1946/1950 lines); coverage gate passes.
  • Browser suite: 24 tests pass.
  • npm ci and the production docs build pass.
  • Production/debug defaults, application overrides, and discovery write/read/clear use a real PhpEngine in regression tests.

@codecov-commenter

codecov-commenter commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.81%. Comparing base (efdfa6d) to head (b451b2d).

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #28   +/-   ##
=========================================
  Coverage     99.81%   99.81%           
- Complexity      813      814    +1     
=========================================
  Files            88       88           
  Lines          2146     2146           
=========================================
  Hits           2142     2142           
  Misses            4        4           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josbeir
josbeir force-pushed the fix/attribute-cache-defaults branch from ea0932d to b451b2d Compare October 17, 2026 10:48
@josbeir
josbeir merged commit 4ec60e4 into main Oct 17, 2026
6 checks passed
@josbeir
josbeir deleted the fix/attribute-cache-defaults branch October 17, 2026 10:52
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