#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname "$0")/.."

command -v php >/dev/null
command -v composer >/dev/null

php -v
composer validate --strict
composer audit

if php -m | grep -qi '^pdo_sqlite$'; then
    php artisan test
else
    echo "SKIP: PHPUnit requires PDO SQLite for its isolated in-memory database."
    echo "Enable PDO SQLite and rerun this verifier before production acceptance."
fi

php artisan route:list --except-vendor
php artisan atlas:status
php artisan optimize

echo "Atlas OS release verification completed."
