fix(core): make get_feature_classes's return docblock scoper-safe#6
Merged
Merged
Conversation
The @return used an absolute …\Feature\FeatureInterface FQCN inside the class-string generic, which php-scoper does not rewrite in docblocks — so a scoped consumer's get_feature_classes() implementation is analysed against the unscoped interface and fails static analysis, forcing a per-consumer @PHPStan-Ignore. Import FeatureInterface and reference the short name (as every other class-string docblock in the package already does); php-scoper rewrites the use statement, so the scoped return type resolves to the scoped interface and consumers need no workaround. Assisted-by: Claude Code:claude-opus-4-8
ahegyes
added a commit
that referenced
this pull request
Jul 4, 2026
… boot report carrier, CRUD field stores, VO grammar, PHP 8.5 idioms Scheduler becomes an ordered-backend-list facade with readiness on the backend contract (SchedulerBackendInterface::is_ready()): schedule writes target the first ready backend, clears and queries span every ready one with declaration-order failure precedence, and create_scheduler() keeps its signature. An empty backend list throws InvalidSchedulerConfigurationException. The kernel exposes boot diagnostics as a PluginBootReport value carrier (BootStatus enum) through a public protected(set) property — plain data rides properties, get_*() stays for derived access. The four group-registering field stores earn their name with descriptor-addressed CRUD (get/set/has/delete + meta_keys) over the form path's storage keys and store-or-revoke semantics; on the form path the processed value is stored verbatim, so validation is the final transformation before persistence. Both settings backends enumerate their option rows for uninstall (option_keys). WPPluginVersionConditional gates third-party plugin dependencies by minimum version. AdminNoticesService self-wires its hooks, validates its dismiss action, and drops the dead pre-6.4 fallback; the stores hook WordPress through instance-addressed callables. The value-object grammar becomes semantic (identity-free + structurally safe property graph; consumption is not a criterion): AdminNotice, FieldProcessingError, and MetaBoxPlacement join Version and PluginHeader; InvalidAdminNoticeException moves to the InvalidValueObjectException family and DependencyRequirement throws its own InvalidDependencyRequirementException. WordPress-global name prefixes are validated at construction in utilities. PHP 8.5 idioms applied where the tooling accepts them: asymmetric-visibility properties replace derivation-free getters (HookHandlerInterface declares $id as a property), readonly classes hoisted, parameter defaults use new-in-initializers, and the scalar output-coercion policy is one shared stringify_for_output(). Remediates 2026-07-03 audit findings #6 #14 #19 #20 #23(doc) #36 #37 #89 #91 #100 #102 #106 #109 #110 #111 and the owner-ruled Scheduler genericity, PluginBootReport, VO-grammar, and modernization decisions. Assisted-by: Claude Code:claude-fable-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The @return used an absolute …\Feature\FeatureInterface FQCN inside the class-string generic, which php-scoper does not rewrite in docblocks — so a scoped consumer's get_feature_classes() implementation is analysed against the unscoped interface and fails static analysis, forcing a per-consumer @PHPStan-Ignore. Import FeatureInterface and reference the short name (as every other class-string docblock in the package already does); php-scoper rewrites the use statement, so the scoped return type resolves to the scoped interface and consumers need no workaround.
Assisted-by: Claude Code:claude-opus-4-8
Summary
Affected packages
wp-framework-bootstrapwp-framework-sharedwp-framework-storagewp-framework-corewp-framework-utilitieswp-framework-settingswp-framework-woocommerceChecklist
composer changelog:add:<package>(one per affected package)composer quality-checkpasses locally (PHPCS + PHPStan + Deptrac + unit tests)README.mdmajor) are explicitly justified belowBreaking changes / migration notes