- How do I install roundly-consulting/requests-for-laravel in a Laravel app?
- Install it with Composer using composer require roundly-consulting/requests-for-laravel. Laravel package auto-discovery should register the service provider, and you should publish any config or migrations only if the package README instructs you to. After that, run your migrations and test suite to confirm the package models and factories resolve correctly in your app.
- What does this Laravel package actually do?
- It provides a Laravel workflow for requests from entities with approvals, including Eloquent models and factories for creating and testing those requests. The package follows a service-provider-plus-factory architecture and is designed so a host application can swap in its own models. It is not an HTTP client despite the "requests" name.
- Which Laravel and PHP versions are supported by the 1.2.x line?
- The 1.2.x line is a patch release series, and the technical evaluation assumes Laravel 8+ with PHP 8.x because it relies on Eloquent factory model resolution. The authoritative answer is the package composer.json and README, so check those before upgrading a legacy app. If you are pinned below Laravel 8, verify compatibility first.
- Can I swap the package Eloquent models for my own models?
- Yes. The package is built for host-application extension: its factories build the configured model when a host swaps it, rather than hard-coding App\Models or an internal concrete class. That means you can subclass or replace its Eloquent models and have factories follow your configured class. The exact swap point may be a config key, container binding, or contract, so confirm which one your version uses.
- How does model resolution work in the package factories?
- Factory model resolution is indirect: the factory reads a configured class instead of assuming the package default model. The 1.2.2 patch corrects this so swapped models are honored in factory-built test data. If you previously overrode factories locally to work around the bug, remove those overrides so the package remains the single source of truth.
- Is upgrading from 1.2.1 to 1.2.2 a breaking change?
- No breaking change is indicated. 1.2.2 is a patch in the 1.2.x line, so semver says it should be a safe bump for hosts already on 1.2.0 or 1.2.1. The realistic risks are test-time, such as double factory overrides or a container binding that is now load-bearing.
- What should I check before upgrading if I swap this package models?
- Grep your service provider and config for override bindings to see whether you swap this package models. If you wrote local factory overrides as a workaround, plan to delete them as part of the upgrade, not later. Then run the full suite, paying attention to seeders and fixtures that may have been masking the old behavior.
- How do I test a Laravel app that uses this package?
- Use the package factories to create request and approval records in tests, and make sure any swapped model binding is registered before the factory runs. Avoid maintaining duplicate local factory definitions once 1.2.2 respects the configured model. If tests were passing only because fixtures used the default model, update them to assert against your swapped model.
- Are there production risks with this package model-swapping approach?
- Production-traffic risk is low because the change is confined to the factory layer and is a patch release. The main concerns are test reliability and upgrade hygiene: a late or inconsistent container binding could cause flaky tests, and leftover workaround overrides can conflict. No data migration or config republication is expected for this patch.
- How is the package maintained, and what alternatives should I consider?
- The 1.2.x line is on patch releases, but the public context does not state a support horizon before 2.0 or whether model swapping is a formal contract versus an incidental convenience. Ask the maintainer and check the changelog or issue link for the reported factory failure. Alternatives include building a small approval workflow in-house or choosing a broader Laravel workflow package if you need more than entity requests with approvals.