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

Think Installer Laravel Package

topthink/think-installer

A Composer installer plugin for ThinkPHP that places framework extensions into the correct project directories. It customizes Composer install paths so packages land where ThinkPHP expects them, simplifying extension management for ThinkPHP applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What the package actually is. topthink/think-installer is not a Laravel package (nor a general-purpose PHP library). It is a Composer installer plugin for the ThinkPHP ecosystem: it implements Composer\Plugin\PluginInterface and Composer\Installer\InstallerInterface so that packages declaring a ThinkPHP-specific type (e.g. think-extend) get installed into the application's extend/ directory instead of vendor/. Its entire reason for existing is ThinkPHP's legacy convention of loading extensions from non-PSR-4, non-vendor paths.

Architecture fit: poor. A Laravel codebase has no use for this. Laravel resolves packages through Composer's PSR-4 autoloading and, where needed, composer/installers (types like laravel-library, wordpress-plugin). Laravel has no extend/ install target, no think-* package types, and no framework hook that consumes what this plugin writes. Adopting it would either be a no-op or, worse, actively relocate files into paths Laravel never autoloads.

Integration feasibility: technically trivial, strategically meaningless. It is a single small plugin with no runtime dependency graph of its own. composer require topthink/think-installer will resolve. But because it is a Composer plugin, it executes arbitrary code in the installer process, which since Composer 2.2 requires explicit config.allow-plugins consent. So the "integration" cost is not code — it is a governance decision to whitelist an install-time code execution hook for zero functional benefit.

Technical risk: elevated relative to value.

  • Abandonment. Last release 2021-03-25; 13 stars; zero dependents. No security response path.
  • Composer API drift. Composer 2.x has churned plugin/installer interfaces (allow-plugins, Composer\Plugin\Capability, deprecations). An unmaintained plugin is a latent CI breaker on the next Composer major or minor that tightens plugin semantics.
  • Supply chain. Install-time plugins are a privileged code path; whitelisting an unmaintained one broadens blast radius for no gain.
  • Silent failure. If the plugin and framework conventions diverge, installs succeed but files land where nothing loads them — a failure mode that surfaces at runtime, not at build time.

Key questions for the requesting team.

  1. Which concrete ThinkPHP package or type: declaration requires this installer, and is that package itself still maintained?
  2. Is the underlying goal "install a legacy ThinkPHP extension into a Laravel app," or "we saw it in a transitive lockfile"?
  3. Can the target package be replaced with a PSR-4-autoloaded fork, or vendored and namespace-mapped in composer.json?
  4. Are we prepared to add and own an allow-plugins entry plus a pinned version constraint and a patching commitment?
  5. What is the exit criterion — i.e., what would let us remove it within two quarters?

Integration Approach

Stack fit. Treat this as a compatibility shim, not a dependency. Laravel's contract is composer.json autoload maps + service providers. Anything the ThinkPHP extension provides should be re-expressed as (a) a PSR-4 namespace under vendor/, (b) an optional service provider, and (c) config published via php artisan vendor:publish. The installer's only job — placing files in a non-vendor directory — is precisely the convention we should not import.

Migration path (recommended, in order).

  1. Inventory. Identify the transitive or explicit requirer. composer why topthink/think-installer and grep the lockfile for "type": "think-*". Confirm whether the plugin is needed to install something or is merely carried along.
  2. Isolate. If a legacy extension is genuinely required, wrap it: fork or vendor it, namespace it under App\Legacy\… or a first-party acme/think-bridge package with explicit PSR-4 autoload, and hand-write the bootstrapping that the ThinkPHP installer assumed.
  3. Remove the plugin. Drop the requirement, add topthink/think-installer to config.allow-plugins as false if it appears transitively, and verify composer install --no-plugins succeeds in CI.
  4. Codify. Add a CI check that fails on new Composer plugin requirements without an approved allowlist entry.

Compatibility. Pin exactly ("topthink/think-installer": "3.0.x" or whatever the resolved version is) with composer.lock committed; never use a floating constraint on an unmaintained plugin. Validate against the Composer version in CI and against the next Composer minor in a non-blocking job.

Sequencing. Do the inventory and the --no-plugins CI assertion first — they frequently prove the plugin is dead weight and collapse the rest of the work. Only if a real dependency remains do you fund the forking/bridging effort. Budget this as a one-sprint cleanup, not a platform initiative.

Operational Impact

Maintenance. Effectively zero upstream maintenance; last commit 2021, single-digit stars, no dependents. Any fix is ours to carry. That means either a fork in a private registry or a Composer patch (cweagans/composer-patches) — both add permanent overhead disproportionate to the plugin's function.

Support. No vendor, no issue triage, no CVE channel. If it breaks a build, the on-call engineer debugs unfamiliar Composer internals under time pressure. This is the dominant cost: not the code, but the unknown-unknowns an unowned install-time plugin injects into CI and release pipelines.

Scaling. The plugin is install-time only — it has no runtime footprint, so it does not affect request throughput, queue workers, or horizontal scaling. Its scaling risk is organizational: it multiplies the number of moving parts in every composer install across every developer machine, CI runner, and deploy target, and it does so at a privileged layer.

Failure modes to instrument.

  • Composer upgrade makes the plugin incompatible → composer install aborts fleet-wide.
  • allow-plugins not propagated to a new CI image → install silently skips the plugin, producing a green build with missing files.
  • Files installed to extend/ but not autoloaded → runtime Class not found in production only.
  • Lockfile re-resolution bumping to an unreleased/unpinned state.
  • Patch drift when the vendored fork is refreshed.

Ramp-up. Minimal to use, meaningful to own. A mid-level engineer can read the plugin in under an hour; understanding ThinkPHP's install conventions, Composer's plugin capability model, and the allow-plugins semantics takes roughly a day. The real ramp-up cost is institutional: someone must be named owner, and that person must know the exit plan. Given the low opportunity score, the correct TPM recommendation is to decline adoption, remove the requirement where possible, and cap any residual investment at a single cleanup sprint — this package's value is entirely legacy compatibility for a framework we are not running.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings