You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [#21] Remove the MockAsset concept
- Delete MockAsset, MockAssetBuilder, and the Assets service that existed
only to build them — work-in-progress placeholder-image code slated for
a ground-up rebuild later.
- Removes 11 of the 13 PHPStan level-4 errors at their source (bogus
@throws tags referencing non-existent exception classes) instead of
baselining WIP code.
- Drop the now-stale MockAsset gotcha from CLAUDE.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [#21] Narrow getSettings() return type for PHPStan
- Add `@method Settings getSettings()` to the Plugin docblock so PHPStan
resolves Settings::$directory at both call sites (Plugin::_registerUrlRules
and ViewController::actionTemplate).
- One annotation, no runtime change; resolves the final 2 of the 13 level-4
errors. `composer phpstan` now exits 0 across src/.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [#18] Expand ECS scope to tests/ and green the codebase
- Add tests/ to ecs.php paths; skip Codeception-generated code (the
gitignored _generated actions trait, the committed actor stubs that
`codecept build` regenerates, and compiled _craft/storage artifacts).
- Autofix the style findings this surfaced — pre-existing trailing
whitespace, a missing EOF newline, an unused `yii\web\View as BaseView`
import in Plugin.php, and closure spacing in the test helpers.
- `composer check-cs` now exits 0 across src/ + tests/.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [#18] Expand PHPStan scope to tests/ at level 4
- Add tests/ to phpstan.neon paths with excludePaths for Codeception
generated code (the _generated actions, the actor stubs, and the
compiled _craft/storage). Committed .gitignore files keep those dirs
present on a clean checkout so the excludePaths always resolve.
- Add three narrow ignoreErrors patterns for the unresolvable actor-class
symbols ($I typed as FunctionalTester, $this->tester, and $I->* module
methods). The patterns name the actor classes explicitly so they can't
mask real src/ findings.
- `composer phpstan` now exits 0 across src/ + tests/ at level 4.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [#18] Run ECS and PHPStan as a CI gate
- Add a `static-analysis` job to ci.yml that runs `composer check-cs` and
`composer phpstan` on push and pull request.
- Single database-free job (not folded into the Codeception MySQL/Postgres
matrix, which would run static analysis redundantly). PHP/Composer setup
mirrors the non-DB steps of codecept.yml, with the Composer cache keyed
on composer.json since the lockfile is git-ignored.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [#18] Add static-analysis CI gate plan doc
Implementation plan for greening PHPStan/ECS and enforcing them in CI,
covering issues #18 and #21. Marked completed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,5 +81,4 @@ Everything wires up in `src/Plugin.php` inside `Craft::$app->onInit()`:
81
81
### Gotchas
82
82
83
83
-**`Navigation::getNav()` hardcodes the `'parts-kit'` folder name** (`src/services/Navigation.php:25`) instead of reading `settings.directory`. The controllers and URL rules respect a custom `directory`, but the nav scan does not—changing `directory` will break nav generation until this is fixed.
84
-
-**`MockAsset` / `MockAssetBuilder`** (`src/models/`) are a work-in-progress feature for rendering placeholder images (generated as Imagick data URLs), exposed via the `assets` service's `make()` builder. Most `MockAsset` methods throw `NotSupportedException`; only width/height/`getUrl()` are implemented.
85
84
-`root.twig` loads the UI from `https://unpkg.com/@viget/parts-kit@^0/...`—the browsing UI requires network access to the CDN.
0 commit comments