Weave Code
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

Installers Laravel Package

composer/installers

Custom installer paths for Composer. Maps package types (e.g., WordPress plugins/themes, Drupal, Joomla) to appropriate directories so dependencies land where your CMS expects them, with flexible installer definitions for multi-project setups.

View on GitHub
Deep Wiki
Context7

A multi-framework Composer library installer

Frequently asked questions about Installers
How does composer/installers help with Laravel asset management?
It automates the placement of package assets (e.g., JS/CSS in `public/`, configs in `config/`) during `composer install` or `update`, eliminating manual `php artisan` commands like `storage:link` or `config:cache`. This is especially useful in CI/CD pipelines where you want to avoid repetitive steps.
Can I use this package with Laravel 5.5 or older versions?
The package officially supports Laravel 5.5+, but older versions may require additional dependencies like `composer/semver`. Test thoroughly in your environment, as some Laravel-specific optimizations (e.g., `post-install-cmd` hooks) might not work as expected.
What’s the difference between `installer-paths` and custom Composer scripts?
`installer-paths` defines where assets should go (e.g., `public/{$name}`), while custom Composer scripts (like `post-install-cmd`) trigger actions. This package replaces manual scripts for asset linking, reducing boilerplate. However, you can still use scripts for other tasks.
Will this break existing `php artisan` commands in my CI/CD pipeline?
No, it’s designed to *replace* repetitive `artisan` commands (e.g., `storage:link`) with automated Composer steps. Audit your pipeline first—remove redundant commands after testing. Conflicts can arise if both the installer and your scripts try to modify the same directories.
How do I configure custom paths for non-standard Laravel directory structures?
Use the `installer-paths` key in `composer.json` to define custom mappings, like `"extra": {"installer-paths": {"app/Resources/{$name}": ["type:resource"]}}`. This is useful for monorepos or projects with non-default structures, but test thoroughly to avoid broken asset links.
Does this package work with Symfony or other non-Laravel PHP frameworks?
Yes, it’s framework-agnostic. You can define custom `installer-paths` for any project, but Laravel-specific optimizations (like `post-install-cmd` hooks) won’t apply. It’s ideal for Symfony or custom frameworks needing automated asset installation.
How do I handle environment-specific asset paths (e.g., `public/staging/` vs. `public/prod/`)?
The package doesn’t natively support environment-specific paths, but you can use Composer’s `post-install-cmd` scripts to symlink or move assets post-install. Alternatively, configure paths dynamically via environment variables in your `installer-paths` definitions.
Are there performance concerns with adding this to my Composer workflow?
The overhead is minimal—it runs during `composer install`/`update` like any other post-install script. Benchmark with `composer install --profile` to measure impact. If you’re already using `php artisan` commands, the trade-off is usually worth it for automation.
What if I have conflicting `post-install-cmd` scripts (e.g., from Laravel Forge or Envoyer)?
Order matters. Explicitly define the sequence in `composer.json` under `scripts`. Place `composer/installers` early if it’s a dependency, or late if it should run after other scripts. Test in CI to ensure no race conditions.
Is there a way to use this without modifying `composer.json` globally?
Yes, you can scope configurations to specific packages using `extra.installer-paths` per-package. For example, a package’s `composer.json` can define its own paths, and the installer will respect them during installation. This is useful for libraries or plugins.
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.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai