mouf/schema-analyzer
A PHP package from the Mouf framework that analyzes database schemas, introspecting tables and columns to help map or generate PHP classes from an existing database structure. Useful for reverse-engineering models and keeping code in sync with your schema.
Architecture fit
Illuminate\Database\Schema builder. Fit is therefore conditional: it is a reasonable companion for code paths that already speak Doctrine, and a foreign body in a pure Eloquent codebase.app/Support/Schema (or a small internal package), bound via a service provider, and never be referenced from controllers, models, or domain services. This keeps a low-adoption dependency replaceable.Integration feasibility
doctrine/dbal dependency (historically required for ->change() and column introspection). If that constraint is already satisfied in composer.json, adding this package is low-effort. If not, you inherit DBAL as a transitive runtime dependency in production — that is the real cost, not the package itself.Technical risk
Key questions for the maintainer / spike
Stack fit
schema:diff, schema:inspect), a queued job for periodic drift checks, and a CI step. Zero request-path usage.SchemaInspector::tables(), ::diff()), so the package's classes appear in exactly one directory of your codebase.Migration path
Compatibility and sequencing
information_schema query set instead (roughly 150 lines, zero dependency, narrower but sufficient for drift checks).php artisan migrate. Schema analysis reads a live database; running it opportunistically during deploys couples deploy success to a third-party introspection library.Maintenance
composer.json and commit the lockfile. Do not allow floating constraints on a package with this adoption profile.Support
information_schema queries) are mandatory before production reliance.Scaling
Failure modes
composer install rather than at runtime, which is at least loud.Ramp-up
How can I help you explore Laravel packages today?