diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-21 03:13:24 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-23 22:07:16 +0900 |
| commit | cec38036d6b3d5a4bd009f2eef3bd88791ab5828 (patch) | |
| tree | f752079278ff48b5a0acef3caff1b1daa1424124 /docs | |
| parent | 765b7749d31675d3cbf541b146ead1aafd6d6ae9 (diff) | |
| download | php-shirabe-cec38036d6b3d5a4bd009f2eef3bd88791ab5828.tar.gz php-shirabe-cec38036d6b3d5a4bd009f2eef3bd88791ab5828.tar.zst php-shirabe-cec38036d6b3d5a4bd009f2eef3bd88791ab5828.zip | |
feat(plugin-class-classifier): add query helper for single-class lookups
Answers how a given class is treated at the plugin boundary, accepting a
PHP source file, a Rust source file, or a (short or fully qualified)
class name. Reads report.json and generates it first when missing. Rust
paths resolve by normalized segment matching because the snake_case
mapping is not reversible for acronyms (io_interface.rs -> IOInterface).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/dev/plugin-class-classification.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/dev/plugin-class-classification.md b/docs/dev/plugin-class-classification.md index db48880f..263161cb 100644 --- a/docs/dev/plugin-class-classification.md +++ b/docs/dev/plugin-class-classification.md @@ -445,6 +445,26 @@ workflow on a Composer upgrade: run the classifier before updating the diff the two files — review only the changed rows. A brand-new class lands in a category (or in the violation list) without any human re-derivation. +### Querying a single class + + scripts/plugin-class-classifier/query <target>... + +answers "how is this class treated?" for one or more targets, from +`report.json` (generated on the fly when missing; staleness is not +checked). A target may be a PHP source file, a Rust source file, or a class +name — fully qualified or just the short name, case-insensitive: + + query composer/src/Composer/Util/Git.php + query crates/shirabe/src/io/io_interface.rs + query Locker + +Rust paths are resolved by normalized segment matching against the report's +FQCNs rather than textual case conversion, because the snake_case mapping +is not reversible for acronyms (`io_interface.rs` → `IOInterface`). Vendor +class names resolve at package granularity. The output shows category +(including an overridden category's computed value), direction, +reachability, reasons, attributes, and the mutator methods. + ### Analysis limits All conservative: |
