- What is mindy/orm-fields?
- It is a Composer package that provides extra field types for the MindyPHP ORM. It is a read-only subtree split of the Extra Fields collection and is not a standalone ORM. It is designed to work inside a MindyPHP application that already uses mindy/orm, not as a general-purpose Laravel package.
- Is mindy/orm-fields compatible with Laravel Eloquent?
- No, it is built for the MindyPHP data-mapper and does not integrate with Eloquent's cast system out of the box. Using it in a Laravel app would require an adapter layer you own and maintain. For Laravel, implement the equivalent behavior with Eloquent custom casts and value objects.
- How do I install mindy/orm-fields?
- Install it with Composer via composer require mindy/orm-fields in a MindyPHP project. Pin an exact version and confirm the package's declared MindyPHP/ORM constraints against your runtime. Because it has no dependents, treat compatibility as unproven and smoke-test CRUD plus hydration before relying on it.
- Can I use mindy/orm-fields to add dynamic attributes to Eloquent models?
- Not directly. The package's field classes follow MindyPHP ORM conventions for registration and hydration, which differ from Eloquent's $casts and accessor/mutator contract. You would need to bridge the two ORMs, which is usually more work than writing a handful of custom casts. For Laravel-only projects, prefer native Eloquent casts.
- What Laravel versions does mindy/orm-fields support?
- The package is not a Laravel package in the Eloquent sense; its compatibility target is the MindyPHP ORM, not Laravel's framework version. There is no documented Laravel version matrix, so do not assume support for any specific Laravel release. Verify against your exact MindyPHP release and PHP 8.x runtime instead.
- How do I define a custom field type with mindy/orm-fields?
- You typically extend or implement the package's field contract and register the field according to MindyPHP ORM conventions. The exact base class or interface is not widely documented in public usage, so confirm it in the source before building on it. Wrap registration in your own module to isolate vendor coupling.
- Is mindy/orm-fields production-ready?
- Treat it as high risk for production: it has one star, zero dependents, and no public corpus of usage or failure reports. The MIT license is low-risk legally, but bus-factor and undocumented MindyPHP version coupling are real concerns. If you adopt it, pin versions, add smoke tests, and be prepared to fix field-layer bugs yourself.
- What alternatives are there to mindy/orm-fields for custom fields in Laravel?
- For Laravel, use Eloquent custom casts, value objects, and JSON columns to store dynamic attributes. Community packages such as spatie/laravel-schemaless-attributes can also help, depending on your needs. Reimplementing the few field behaviors you actually need is often smaller and safer than bridging a foreign ORM.
- Does mindy/orm-fields handle validation and serialization of custom fields?
- The package surfaces typed accessors, casting, serialization, and possibly validation hooks as composable field classes. Exact behavior depends on the field implementation and the MindyPHP hydration pipeline. Confirm how each field persists and serializes data before trusting it with production records.
- How is mindy/orm-fields maintained and tested?
- There is little public evidence of active maintenance, release cadence, or a CI matrix. The repository is a read-only subtree split, which means issues and pull requests likely belong to the parent MindyPHP project. Ask who maintains it and whether tests run against supported MindyPHP and PHP versions before adopting.