Allow optional tmpDir and logDir in Meta constructor#41
Conversation
Applications can pass resolved writable paths while keeping the default
{appDir}/var/{tmp|log}/{context} layout when omitted. Directory creation
is centralized in ensureDir(); environment reading stays outside Meta.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 1.x #41 +/- ##
===========================================
Coverage 100.00% 100.00%
+ Complexity 19 17 -2
===========================================
Files 3 3
Lines 45 48 +3
===========================================
+ Hits 45 48 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PHP filesystem APIs accept '/' on Windows; DIRECTORY_SEPARATOR is unnecessary noise here.
Summary
$tmpDir/$logDirconstructor arguments toMeta(BC: existing 3-arg calls unchanged).{appDir}/var/tmp/{context}and{appDir}/var/log/{context}.ensureDir().Usage
Motivation
Writable directories are deploy-dependent. Package compile can share the same Meta via the application injector (
Compiler::fromInjector). Meta should accept explicit paths without taking on env/bootstrap policy.Test plan
composer tests(cs / sa / phpunit)var/