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
Add dama/doctrine-test-bundle for faster Behat test isolation
Replaces per-scenario schema drop/create with DAMA's transaction-rollback
approach. EnableForeignKeys middleware registered at priority 101 (above
DAMA's 100) so PRAGMA foreign_keys=ON fires before the outer BEGIN
TRANSACTION, keeping SQLite ON DELETE SET NULL cascades functional.
Copy file name to clipboardExpand all lines: CLAUDE.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,15 +26,15 @@ Companion project: **CWA Nuxt Module** (`@cwa/nuxt`) — the frontend that consu
26
26
27
27
```bash
28
28
# Unit tests
29
-
bin/phpunit
29
+
php -d memory_limit=256M vendor/bin/phpunit
30
30
31
31
# Integration tests (Behat)
32
-
bin/behat
32
+
php -d memory_limit=256M vendor/bin/behat
33
33
34
34
# Database setup for tests
35
-
bin/console -e test doctrine:database:create
36
-
bin/console -e test doctrine:migrations:migrate --no-interaction
37
-
bin/console -e test doctrine:schema:validate
35
+
php tests/Functional/app/bin/console -e test doctrine:database:create
36
+
php tests/Functional/app/bin/console -e test doctrine:migrations:migrate --no-interaction
37
+
php tests/Functional/app/bin/console -e test doctrine:schema:validate
38
38
```
39
39
40
40
Behat features live in `features/`. PHPUnit tests in `tests/`. Behat coverage is more extensive than unit — prefer adding Behat scenarios for new API behaviour, unit tests for pure logic.
@@ -164,6 +164,14 @@ This means:
164
164
5.**`/_/resource_manifest/{id}` unified endpoint** — `ResourceManifest` DTO (`src/ApiResource/ResourceManifest.php`) with `ResourceManifestStateProvider` resolving route paths (starts with `/`) or UUIDs (Page then AbstractPageData). `ResourceManifestVoter` delegates access control to `RouteVoter` or `AbstractRoutableVoter`. `ResourceManifestNormalizer` produces `{ "resource_iris": string[][] }` using the shared `ManifestDepthGroupTrait`.
165
165
6.**`ManifestDepthGroupTrait`** (`src/Serializer/Normalizer/Trait/ManifestDepthGroupTrait.php`) — `buildDepthGroups`, `collectCurrentDepth`, `shouldSkipIri` extracted and shared between `RouteNormalizer` and `ResourceManifestNormalizer`
166
166
167
+
### Outstanding — `parentPage` in standard Page read group
168
+
169
+
**Requirement (discovered 2026-06-15):** The Nuxt module's admin parent-page picker must filter out descendants of the current page to prevent circular parent chains (e.g. A → B → A). The picker is populated from `GET /_/pages` (via `useParentPageLoader`). To detect descendants client-side, each page in that collection response must include its own `parentPage` IRI.
170
+
171
+
Currently `parentPage` is only in `Route:manifest:read`. It needs to be added to whatever serialization group drives the `/_/pages` collection read (e.g. `Page:read` or a shared `AbstractPage:read` group). This satisfies the principle of least exposure — there is a concrete consumer (the admin picker descendant-filter).
172
+
173
+
A Behat test should cover: `GET /_/pages` response includes `parentPage` for a page that has one set.
174
+
167
175
### Design decisions
168
176
169
177
-**No `$nested` boolean** — parent = nested, full stop. The presence of `$parentPage`/`$parentPageData` is the complete signal.
0 commit comments