# Changelog

## Score

- CAI 60 → 60 (-0.5)
- Rubric changed (rubric-2026.10.1 → rubric-2026.10.5) — scores are not directly comparable.

## Lenses

- Code Health 98 → 69 (-28.5)
- Architecture 100 → 100 (+0.0)
- Maturity 36 → 43 (+6.6)
- Readiness 74 → 74 (+0.0)
- Security 82 → 82 (+0.0)

## Resolved (4)

- Ambiguous return type and purpose of `getClassLoader`. It is unclear if this returns the current `ClassLoader` instance (singleton-like behavior) or a specific loader for a given class. If it returns the current instance, the `className` parameter is misleading. If it returns a specific loader, it suggests a registry pattern not evident in the rest of the API.
- Documentation: contradicts the code (docs/en/reference/class-loading.rst)
- Semantic overlap and confusion between loading capability and existence checks. `canLoadClass` implies a capability check (can I load this?), while `classExists` implies a runtime state check (is this class already loaded/defined?). In many contexts, `class_exists()` is the standard PHP function, but having a custom wrapper alongside `canLoadClass` creates ambiguity: does `canLoadClass` check if the file exists on disk, or if the class is autoloadable? `loadClass` performs the action. The distinction between 'can load' and 'exists' is not clearly defined by the signatures.
- Workflow token permissions not restricted

## New (9)

- Ambiguous distinction between loading capability and execution. `canLoadClass` suggests a check (like `class_exists` or `file_exists`), while `loadClass` performs the actual inclusion. However, `ClassLoader` typically implements `spl_autoload_register` which calls `loadClass`. Having a separate `canLoadClass` is often redundant if `loadClass` is the primary entry point, or confusing if `canLoadClass` doesn't actually load but just checks paths. More critically, `classExists` is also present, which is a standard PHP function wrapper. The intent of `canLoadClass` vs `loadClass` is not clearly distinct in naming convention compared to standard patterns (e.g., `canLoad` vs `load`).
- Orphaned file (src/ClassLoader.php)
- Orphaned file (src/Proxy/Exception/InvalidArgumentException.php)
- Overlap with standard PHP functions. `classExists` is a direct wrapper around `class_exists()`. `canLoadClass` is a custom check. The presence of `classExists` suggests a utility layer, but `canLoadClass` is specific to the loader's logic. This creates a mixed API where some methods are thin wrappers and others are domain-specific. It's not a strict duplication, but it contributes to API noise.
- Workflow token permissions not restricted (.github/workflows/coding-standards.yml)
- Workflow token permissions not restricted (.github/workflows/continuous-integration.yml)
- Workflow token permissions not restricted (.github/workflows/release-on-milestone-closed.yml)
- Workflow token permissions not restricted (.github/workflows/static-analysis.yml)
- Workflow token permissions not restricted (.github/workflows/website-schema.yml)
