trinity/framework
Trinity Framework is a modular PHP framework for building web applications with Laravel-style conventions, offering routing, dependency injection, and database abstractions on a lightweight core. It aims to simplify scalable app development while remaining compatible with the wider PHP ecosystem.
Trinity is a 2015-era framework package, not a Laravel-first add-on. There is no documented service provider, facade, config publish, or artisan command in the repository, and the packagist metadata shows no dependents — so treat it as unknown third-party code and start by reading it rather than installing it.
https://github.com/modpreneur/trinity and inspect composer.json first. Look for the require block (PHP version, illuminate/* constraints) and any extra.laravel.providers / extra.laravel.aliases keys. If neither exists, this is a standalone framework and will not plug into a Laravel application's container or lifecycle.php: >=5.4 and illuminate/*: ~5.0 or similar. On PHP 8.1+ and Laravel 10/11 the install will either fail dependency resolution or install silently and then blow up at runtime on removed functions. Verify with composer why-not trinity/framework before committing anything.composer require trinity/framework --dry-run to see what Composer wants to do to your lockfile, and only then install into a scratch app — never into an existing production codebase. The realistic first use case is a proof-of-concept spike in a legacy PHP 5.6/7.x container, not a feature in a modern app.class, function, and public function in src/ to map it. If it exposes something like a router, container, or HTTP kernel, that is the piece you would test in isolation with a single php -r or standalone index.php bootstrap before touching Laravel.If your goal is "add a capability to a Laravel app," the honest starting move is to look elsewhere. With 2 stars, 0 dependents, and a release from 2015, there is no community signal that this package works with any Laravel version you are likely running.
Because the package exposes no documented Laravel integration, any pattern here is a workaround, and you should treat each one as scaffolding you may have to discard.
trinity.php or subdomain) and let it own its own request lifecycle. Do not try to share Laravel's container or middleware stack — the 2015 code will not understand Illuminate\Contracts\* interfaces introduced later.app/Support/Trinity/ directory that instantiates the package and exposes plain methods (->handle($payload): array). Keep the package types out of your controllers and jobs so you can swap the implementation without a rewrite. This is the single most valuable pattern for a low-signal dependency.ServiceProvider, register it yourself in AppServiceProvider::register():
$this->app->singleton(\Trinity\Whatever::class, function ($app) {
return new \Trinity\Whatever(config('trinity.options', []));
});
This gives you container resolution and makes it mockable in tests. Be aware you are inventing the integration contract; nothing upstream will maintain it for you.config/trinity.php into those in the provider's boot() before any resolution happens. This is where most 2015 packages break — they read getenv() or a hardcoded path at construction time.composer.json ("trinity/framework": "1.x-dev#<commit>") so a stray tag cannot change behaviour under you."repositories": [{"type": "vcs", "url": "[email protected]:yourorg/trinity.git"}]
This is the realistic long-term workflow for an unmaintained dependency — you will be the maintainer whether you plan to be or not.composer require can succeed (especially with --ignore-platform-reqs or loose constraints) and still fatal at runtime on PHP 8 deprecations, each() removal, or dynamic property deprecation in 8.2. Always run your test suite and a real request through the code path, not just an install.composer.json has no extra.laravel block, none of the usual php artisan vendor:publish discovery happens. Do not waste time looking for a config file that ships; it isn't there.src layout, composer dump-autoload -o may expose classes that classmap-authoritative mode then hides, or vice versa. If classes are "not found" in production but fine locally, that is usually an -o/authoritative classmap mismatch.dd()/dump() at the boundary, composer show trinity/framework to confirm what actually installed, and reading vendor/trinity/framework source. Budget for this in estimates — unfamiliar code with zero docs is expensive.ignore-platform-reqs is a last resort, not a setup step. If you find yourself adding it to CI, that is the signal to fork the package and fix the constraints properly, or drop it.vendor/, namespace mistakes will be hard to spot. Keep your adapter under your own namespace and reference the package's FQCN explicitly.composer audit after installing, review the license file in the repo (it is not stated in the metadata you have), and get sign-off before it touches anything handling user input or credentials.How can I help you explore Laravel packages today?