Phase 2 sub-commit 5: convention test passes, skeleton walkthrough, phase 2 closed
Some checks failed
CI / Quality (push) Failing after 1m50s

Runs `make:bridge:resource Todo` against the skeleton, then `make:migration`
+ `doctrine:migrations:migrate`, and verifies the round-trip end-to-end:

  - POST /api/todos creates a row with a UUIDv7 id
  - GET /api/todos returns the row
  - Mercure dual-publishes:
    - app://model/todo (collection topic)
    - app://model/todo/{uuid} (entity topic)
  - The published envelope shape matches PLAN.md §4 exactly:
    {op:"upsert", id:..., version:..., data:{...}, correlationKey:"..."}
  - correlationKey echoes the request's Idempotency-Key, ready to be
    matched by ReactiveListModel's pending state on the QML side.

Generated files committed as the regression baseline (Phase 3 will add
a CI check that re-running the maker reproduces these byte-for-byte):

  - framework/skeleton/symfony/src/Entity/Todo.php
  - framework/skeleton/symfony/src/Controller/TodoController.php
  - framework/skeleton/symfony/migrations/Version20260502004612.php
  - framework/skeleton/qml/TodoList.qml

framework/skeleton/README.md captures the three-command flow plus a
curl walkthrough so future readers can reproduce. Phase 2 done.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-02 02:49:23 +02:00
parent 4a42de702b
commit 1964a52f99
5 changed files with 312 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
// Auto-generated by `bin/console make:bridge:resource Todo`.
// Drop this into your QML and customize the delegate to taste.
import QtQuick
import QtQuick.Controls
import PhpQml.Bridge
ListView {
id: todoList
model: ReactiveListModel {
baseUrl: BackendConnection.url
token: BackendConnection.token
source: "/api/todos"
topic: "app://model/todo"
}
delegate: ItemDelegate {
required property string id
required property string title
required property bool done
required property bool pending
text: title + (done ? " ✓" : "")
opacity: pending ? 0.5 : 1.0
width: ListView.view.width
}
}