PageSpeed Watcher: Laravel 13 support, route discovery, and watcher:run-tests

A practical package update for teams that already run PSI from Laravel and need the next layer of scheduling and discovery.

We open-sourced PageSpeed Watcher so Laravel apps could run Google PageSpeed Insights on a schedule, store results, and see API usage without rebuilding the same client every time. That first release was deliberately narrow. This update fills the gaps we kept hitting ourselves: support for current Laravel majors, a real batch runner for stored pages, route-based page discovery, retries that honour the config you already publish, and metrics the schema already expected.

// What changed on main

The package now declares Illuminate components for Laravel 11, 12, and 13 (PHP 8.2+; Laravel 13 needs PHP 8.3+). CI runs a matrix across those combinations so we are not guessing when a new Illuminate release lands. We also require illuminate/database and illuminate/cache explicitly, and dropped unused Symfony crawler dependencies that were never part of the route-discovery path.

On the operational side, config keys that already existed for retries now drive behaviour. Transient PSI failures (429, 5xx, connection errors) retry with exponential backoff from PSI_RETRY_ATTEMPTS and PSI_RETRY_DELAY. extractCoreMetrics() now includes Total Blocking Time and Speed Index, matching the columns already present on watcher_test_results.

// New commands

watcher:discover-routes

Scans Laravel GET routes without path parameters, applies include/exclude patterns from config, and syncs rows into watcher_pages. This is package-scoped discovery from your application routes, not sitemap crawling of external client sites (that remains an Apogee Watcher concern).

watcher:run-tests

Loads active pages, runs PSI for mobile, desktop, or both, and stores results. Options include --pages=all or comma-separated IDs, plus --json for scripting. The README now includes a Laravel Scheduler example keyed to DAILY_TEST_TIME.

Existing commands gained --json as well: watcher:test-page, watcher:usage, watcher:discover-routes, and watcher:run-tests.

// Install or update

composer require apogee/laravel-pagespeed-watcher:dev-main

php artisan vendor:publish --tag=watcher-config
php artisan vendor:publish --tag=watcher-migrations
php artisan migrate

php artisan watcher:discover-routes
php artisan watcher:run-tests --strategy=both
php artisan watcher:usage --json

If you already had the package pinned to an older dev-main commit, run composer update apogee/laravel-pagespeed-watcher. The release that carries these changes is commit f274630 on the public repository.

// Package versus SaaS

This remains a single-app Laravel package. Multi-tenant organisations, external-site sitemap discovery, budgets, alerts, and white-label PDF reports stay in Apogee Watcher. The SaaS consumes the same Composer package from GitHub; agency product features do not live in this repository.

Background on why we published the package in the first place: Open-sourcing PageSpeed Watcher.

// Links

Issues and pull requests are welcome, especially from teams scheduling tests across more than one environment.

APOGEE INFORMATION SYSTEMS · Greece · Luxembourg · GitHub