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

Composer Installers Extender Laravel Package

oomphinc/composer-installers-extender

Extends Composer Installers to add custom installer types and paths without forking. Define extra installer mappings for plugins/themes/modules and other packages, keeping your project’s directory structure consistent across Composer installs.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Use Case Alignment (Updated for 2.0.0):

    • Retains full compatibility with custom package types (e.g., laravel-module, theme) but now enforces PSR-2 standards and PHP 7.1+, aligning with modern Laravel (8+) and Composer 2.x ecosystems.
    • Breaking changes (e.g., Installer class rename to Installers\Installer) may require updates to custom installers or third-party integrations extending this package.
    • Development improvements (PHPUnit, PHP_CodeSniffer) suggest better testability and code quality, reducing long-term technical debt for maintainers.
    • Composer 2.x support is now mandatory, eliminating legacy compatibility overhead for projects using Composer 1.x.
  • Laravel Synergy (Unchanged):

    • Continues to work seamlessly with Laravel’s service provider auto-discovery and modular architectures (e.g., illuminate/modules).
    • No functional changes to Laravel integration; breaking changes are internal to the package.

Integration Feasibility (Updated)

  • Breaking Changes:

    • Class Renames:
      • OomphInc\ComposerInstallersExtender\Installer → OomphInc\ComposerInstallersExtender\Installers\Installer
      • OomphInc\ComposerInstallersExtender\InstallerHelper → OomphInc\ComposerInstallersExtender\Installers\CustomInstaller
      • Impact: Any custom installers or monkey-patched logic relying on these classes must be updated.
    • PHP 7.1+ Requirement: Drops support for PHP 7.0, requiring projects to upgrade.
    • Composer 2.x Mandate: Projects using Composer 1.x must migrate (though Composer 2.x is now the default for Laravel 8+).
  • New Opportunities:

    • PSR-2 Compliance: Easier collaboration with Laravel’s codebase (which also follows PSR standards).
    • Development Dependencies: Enables unit testing and static analysis for custom installers, improving reliability.

Technical Risk (Updated)

Risk Area Severity Mitigation Strategy
Breaking Class Changes High Audit all custom installers; update imports and logic. Use composer show -a to find dependencies.
PHP 7.1+ Requirement Medium Upgrade PHP version if not already compliant (Laravel 8+ requires PHP 7.4+).
Composer 2.x Migration Medium Follow Composer 2.x migration guide. Test in CI first.
Custom Installer Failures High Write tests for custom installers using phpunit/phpunit.
Laravel Caching Issues Low Unchanged; clear caches post-install if packages modify Laravel’s config/routes.

Key Questions (Updated)

  1. Are there any custom installers or third-party packages extending composer-installers-extender? If yes, how will the class renames (Installer → Installers\Installer) be addressed?
  2. Is the project using Composer 1.x? If yes, what is the migration plan to Composer 2.x?
  3. What is the current PHP version? If <7.1, what are the upgrade constraints (e.g., hosting limitations)?
  4. Are unit tests or static analysis (PHPStan/Psalm) part of the CI pipeline? If not, how will the new development dependencies (phpunit, php_codesniffer) be leveraged?
  5. How will custom package post-install scripts be validated in CI? (e.g., symlinks, config publishing, database migrations?)

Integration Approach

Stack Fit (Updated)

  • Core Stack Compatibility:
    • PHP 7.1+: Now mandatory; Laravel 8+ (PHP 7.4+) is fully compatible.
    • Composer 2.x: Required; projects must migrate from Composer 1.x.
    • Laravel 5.5+: Unchanged, but Laravel 8+ is recommended for Composer 2.x parity.
  • Tooling Synergy (Updated):
    • PHPUnit/PHP_CodeSniffer: Enable testing custom installers and enforcing PSR-2 compliance.
    • Composer 2.x: Faster installations and better dependency resolution for large projects.
    • Laravel Forge/Envoyer: Automate Composer 2.x migrations and PHP upgrades in deployment pipelines.

Migration Path (Updated)

Phase Action Tools/Commands
Pre-Migration Audit custom installers for class dependencies. grep -r "OomphInc\\ComposerInstallersExtender\\Installer" .
PHP/Composer Upgrade Upgrade PHP to 7.1+ and migrate to Composer 2.x. composer self-update + Composer 2.x migration guide
Class Refactoring Update custom installers to use renamed classes. Find/replace in IDE or script.
Testing Add PHPUnit tests for custom installers; run PHP_CodeSniffer. composer require --dev phpunit/phpunit squizlabs/php_codesniffer
CI/CD Update Update CI to use Composer 2.x and PHP 7.1+. Example: .github/workflows/ci.yml with composer:2 and php:7.4.
Rollout Deploy with feature flags if custom installers are critical. Gradual rollout with monitoring.

Compatibility (Updated)

  • With Laravel Ecosystem:
    • Unchanged: Works with Laravel’s auto-discovery, modules, and packages.
    • Composer 2.x: Better performance for large projects (e.g., monorepos with many custom packages).
  • With Third-Party Tools:
    • Laravel Package Tools: No conflicts; may benefit from PSR-2 compliance.
    • Custom Scripts: Post-install scripts must be tested with Composer 2.x (e.g., post-install-cmd behavior changes).
    • PHPStan/Psalm: Can now analyze custom installers for type safety.

Sequencing (Updated)

  1. Pre-Integration:
    • Audit: Identify all custom installers and dependencies on renamed classes.
    • Upgrade: Migrate PHP to 7.1+ and Composer to 2.x in a staging environment.
  2. Pilot Phase:
    • Test non-critical custom packages first (e.g., themes, plugins).
    • Validate post-install scripts and Laravel auto-discovery.
  3. Full Rollout:
    • Update all custom installers and CI/CD pipelines.
    • Train developers on Composer 2.x and PHP 7.1+ changes.
  4. Optimization:
    • Add unit tests for custom installers.
    • Automate PSR-2 compliance checks in CI.

Operational Impact

Maintenance (Updated)

  • Proactive Tasks:
    • Class Refactoring: Monitor for deprecated class names in future updates.
    • Composer 2.x: Stay updated on Composer 2.x best practices (e.g., composer.json schema changes).
    • PHP Versioning: Plan upgrades for PHP 8.x (Laravel 9+).
    • Testing: Enforce PHPUnit and PHP_CodeSniffer in CI for custom installers.
  • Reactive Tasks:
    • Composer 2.x Issues: Debug platform checks or vendor directory changes.
    • PHP Deprecations: Address PHP 7.1 deprecations (e.g., create_function) in custom scripts.
    • Custom Installer Failures: Use PHPUnit to isolate issues in post-install logic.

Support (Updated)

  • Troubleshooting:
    • Common Issues:
      • Class 'OomphInc\ComposerInstallersExtender\Installer' not found → Update imports to Installers\Installer.
      • Composer 2.x platform requirements → Adjust config.platform-check in composer.json.
      • PHP 7.1 deprecation warnings → Update custom scripts to PHP 7.4+ syntax.
    • Debugging Tools:
      • `com
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.
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk