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

Unified Asset Installer Laravel Package

phpdocumentor/unified-asset-installer

Composer custom installer for phpDocumentor assets. Installs packages of type phpdocumentor-template into /data/template instead of /vendor so templates land where phpDocumentor expects them. Intended for template authors; plugin support is planned.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Purpose Alignment: The package is a Composer custom installer tailored for phpdocumentor assets (templates/plugins), addressing a niche but critical need for non-standard installation paths (/data/template instead of /vendor).
  • Laravel Relevance: While Laravel primarily uses Composer for dependencies, this package is not directly Laravel-specific but could be leveraged for:
    • Documentation tools (e.g., phpdocumentor for API/docs generation).
    • Custom asset pipelines where Composer-managed assets need non-standard paths (e.g., themes, plugins).
  • Architectural Constraints:
    • Requires Composer integration (not a Laravel service provider or facade).
    • Limited to phpdocumentor-related projects unless extended for broader use (e.g., phpdocumentor-plugin type, as noted in the TODO).

Integration Feasibility

  • Low Coupling: The package operates at the Composer layer, not the Laravel framework layer. Integration would require:
    • A composer.json with "type": "phpdocumentor-template" (or future phpdocumentor-plugin).
    • Explicit dependency on phpdocumentor/unified-asset-installer.
  • No Laravel-Specific Hooks: No need for service providers, config publishing, or publishable assets. Installation is purely Composer-driven.
  • Dependency Isolation: Since the package is archived and has 0 dependents, its long-term viability is uncertain. Risk of bitrot or abandonment exists.

Technical Risk

  • Archived Status: The package is archived with no active maintenance. Risks include:
    • Compatibility breaks with newer Composer versions.
    • Unresolved TODOs (e.g., phpdocumentor-plugin type).
    • No security patches for potential vulnerabilities.
  • Composer-Specific: Relies on Composer’s custom installer API, which may evolve or deprecate.
  • Limited Use Case: Only applicable if your project:
    • Uses phpdocumentor for documentation.
    • Needs non-standard asset paths (e.g., /data/template).
    • Can tolerate the archived state.

Key Questions

  1. Why use this over alternatives?
    • Are there modern alternatives (e.g., Laravel’s mix/vite for assets, or custom Composer scripts)?
    • Is phpdocumentor a hard requirement, or could another tool (e.g., robo, dep for docs) suffice?
  2. Maintenance Strategy
    • How will you handle archived package risks (e.g., forks, local patches)?
    • Is there a backup plan if Composer’s custom installer API changes?
  3. Scope Expansion
    • Could this be extended for Laravel-specific asset types (e.g., laravel-theme)?
    • Would a custom Composer script (e.g., post-install-cmd) be simpler than a custom installer?
  4. Documentation & Tooling
    • How will this integrate with Laravel’s asset pipelines (e.g., public_path() vs. /data/template)?
    • Are there CI/CD implications (e.g., path assumptions in tests/deployments)?

Integration Approach

Stack Fit

  • Composer-Centric: Fits projects where:
    • Assets are managed via Composer (e.g., themes, plugins).
    • Non-standard paths are required (e.g., /data/template).
  • Laravel Workarounds:
    • If using phpdocumentor for docs, this could decouple asset paths from /vendor.
    • For Laravel assets, alternatives like:
      • Laravel Mix/Vite: For frontend assets.
      • Custom Composer scripts: To symlink/move assets post-install.
      • Package development: Extend the installer for Laravel-specific types.
  • Anti-Patterns:
    • Avoid if the goal is generic Laravel asset management (use Laravel’s built-in tools instead).
    • Not suitable for runtime asset loading (e.g., plugins loaded via require_once).

Migration Path

  1. Assessment Phase:
    • Audit existing asset workflows to confirm need for non-standard paths.
    • Test if phpdocumentor is the only tool requiring this.
  2. Proof of Concept:
    • Create a minimal composer.json with "type": "phpdocumentor-template" and verify installation.
    • Test path resolution in Laravel (e.g., storage_path('app/data/template')).
  3. Integration Steps:
    • Add dependency to composer.json:
      "require": {
          "phpdocumentor/unified-asset-installer": "^1.0"
      }
      
    • Configure phpdocumentor packages with "type": "phpdocumentor-template".
    • Update Laravel’s asset resolution logic (if paths differ from /vendor).
  4. Fallback Plan:
    • If risks are too high, implement a custom Composer script to move assets post-install:
      "scripts": {
          "post-install-cmd": [
              "php artisan vendor:publish --tag=phpdocumentor-assets --force"
          ]
      }
      

Compatibility

  • Composer Version: Tested with older Composer (due to the alphabetical name bug). May need adjustments for Composer 2.x+.
  • Laravel Version: No direct conflicts, but path assumptions (e.g., public_path() vs. /data/template) must be handled manually.
  • PHP Version: Likely compatible with Laravel’s PHP requirements (8.0+), but no guarantees due to archived status.

Sequencing

  1. Pre-Integration:
    • Decide if this is a one-time setup (e.g., for docs) or a reusable pattern.
    • Document path conventions (e.g., /data/template vs. Laravel’s storage_path()).
  2. During Integration:
    • Install the package and verify asset paths.
    • Update CI/CD to account for new paths (e.g., .gitignore, deployment scripts).
  3. Post-Integration:
    • Monitor for Composer/path resolution issues.
    • Plan for long-term maintenance (e.g., forks, alternatives).

Operational Impact

Maintenance

  • High Effort:
    • Archived Package: Requires vigilance for Composer breaks or security issues.
    • No Community Support: Issues may go unanswered; may need internal patches.
  • Mitigation Strategies:
    • Fork the repo and maintain locally.
    • Set up monitoring for Composer custom installer deprecations.
    • Document workarounds for known limitations (e.g., missing phpdocumentor-plugin type).

Support

  • Debugging Challenges:
    • Issues may stem from Composer internals (e.g., custom installer behavior), not Laravel.
    • Limited community resources due to archived status.
  • Support Plan:
    • Internal runbook for common issues (e.g., path resolution failures).
    • Fallback to alternatives (e.g., custom scripts) if the package becomes unmaintainable.
    • Leverage Laravel’s issue trackers for path-related questions (e.g., storage_path() usage).

Scaling

  • Limited Scalability:
    • Only scales to projects using phpdocumentor with non-standard paths.
    • Not a general-purpose solution for Laravel asset management.
  • Scaling Workarounds:
    • For larger teams, standardize on Laravel’s asset tools (Mix/Vite) and use this only for docs.
    • If extending for plugins/themes, create a custom installer (not tied to phpdocumentor).

Failure Modes

Failure Scenario Impact Mitigation
Composer custom installer deprecation Package breaks in future Composer Switch to custom scripts or symlinks.
Path resolution issues Assets not found at runtime Validate paths in CI/CD.
Abandoned package Security/unpatched vulnerabilities Fork and maintain.
Laravel path assumptions Conflicts with public_path() etc. Explicitly map /data/template to Laravel paths.

Ramp-Up

  • Learning Curve:
    • Moderate: Requires understanding of:
      • Composer custom installers.
      • phpdocumentor asset structure.
      • Laravel’s path resolution (if bridging the two).
  • Onboarding Steps:
    1. Document the workflow for new team members (e.g., "Why /data/template?").
    2. Create a template composer.json for new phpdocumentor packages.
    3. Add CI checks to verify asset paths post-install.
  • Training Needs:
    • Composer internals: For debugging custom installer issues.
    • Laravel paths: If integrating
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.
terminal42/code-quality-tools
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