From 35d16ea2467b954aeb798c30a0c0837a997e200e Mon Sep 17 00:00:00 2001 From: Olivier Gorzalka Date: Tue, 24 Nov 2026 16:38:33 +0100 Subject: [PATCH 1/3] chore(deps): keep Dependabot off phpstan/phpstan 2.3.6+ until pest-plugin-type-coverage follows (#667) --- .github/dependabot.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6f29822b..9627b831 100755 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,7 +10,14 @@ updates: - "dependencies" - "automerge" versioning-strategy: "increase" - + ignore: + # PHPStan 2.3.6 removed AnalyserResult::getCollectedData(), which pest-plugin-type-coverage 3.x + # still calls: `pest --type-coverage` fails with "Call to undefined method" (#667), so composer.json + # caps phpstan/phpstan below 2.3.6. The fix is only in the plugin 4.0.6+ (Pest 4) and 5.x; lift this + # ignore, and the cap, when the framework moves to Pest 4 or later. + - dependency-name: "phpstan/phpstan" + versions: [">=2.3.6"] + - package-ecosystem: "github-actions" directory: "/" schedule: From 27bc48ef685890f7c70d943734226400531f04ae Mon Sep 17 00:00:00 2001 From: Olivier Gorzalka Date: Tue, 24 Nov 2026 16:48:26 +0100 Subject: [PATCH 2/3] test(e2e): record how fast the machine was next to the nightly performance metrics --- tests/e2e/fixtures/perf/calibration.php | 50 +++++++++++++++++++++++++ tests/e2e/specs/perf-metrics.spec.ts | 25 ++++++++++++- tests/e2e/support/perf.test.ts | 38 +++++++++++++++++++ tests/e2e/support/perf.ts | 36 ++++++++++++++++-- 4 files changed, 144 insertions(+), 5 deletions(-) create mode 100644 tests/e2e/fixtures/perf/calibration.php diff --git a/tests/e2e/fixtures/perf/calibration.php b/tests/e2e/fixtures/perf/calibration.php new file mode 100644 index 00000000..ae615bfc --- /dev/null +++ b/tests/e2e/fixtures/perf/calibration.php @@ -0,0 +1,50 @@ + round($cpu, 1), 'fs_ref_ms' => round($disk, 1)], JSON_THROW_ON_ERROR); diff --git a/tests/e2e/specs/perf-metrics.spec.ts b/tests/e2e/specs/perf-metrics.spec.ts index d83cd923..c9484cd5 100644 --- a/tests/e2e/specs/perf-metrics.spec.ts +++ b/tests/e2e/specs/perf-metrics.spec.ts @@ -20,12 +20,19 @@ import { artisan, homeUrl, runId, wp } from '../support/site'; * boot_ms time from the start of the request to wp_loaded, warm (REST index) * cold_boot_ms the same, on the first request after `discovery:clear` * thumbnail_ms wp_generate_attachment_metadata() for one 2400x1600 JPEG, every size + * + * Next to them the report carries `calibration`: how fast this machine ran two fixed pieces of work + * (cpu_ref_ms, fs_ref_ms). The shared runners differ by up to a factor of two from one night to the + * next, which the comparison cannot tell from a regression; these are recorded to find out how the + * timings follow the machine. They are printed, never judged. */ const out = process.env.E2E_PERF_OUT ?? './test-results/perf-metrics.json'; const warmRuns = 7; const coldRuns = 3; const thumbnailRuns = 3; +const calibrationRuns = 5; const metrics: Metrics = {}; +const calibration: Metrics = {}; test.skip(process.env.E2E_PERF !== '1', 'set E2E_PERF=1 to measure'); test.describe.configure({ mode: 'serial' }); @@ -43,7 +50,7 @@ test.afterAll(() => { } mkdirSync(join(out, '..'), { recursive: true }); - writeFileSync(out, `${JSON.stringify({ measuredAt: new Date().toISOString(), run: runId, metrics }, null, 2)}\n`); + writeFileSync(out, `${JSON.stringify({ measuredAt: new Date().toISOString(), run: runId, metrics, calibration }, null, 2)}\n`); }); /** One REST index request, and the boot time the framework reported for it. */ @@ -96,3 +103,19 @@ test('thumbnail generation', () => { metrics.thumbnail_ms = median(samples); }); + +test('calibration', () => { + const script = readFileSync(join(import.meta.dirname, '..', 'fixtures', 'perf', 'calibration.php'), 'utf8').replace(/^<\?php\s*/, ''); + const cpu: number[] = []; + const disk: number[] = []; + + for (let run = 0; run < calibrationRuns; run++) { + const result = JSON.parse(wp('eval', script)) as { cpu_ref_ms: number; fs_ref_ms: number }; + + cpu.push(result.cpu_ref_ms); + disk.push(result.fs_ref_ms); + } + + calibration.cpu_ref_ms = median(cpu); + calibration.fs_ref_ms = median(disk); +}); diff --git a/tests/e2e/support/perf.test.ts b/tests/e2e/support/perf.test.ts index d74b1041..1279e4a1 100644 --- a/tests/e2e/support/perf.test.ts +++ b/tests/e2e/support/perf.test.ts @@ -2,6 +2,7 @@ import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; import { compareMetrics, + describeCalibration, describeComparison, judgeRun, type Diagnostics, @@ -189,3 +190,40 @@ describe('judgeRun', () => { assert.equal(judgeRun(run({ boot_ms: 109 }), run({ boot_ms: 100 })).failed, false); }); }); + +describe('describeCalibration', () => { + it('says nothing when the run has no calibration', () => { + assert.deepEqual(describeCalibration(undefined, { cpu_ref_ms: 50 }), []); + }); + + it("prints this night's numbers alone when the reference night has none", () => { + assert.deepEqual(describeCalibration({ cpu_ref_ms: 60 }, undefined), ['calibration cpu_ref_ms: 60 ms']); + assert.deepEqual(describeCalibration({ cpu_ref_ms: 60, fs_ref_ms: 9 }, { cpu_ref_ms: 0 }), ['calibration cpu_ref_ms: 60 ms', 'calibration fs_ref_ms: 9 ms']); + }); + + it('compares each number with the reference night', () => { + assert.deepEqual(describeCalibration({ cpu_ref_ms: 75, fs_ref_ms: 8 }, { cpu_ref_ms: 50, fs_ref_ms: 10 }), [ + 'calibration cpu_ref_ms: 75 ms (reference night 50 ms, +50.0 %)', + 'calibration fs_ref_ms: 8 ms (reference night 10 ms, -20.0 %)', + ]); + }); +}); + +describe('judgeRun and the calibration', () => { + const report = (metrics: Record, calibration?: Record) => ({ measuredAt: '2026-11-18T03:30:00Z', run: '1', metrics, calibration }); + + it('never fails on a calibration that moved: the machine is not the code', () => { + const verdict = judgeRun(report({ boot_ms: 100 }, { cpu_ref_ms: 200 }), report({ boot_ms: 100 }, { cpu_ref_ms: 50 })); + + assert.equal(verdict.failed, false); + assert.ok(verdict.lines.includes('calibration cpu_ref_ms: 200 ms (reference night 50 ms, +300.0 %)')); + }); + + it('still fails on a regression, calibration or not', () => { + assert.equal(judgeRun(report({ boot_ms: 150 }, { cpu_ref_ms: 50 }), report({ boot_ms: 100 })).failed, true); + }); + + it('prints the calibration on the first night too', () => { + assert.ok(judgeRun(report({ boot_ms: 100 }, { cpu_ref_ms: 50 }), null).lines.includes('calibration cpu_ref_ms: 50 ms')); + }); +}); diff --git a/tests/e2e/support/perf.ts b/tests/e2e/support/perf.ts index 30db71ef..c05424be 100644 --- a/tests/e2e/support/perf.ts +++ b/tests/e2e/support/perf.ts @@ -151,8 +151,14 @@ export function median(values: number[]): number { /** The nightly measures, in milliseconds. Each is the median of several runs. */ export type Metrics = Record; -/** What one nightly run writes: the metrics and what they were measured on. */ -export type MetricsReport = { measuredAt: string; run: string; metrics: Metrics }; +/** + * What one nightly run writes: the metrics, and how fast the machine was. + * + * `calibration` holds fixed pieces of work that do not depend on the framework (see + * fixtures/perf/calibration.php). It is printed next to the verdict and never judged: the + * reports of the nights before it existed have none. + */ +export type MetricsReport = { measuredAt: string; run: string; metrics: Metrics; calibration?: Metrics }; export type MetricFinding = { metric: string; baseline: number; current: number; change: number }; @@ -226,6 +232,28 @@ export function describeComparison(comparison: Comparison, tolerance = 0.1): str return lines; } +/** + * The calibration as lines for the CI log: this night's, and the reference night's when it has one. + * Information only: the machine is not the code, so it never fails a run. + */ +export function describeCalibration(current: Metrics | undefined, baseline: Metrics | undefined): string[] { + if (current === undefined) { + return []; + } + + return Object.entries(current).map(([name, value]) => { + const before = baseline?.[name]; + + if (before === undefined || before <= 0) { + return `calibration ${name}: ${value} ms`; + } + + const change = (value - before) / before; + + return `calibration ${name}: ${value} ms (reference night ${before} ms, ${change >= 0 ? '+' : ''}${(change * 100).toFixed(1)} %)`; + }); +} + /** The verdict of a nightly run: what to print and whether the job fails. */ export type Verdict = { failed: boolean; lines: string[] }; @@ -238,11 +266,11 @@ export type Verdict = { failed: boolean; lines: string[] }; */ export function judgeRun(current: MetricsReport, baseline: MetricsReport | null, tolerance = 0.1): Verdict { if (baseline === null) { - return { failed: false, lines: ['No baseline yet: this run becomes the reference.', ...Object.entries(current.metrics).map(([metric, value]) => `${metric}: ${value} ms`)] }; + return { failed: false, lines: ['No baseline yet: this run becomes the reference.', ...Object.entries(current.metrics).map(([metric, value]) => `${metric}: ${value} ms`), ...describeCalibration(current.calibration, undefined)] }; } const comparison = compareMetrics(current.metrics, baseline.metrics, tolerance); - const lines = [`Baseline of ${baseline.measuredAt} (run ${baseline.run})`, ...describeComparison(comparison, tolerance)]; + const lines = [`Baseline of ${baseline.measuredAt} (run ${baseline.run})`, ...describeComparison(comparison, tolerance), ...describeCalibration(current.calibration, baseline.calibration)]; return { failed: comparison.regressions.length > 0 || comparison.missing.length > 0, lines }; } From d468abab929febaf93393d7f637bf0d2deb06791 Mon Sep 17 00:00:00 2001 From: Olivier Gorzalka Date: Tue, 24 Nov 2026 17:11:30 +0100 Subject: [PATCH 3/3] chore: release 13.44.0 (Laravel 13.44, pollora/object-cache ^0.3.1) --- CHANGELOG.md | 9 ++++++++- composer.json | 14 +++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31f34a78..447ff3ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,14 @@ All notable changes to the Pollora framework will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/Pollora/framework/compare/v13.43.4...develop) +## [Unreleased](https://github.com/Pollora/framework/compare/v13.44.0...develop) + +## [v13.44.0](https://github.com/Pollora/framework/compare/v13.43.4...v13.44.0) - 2026-11-24 + +### Changed + +- **Built on Laravel 13.44.** The `illuminate/*` packages are required at `^13.44` (they were `^13.43`), and the framework follows Laravel's line again. The test suite and static analysis pass against Laravel 13.44.0. +- **`pollora/object-cache` is required at `^0.3.1`.** 0.3.1 fixes the drop-in when the Composer autoloader it names cannot be read by the web server: it used to stop the whole site with a fatal error when the file existed but could not be opened, and stayed off without a word otherwise. It now stays inert and writes the path to the PHP error log, and `pollora:object-cache:status` has an `Autoloader` line (the path, whether this user can read it, and a flag for a path in the home directory). Run `pollora:object-cache:enable` again to update the drop-in file. ## [v13.43.4](https://github.com/Pollora/framework/compare/v13.43.3...v13.43.4) - 2026-11-24 diff --git a/composer.json b/composer.json index b44821e7..000e1bd7 100644 --- a/composer.json +++ b/composer.json @@ -24,11 +24,11 @@ "require": { "php": "^8.3", "pollora/helper-overrider": "^1.2", - "illuminate/auth": "^13.43", - "illuminate/support": "^13.43", - "illuminate/database": "^13.43", - "illuminate/routing": "^13.43", - "illuminate/console": "^13.43", + "illuminate/auth": "^13.44", + "illuminate/support": "^13.44", + "illuminate/database": "^13.44", + "illuminate/routing": "^13.44", + "illuminate/console": "^13.44", "pollora/abilities": "^1.0", "pollora/ajax": "^1.3", "pollora/assets": "^0.2", @@ -38,7 +38,7 @@ "pollora/entity": "^2.0", "pollora/media": "^0.8 || ^0.9 || ^0.10", "pollora/meta": "^0.1", - "pollora/object-cache": "^0.3", + "pollora/object-cache": "^0.3.1", "pollora/hook": "^2.0.1", "pollora/i18n": "^0.1.1", "pollora/option": "^1.1", @@ -56,7 +56,7 @@ "coduo/php-humanizer": "5.0.3", "nwidart/laravel-modules": "^13.3", "symfony/process": "^7.4 || ^8.0", - "illuminate/config": "^13.43", + "illuminate/config": "^13.44", "laravel/prompts": "^0.3.27" }, "autoload": {