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

Scratch Laravel Package

laravel-bridge/scratch

A lightweight Laravel bridge for scratch work: temporary storage, throwaway records and sandboxed experiments kept out of your main tables. Simple setup, sensible defaults and a clean API make it handy for prototyping, testing and quick one-off tasks.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with composer require vendor/package:^1.7. Version 1.7.0 adds PHP 8.0 support, so confirm your app, CI matrix, and production runtime are on PHP 8.0+ before upgrading.
  • Look first at the package's service provider and published config file. Run php artisan vendor:publish --provider="Vendor\\Package\\PackageServiceProvider" (or the package's documented tag) and review the defaults before changing anything.
  • Verify the package is auto-discovered; if you are on an older Laravel version, register the provider and aliases manually.
  • First use case: resolve the package's main class from the container and exercise its primary API in a Tinker session or a throwaway route. This confirms autoloading, config resolution, and PHP 8 compatibility before you wire it into application code.

Implementation Patterns

  • Prefer constructor injection over facades in application services and jobs. It keeps tests fast and makes dependencies explicit.
  • Keep package configuration in config/ and read it through the package's config keys rather than calling env() directly. Cache the config in deployment (php artisan config:cache) and clear it after any config changes.
  • Wrap third-party calls behind a small application-level adapter or interface when the package touches external systems. This lets you swap implementations and fake the package in tests without coupling domain code to its concrete classes.
  • Use the package's events, middleware, or extension hooks instead of subclassing internals. Subclassing is the most common source of upgrade friction.
  • In tests, use the package's provided fake or mock the underlying client. For database-backed features, combine RefreshDatabase with factories and assert on the package's public behavior rather than internal state.
  • For queued work, serialize only identifiers or plain data into jobs and re-resolve the package service inside handle(). This avoids stale container state and keeps payloads small.
  • Pin the major version in composer.json and let patch/minor releases flow through CI. Because 1.7.0 is a compatibility release, run your full test suite on PHP 8.0 before merging.

Gotchas and Tips

  • PHP 8.0 support does not necessarily mean PHP 8.1+ features are available. If you deploy to 8.0, set "platform": {"php": "8.0.0"} in composer.json so Composer does not resolve dependencies that require newer syntax.
  • PHP 8 changes error behavior and type handling. Watch for new TypeError and ValueError exceptions around null and union-typed arguments that were previously coerced silently.
  • If you extend package classes, match method signatures exactly. PHP 8 is stricter about covariance, contravariance, and optional parameter ordering.
  • After upgrading, clear cached config, routes, and views: php artisan optimize:clear. Stale config caches are the most common cause of "it works locally but not in staging."
  • Check the package's composer constraints before assuming 1.7.0 still supports PHP 7.x. If you need to stay on 7.x, pin to the last release that declares it.
  • Debug with php artisan about to confirm the framework and PHP versions actually in use, then inspect the package's log channel and exception messages. Enable debug logging only in local environments.
  • Extension points to prefer: custom drivers registered through the package's manager, macros where supported, published config overrides, and event listeners. Avoid editing vendor files; use a service provider to bind replacements.
  • Run composer why-not vendor/package 1.7.0 if the upgrade is blocked. It quickly identifies conflicting platform or dependency constraints.
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.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle