- What is ralphjsmit/stubs used for in a Laravel application?
- It is intended to publish and override the template files behind Laravel's Artisan make commands, so generated classes, migrations, factories, and tests follow your project's conventions. Teams typically use this to standardize DTOs, actions, form requests, and test scaffolding without reviewing every boilerplate file by hand. Treat it as build-time scaffolding convenience rather than a runtime feature.
- How do I install ralphjsmit/stubs in a Laravel project?
- The expected flow is a Composer require followed by a vendor:publish step to copy the package's stub templates into your project. Before installing, confirm the Packagist identity, namespace, and service provider because the supplied metadata points at two different package concepts. Commit the published stubs, run a few artisan make commands, and review the generated output before rolling it out to the team.
- Which Laravel and PHP versions does ralphjsmit/stubs support?
- The available context does not provide a complete compatibility matrix, and the last recorded release is from February 2023. That makes PHP 8.3+ and current Laravel LTS support a likely failure point that you should verify in a sandbox. Install it on your actual Laravel and PHP matrix and test the make commands you rely on before adopting it.
- Is ralphjsmit/stubs the same package as ralphjsmit/filesystem?
- The supplied metadata is inconsistent: the Composer name and blurb describe a Laravel stub-publication package, while the repository URL and description describe a fluent filesystem wrapper. Treat the artifact as unresolved until you confirm the Packagist name, namespace, service provider, and repository from source. Do not standardize on it until that identity question is answered in writing.
- Can I customize make:model, make:request, or make:test output with Laravel stubs?
- The package's stated purpose is to let you override the templates behind Artisan make commands, which includes generated classes, migrations, and tests. You would publish the relevant stub files and edit them while preserving Laravel's placeholder tokens. After editing, regenerate sample files and confirm the output still compiles and matches your conventions.
- Where should customized Laravel stub files live and who should own them?
- Published stubs should be committed to a predictable project location and treated as shared source code, not as local developer preferences. Assign ownership to the Laravel lead or platform team, and document how stubs are regenerated after framework upgrades. Also check for collisions with stubs your project already publishes before adding another publish tag.
- Does ralphjsmit/stubs add runtime overhead or affect file storage in production?
- Under the stub-publication reading, it is a build-time tool that copies templates into the project and should have zero runtime footprint. The output is source code reviewed by developers, so it should not touch customer uploads, tenant documents, export pipelines, or billing artifacts. If you actually need a filesystem abstraction, that is a different package with a different risk profile.
- How should I test custom Laravel stubs after a framework upgrade?
- Add a CI or sandbox step that runs the artisan make commands you depend on and asserts that the generated files compile and match expected placeholders. Review any changes to Laravel's native stubs and check that your published templates still align with them. Keep this in your Laravel upgrade checklist so scaffolding drift is caught before it reaches feature branches.
- Is ralphjsmit/stubs actively maintained and safe for production use?
- The available maintenance signals are weak: 18 stars, 0 dependents, a last release in February 2023, a single maintainer, and metadata that does not self-consistently identify the package. Use it, if at all, as a preference bet for internal scaffolding rather than in anything with an SLA, compliance scope, or security-response requirement. Pin the version and record the adoption decision so the dependency has an owner.
- What are the alternatives to ralphjsmit/stubs for overriding Artisan stubs?
- Laravel already supports publishing its own stubs with artisan stub:publish, and you can maintain project-specific templates or custom make commands without an extra dependency. Evaluate the native approach first because it avoids adding an unmaintained package to the build path. The package is convenience, not a unique capability.