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

Resource Bundle Laravel Package

rafrsr/resource-bundle

rafrsr/resource-bundle is a lightweight PHP package for structuring and managing application resources. Install it via Composer and integrate it into Laravel or Symfony projects to organize resource-related logic with a simple, reusable bundle.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Confirm platform requirements first: release 3.0.0 bumps Symfony support to 4.x, which generally means PHP 7.1.3+ and a Laravel version that ships Symfony 4 components (Laravel 5.6+). If you are on Laravel 5.5 or older, stay on the previous major line.
  • Install with an explicit constraint: composer require vendor/package:^3.0. Check the package’s composer constraints before upgrading in a mixed-dependency project.
  • Laravel package auto-discovery should register the service provider. If your app disables discovery, add the provider to config/app.php manually.
  • Publish any config/assets the package exposes: php artisan vendor:publish --provider="Vendor\\Package\\ServiceProvider".
  • First use case: open php artisan tinker, resolve the package’s primary service or facade, and run a read-only call to confirm container wiring and configuration. Then move the same call into a controller, command, or job.

Implementation Patterns

  • Prefer constructor injection in controllers, jobs, and commands. Use the facade mainly in Blade views, quick scripts, or legacy code where DI is awkward.
  • Keep package configuration in config/ and drive environment-specific values through .env. Run php artisan config:cache in production and clear it during local debugging.
  • For long-running or remote operations, wrap package calls in queued jobs with explicit timeouts and retry limits. Restart workers after deployment: php artisan queue:restart.
  • In tests, bind a fake/mock implementation into the container or use any package-provided fake helpers. Assert the interaction rather than hitting external services.
  • Add a CI matrix for the Laravel/Symfony 4 versions you actually support. Run composer update --prefer-lowest periodically to catch overly loose constraints.
  • If the package dispatches events or exposes extension points such as custom drivers or macros, use those rather than subclassing or forking. Register customizations in a dedicated service provider.
  • For scheduled workflows, call the package through a scheduled command or job rather than directly from Kernel::schedule(), so failures are retried and logged consistently.

Gotchas and Tips

  • 3.0.0 is a major version. The Symfony 4 bump drops Symfony 3 support; read the CHANGELOG/UPGRADE notes before upgrading. Use composer why-not vendor/package 3.0 to find blocking dependencies.
  • Verify auto-discovery is active. A missing provider often looks like a “class not found” or “target class does not exist” error during container resolution.
  • After publishing or editing config, run php artisan config:clear. If you use php artisan optimize, stale cached config and services can hide binding errors—clear caches before debugging.
  • Symfony 4 requires PHP 7.1.3+ and may require extensions such as mbstring. Check composer check-platform-reqs in CI and production.
  • Avoid resolving the package in a service provider’s register() method if it touches config, the database, or the filesystem. Defer to boot() or a deferred provider.
  • When debugging, wrap calls with Log::debug() and inspect storage/logs/laravel.log. For queue failures, check the failed-jobs table and worker logs.
  • Prefer container bindings and config overrides over editing vendor code. If the package wraps Symfony components, you can often swap an implementation through the container without forking.
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.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle