Repository navigation
Immutable
release. Only release title and notes can be modified.
Added
- Query loops can filter on a host's own taxonomies (#439).
QueryRuntime::applyTaxQuery()only knewcategoryandpost_tag, so any other taxonomy left the loop unfiltered. It now passes those to a newap.cmsFramework.query.taxQueryfilter, with(Builder $query, string $taxonomy, list<int> $terms, string $operator, string $postType), and listeners constrain the builder in place and return it. The built-in taxonomies don't change, and with no listener an unmapped taxonomy stays a no-op. Unlike the built-ins, the filter also receivesNOT IN,AND,EXISTSandNOT EXISTS, so a listener can implement them. Any other operator, or a taxonomy that isn't 1–64 letters, digits,_,-,.or:, never reaches the filter.
Changed
- Plugin and theme changes now refresh the runtime synchronously.
PluginManager::installFromZip(),installFromDisk(),activate(),deactivate()anddelete(), andThemeManager::installFromZip()andactivateTheme(), now runqueue:restartand, when the site has cached config, routes or events, rebuild each cache in a freshphp artisanprocess (up to 120 seconds each) before returning. Admin requests that make these changes take longer on a host with compiled caches, and every queue worker restarts after its current job (#450, #453). cms.updates.opcache.web_resetdefaults to off whenAPP_ENV=testing. Left unset, the CLI web-OPcache reset chain is skipped wheneverapp()->runningUnitTests()is true, without a warning or aphp_reload_requiredflag. A deployed server that runs withAPP_ENV=testingshould setCMS_UPDATES_OPCACHE_WEB_RESET=true(#456).
Fixed
- Plugin updates that download in the same second no longer share an archive (#460). On the legacy
update_urlfeed path,UpdateManager::downloadUpdate()named its temp file fromtime()alone and buffered the whole archive in memory. Two updates in the same second wrote to the same file, so one update could extract the other's archive after its own checksum had passed, and the first update to finish deleted the archive the other still needed. The download now streams throughStreamsDownloadsToDiskto a randomly named file, like the source-backed path. That path also applies thecms.updates.download_timeouttimeout and https-only redirects. A non-2xx response is still reported as a download failure. Plugin and theme backup archives get a random suffix too, so two backups of the same version in the same second no longer overwrite each other. - Host and plugin test suites no longer reach a real PHP-FPM socket or the loopback route (#456). Since #453, every plugin or theme install, activation, deactivation and delete run from the CLI went through the web OPcache reset chain, so a downstream test suite made a FastCGI request to any PHP-FPM socket it found, an HTTP request to
app.url's loopback route and, if configured, rancms.updates.php_reload_command. A newcms.updates.opcache.web_resetsetting (CMS_UPDATES_OPCACHE_WEB_RESET) turns the chain off or on. Left unset, it is off while the application runs its unit tests and on otherwise. A skipped reset records the method asnullwithout flaggingphp_reload_requiredor logging a warning. The same applies to the self-updater and to the reset after a plugin's Composer install.UpdateStateStore::recordOpcacheReset()takes an optional$reloadRequired. - The core self-updater signals queue workers to restart after a rollback (#457).
ApplicationUpdateManager::rollback()restored the snapshot and reset OPcache but never ranqueue:restart, so a worker that loaded the failed release's classes, above all the one that ranPerformUpdateJob, kept them until it was restarted by hand.rollback()now runsqueue:restartafter its OPcache reset, and so does a failure with no snapshot to restore. - The core self-updater signals queue workers to restart after an update (#452).
ApplicationUpdateManagerrebuilt the compiled caches and reset OPcache but never ranqueue:restart, so a worker started before the update, including the one runningPerformUpdateJob, kept the old framework classes until it was restarted by hand. It now runsqueue:restartafter the OPcache reset, after a successful update and when a failure finishes forward. The restart moved into a newRestartsQueueWorkerstrait that the self-updater and the plugin and theme managers share. - Plugin and theme installs and activations go live on production hosts (#453). With a route cache in place, a newly activated plugin's named routes didn't exist until
route:cachewas run, and nothing reset OPcache or restarted queue workers.PluginManager::installFromZip(),installFromDisk(),activate(),deactivate()anddelete(), andThemeManager::installFromZip()andactivateTheme(), now rebuild the caches the site had, reset OPcache and runqueue:restart, as updates do since #450. Each change refreshes once per request: an update's own deactivate and reactivate, a delete's deactivate and the OPcache reset after a Composer install (#438) are folded into it, andcms:plugins:syncrefreshes once, only when something changed. The managers report the outcome throughopcacheResetMethod()andphpReloadRequired(), and the install, activate, deactivate and delete endpoints returnopcache_reset_method,php_reload_requiredand awarning, like the update endpoints. A change that fails after it was saved, such as anactivatedlistener that throws, still refreshes before the failure is rethrown. - A rolled-back plugin or theme update resets OPcache and rebuilds the caches it cleared (#454). After a failed update restored its backup, PHP-FPM could keep serving bytecode compiled from the failed version's files, and caches cleared by the deactivate around an active plugin's update stayed cleared. Once the backup is restored, the plugin and theme
UpdateManagers now run the same refresh as a successful update. When no OPcache reset reached the web server, the failed update's 422 error bag gains aphp_reload_requiredmessage, and the plugin 409 and theme 500 responses carryopcache_reset_methodandphp_reload_required. - Plugin and theme updates now go live on production hosts without manual steps (#450). On a host with
opcache.validate_timestamps=0, cached routes and a queue worker, an update only changed files. PHP-FPM kept a mix of old and new bytecode, the route cache kept the old routes, and workers ran the old job classes, so new methods and named routes failed until PHP-FPM was reloaded,optimizewas run and PHP-FPM was reloaded again. After a successful plugin or theme update,UpdateManagernow rebuilds the config, route and event caches the site had, in a fresh process and whatevercms.plugins.autoClearFrameworkCachessays, then resets the web server's OPcache through the self-updater's chain (#429), then runsqueue:restart. The update endpoints reportopcache_reset_methodandphp_reload_required, plus awarningto reload PHP-FPM when no reset reached it. The cache rebuild moved fromApplicationUpdateManagerinto a newRebuildsCompiledCachestrait. - Theme Image borders and shadows land on the
<img>in the editor canvas (#449).GlobalStylesEmitterput a block'sstyles.blocksborder and shadow on its wrapper, so an Image's frame wrapped its caption in the canvas, unlike the Blade front end since visual-editor 1.20. Border and shadow declarations now follow visual-editor'sBlockStyleCssCompiler::FEATURE_SELECTORS(Image, Post Featured Image and Avatar on their<img>, and the shadow of Button and Table on their inner element), with a built-in copy of the map for older visual-editor versions. - Saved
_resolved*attributes are stripped before a record's content is stamped (#448).rendered_contentrelied on the query pass stripping them by default, so a query pass that threw would let a saved_resolvedShareLinkswin over whatPostResolvercomputes.HasRenderedBlockContentnow strips them as its own step, with visual-editor'sResolvedAttributes::strip()(orPostResolver::stripSavedAttributes()), and tells the query pass the tree is already stripped. - Site-editor filters keep all-digit slugs such as
404(#447). Theap.visual-editor.templates,template-parts,patternsandnavigationfilter callbacks merged witharray_merge(), which renumbers integer keys, so a static404entry and a resolved404template both survived and visual-editor's resolver returned a 500. They now usearray_replace(). - A plugin's Composer packages now reach PHP-FPM without a manual reload (#438). On a host with
opcache.validate_timestamps=0, installing, updating or activating a plugin with acomposerblock succeeded, but every later request ran from PHP-FPM's cached pre-installautoload_static.php,bootstrap/cache/packages.phpandservices.php. The package's classes and service provider didn't exist for the site until PHP-FPM was reloaded.PluginManagernow resets OPcache once the packages are installed. In a web request it callsopcache_reset(). From the CLI, such asworkshop:checkinorcms:plugins:*, it uses the self-updater's chain from #429: FastCGI tocms.updates.opcache.fpm_socket, then the signed loopback route, thencms.updates.php_reload_command. If nothing reaches the web server, the install still succeeds and a warning tells the operator to reload PHP-FPM, with the reason each mechanism failed. The chain moved fromApplicationUpdateManagerinto a newResetsWebOpcachetrait, which both managers use.