krma-cl/kcfinder
Laravel integration for KCFinder, providing a browser-based file manager for uploading, browsing, and selecting images or files in CKEditor and other WYSIWYG editors. Includes configuration and helper hooks to wire KCFinder into your PHP app.
Architecture fit. KCFinder is a standalone, session-oriented PHP file manager, not a Laravel-native package. In a Laravel application it sits beside the framework's filesystem abstraction (Storage/Flysystem), authorization policies, and event system rather than inside them. That is a poor architectural fit for anything user-facing or multi-tenant, but an acceptable fit as an isolated back-office tool placed behind Laravel's auth and authorization middleware. The new neutral operation observer is the most architecturally significant item in 4.10: it gives Laravel integrations a seam to react to successful file and directory moves with previous and resulting logical paths, avoiding direct coupling to KCFinder internals. The introduction of dragMove.enabled (default off) and themeOptions keeps the legacy deployment shape intact, which reduces architectural churn.
Integration feasibility. composer require krma-cl/kcfinder:^4.10 is feasible, but "installable via Composer" is not the same as "Laravel-integrated." The release does not claim a service provider, facade, config publish, or Laravel filesystem driver; a TPM should assume a thin internal adapter is required (route group, auth middleware, config bridging, observer-to-event listener). The reported validation matrix — PHP 8.2 through 8.5, 109 PHPUnit tests and 320 assertions, PHPStan, Composer validation and advisory audit — is reasonable hygiene but thin coverage for a component whose primary job is destructive filesystem mutation. Reproducible ZIP plus checksum for traditional installs is a genuine supply-chain plus.
Technical risk. The highest-risk area is the new move capability: a whole-operation conflict policy (overwrite, keep both, cancel) implies multi-file atomicity semantics that are hard to guarantee on a plain filesystem. If the observer fires after success only, integrations cannot distinguish partial failure; if it can throw, the UI may report a move that is only partially applied. Drag-and-drop as the primary interaction is also a risk on touch devices and for keyboard users, partly mitigated by the accessible Move to… context action. The VERSION file consolidation is low risk and improves release traceability. The larger, pre-existing risk is the codebase's lineage: a resurrected legacy file manager carries a broad attack surface (upload handling, path confinement, CSRF, per-user authorization) and a maintainership model that is small relative to that surface.
Key questions.
dragMove.enabled global config or per-user/per-role? Can it be piloted?Stack fit. Treat KCFinder as an embedded legacy component, not as a Laravel package. Confine it to a dedicated route group protected by auth, verified-email, and a dedicated can:manage-files style gate; disable public access to its upload root; place its storage outside the application's public disk root and serve downloads through a controlled controller where possible. Keep it single-tenant per instance until path isolation is proven.
Migration path. From 4.9.x the upgrade is low-friction: defaults are preserved, drag-move is disabled unless opted in, and clipboard behavior is unchanged. From older KCFinder 3.x or from CKFinder/other browsers, budget for configuration translation, theme rework (Bootstrap 5 theme v0.4.0 is available), and auth wrapping. The VERSION file change may break any bespoke packaging script that parsed version strings from PHP source; audit build tooling before upgrading.
Compatibility. PHP 8.2–8.5 is validated, which excludes applications still on PHP 8.0/8.1 — a real constraint for older Laravel deployments. Verify the package's own composer.json platform requirements and whether advisory audits remain clean in your lockfile. The theme is versioned separately, so theme and core must be upgraded in step; pin both.
Sequencing.
dragMove.enabled for a pilot group only; keep Move to… as the documented fallback.Maintenance. The component has its own configuration and release cadence distinct from Laravel's. Pin the Composer constraint, track upstream security advisories, and expect to own an adapter layer that upstream does not maintain. Budget recurring time for theme (v0.4.0) compatibility and for reviewing the move/conflict code paths as they mature. The explicit "documented but not enabled" note on visual ordering and recoverable trash is welcome roadmap honesty — plan as if neither arrives on a fixed date.
Support. No commercial support is implied; assistance is community/upstream. The team should own a runbook covering configuration, storage roots, permissions, and recovery from partial moves. Escalation for suspected path traversal or data loss should route to security, not to a feature ticket.
Scaling. File operations are synchronous PHP requests. Moving large folders will block a worker, consume memory proportional to entry count, and cannot be queued or resumed. Concurrency during move (another user writing into the source tree) is not obviously guarded. For high-volume or multi-tenant use, this component should not be the primary interface; scope it to occasional administrative operations and set upload/move size ceilings at the web server and PHP level.
Failure modes. Partial moves after a conflict or mid-operation crash; observer listener exceptions surfacing as inconsistent UI state; silent overwrite under the "overwrite" policy; permission or disk-full errors mid-tree; session expiry during a long move; path traversal or symlink escape on unusual filesystems; theme/core version skew breaking presentation. Each needs an operator-visible error path and a documented recovery procedure.
Ramp-up. Developers familiar with Laravel idioms will need orientation on KCFinder's legacy configuration model and its non-Laravel lifecycle. Testers need a device matrix for drag-and-drop plus keyboard-only verification of Move to…. Operators need training on the three conflict policies before the flag is enabled, because "overwrite" applied to a whole operation is easy to misread. Realistic ramp-up is days, not hours, for the adapter and security review; the feature flag keeps that cost off the critical path.
How can I help you explore Laravel packages today?