laravel-plus/extension
laravel-plus/extension adds a lightweight extension system to Laravel, helping you organize features into discoverable modules, register services and routes, and keep plugin-style functionality isolated. A practical foundation for modular, maintainable Laravel applications.
Verify installability before anything else. This package is archived, so its composer.json almost certainly pins an older illuminate/support range. Check the constraint first:
composer show laravel-plus/extension --all # inspect requires + available versions
If your app is on a current Laravel release, expect a dependency conflict. Options, in order of preference: fork it under your own vendor namespace, install with --with-all-dependencies on a legacy branch, or skip it and copy the two or three helpers you actually need into app/Support/.
Install and look at what it registers:
composer require laravel-plus/extension
Then read, in this order:
composer.json — the require block, and whether it declares extra.laravel.providers (auto-discovery) or expects manual registration.src/ — this is the real API surface. Note every $this->app->bind(), Blade::directive(), macro(), and helper file require.config/*.php — publish it so you can see every knob without reading source:php artisan vendor:publish --provider="LaravelPlus\Extension\ExtensionServiceProvider"
First use case: do not adopt the pack as a unit. The pack is a bundle of unrelated conveniences (helpers, macros, generator commands, directives). Pick the single feature that solves your immediate problem, wire it in, and leave the rest dormant. That keeps your blast radius small when you eventually remove the package.
Adapter-first adoption. Because the package is unmaintained, never call its helpers or macros directly from controllers, models, or Blade views. Wrap each one you use in your own class:
// app/Support/Slug.php
final class Slug
{
public static function make(string $value): string
{
return \LaravelPlus\Extension\...::slugify($value); // the one call site
}
}
When you fork or replace the package, you edit one file instead of grepping the codebase.
Audit-then-enable. Walk the provider and write a short inventory: helpers loaded, macros registered, commands registered, config keys. For each item decide adopt / ignore / reimplement. Anything you can't explain in one sentence, reimplement — a 20-line helper you own beats an unmaintained dependency.
Config pinning. Publish the config file and commit it. Never rely on package defaults for anything behavioural (prefixes, table names, feature toggles) — archived packages ship defaults tuned to a Laravel version you are not running, and a fork or replacement will silently change them.
Version pinning in CI. Never use a floating constraint on an archived package. Pin the exact version in composer.json and commit composer.lock. Treat any lockfile diff on this package as a code review trigger.
Migration-shaped integration. If the pack registers macros on Collection, Str, Request, or Blueprint, centralise them in a single service provider of your own that uses the package's trait/macro registration. That provider becomes the one place you delete from later.
Test against the behaviour, not the package. Write tests against your adapter, so a fork swap does not invalidate your suite. Do not write unit tests that assert on a package class name — you are testing a frozen artefact.
composer.json lacks extra.laravel.providers, register manually in bootstrap/providers.php (Laravel 11+) or config/app.php.str_*, blank(), optional(), array_* that now exist in illuminate/support. A collision produces a fatal Cannot redeclare at boot, not a useful error. Guard by loading the package's helper file conditionally, or fork the file and drop the duplicates.register() are null. If something behaves oddly in production but fine in tests, dump the provider's register vs boot split with php artisan about and a temporary dump() in each.Collection or Str will override or be overridden by a Laravel-native method of the same name depending on version. Grep the provider for macro( and compare against the framework's current method list.php artisan vendor:publish and diff the published config against the package's config/ — published-then-abandoned config files are the classic source of "why is this prefix wrong".composer replace-ing it with your own fork. All three are safe; patching vendor/ is not.How can I help you explore Laravel packages today?