Repository navigation
v2.15.6
·
24 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Fixed
- The self-updater now resets OPcache, so PHP-FPM stops running pre-update code (#425).
ApplicationUpdateManagercleared Laravel's caches but never OPcache. Withopcache.validate_timestamps=0(Laravel Forge's OPcache optimisation), PHP-FPM kept the old bytecode for every file it had already compiled, so the site ran a mix of old and new code until PHP-FPM was reloaded. A route cache built afterwards could then name middleware the stale provider never registered, and every page returned 500.opcache_reset()now runs once the files on disk are final: after a successful update, after a rollback, and after a failure that leaves new or half-applied code in place. Inside a PHP-FPM request this clears the pool's cache. From the CLI or a queue worker it can only clear that process's cache, so the updater logs a warning, recordsphp_reload_requiredin the update state, andupdate:perform,update:rollbackandupdate:statustell the operator to reload PHP-FPM. The same happens whenopcache.restrict_apiblocks the reset. The config, route and event caches that were in place before an update are also rebuilt afterwards, each in a fresh PHP process so it is compiled from the new code, instead of leaving a production site uncached. A failed rebuild is logged and does not fail the update.
Performance
- Listing templates, parts and patterns no longer re-queries and re-parses every entity (#424).
TemplateResolver::all()andTemplatePartResolver::all()loaded every row for the active theme and then calledresolve()per slug, which queried the row again, looked up the theme file and re-parsed it: about 35ms per template on a real site. Both now build each entity from the row and theme file already in hand, through a builder shared withresolve(), with one query and one directory scan per call. Parsed theme templates, parts and patterns are memoised by the newParsedThemeFileCachefor the request and in the cache store, keyed on a hash of the file contents (plus the block hydrator and visual-editor version for templates and parts), so editing a theme file takes effect immediately. The store layer is on by default and can be turned off withcms.themes.parsedFileCacheEnabled(THEMES_PARSED_FILE_CACHE_ENABLED), which is useful while developing blocks;cms.themes.parsedFileCacheTtlsets its lifetime (default one hour). An unavailable cache store falls back to parsing, and a parse whose hydration failed is not stored. The site-editorap.visual-editor.*filters also stop runningSchema::hasTable()once their table has been found.