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

Framework Laravel Package

topthink/framework

ThinkPHP is a fast, simple MVC PHP framework for web development, offering routing, ORM, caching, templating, and a rich toolkit for building applications quickly. This package is its core framework.

View on GitHub
Deep Wiki
Context7

ThinkPHP Framework

Frequently asked questions about Framework
Is topthink/framework a Laravel package?
No. topthink/framework is ThinkPHP, a full-stack, opinionated PHP MVC framework that is a peer to Laravel rather than a plugin for it. It ships its own container (think\App), ORM (think-orm), template engine, router, session handling, and global helper functions. It is Composer-installable, which is usually why it turns up in Laravel package scans, but there is no service provider, facade, or official Laravel bridge.
Can I install topthink/framework inside an existing Laravel application?
You should not. ThinkPHP assumes it owns the front controller, the autoloader configuration, the error and exception handler, and a namespace of global helper functions, so co-loading it into Laravel produces helper collisions, container ambiguity, and conflicting PSR-4 roots. No official integration layer exists, and any glue you write would be bespoke code your team maintains indefinitely. Treat it as a separate runtime, not a library you drop into an existing app.
How do I install ThinkPHP with Composer?
The framework itself is installed with composer require topthink/framework, though most projects start from the application skeleton (topthink/think) so the front controller, config directory, and routing bootstrap are in place. ThinkPHP expects to control the entry file and autoload configuration, which is why a clean standalone project is recommended over grafting it into another framework. After install, configuration lives in the config directory and routes are typically defined in route files rather than attributes.
Which PHP versions does ThinkPHP support?
Release 8.1.4 includes adjustments for PHP 8.5 compatibility, which shows the project is tracking the PHP release train rather than lagging behind it. However, there is no clearly documented supported-version matrix, so the compatibility signal should be read from release notes rather than assumed. Confirm the exact supported PHP range for your target version before committing to a deployment baseline.
How do I integrate ThinkPHP with a Laravel-based platform?
Integrate at arm's length: deploy ThinkPHP as an isolated service with its own container, virtual host, and CI pipeline, then expose an OpenAPI contract that the Laravel side consumes through its HTTP client or a queue consumer. That is a network boundary rather than an integration project, and it avoids shared session stores, shared vendor directories, and shared ORM models. The psr/http-message ^2.0 widening makes it marginally easier to align shared DTOs and HTTP value objects, but it does not make Laravel middleware or HTTP kernel components portable.
Does ThinkPHP support PSR-15 middleware like Laravel?
No. ThinkPHP has its own middleware pipeline and its own console, and it does not interoperate with Artisan or the Laravel HTTP kernel. The recent widening of the psr/http-message constraint to ^2.0 improves PSR-7 message compatibility, which helps when sharing DTOs and HTTP value objects across a service boundary. It is not PSR-7 or PSR-15 middleware alignment, so do not read that changelog line as ThinkPHP speaking the same HTTP stack as Laravel.
What license does topthink/framework use, and can we ship it?
ThinkPHP is generally published under Apache-2.0, but a package scan flagged the license as NOASSERTION, meaning the SPDX identifier is not reliably declared. Legal must confirm the actual license before any code enters your supply chain, and engineering work should not be sequenced ahead of that confirmation. Nothing in the 8.1.4 patch release changes this open question.
How does ThinkPHP's ORM compare to Eloquent?
ThinkPHP uses think-orm, its own ORM and query builder with models, relations, and migrations, which is functionally comparable to Eloquent but entirely separate. You cannot share Eloquent models or think-orm models across the boundary without creating coupling that is hard to test cleanly. If the two services talk, do it through JSON contracts or a shared database behind an anti-corruption layer rather than a shared model layer.
How do I test a ThinkPHP application?
ThinkPHP applications are typically tested with PHPUnit against the framework's own bootstrap, and the project does not provide Laravel-style helpers such as RefreshDatabase or HTTP assertion traits. You will need to build your own fixtures, database reset strategy, and request-level test harness for the isolated service. Keep that test suite and its CI pipeline entirely separate from the Laravel estate so failures and dependencies do not bleed across runtimes.
Is ThinkPHP actively maintained, and is it safe for production?
The project is maintained, with 8.1.4 arriving as a maintenance patch containing bug fixes, internal method adjustments, and PHP 8.5 compatibility work, with no breaking changes or deprecations. The practical risks are elsewhere: thin third-party package support, sparse English documentation, its own self-contained tooling surface, and security advisories that may not reach the channels your Laravel estate monitors. In a Laravel-standardized organization it is an outlier by default, and is a reasonable choice mainly in a China-facing context where ThinkPHP talent and ecosystem are locally abundant.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource