osiemsiedem/laravel-autolink
Laravel AutoLink automatically converts URLs, email addresses, hashtags, and @mentions in text into clickable HTML links. Configurable, framework-friendly, and easy to drop into Blade views or models.
Version 10.0.0 is a major release, but the breaking surface is narrow: Laravel 13 support plus three behavioural fixes to the parsing/validation layer (ignored tags, email local-parts, www. link detection). Treat it as a "bump constraints, re-run your fixtures" upgrade rather than a rewrite.
composer require <vendor>/<package>:^10.0
php artisan vendor:publish --tag=<package>-config # if you haven't already
php artisan config:clear
Where to look first:
composer.json of the package — confirm the new Laravel/PHP floor. 10.0.0 supports Laravel 13, which almost always implies a higher minimum PHP version than your 9.x constraint allowed. Check your own composer.json platform requirement before bumping.config/ in the package — this is where ignored/allowed tags and any parsing toggles live. The tag-matching fix changes how values in this file are interpreted.tests/ directory — the release notes describe exact behaviour changes (dotted local-parts, Unicode punctuation boundaries, case-insensitive full-tag matching). Those fixes will have corresponding new test cases, which are the fastest way to learn the new contract.First use case to validate the upgrade: take a form or endpoint that accepts free text from users (contact form, profile bio, comment body) and push three fixtures through it — [email protected], an address with a trailing dot before the @ ([email protected]), and a paragraph containing visit www.example.com—then… with Unicode punctuation adjacent. Compare output before and after the bump.
Sanitize/parse on output, not on ingest, for user-generated content. The 10.0.0 fixes are all "we now detect things correctly." If you sanitize at write time, every future parser fix requires a data migration to re-derive stored values. Storing raw text and running it through the package at render time means a composer update improves historical content for free. Reserve ingest-time processing for cases where you must index the extracted value (e.g. storing a normalized email for lookups).
Normalize config to canonical tag names. Because ignored-tag detection now matches full tag names case-insensitively, your config no longer needs defensive lowercase/mixed-case duplicates. Collapse entries like ['Script', 'script', 'SCRIPT'] down to ['script']. Do this in a config change, not in a service provider string-manipulation layer — the point of the fix is that the package handles it.
Treat the parser as a boundary service. Wrap calls in a thin app-level class (App\Support\ContentParser) rather than calling the package facade from controllers, jobs, and Blade partials. When a minor release shifts behaviour again, you have one place to add assertions or shims, and it's mockable in feature tests.
Backfill job for stricter email handling. The leading/trailing/repeated-dot rejection is a genuine behaviour narrowing — rows that were previously "valid" may now fail re-validation on edit. Pattern:
// one-off, chunked, idempotent
User::query()->whereNotNull('email')->chunkById(500, function ($users) {
foreach ($users as $user) {
if (! $validator->passes($user->email)) {
Log::channel('data-quality')->warning('legacy invalid email', ['id' => $user->id]);
}
}
});
Report rather than silently null out — you want a list, not data loss.
Table-driven tests for the parser. The three fixes all live in edge cases, which are exactly what hand-written happy-path tests miss. Use a PHPUnit data provider with a fixture corpus: malformed emails (.user@, user.@, us..er@), text with www. abutting em dashes, curly quotes, CJK full-width punctuation, and tags in mixed case. Commit that corpus — it becomes your regression net for 10.1, 10.2, and beyond.
Integration tip for queues: if parsing happens in jobs or listeners, restart workers after the deploy (php artisan queue:restart). A rolling worker fleet running 9.x alongside 10.x web nodes will produce inconsistent parsed output in the same table.
composer why-not laravel/framework 13.* before assuming the bump is trivial.div also suppressing divider, or a wildcard-ish entry — that stops working. Audit your config for short entries that were silently over-matching, and grep your tests for assertions that encoded the old loose behaviour.www. after Unicode punctuation is fixed — so output changes. Anywhere you cached or stored rendered HTML with linkified text will now differ from freshly-parsed output. If you have a cache-busting or content-hash strategy keyed on parsed output, bump the namespace on deploy to avoid mixing pre- and post-fix markup.utf8mb4 and check collation. Unicode punctuation boundary handling only behaves if the database column can actually store those characters. utf8 (3-byte) columns silently truncate or mangle em dashes and curly quotes, which will make the new fix look broken.php artisan tinker with the package's parser directly rather than through your HTTP stack — instantiate it, feed a string, dd() the result. If a config change appears not to take effect, it's almost always a cached config (php artisan config:clear) or an OPcache-stale file in a long-running process.www. at string start). Watch 10.0.x minors and re-run your fixture corpus on each.How can I help you explore Laravel packages today?