feat(compat): sweep of components against the real core with strict diagnostics
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
# Smoke HTTP del paquete cache (APCu sólo existe en SAPI web).
|
||||
set -u
|
||||
|
||||
check() {
|
||||
local comp="$1" path="$2" expect="$3" body
|
||||
if ! body="$(curl -fsS "$BASE$path" 2>/dev/null)"; then
|
||||
echo "$PKG:$comp|fail" >> "$RESULTS"; return
|
||||
fi
|
||||
if printf '%s' "$body" | grep -qF "$expect"; then
|
||||
echo "$PKG:$comp|ok" >> "$RESULTS"
|
||||
else
|
||||
echo " inesperado en $path: $(printf '%s' "$body" | head -c 200)" >&2
|
||||
echo "$PKG:$comp|fail" >> "$RESULTS"
|
||||
fi
|
||||
}
|
||||
|
||||
check apcache /compat/cache/apcache 'APC_OK'
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
// Router de compatibilidad del paquete cache (APCu via SAPI web).
|
||||
|
||||
use Libs\APCache;
|
||||
use Libs\Router;
|
||||
|
||||
Router::get('/compat/cache/apcache', function () {
|
||||
$key = 'compat_' . bin2hex(random_bytes(4));
|
||||
$ok = APCache::save($key, 'valor-42', 30) !== false
|
||||
&& APCache::get($key) === 'valor-42';
|
||||
APCache::delete($key);
|
||||
$ok = $ok && APCache::get($key) === false;
|
||||
echo $ok ? 'APC_OK' : 'APC_FAIL';
|
||||
});
|
||||
Reference in New Issue
Block a user