- How do I install scafera/database in a Laravel application?
- Install it with Composer using composer require scafera/database. The package is designed to work alongside your existing Laravel database connections and query builder. After installation, follow the README for any optional setup, especially if you use custom migration paths or validator extensions.
- Which Laravel and PHP versions does scafera/database support?
- The provided release context does not list the exact Laravel and PHP version constraints. Check the package README and composer.json for the supported matrix before rollout. Pay particular attention if your application uses non-standard migration directories, custom validator extensions, or tooling that parses validation error structures.
- What features does scafera/database provide for Laravel developers?
- It provides schema inspection helpers for tables, columns, and indexes, plus query utilities for common read and write patterns. It is connection-aware and integrates with Laravel's DB manager. It also includes migration-friendly tooling for development and testing, keeping database workflows clean and consistent.
- Can scafera/database inspect tables, columns, and indexes?
- Yes, schema inspection helpers for tables, columns, and indexes are one of the package's core features. These helpers are meant to complement Laravel's existing database layer rather than replace it. Use them to keep schema inspection tasks consistent in development, testing, and migration-friendly workflows.
- How does scafera/database compare with Laravel's built-in schema and query tools?
- Laravel's schema builder, query builder, and Eloquent remain the foundation, and scafera/database is positioned as a lightweight complement to them. It adds expressive helpers for schema inspection and common database operations while staying connection-aware. For deeper schema introspection or admin tooling, evaluate Laravel's native APIs and dedicated alternatives before adding another dependency.
- Do I need to configure a separate database connection for scafera/database?
- No separate connection is indicated in the package description. It is described as connection-aware and designed to integrate with Laravel's DB manager alongside your existing connections. Confirm any optional configuration in the README, particularly for custom migration locations or validator usage.
- What changed in scafera/database v1.0.4?
- v1.0.4 is a patch release with additive features and documentation changes, and no breaking changes are declared. It adds stable validator rule IDs, validates migration locations before discovery, improves the README onboarding introduction, and aligns SeedCommand help text. Verify that custom migration paths still resolve and that validator error keys or messages are unchanged.
- How does migration location validation affect custom migration paths?
- v1.0.4 validates migration locations before discovery, which should surface misconfigured paths earlier and more clearly. The risk is that a previously tolerated invalid location may now fail discovery, so test non-standard migration directories in CI and staging. Confirm whether invalid paths fail hard, warn, or are skipped before promoting to production.
- Are validator rule IDs in scafera/database stable enough to rely on?
- v1.0.4 introduces stable validator rule IDs, which can support consistent validation error mapping, automated test assertions, and downstream observability. The open question is whether those IDs are public and guaranteed stable across minor releases. Treat them as a potential public contract until the package documents that guarantee, and verify whether IDs appear in error payloads, logs, or only internal rule objects.
- How should I test and roll out a scafera/database upgrade in production?
- Update the dependency in a branch, run your existing test suite, and execute migration discovery in CI and staging with representative migration paths. Validate validator flows and check any scripts that assert on seeder help output. Promote to production with a rollback plan limited to dependency reversion, and update internal onboarding docs to reference the new README introduction and rule ID conventions.