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

Imagine Laravel Package

prolixlib/imagine

prolixlib/imagine is a Laravel/PHP package that integrates the Imagine image manipulation library, offering a convenient, framework-friendly API for resizing, cropping, and processing images so common image workflows are easier to build and maintain.

View on GitHub
Deep Wiki
Context7

Getting Started

This release (2.0.3) removes the package's preflight check for PHP's allow_url_fopen setting. That is the first thing to understand: the package no longer blocks installation or bootstrapping on hosts where allow_url_fopen=Off — common on hardened shared hosting and some container images. The package still needs a working transport for remote URLs, so verify ext-curl and/or Guzzle are available before your first real request.

Minimal steps:

  1. composer require the package at ^2.0.3.
  2. Publish any config if the package provides it (php artisan vendor:publish --tag=...) and review timeout, retry, and transport options.
  3. Confirm the runtime can reach remote hosts: run a small tinker script or Artisan command that performs one fetch.
  4. Look first at the README's "requirements" section, the package service provider bindings, and the config file — that is where the transport and URL-fetching behavior is wired.

First use case: perform a single remote retrieval inside a queued job rather than a web request. This validates the transport, surfaces TLS/DNS/timeout issues early, and mirrors how you should use the package in production.

Implementation Patterns

  • Inject the package service, don't call it statically. Resolve the client/manager from the container in controllers, jobs, and commands. This keeps tests swappable and lets you bind a fake transport.
  • Wrap remote calls in jobs with retries. Since 2.0.3 no longer fails fast on allow_url_fopen, transport failures now appear at request time. Use $tries, backoff(), and retryUntil() on the job, and let the package's exceptions bubble to the queue worker.
  • Centralize configuration in config/...php. Put base URLs, timeouts, user agents, and auth headers there; read them via config(). Avoid scattering URLs through controllers.
  • Use Laravel's HTTP client fakes in tests. If the package delegates to Guzzle or Laravel's Http facade, Http::fake() and Http::assertSent() are the fastest way to test integration without network access.
  • Compose with caching and rate limiting. For repeated remote reads, wrap calls in Cache::remember() and add a RateLimiter when hitting third-party APIs. The package handles retrieval; your app should handle politeness and cost.
  • Bind a custom transport when needed. If the package exposes a contract or manager, bind your own implementation in a service provider for logging, signing, or proxy support. This is also the cleanest migration path if you later replace the package.

Gotchas and Tips

  • Removing the allow_url_fopen check moves failure later. Previously you got a clear boot-time error; now a host with allow_url_fopen=Off may fail only when a request runs. Add a health check or a smoke-test command that performs one fetch and alerts on transport errors.
  • Do not assume file_get_contents() works for remote URLs. Even though the guard is gone, PHP still refuses remote file_get_contents() when allow_url_fopen=Off. Ensure the package's transport uses cURL/Guzzle, and confirm ext-curl is installed (php -m | grep curl).
  • Check config caching after upgrades. Run php artisan config:clear after updating; stale cached config is a common cause of "why is it still doing X?" behavior.
  • Watch for SSRF and URL validation. With the guard removed, user-supplied URLs deserve explicit validation (scheme allowlist, private-IP blocking). The package is not a security boundary.
  • Debugging transport issues: log the exception class and message, inspect php -i | grep allow_url_fopen, verify DNS and TLS from the host, and test with a known-good URL before blaming the package.
  • Extension points: use the package's config file for timeouts/retries, bind a custom client or Guzzle middleware for logging and auth, and listen for any package events to instrument fetch duration and failure rates.
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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums