Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Config Cache Bundle Laravel Package

yahoojapan/config-cache-bundle

A Symfony bundle for Yahoo Japan that caches configuration values, letting you load and reuse config data efficiently without repeated parsing. Useful for projects needing lightweight config caching within a Symfony bundle context.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — fundamental mismatch. Despite the framing, yahoojapan/config-cache-bundle is a Symfony bundle, not a Laravel package. It ships a Bundle subclass, a DI extension, and compiler passes that only register against Symfony's Kernel/ContainerBuilder. None of that bootstrapping has an analogue in Laravel's service container. Equally important, the problem it solves is largely already solved differently in each framework:

  • Laravel: php artisan config:cache compiles the entire config/ tree into one PHP file — fast, but coarse-grained and invalidated only on deploy.
  • Symfony ConfigCache (what this bundle wraps): per-resource caching with an isFresh() mtime check, so individual user-defined config files can be re-parsed only when they change.

That per-file freshness model is the only genuinely differentiated capability here, and it is not what Laravel's config cache does. So there is a real (if narrow) use case — runtime-editable config files, multi-tenant config, drop-in config directories — but this package is the wrong delivery vehicle for it.

Integration feasibility — low. Realistic options, in order of preference:

  1. Use symfony/config directly (the maintained upstream component Laravel does not ship but can install). ConfigCache and ConfigCacheFactory are ~standalone classes with no kernel dependency. This captures 90% of the value with none of the abandonment risk.
  2. Reimplement the bundle's thin logic (~100–200 LOC) as a Laravel service provider + facade.
  3. Install the bundle — requires pulling in Symfony's DI kernel inside Laravel, which is an anti-pattern and will fight the framework.

Technical risk — high, bordering on disqualifying.

  • Abandoned since 2016-07-14. No releases in ~9 years.
  • PHP version ceiling. A 2016 Symfony bundle will constrain to php: ^5.5|^7.0 and symfony/*: ^2.7|^3.0. Laravel 10/11/12 require PHP 8.1+ and Symfony 6/7. Composer will either refuse to resolve or you'll --ignore-platform-reqs your way into runtime fatals (removed each(), dynamic property deprecations, Serializable changes, untyped signature mismatches).
  • Zero ecosystem signal. 6 stars and 0 dependents means no downstream users have shaken out bugs against modern stacks, no forks to adopt, no CVE coverage, no StackOverflow corpus.
  • Score 0.03 is consistent with the above: it is effectively a reference implementation, not a dependency.

Key questions for the team:

  • What is the actual requirement? If it is "make config loading faster," Laravel's built-in cache wins and this package is unnecessary. If it is "config files change at runtime and we can't redeploy," that is a genuine gap worth solving — but with symfony/config or in-house code.
  • Are we on Laravel or Symfony? On Symfony (legacy 2.x/3.x), the bundle might still be the least-effort option; on Laravel it is not an option at all.
  • Do we require per-file freshness, or is whole-tree invalidation acceptable?
  • Who owns the fork when upstream is dead?

Integration Approach

Stack fit. Poor as a dependency, good as a pattern. The architectural idea — cache parsed user config, key it by source file, invalidate on mtime — maps cleanly onto Laravel idioms if implemented natively.

Recommended path (do not install the bundle):

  1. Add symfony/config to composer.json (it is versioned and maintained independently; current releases track PHP 8.x).
  2. Register a singleton in a service provider wrapping ConfigCacheFactory with a Laravel-backed cache directory (storage/framework/cache/config-resources) and a PSR-3 logger.
  3. Expose the loader behind a facade or a repository binding so call sites never touch Symfony types — keeps the escape hatch open.
  4. Add an artisan command to warm and clear the resource cache as part of config:cache / deploy hooks.

Migration path. If an existing Symfony 2.x/3.x service uses the bundle, do not port the bundle forward; port the contract. Extract the call sites behind an interface, implement it twice (bundle-backed in the legacy app, native in the target app), and cut over per-consumer. This avoids a big-bang rewrite and lets you run both in parallel during the transition.

Compatibility. Two hard gates: PHP 8.1+ (Laravel 10+) and Symfony 6/7 components. The bundle fails both. Even in a Symfony app, ^3.0 components are EOL and unsupported. Treat the bundle as incompatible by default and require an explicit, documented exception to use it.

Sequencing.

  1. Spike (1–2 days): confirm whether per-file freshness is actually required; benchmark php artisan config:cache against the proposed resource cache on a representative config set. In most Laravel apps the built-in cache, loaded once per request from opcache, is faster than an isFresh() stat call per file.
  2. Decide: if the spike shows no measurable win, close the ticket. This is the likely outcome.
  3. Build: native adapter over symfony/config, behind a feature flag.
  4. Instrument: log cache hits/misses and parse durations before rollout.
  5. Roll out behind the flag, then remove the flag.
  6. Never put the 2016 bundle in the production dependency graph.

Operational Impact

Maintenance. Effectively unbounded. There is no maintainer, no release cadence, and no upgrade path. Adopting it means forking it, and forking it means owning PHP 8 compatibility, Symfony 6/7 compatibility, and any future security surface yourself — for a component that is ~150 lines of glue. The cost/benefit is inverted: you would be maintaining a dependency to avoid writing the code it contains. If adopted, pin by commit hash (no tags will move), vendor the source, and record it on the technical-debt register with a named owner and a removal date.

Support. Zero. No vendor, no community, no issue triage, no security advisories. Internal support means one or two engineers reading 2016 source. Bus factor is a genuine risk — document the caching semantics (key derivation, freshness predicate, atomicity of writes) in-repo, because that knowledge will not exist anywhere else.

Scaling. The cache is local filesystem state, which is the sharp edge in any multi-node deployment:

  • On N app servers, each maintains its own cache directory. Invalidate on one and the others serve stale config until their own mtime check fires — and mtime comparison across NFS or container overlays is unreliable.
  • Cold caches produce a thundering herd on the first request after deploy; every node parses every config file simultaneously.
  • Containerized/ephemeral filesystems discard the cache on every restart, silently degrading to parse-per-request and negating the entire benefit unless the cache is warmed at image build or boot.

Mitigations: warm during deploy (never on first request), back the cache with shared storage only if mtime semantics are proven reliable, or move to a content-hash key in Redis instead of mtime-on-disk.

Failure modes to instrument:

  • Silent staleness — the freshness check passes when it shouldn't (mtime preserved by rsync/cp -p, coarse timestamp granularity, clock skew across nodes). Result: config changes that never take effect, with no error. Highest-severity mode; needs a hit/miss counter and a "cache age" gauge.
  • Silent cache miss — a resource becomes permanently "stale" (permissions, missing file, path change), so every request re-parses. Functionally correct, quietly 10–100x slower. Needs a miss-rate alert.
  • Write races / torn reads — concurrent regeneration of the same cache file without atomic rename yields a partially written PHP file. Confirm the implementation writes-then-renames; if not, do not run it under load.
  • Fatals on load — cached files are included; any PHP 8 incompatibility in the compiled output becomes a hard 500 on every request until the cache is manually cleared. Combined with an abandoned package, this is the failure mode that argues most strongly against adoption.
  • Cache-directory permissions — writable-by-app cache dirs are a code-execution vector if any upload path can reach them; keep it outside the webroot.

Ramp-up. Learning the bundle's API is trivial (small surface, two or three classes). Learning its failure characteristics is not — those only surface under multi-node deploy, load, or a PHP upgrade. Budget a half-day to read the source and an on-call runbook entry covering "clear the resource cache" as the first response to config anomalies. Onboarding cost is low; ownership cost is the real number, and it is high relative to the value delivered.

Verdict. Do not adopt as a dependency. The underlying pattern is worth ~1 engineer-week to implement natively on symfony/config (or to skip entirely if config:cache already meets the latency target), and that path is strictly cheaper than owning a 2016 Symfony bundle inside a Laravel application.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource