stillat/documentation-search
A Laravel/PHP package from Stillat for adding searchable documentation to your application, helping you index docs and surface relevant results through a simple search experience.
This assessment reflects v2.0.0. The release notes are terse, so confirm details against the package README and source before rolling out.
composer.json for the exact statamic/cms and laravel/framework constraints. Do not upgrade in place on a Statamic 5 site.composer require <vendor>/<package>:"^2.0", then run any documented publish/install command (php artisan vendor:publish --tag=...). Clear caches afterwards: php artisan config:clear && php artisan cache:clear.$reference = $provider->resolve($key); // now a reference, not an object
$entry = \Statamic\Facades\Entry::find($reference);
If your first use is in Antlers/Blade, check whether the tag/modifier now emits an ID; you may need to resolve it through the corresponding Statamic tag or a small view composer.
final class EntryResolver
{
public function __construct(private Provider $provider) {}
public function entry(string $key): ?Entry
{
$ref = $this->provider->resolve($key);
return $ref ? Entry::find($ref) : null;
}
}
This is also your migration shim: preserve object semantics temporarily while you refactor call sites.
null for stale references. Add a regression test that calls every previously object-returning call site.->title(), ->url(), property access) with reference extraction followed by re-resolution.$provider->resolve($key)->title() or similar will fail with "call to a member function on string/int" errors. Static analysis (PHPStan/Larastan) will catch it only if return types are declared; otherwise grep is your friend.Entry::find($id) returns null; handle it explicitly. Reserve findOrFail for places where a missing reference truly is an error.^6.0. If it also supports ^5.0, test both majors, because Statamic 6's Laravel/PHP baseline and control-panel changes can surface issues that the addon's own tests miss.ray($ref)/ddd($ref) at the boundary saves time.^2.0, not *, and review the addon's changelog for any follow-up patch releases that adjust reference handling.How can I help you explore Laravel packages today?