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.
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.
Composer\Plugin\Capability, deprecations). An unmaintained plugin is a latent CI breaker on the next Composer major or minor that tightens plugin semantics.Key questions for the requesting team.
type: declaration requires this installer, and is that package itself still maintained?composer.json?allow-plugins entry plus a pinned version constraint and a patching commitment?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).
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.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.topthink/think-installer to config.allow-plugins as false if it appears transitively, and verify composer install --no-plugins succeeds in CI.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.
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 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.extend/ but not autoloaded → runtime Class not found in production only.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.
How can I help you explore Laravel packages today?