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

Upload Crop Image Bundle Laravel Package

marrouchi/upload-crop-image-bundle

A PHP bundle for handling image uploads with built-in cropping. Add file upload and crop workflows to your app so users can select, preview, and crop images before saving, with configurable server-side processing and storage.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Headline finding: this is still not a Laravel package. marrouchi/upload-crop-image-bundle remains a Symfony2 bundle — the Symfony analogue of a package, but structurally incompatible with Laravel's package model. There is no composer.json-declared Laravel service provider, no Facade, no config/ publishable namespace, no Blade views. It ships a *Bundle class, DI extension, YAML/XML service definitions, and Twig templates. Laravel has no bundle registry, no AppKernel, and no templating component to register it against. The package cannot be composer required into a Laravel application in any conventional sense.

What release 0.1.1 changes — and does not change. Two edits: the entity is removed from the bundle and is now supplied by the host application via config.yml; and route generation moves out of server-side templating into JavaScript reading data-* attributes. Neither edit touches the disqualifying facts. "Provide your entity through config.yml" is a Symfony DI extension directive — it presumes a bundle extension class, a config.yml tree, and a Doctrine-mapped entity in the host app. A Laravel application has none of those; its equivalent is an Eloquent model and a config/*.php array, and the bundle has no path to either. The routing change is a re-placement of coupling, not a removal: route URLs are now emitted into markup as data attributes rather than produced by a Twig path() call, so the template layer is still the integration seam — it has simply become a seam that JavaScript consumes instead of one Twig consumes.

Architecture fit — still poor, unchanged. The only structural overlap remains Symfony\Component\HttpFoundation\File\UploadedFile, which Laravel's Illuminate\Http\UploadedFile extends. If the crop logic operates on that class in isolation, that method signature survives a port. Everything around it — kernel bootstrapping, container wiring, entity configuration, view rendering — requires rewriting. The bundle's dependency on symfony/symfony ~2.x and the removed templating service still creates an irreconcilable Composer conflict against Laravel 10/11, which pulls symfony/* v6/v7 components.

Integration feasibility — unchanged in kind, marginally cheaper as source material. The entity removal is a small net positive for extraction: the bundle no longer owns a Doctrine entity, so there is one less thing to delete rather than port. The routing change is also a small positive — it confirms the bundle's URL generation is string-emission into markup, which is trivial to replace and does not require untangling a router integration. Net: the extractable core is still roughly 100–200 lines, and the 1–2 day spike estimate holds. Installation as a dependency remains non-viable.

Technical risk — high, with one correction to the prior assessment. The earlier note that there have been "no releases in ten years" is now falsified by the existence of 0.1.1, and that correction cuts both ways. It is evidence someone is still touching the repository. It is not evidence of a support commitment: no security response process, no dependents, no community vetting. More concerning is the versioning discipline — 0.1.1 removes an entity from the bundle and relocates route generation, both of which are breaking for any existing integrator, shipped at patch level. A maintainer willing to break configuration at x.y.z+1 is a maintainer whose upgrade path you cannot plan against. The Symfony 2.x foundation remains EOL since November 2018, and the package still handles user-supplied binary uploads and filesystem writes, a category where unpatched path handling and MIME-validation gaps matter.

Key questions for the maintainer/owner:

  1. Is the version scheme new? 0.1.1 is inconsistent with the previously observed 2015-era release — was numbering reset, and does 0.1.0 correspond to the old code or to a rewrite?
  2. Is the crop service free of Twig, Assetic, and FrameworkBundle coupling, or is rendering still interleaved with processing?
  3. What are the exact composer.json PHP and symfony/* constraints as of 0.1.1?
  4. Does "provide your entity through config.yml" assume Doctrine, or is it a plain class reference? This determines whether extraction needs a Doctrine shim.
  5. Is image handling GD, Imagick, or both — and is EXIF orientation honored?
  6. Is crop geometry validated server-side, or trusted from the client payload?
  7. What is the license, and is there any test suite?
  8. Who owns the fork if we port it, and where does the maintenance obligation land?

Integration Approach

Stack fit: still no direct fit. Target stack (assumed Laravel 10/11, PHP 8.2+) versus a Symfony 2 bundle. Treat this as a reference implementation, not a dependency. State this explicitly to stakeholders — the failure mode is a well-intentioned engineer spending a week trying to force Composer resolution.

Recommended path (preferred): replace, don't port. The problem space — server-side cropping of uploaded images — is thoroughly served by maintained packages. intervention/image for the processing primitive, paired with spatie/laravel-medialibrary for conversions and storage orchestration, covers the same ground with active security response, PHP 8 support, and Laravel filesystem integration. Client-side crop UI is better sourced from a current library. Roughly a 1 day integration with no fork liability. Release 0.1.1 does not create a gap that would justify revisiting this.

Fallback path: timeboxed extraction. If there is a specific behavioral requirement this bundle satisfies and modern libraries do not, fork and port in this order:

  1. Audit composer.json — confirm license, record constraints, and note whether the 0.1.1 constraints actually moved off Symfony 2.
  2. Isolate the crop class; strip Twig, routing, and container references.
  3. Substitute the application-supplied entity with an Eloquent model or a plain DTO — 0.1.1 makes this an explicit step rather than an implicit one, which is a genuine improvement in clarity.
  4. Rewrite the entry point as an Illuminate\Http\UploadedFile-consuming service (no adapter needed — inheritance is compatible).
  5. Replace DI XML/YAML with a ServiceProvider binding to an interface, and the config.yml entity parameter with config/*.php.
  6. Drop the data-attribute route emission entirely; serve the crop endpoint from routes/web.php returning JSON, and let the front-end call it directly. 0.1.1 makes this cheaper — there is no routing.yml to translate, only markup to discard.
  7. Move storage to Storage::disk() rather than absolute paths.
  8. Add validation rules (image, mimes, max) at the FormRequest layer.

Sequencing: spike in a throwaway branch before committing to the port. The 0.1.1 changes lower the extraction cost slightly, which raises the risk of the spike coming back "clean" while the surrounding plumbing is still underestimated. Gate on: fewer than ~3 classes after stripping views and config, and no hard Symfony service lookups. Otherwise abandon and take the replacement path. Never sequence this behind other feature delivery — the crop path is an upload path, and a broken upload path is a visible incident.

Compatibility note: Laravel's HTTP foundation inheritance means image-processing calls likely port without signature changes, which makes the extraction look deceptively cheap. Budget for the surrounding plumbing, not the pixel math.

Operational Impact

Maintenance — still unacceptable as a live dependency, with a corrected nuance. There is now evidence of recent commit activity, which is better than a fully dormant repository and is worth stating plainly rather than dismissing. It does not change the conclusion. A single-maintainer Symfony2 bundle with no dependents has no support obligation, no security response expectation, and no upgrade path to your runtime; if it is installed, your team is the maintainer from day one. The 0.1.1 changes reinforce rather than relieve this — breaking configuration and routing changes at patch level mean you cannot pin and plan. If it is ported, that obligation becomes visible and attributable, which is the better outcome. Record the ownership assignment either way; abandoned upload handlers surface during security reviews with no clear owner.

Support — effectively none. Documentation is a README from 2015 plus two lines of release notes. Debugging will be archaeology against dead Symfony 2 documentation. There is no changelog discipline, and no version of this package will ever target your PHP runtime.

Scaling — synchronous CPU and memory in the request cycle. Cropping is blocking; large uploads occupy PHP-FPM workers and can exhaust memory_limit inside GD/Imagick before any application-level guard fires. Beyond low-volume internal use, dispatch the crop to a queue job with explicit memory ceilings and image dimension caps enforced pre-crop. Storage must go through Laravel's filesystem abstraction for S3/CDN and multi-instance compatibility — absolute-path writes from a 2015-era bundle break the moment you scale past one node. The 0.1.1 routing change is client-side only and does nothing for any of this.

Failure modes to design against:

  • Memory exhaustion on oversized uploads (no dimension pre-check in era-appropriate code).
  • Orphaned files when crop fails after the original is written — no transactionality across filesystem and DB.
  • Unvalidated crop geometry trusted from the client payload, producing zero-area or out-of-bounds crops.
  • Missing EXIF orientation handling, producing rotated output on mobile captures.
  • Filename handling that may permit traversal or collision on concurrent writes.
  • Silent MIME-type trust rather than content inspection.
  • New in 0.1.1: a misconfigured or absent config.yml entity reference now fails at container-compile time rather than being caught by the bundle's own defaults, and data-attribute routes silently degrade if the template fragment is not rendered.

Ramp-up — low, and that remains the one favorable data point. The codebase is small and the domain is well understood. A mid-level engineer can read it in an afternoon. The real ramp-up cost is organizational: socializing that the package is not Laravel-native, that the dependency route is closed, and that the replacement decision must be made deliberately rather than discovered mid-sprint.

Recommendation: unchanged — reject as a dependency. Approve a 1–2 day spike to confirm the crop logic is extractable, defaulting to intervention/image + spatie/laravel-medialibrary if the spike does not come back clean. Release 0.1.1 is a modest positive for the spike (less Doctrine and router coupling to strip) and a net neutral-to-negative for the package (patch-level breaking changes from a single maintainer). The disqualifying facts remain Symfony2 architecture, an EOL framework underneath, and zero dependency-side vetting.

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