v2.0.0
·
29 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Added
- SiteEditor module — entirely new module providing the back-end for a WordPress-style site editor experience:
- H0 — extended
theme.jsonschema covering settings, styles, templates, parts, patterns, andmenus.locations - H1 — Templates + template-parts:
TemplateandTemplatePartmodels,TemplateResolver/TemplatePartResolvermerging theme-shipped files with DB user customizations, REST endpoints returning WP/wp/v2/templatesand/wp/v2/template-partsshape, withap.visual-editor.templatesandap.visual-editor.template-partsfilter registration behindclass_existsguards - H2 — Patterns:
BlockPatternmodel +block_patternstable,PatternResolvermerging theme.phppattern files with user-source DB rows, REST endpoints under/api/v1/blocks(synced) and/api/v1/block-patterns/patterns(unsynced) returning WP-shape payloads, andap.visual-editor.patternsfilter registration behind aclass_existsguard PatternFileParserfor theme-shipped pattern files with WP-style header doc-comments (Title:,Slug:,Categories:,Description:,Block Types:)- H3 — Global styles:
GlobalStylesmodel +global_stylestable (singleton-per-theme),GlobalStylesResolverdeep-mergingtheme.jsondefaults with theme-shipped variation files (themes/{active}/styles/{slug}.json) and DB user customization,GlobalStylesEmittertranslating the resolved tree into--wp--preset--*custom properties + per-element CSS rules with content-hash cache invalidation on model save/delete, REST endpoints under/api/v1/global-styles(GET / PUT / DELETE / variations / css) returning WP/wp/v2/global-stylesshape,@cmsGlobalStylesBlade directive for front-end head injection, andap.visual-editor.global-stylessingleton filter registration behind aclass_existsguard - H4 — Menus:
Menu,MenuItem, andMenuLocationAssignmentmodels with REST endpoints for menus, menu items, and theme-declared menu locations
- H0 — extended
- Visual editor integration — opt-in bridge to the optional
artisanpack-ui/visual-editorpackage:block_contentJSON column onpostsandpagestables for visual editor block trees, alongside the existingcontentlongText columnPostandPagemodels adoptArtisanPackUI\VisualEditor\Concerns\HasBlockContentwith a polyfill stub so visual-editor remains an optional integration rather than a hard composer dependency- Auto-registration of
HasBlockContentcontent types into theap.visual-editor.resourcesfilter, plus explicit registration ofPostandPage - Registration of
visual_editor.*permissions when visual-editor is installed
- QueryRuntime service (G4c-1) for resolving
core/queryblock loops at render time - Site settings —
site.*settings registered with a WP-shape/api/v1/settings/siteendpoint and a by-key save path that applies sanitizers and types - Themes lifecycle:
installFromZip()API andPOST /v1/themesupload route for installing themes from a ZIP archive- Strict manifest schema enforcement for theme installs (
WpThemeJsonValidator+WpThemeJsonValidationResult) - Theme lifecycle hooks fired on install and activate
- Updates:
GitLabUpdateSourcenow supports release-asset download URLs in addition to tarball URLs
Changed
- RBAC migration (Wave 4) — the Users module's bundled
Role,Permission,HasRolesAndPermissions, and RBAC migrations have been removed and replaced by composition over the sharedartisanpack-ui/rbacpackage. The cms-framework classes remain at the same paths and subclass the rbac base, so existing imports keep working. See UPGRADE-RBAC.md for migration details. - Relaxed
artisanpack-ui/securityconstraint to allow^2.0in addition to^1.0.3 RolesTableSeederandPermissionsTableSeederare now opt-in; the defaultDatabaseSeederonly runsSettingsTableSeederrolesandpermissionsschemas now expose adescriptioncolumn (via the rbac base schema)- New
role:route middleware alias pairs with rbac'spermission:alias
Fixed
HasFeaturedImagecontent-type trait rewritten to use thefeatureablespivot table (replacing the legacy direct column reference)- Site editor REST routes now use
auth:sanctumso REST clients can pass Bearer tokens - Template parts now accept
navigation-overlayas a valid area; the legacygeneralarea was renamed touncategorizedto match WP core (Keystone #55) UpdateInfo->sha256is now populated from GitLab releasesUsersAPI routes (users,roles,permissions,users/bulk) are now gated behind theauthmiddleware (bug fix #129)PermissionControllernow callsauthorizeResource()so it consultsPermissionPolicylike every other controller in the framework (bug fix #127)PermissionPolicymethods now takeAuthenticatable $user(Laravel's standard signature) instead ofstring|int $id(bug fix #128)- Bulk settings updates wrapped in a DB transaction
- Schema-guarded
ap.visual-editor.*filter callbacks against missing tables PostandPage$fillableno longer includeblock_content(block trees flow through the visual-editor pipeline, not mass assignment)PatternFileParserregexes are now anchored
Removed
- Bundled
Rolemodel,Permissionmodel,HasRolesAndPermissionstrait implementation, and the three RBAC migrations (create_roles_table,create_permissions_table,create_user_role_permission_pivots) — superseded byartisanpack-ui/rbac. The class/trait names are preserved as subclasses for backward compatibility.
Migration / Upgrade
See UPGRADE-RBAC.md for the full upgrade guide. For most apps, the upgrade is composer require artisanpack-ui/rbac:^0.1 && php artisan migrate.