More xml check
·
3 commits
to main
since this release
Added
- 6 new XML-integrity processors (27 total):
- AnonymousApiExposure — flags
webapi.xmlroutes exposed to anonymous callers without a justifying XML comment - BrokenAcl — detects admin menu entries that reference ACL resources not defined in any
acl.xml - CronIntegrity — detects
crontab.xmljobs whose instance class or method does not exist - GetWriteAntipattern — flags
webapi.xmlroutes where the HTTP verb does not match the semantics of the target service method (e.g.GETon asave*()method) - IndexerCircular — detects circular dependencies declared between indexers across
indexer.xmlfiles - OrphanedCronGroup — detects
crontab.xmljobs placed in a group that nocron_groups.xmldefines
- AnonymousApiExposure — flags
Graphutility (src/Core/Scan/Util/Graph.php) — cycle detection on directed adjacency lists via iterative 3-color DFS, with canonicalized output. Used byIndexerCircularand reusable for any future dependency-graph processorClasses::isImportUsed()— detects whether an imported FQCN is actually referenced in the file body (type hint, instanceof, static call, extends/implements, docblock, direct FQCN reference). Optional$ignoreParentPassthroughflag treats constructor parameters that are forwarded untouched toparent::__construct()as non-usage, enabling sub-class-aware detection- Multi-arg rejection in CLI:
scanandfix-applynow error out when given more than one positional argument instead of silently using the last one.Args::parse()return type changed:restis nowarray<int, string>instead ofstring
Changed
- UseOfObjectManager — useless-import detection rewritten: replaces the previous "imported but no usage tracked" heuristic with
Classes::isImportUsed(..., ignoreParentPassthrough: true). A subclass that importsObjectManagerInterfaceonly to type-hint a parameter forwarded toparent::__construct()is now correctly flagged as a useless import — previously masked by the parent passthrough - AroundPlugins —
deepPluginStackseverity raised frommediumtohigh. Deep around-plugin chains are a real performance and debugging hazard, not a stylistic concern - CountOnCollection — constructor parsing hoisted:
analyzeFile()andmapCollectionReturningMethods()no longer each re-parse the same constructor; parsing happens once inprocess()and is passed in. Minor speedup on large files where both code paths run - SpecificClassInjection — class-file cache: repeated reads of the same target class file (during
extendsClass()checks forAbstractModel/AbstractExtensibleModel) are now cached per-scan, avoiding redundant disk I/O when the same parent class is inspected for many injection sites - HtmlReporter — CSS cached statically:
report.cssis loaded once per process and now throwsRuntimeExceptionif missing instead of silently producing an unstyled report - Api — replaces
echowithCliWriter::info()for the "calling API" log line
Fixed
Content::getLineNumber()not-found return: changed from-1to0for consistency with caller expectations across the codebase. Callers that need to detect "not found" should now check=== 0
Removed
AbstractPreparer::getMappedRule()— unusedMagentoFrameworkPlugin::getFoundCount()override — redundant;AbstractProcessor's default is now used
What's Changed
- Bump softprops/action-gh-release from 2 to 3 by @dependabot[bot] in #11
- Bump actions/upload-pages-artifact from 4 to 5 by @dependabot[bot] in #10
Full Changelog: v1.0.8...v1.2.0