- What is kanata-php/forklift used for in Laravel?
- Forklift is a Laravel package for moving and reshaping data between sources. You define a source, map its fields, and run repeatable transfers through a fluent API. The repository overview also describes a Livewire component for moving assets in folders, so confirm the exact feature set in the README before adopting it.
- How do I install kanata-php/forklift with Composer?
- Install it with Composer using composer require kanata-php/forklift. Because it is a Laravel package, check the README and composer.json for service provider discovery, configuration publishing, and any Livewire requirements. Pin the version during evaluation, especially while the package is pre-1.0.
- Which Laravel and PHP versions does Forklift support?
- The provided context does not state exact Laravel and PHP version constraints. Check the package composer.json and README before adoption, and confirm that its service provider and bindings match your application. If your Laravel version is unsupported, defer adoption or isolate Forklift behind an internal adapter.
- Does Forklift require Livewire?
- The package overview calls Forklift a Laravel Livewire component for moving assets in folders, so Livewire is likely required for that UI feature. The data-transfer blurb suggests core mapping and transfer behavior may be usable separately, but this is not confirmed. Verify Livewire and frontend requirements in the package documentation before installing.
- How do I define a source and map fields in Forklift?
- With Forklift you define a source, map its fields to the destination shape, and execute repeatable transfers through a fluent API. This makes transforms explicit and rerunnable rather than embedding one-off logic in controllers or commands. Start with a small source and field map, then add mappings as your import or migration rules grow.
- What Laravel use cases fit Forklift best?
- Forklift fits imports, legacy data migrations, and keeping databases in sync, according to its package blurb. The Livewire component description also points to asset or folder-moving workflows. It is best suited to Laravel teams that want a fluent, repeatable mapping layer rather than ad hoc transfer scripts.
- Is Forklift production-ready at version 0.1.0?
- Treat Forklift 0.1.0 as early-adopter software, not a drop-in production dependency. The technical assessment flags unstable pre-1.0 APIs, sparse release documentation, unclear return types, and ambiguous findLocation semantics. Run a non-production spike, pin the version, and add your own contract tests before broader rollout.
- What breaking changes came with Forklift 0.1.0 model-specific repositories?
- Version 0.1.0 moves toward model-specific repositories instead of a shared generic repository. Repository methods now require fewer parameters because specialization supplies context, and the interface adds findLocation. Existing implementations and call sites using the older generic contract must be audited and refactored.
- What does findLocation do in Forklift repositories?
- The context does not clearly define findLocation; it could be a query method, a coordinate lookup, a polymorphic resolver, or something else. Review the package source and tests, then document the intended semantics for your team. Add contract tests around its return values and failure behavior before relying on it.
- Are there alternatives to Forklift for Laravel data imports?
- The context does not list direct alternatives, so evaluate Forklift against your existing Laravel patterns. Laravel Excel, custom artisan commands, or a small internal mapping layer may fit simpler imports, while a dedicated package helps when you need repeatable fluent transfers. Compare maintenance, documentation, and test coverage before choosing.