Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Provider Laravel Package

yukata-roommate/laravel-provider

A Laravel package that streamlines service provider development with reusable helpers for registering config, routes, migrations, views, translations, and container bindings, cutting boilerplate so package and application providers stay clean, consistent, and easy to maintain.

View on GitHub
Deep Wiki
Context7

Getting Started

Install and confirm the provider is actually registered.

composer require yukata-roommate/laravel-provider
php artisan about          # look for the provider in the "Loaded Providers" / package list

The package advertises auto-discovery, so there should be no manual config/app.php edit. Before you write a single line of application code, verify that claim — a zero-star package's README is not evidence. Read its composer.json directly:

cat vendor/yukata-roommate/laravel-provider/composer.json

Check three things in that file:

  1. extra.laravel.providers — the auto-discovery entry. If it is missing, you must register the provider manually.
  2. require — the php and illuminate/* / laravel/framework constraints. Compare against your actual runtime, not the package's advertised range.
  3. autoload.psr-4 — the namespace root, which tells you what to import.

Where to look first. The whole package is one class. Open the provider and read register() and boot() line by line:

find vendor/yukata-roommate/laravel-provider/src -name '*ServiceProvider.php'

Everything the package does day-to-day is visible there: which keys it mergeConfigFroms, which interfaces it binds to which concretes, whether it calls $this->app->singleton() (shared instance) or bind() (new instance per resolution), and which publish tags it exposes. That one file is your real documentation.

Publish the config immediately.

php artisan vendor:publish --provider="YukataRoommate\...\...ServiceProvider"

Use --provider rather than --tag — with no documented tags and no documented config key prefix, you are guessing otherwise. The result lands at config/<package>.php. Commit it. Never ship a Laravel app that relies on a dependency's un-published defaults; the next patch release silently changes your runtime behaviour.

First use case. The package's value proposition is container bindings, so the first thing to try is resolving a service and calling one method on it:

php artisan tinker
>>> app(\YukataRoommate\...\YourClient::class);

If that resolves without a binding error, the integration is live. If it throws Target [X] is not instantiable, the provider is not loaded, the config key is missing, or the binding is conditional on a config value you have not set. That single tinker command is the fastest triage for the entire package.

Implementation Patterns

Constructor injection, not app(). The package exists to make its services injectable. Treat app(Foo::class) inside your own classes as a smell — it hides the dependency and makes tests need the full container.

final class SyncOrders
{
    public function __construct(private readonly YukataClient $client) {}

    public function handle(): void
    {
        $this->client->sync();
    }
}

Laravel resolves SyncOrders from the container, which resolves YukataClient from the package's binding. This works in controllers, queued jobs, artisan commands, and event listeners with no extra wiring.

Bind the contract, not the concrete, in your own code. If the package exposes an interface, type-hint that in your classes and add one thin adapter provider of your own:

// app/Providers/YukataServiceProvider.php
public function register(): void
{
    $this->app->bind(OrderSyncGateway::class, fn ($app) =>
        new YukataOrderSyncGateway($app->make(YukataClient::class))
    );
}

This is the single highest-value pattern with a package at this maturity level. One adapter class means the day the package is abandoned or breaks on a new Laravel major, you rewrite one file instead of grepping the codebase. It also gives you a seam for tests.

Drive behaviour through published config, per environment. The package merges config and gives you a file; use it as the switch point rather than sprinkling options into call sites.

// config/services.php or config/yukata-roommate.php
'yukata' => [
    'endpoint' => env('YUKATA_ENDPOINT'),
    'timeout'  => env('YUKATA_TIMEOUT', 5),
    'enabled'  => env('YUKATA_ENABLED', true),
],

Then gate the integration in your adapter so the dependency can be turned off in an incident without a deploy or a rollback — critical when a single-maintainer package starts failing and you have no upstream to wait on.

Queue it if it does network I/O. A container binding that performs HTTP calls is fine in a controller, catastrophic in a request that also renders a page. Wrap package calls in a job and give it explicit retry/backoff:

final class SyncOrder implements ShouldQueue
{
    public int $tries = 3;
    public array $backoff = [10, 60, 300];

    public function __construct(private readonly int $orderId) {}
}

Testing. Because it is a plain container binding, you override it in tests without touching the package:

$this->mock(YukataClient::class, fn ($m) => $m->shouldReceive('sync')->once());

For config-sensitive paths, use config(['yukata.enabled' => false]) in the test rather than a separate env. If the package registers a singleton and you are seeing state bleed between tests, call app()->forgetInstance(YukataClient::class) in tearDown().

No facade means write your own if you need one. The description lists bindings only. If your team leans on facades, add a five-line facade class over the binding in app/ — do not expect the package to provide one, and do not reach for app() at call sites as a substitute.

Integration tip for existing code. If anything in your app already does what this package does, delete it in the same PR. Two implementations of the same concern is the reliable source of subtle divergence, and it is what makes the eventual removal expensive.

Gotchas and Tips

Config caching will bite you first. Laravel's config:cache runs register() in an environment where env() returns null outside config files. If the package's provider calls env() directly in register(), it will work in dev and silently break in production. Test it explicitly before shipping:

php artisan config:cache && php artisan config:clear

If it breaks, publish the config, replace the package's env() reads with your own config keys, and stop relying on its defaults.

Do not let the package do I/O in register(). Registration happens on every request boot and on every Octane worker start. Anything doing network or filesystem work there shows up as cold-start latency and, under Octane, as stale boot state. Grep the provider for file_get_contents, Http::, curl, and sleep. If present, wrap it — or don't use the package on a hot path.

Binding override order matters. Your adapter provider must load after the package's. Package auto-discovery registers before app/Providers/*, which is what you want — but if you ever add the package to AppServiceProvider::register() yourself, you will silently shadow your own override. Confirm load order with:

php artisan about   # provider list is ordered

Watch out for singleton() bindings holding request state. A client bound as a singleton and configured with per-request data (user token, tenant ID) will leak across requests under Octane. If the provider uses singleton() (read the source — this is exactly why you read it first), either forgetInstance() at request boundaries or resolve per-request via bind() in your adapter.

vendor:publish tag collisions are common and confusing. Always add --provider=. If you publish twice you will overwrite your edited config; keep the published file in VCS so git diff catches it.

Migrations. The description does not mention them, but check anyway before assuming none exist:

php artisan vendor:publish --provider="..." 
php artisan migrate --pretend

Any package-owned schema is a much heavier commitment than a binding — it moves the exit cost from "swap one adapter" to "backfill and cut over." If migrations exist, confirm rollback works in a scratch database first.

Debug the loading, not the code, when things are broken. In order:

composer show yukata-roommate/laravel-provider        # is it actually installed, at what version
php artisan about                                     # is the provider loaded
php artisan config:show yukata                         # did your config merge
php artisan tinker --execute="app(Foo::class)"        # does the binding resolve

Ninety percent of failures are at step two or three, not in the package's business logic.

Pin the version and write down who owns the upgrade. At 0 stars with a single release in March 2025, you are the maintainer of this dependency in practice. Use an explicit constraint ("1.0.*") rather than a caret if you want tight control; either way, add a line to your dependency inventory: what it does, where it is wired, how to disable it (YUKATA_ENABLED=false), and who upgrades it. Without that note, the next engineer pays the full investigation cost — which, with no docs and no changelog, is the entire cost of this assessment again.

Failure surface to verify before production. Trigger them deliberately in staging: unset endpoint in config, provider returning 500, timeout, malformed response. Confirm the package throws a typed, catchable exception rather than dd()-ing or swallowing errors, and that failures land in Laravel's log channel. If it throws bare \Exception, wrap it in your adapter so upstream callers can distinguish retryable transport failures from permanent config errors.

Extension points are limited to what you build. There is no documented event, macro, or driver system here — just a provider, a config file, and bindings. Plan your customisation as an adapter layer in app/, never as edits to vendor/. And re-run the tinker smoke test after every composer update; with no upstream release cadence to rely on, your test suite is the compatibility matrix.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource