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

Composer Module Installer Laravel Package

simplesamlphp/composer-module-installer

Composer plugin that installs SimpleSAMLphp modules via Composer. Define your module as type "simplesamlphp-module" (or "simplesamlphp-assets-*") and it installs into SimpleSAMLphp’s modules/ (or public/) directory. Works with Packagist or private repos.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Limited Laravel Relevance: This package is exclusively for SimpleSAMLphp module management and does not natively integrate with Laravel’s architecture. Laravel’s dependency management relies on Composer packages (via Packagist) and Service Providers, not Composer plugins for module installation. The package’s design assumes a monolithic SimpleSAMLphp installation, which contrasts with Laravel’s modular, package-based ecosystem.
  • Potential Use Case: Only applicable if Laravel embeds SimpleSAMLphp (e.g., for SSO/authentication) and requires module extensibility. Even then, the package would need custom adaptation to fit Laravel’s workflow.
  • Alternatives Exist: Laravel’s Package Development and Service Provider mechanisms already handle modularity without requiring a Composer plugin. This package adds no direct value unless SimpleSAMLphp is a core dependency.

Integration Feasibility

  • High Customization Required:
    • The package lacks Laravel-specific hooks (e.g., ServiceProvider, Package Discovery). Integration would require:
      • Composer Plugin Extensions: Modifying the plugin to recognize Laravel’s autoloading structure.
      • Manual Symlinking: Post-install scripts to link SimpleSAMLphp modules to Laravel’s resources/ or vendor/ directories.
      • Namespace Resolution: Ensuring SimpleSAMLphp modules (e.g., SimpleSAML\Module\*) don’t conflict with Laravel’s App\ or Vendor\ namespaces.
    • No Official Support: The package is abandoned (last release 2023) with zero Laravel-dependent projects, indicating a lack of community adoption.
  • Dependency Isolation:
    • SimpleSAMLphp modules may introduce unexpected dependencies (e.g., PHP extensions, non-PSR-4 autoloading) that conflict with Laravel’s ecosystem.
    • Risk of version skew between SimpleSAMLphp core and modules, leading to runtime errors.

Technical Risk

  • High Risk of Failure:
    • No Laravel Compatibility Guarantees: The package was not designed for Laravel, and reverse-engineering its integration would be error-prone.
    • Maintenance Overhead: Requires forking or maintaining a custom version to address Laravel-specific gaps (e.g., autoloading, service registration).
    • Security Risks: LGPL-2.1 license may introduce legal/compliance issues if SimpleSAMLphp modules include restrictive dependencies (e.g., GPL-licensed code).
  • Operational Complexity:
    • Debugging Challenges: Issues arising from Composer plugin behavior would require deep knowledge of both Laravel and SimpleSAMLphp internals.
    • CI/CD Integration: Automating module installation in Laravel’s pipeline (e.g., GitHub Actions, Docker) would need custom scripts, increasing build complexity.
  • Deprecation Risk:
    • SimpleSAMLphp is less actively maintained than Laravel. If the project migrates away from SimpleSAMLphp, this integration would become obsolete.

Key Questions

  1. Strategic Alignment:

    • Does Laravel require SimpleSAMLphp for core functionality (e.g., SSO), or is this a temporary integration?
    • If not, is there a native Laravel alternative (e.g., Laravel Fortify, Sanctum, or third-party auth packages)?
  2. Integration Scope:

    • Should SimpleSAMLphp run as a separate service (microservice) or be embedded in Laravel?
    • How will modules be discovered and loaded in Laravel (e.g., via config/module.php, dynamic Service Providers)?
  3. Alternatives Assessment:

    • Could Laravel Packages or Symfony Bundles achieve the same goal with lower risk?
    • Are there modern Composer-based solutions (e.g., Spatie’s Laravel packages, Laravel Nova) that avoid SimpleSAMLphp entirely?
  4. Long-Term Viability:

    • Is the team prepared to maintain a fork of this package for Laravel compatibility?
    • What’s the exit strategy if SimpleSAMLphp is deprecated or replaced?
  5. Performance Impact:

    • How will autoloading performance be affected by mixing SimpleSAMLphp modules with Laravel’s PSR-4 autoloader?
    • Are there memory/CPU overhead concerns from running SimpleSAMLphp alongside Laravel?

Integration Approach

Stack Fit

  • Non-Native Fit: This package is not designed for Laravel and requires significant adaptation. The integration would involve:
    • SimpleSAMLphp as a Dependency: Laravel would need to include SimpleSAMLphp (e.g., via composer require simplesaml/simplesamlphp) and configure it as a subsystem.
    • Composer Plugin as a Middleware: The simplesamlphp/composer-module-installer would act as a bridge between Composer and SimpleSAMLphp’s module system, but only within the SimpleSAMLphp namespace.
  • Hybrid Architecture Options:
    1. Embedded SimpleSAMLphp:
      • Install SimpleSAMLphp in Laravel’s vendor/ directory.
      • Use the Composer plugin to install modules into vendor/simplesamlphp/modules/.
      • Challenge: Laravel’s autoloader may not recognize SimpleSAMLphp’s module structure, requiring custom composer.json autoload configurations.
    2. Microservice Integration:
      • Run SimpleSAMLphp as a separate service (e.g., Docker container).
      • Use Laravel’s HTTP client to interact with SimpleSAMLphp’s API.
      • Challenge: Modules would need to be managed externally, complicating deployment workflows.

Migration Path

  1. Phase 1: Proof of Concept (Low Risk)

    • Install SimpleSAMLphp in a sandbox Laravel project:
      composer require simplesaml/simplesamlphp
      composer global require simplesamlphp/composer-module-installer
      
    • Test module installation:
      composer require vendor/simplesamlphp-module-test
      
    • Verify that modules appear in vendor/simplesamlphp/modules/ and are accessible (e.g., via SimpleSAMLphp’s config.php).
  2. Phase 2: Laravel Integration (High Risk)

    • Option A: Embedded Integration
      • Add a custom Composer script in Laravel’s composer.json to symlink modules:
        "scripts": {
          "post-install-cmd": [
            "php artisan simplesaml:link-modules"
          ]
        }
        
      • Create an Artisan command (simplesaml:link-modules) to copy modules from vendor/simplesamlphp/modules/ to Laravel’s storage/app/simplesaml/modules/.
      • Register a Service Provider to load SimpleSAMLphp’s config.php and expose modules to Laravel’s container.
    • Option B: Microservice Integration
      • Deploy SimpleSAMLphp as a Docker container or separate PHP-FPM pool.
      • Use Laravel’s Http facade to communicate with SimpleSAMLphp’s API.
      • No Composer plugin needed; modules are managed externally.
  3. Phase 3: Validation and Optimization

    • Test autoloading performance (e.g., using composer dump-autoload --optimize).
    • Validate namespace isolation (ensure SimpleSAML\Module\* doesn’t conflict with Laravel’s App\ namespace).
    • Automate module updates in CI/CD pipelines (e.g., GitHub Actions, GitLab CI).

Compatibility

  • Composer Version: Requires Composer ≥2.0 (plugin system changes). Laravel’s default Composer version (installed via laravel/installer) may need updating.
  • PHP Version: SimpleSAMLphp supports PHP 7.4–8.2; Laravel 8/9/10 aligns, but older Laravel versions (e.g., 7.x) may conflict.
  • Autoloading Conflicts:
    • SimpleSAMLphp modules use non-PSR-4 autoloading (e.g., include 'module.inc.php'). Laravel’s autoloader may fail to resolve these paths.
    • Workaround: Use composer.json autoload rules to map SimpleSAMLphp modules:
      "autoload": {
        "psr-4": {
          "SimpleSAML\\Module\\": "vendor/simplesamlphp/modules/*/src/"
        }
      }
      
  • Service Provider Conflicts:
    • SimpleSAMLphp’s config.php may override Laravel’s autoload paths or register duplicate services.
    • Workaround: Load SimpleSAMLphp’s config after Laravel’s bootstrap.

Sequencing

  1. Prerequisite: Ensure SimpleSAMLphp is not a critical path for Laravel’s core functionality. If it is, evaluate native Laravel auth solutions first.
  2. Order of Operations:
    • Install SimpleSAMLphp as a dependency.
    • Configure the Composer plugin globally.
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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor