Skip to content

Commit 36983d1

Browse files
authored
docs: scrub references to a specific consumer (Scriptor) throughout (#27)
* docs: scrub references to a specific consumer (Scriptor) throughout iManager is a general-purpose embeddable CMS framework. Calling out one specific host application (Scriptor) implies a primary / blessed consumer that doesn't exist — the library is consumer-agnostic and the docs should read that way. Rewrites all consumer-naming mentions across user-facing and planning docs, and moves the host-side cutover plan into the host's own repo. Changes ------- User-facing: - `README.md` — drops "the reference consumer is Scriptor", drops "shipped with Scriptor ≤ 1.x" and "use Scriptor ≤ 1.x" framing, drops the link to the Scriptor-integration phase plan. - `CHANGELOG.md` — Phase 12 cache invalidation hook and Phase 14e files entries lose their "(Scriptor's …)" call-outs in favour of the underlying capability. - `docs/migration-guide.md` — Step 5 drops the "Scriptor's own switchover is documented in …" reference; the workaround note describes a self-referential parent field generically. - `docs/api/README.md`, `docs/api/domain.md`, `docs/api/field-types.md` — three stray references rewritten generically (cache subsystem blurb, lazy-listener tip, render() motivation). Planning: - `docs/imanager-2.0-plan.md` — Phase 14 reframed as "First-Consumer- Cutover (Release-Gate)"; release strategy, phase-status row, and acceptance criteria use host-neutral language. - `docs/imanager-analysis.md` — header reframes as a 1.x analysis; drops the "embedded in Scriptor 1.12.1" framing. Removed: - `docs/imanager-2.0-phase-14-plan.md` — this is the consumer-side cutover detail plan; it belongs in the consumer's own docs/. * ci: strip auto-set GitHub OAuth from composer auth before install `shivammathur/setup-php@v2` automatically copies `secrets.GITHUB_TOKEN` into Composer's global `github-oauth.github.com` config to lift the unauthenticated Packagist rate limit. GitHub now issues JWT-shaped `ghs_*` installation tokens (uppercase letters, dots, dashes), which Composer 2.x's `BaseIO::setAuthentication` validation regex rejects as "invalid characters" — `composer install` then dies before fetching any dependency. We don't actually need the token for public-Packagist installs (the unauthenticated limit is fine for our matrix). Unset the OAuth entry right after `setup-php` runs and let Composer fall back to anonymous requests. Bundled into this docs PR so the PR's CI can go green on this branch — a CI infra hotfix on a standalone branch wouldn't help, since CI runs the workflow file from the PR branch itself.
1 parent 163c161 commit 36983d1

10 files changed

Lines changed: 97 additions & 509 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ jobs:
3232
coverage: none
3333
tools: composer:v2
3434

35+
# shivammathur/setup-php auto-writes secrets.GITHUB_TOKEN to
36+
# composer's global github-oauth config. GitHub now issues
37+
# JWT-shaped ghs_* tokens (uppercase letters, dots, dashes)
38+
# that older Composer 2.x BaseIO validation rejects, breaking
39+
# `composer install` before any package is fetched. We don't
40+
# need the token for public-Packagist installs anyway; strip
41+
# it so Composer falls back to anonymous Packagist requests.
42+
- name: Strip auto-set GitHub OAuth from composer auth
43+
run: composer config --global --unset github-oauth.github.com || true
44+
3545
- name: Get composer cache directory
3646
id: composer-cache
3747
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
114114

115115
- `Imanager\Cache\FilesystemCache` implementing PSR-16
116116
`CacheInterface`; HTML snippet caching with TTL + atomic write.
117-
- Invalidation hook published as a domain event so listeners
118-
(Scriptor's `PageCacheInvalidationListener`) can clear on writes.
117+
- Invalidation hook published as a domain event so host listeners
118+
can clear cached entries on writes without monkey-patching the
119+
storage layer.
119120

120121
### Phase 13 — Files & upload
121122

@@ -150,7 +151,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
150151
captions / alt text); `File` domain object + `FileRepository`
151152
updated; full test coverage (`feature/file-title-column`).
152153
- `feat(files): File::withPosition()` helper for ordered file
153-
re-numbering used by Scriptor's pages-edit drag-handle (#21).
154+
re-numbering — supports drag-and-drop reordering in host editor
155+
UIs without re-saving the surrounding item (#21).
154156

155157
### Phase 16 — Docs & examples (in progress)
156158

README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,24 @@ iManager is a small CMS **framework**, not a CMS application: you embed
88
it inside your own PHP app and get a typed domain model, a Repository
99
layer over SQLite (JSON columns + FTS5), a Field-Type plugin system,
1010
file storage with on-demand thumbnails, and a CLI for schema and
11-
migration ops. The reference consumer is
12-
[Scriptor](https://github.com/bigin/Scriptor), a flat-file CMS that
13-
boots iManager and adds an Editor UI on top of it.
11+
migration ops. Use it under any PHP front-end you like — a hand-rolled
12+
admin tool, a flat-file CMS, an internal API, a static-site generator
13+
that needs a typed content store. iManager has no opinion about how
14+
your application is shaped.
1415

1516
---
1617

1718
## Status
1819

1920
**🚧 2.0 development in progress — not for production use.**
2021

21-
iManager 2.0 is a ground-up rewrite of the iManager library that
22-
shipped with Scriptor ≤ 1.x. The 2.0 line replaces the flat
23-
`var_export`-based persistence with SQLite (JSON `items.data` column +
24-
generated columns + FTS5), introduces typed domain models, a Repository
25-
/ Query layer, a CLI tool, and a clean field-type plugin system. The
26-
2.0.0 Packagist tag is targeted for Phase 17 — until then,
27-
`bigins/imanager:2.0.x-dev` is the way to consume it.
28-
29-
For the current production-ready 1.x line, use Scriptor ≤ 1.x.
22+
iManager 2.0 is a ground-up rewrite of the 1.x library. The 2.0 line
23+
replaces the flat `var_export`-based persistence with SQLite (JSON
24+
`items.data` column + generated columns + FTS5), introduces typed
25+
domain models, a Repository / Query layer, a CLI tool, and a clean
26+
field-type plugin system. The 2.0.0 Packagist tag is targeted for
27+
Phase 17 — until then, `bigins/imanager:2.0.x-dev` is the way to
28+
consume it. The 1.x line remains available for production use.
3029

3130
---
3231

@@ -176,8 +175,6 @@ Available composer scripts:
176175

177176
- **Master plan** (multi-phase rewrite, phase status):
178177
[`docs/imanager-2.0-plan.md`](docs/imanager-2.0-plan.md).
179-
- **Phase 14 detail plan** (Scriptor integration):
180-
[`docs/imanager-2.0-phase-14-plan.md`](docs/imanager-2.0-phase-14-plan.md).
181178
- **Changelog**: [`CHANGELOG.md`](CHANGELOG.md).
182179
- API reference, migration guide (1.x → 2.0), deployment guide,
183180
field-type cookbook, and query cookbook are landing during Phase 16.

docs/api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ tells you which source file to read next.
5151
| `Imanager\Enum` | `FieldType` (the 16 built-in enum cases), `SqliteAffinity` (storage class hint), `InputErrorCode` (validation error codes). | `src/Enum/` |
5252
| `Imanager\Files` | File-storage abstraction (`FileStorage` interface, `LocalFileStorage`), upload validation, and `ImageProcessor` for on-demand thumbnails. `FileRepository` (under `Storage`) tracks file *metadata*; this subsystem moves the bytes. | `src/Files/` |
5353
| `Imanager\Http` | Small request-layer toolkit: `SessionStore` (with `NativeSessionStore` default), `Csrf` (per-form tokens, capped LRU), and request/URL helpers. iManager does *not* ship a router. | `src/Http/` |
54-
| `Imanager\Cache` | PSR-16 cache contract and `FilesystemCache` (hash-keyed, two-level directory fanout, TTL metadata in-file). Used by Scriptor for section-cache; library itself stays uncached for predictability. | `src/Cache/` |
54+
| `Imanager\Cache` | PSR-16 cache contract and `FilesystemCache` (hash-keyed, two-level directory fanout, TTL metadata in-file). Hosts wire it to whatever they want to cache (rendered fragments, query results, …); the library itself stays uncached for predictability. | `src/Cache/` |
5555
| `Imanager\Search` | `FullTextSearch` over a SQLite FTS5 mirror of `items`. CLI command `fts:rebuild` rebuilds the index from scratch. | `src/Search/` |
5656
| `Imanager\Templating` | Single-purpose `{{var}}` substitution for short strings (pagination links, alerts). Caller is responsible for escaping. **Not** a view layer. | `src/Templating/` |
5757
| `Imanager\Validation` | `Sanitizer` facade over HTMLPurifier (sanitize) and Parsedown (markdown). Pure functions; safe to call repeatedly. | `src/Validation/` |

docs/api/domain.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,9 @@ $provider->subscribe(ItemDeleted::class, function (ItemDeleted $event): void {
375375
```
376376

377377
Listener instantiation can be lazy — wrap the closure body in a
378-
`static $listener = null` guard if construction is expensive
379-
(Scriptor's `ImanagerBootstrap` does this for `PageCacheInvalidationListener`).
378+
`static $listener = null` guard if construction is expensive (e.g.
379+
the listener queries the DB on construct to learn which category id
380+
it watches).
380381

381382
---
382383

docs/api/field-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Field types are the plugin layer that decides:
77
2. What **SQLite affinity** the value uses if it's promoted to a hot
88
column.
99
3. How the value is **rendered** as an HTML form input — for hosts
10-
that lean on the library's rendering, like Scriptor's Editor.
10+
that lean on the library's rendering for their editor UI.
1111

1212
This page is the **reference**: enum cases, the plugin interface,
1313
the registry, and a table of the built-in plugins. A step-by-step

0 commit comments

Comments
 (0)