Skip to content

v13.36.1

Choose a tag to compare

@github-actions github-actions released this 16 Oct 12:26
· 135 commits to main since this release
c919610

Added

  • Block Bindings live in their own package, pollora/block-bindings, which the framework requires: the resolver, the source builder and registry, BindingContext, the four sources Pollora ships (pollora/post-meta, pollora/term-meta, pollora/author-meta, pollora/option), BlockBindingDiscovery, the WordPress adapters, the editor data and script (block-bindings.js ships with the package) and the preview route, with their tests. Class names do not change. The framework keeps what needs Laravel: BlockBindingServiceProvider, config/block-bindings.php, the Laravel implementations of the package's contracts (LaravelMethodInvoker, LaravelBindingEvents, LaravelPostFinder), pollora:binding:list, pollora:make:binding and the pollora:doctor check
  • Roles and capabilities live in their own package, pollora/roles, which the framework requires: RoleDefinitionBuilder, RoleRegistry, RoleCompiler, PostTypeCapabilityMap, the capability readers, the WordPress adapters (stored roles, WP_Roles injection, label translation, role usage) and RoleDiscovery, with their tests. Class names do not change. The framework keeps the Laravel side: RoleServiceProvider, the role middleware, the @role directive, the HasRoles bridge ($user->can(), @can), the pollora:roles:* commands and the pollora:doctor check
  • Typed meta lives in its own package, pollora/meta, which the framework requires: MetaAccessor (of(), schemas(), schemaFor(), extend()), the fluent MetaRecord, the schema builder and repository, MetaAuditor, MetaUiDrivers, the value caster, the WordPress adapters, MetaDiscovery and MetaUiDriverConformance, with their tests. Class names do not change. The framework keeps what needs Laravel: MetaServiceProvider, the Meta facade and HasTypedMeta, the Laravel validator (LaravelMetaValidator), the pollora:meta:* commands and the pollora:doctor check
  • The asset classes live in their own package, pollora/assets, which the framework requires: AssetManager, AssetContainer, AssetEnqueuer (Asset::add()->container()->useVite()), AssetFile, the record and the wp-admin notice of a missing build. Class names do not change. The package also resolves Vite builds without Laravel, for a classic theme, a plugin or a Bedrock site. The framework keeps what needs Laravel: the service provider, the Asset facade, ViteManager (Laravel's Vite, where ASSET_URL, a CDN and the application URL keep applying), RootAssetManager and the Laravel implementations of the package's three contracts (ViteManagerFactory, RuntimeContext, PublicPath)

Changed

  • Accepts pollora/query 2.0 alongside 1.x (^1.0 || ^2.0, up from ^1.0): the package now covers every WordPress query class, with terminal methods (first(), ids(), count(), exists()) and the documentation of each builder. Class names and the three existing facades do not change. composer update takes 2.0, and a project that needs 1.x requires pollora/query ^1.0 itself. A few fixes in 2.0 change the result of a query that used to run: where() followed by orWhere() groups the earlier clauses ((a AND b) OR c), DateQuery::inclusive() now takes effect, dates use a 24-hour clock, and an invalid fields(), userPermission() or orderBy() direction throws a QueryException instead of being ignored. The package's upgrading guide lists them
  • The asset classes that left for the package no longer reach for Laravel: AssetEnqueuer receives the hook services, the Vite factory, the runtime and a PSR-3 logger instead of resolving them from the container, AssetFile is resolved through a resolver the provider sets (AssetFile::resolveUsing()), and AssetManager, MissingBuilds and MissingBuildNotice take their public directory, logger and project root as arguments. The rendered HTML of a Pollora site is unchanged, in build and while Vite runs hot
  • An AssetEnqueuer destroyed after its application, as in a test, no longer throws while it reports a failure of its deferred enqueue
  • The typed meta classes that will leave for pollora/meta no longer reach for Laravel: MetaUiDrivers and MetaAccessor::extend() take a PSR-11 ContainerInterface (the Laravel container is one, a driver closure receives the same object), and the key of a data object's property is derived by Pollora\Attributes\Support\Naming instead of Str::snake(). What needs Laravel moved to Pollora\Meta\Infrastructure\Laravel: MetaServiceProvider, LaravelMetaValidator, TypedMetaCheck, MetaListCommand and MetaAuditCommand. The rendered pages, the REST responses and the output of the pollora:meta:*, pollora:binding:list, pollora:roles:* and pollora:doctor commands of a Pollora site are unchanged
  • The roles classes that will leave for pollora/roles no longer reach for Laravel: the label of a #[Role] without one comes from Naming::headline() (the same words as Str::headline()) and Naming::classBasename(). What needs Laravel moved to Pollora\Role\Infrastructure\Laravel: RoleServiceProvider, the role middleware EnsureUserHasRole, the @role directive RoleDirective, the RolesCheck of pollora:doctor and the pollora:roles:* and pollora:make:role commands with their stubs. Roles, capabilities and command outputs of a Pollora site are unchanged
  • The Block Bindings classes that will leave for pollora/block-bindings no longer reach for Laravel: the resolver takes a PSR-11 container, and three contracts carry what Laravel did for it, MethodInvokerInterface (the method of a #[BlockBinding] source gets the services its typed parameters name; LaravelMethodInvoker calls through Laravel's container, ReflectionMethodInvoker by reflection) BindingEventsInterface (BindingResolved reaches Laravel's dispatcher through LaravelBindingEvents) and PostFinderInterface (BindingContext::post() loads the framework's Pollora\Models\Post through LaravelPostFinder, Colt's Post without it, and is typed as Colt's Post, which the framework's extends). The options a project lists in block-bindings.options reach OptionSource and the editor data as an array, read from the config by the provider. Labels and names come from Naming, as Str writes them. What needs Laravel moved to Pollora\BlockBinding\Infrastructure\Laravel: the provider, the doctor check, pollora:binding:list and pollora:make:binding with their stub. Pages, REST responses and command outputs of a Pollora site are unchanged