Files

56 lines
1.7 KiB
JSON
Raw Permalink Normal View History

{
"name": "php-qml/bridge",
"description": "Symfony bundle bridging PHP applications to a Qt/QML host (part of the php-qml framework).",
"type": "symfony-bundle",
Release prep v0.1.0: LGPL-3.0-or-later + real Gitea host URL Closes the two release-prep items called out in the Phase 5 closure paragraph (a3d35a7). License: LGPL-3.0-or-later. Chosen to align with Qt 6's LGPLv3, which keeps the AppImage's relinkability obligation (PLAN.md §12) satisfied and avoids version-mixing friction with upstream Qt. Two files at the repo root: - LICENSE — LGPL-3.0 text (the project license). - LICENSE.GPL — GPL-3.0 text the LGPL-3.0 explicitly incorporates ("This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License…"). framework/php/composer.json: "license": "proprietary" → SPDX "LGPL-3.0-or-later". CHANGELOG Notes section updated with the actual license + LICENSE/LICENSE.GPL pointer. Repo URL: every `gitea.example/<org|you>/php-qml` (and `<org>/<repo>` in docs/packaging-linux.md) replaced with the real `src.bundespruefstelle.ch/magdev/php-qml`. Touched README.md, CHANGELOG.md (compare + tag links), docs/getting-started.md, docs/packaging-linux.md (build-appimage --update-info example + latest.json appcast example). PLAN.md: status line bumped to "v0.1.0 ready to tag — LGPL-3.0-or-later license shipped, repo URL fixed". Phase 5 closure paragraph rewritten to record both items resolved (rather than pending). Only remaining manual edit at tag time: CHANGELOG `[0.1.0] — TBD` → `[0.1.0] — YYYY-MM-DD` (per Keep-a-Changelog), and the actual `git tag v0.1.0 && git push --tags` itself, which triggers .gitea/workflows/release.yml. Per the branching memory, releases land on main — merge dev → main first. Verified: `make quality` from framework/skeleton green (16 tests, 45 assertions; PHPStan + cs-fixer clean; maker snapshots match). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 09:50:15 +02:00
"license": "LGPL-3.0-or-later",
"require": {
"php": "^8.4",
"symfony/framework-bundle": "^8.0",
"symfony/mercure": "^0.7",
"symfony/security-bundle": "^8.0",
"symfony/routing": "^8.0",
"symfony/http-foundation": "^8.0",
"symfony/console": "^8.0",
"symfony/dependency-injection": "^8.0",
Phase 2 sub-commit 2: ModelPublisher + #[BridgeResource] + Doctrine listener Bundle gains the model layer that bridges Doctrine entities to Mercure without per-resource glue. Three new pieces: - `#[BridgeResource(name: ?string)]` attribute marks an entity as a reactive bridge model. Topic name defaults to the lowercased class basename and can be overridden per resource. - `ModelPublisher` translates entity changes into PLAN.md §4 envelopes ({op, id, data, version, ?correlationKey}) and dual-publishes them on `app://model/{name}` (collection topic) and `app://model/{name}/{id}` (entity topic). Entity normalisation goes through Symfony's Serializer (ObjectNormalizer + DateTime + BackedEnum) for predictable JSON. The envelope `version` field is a per-process monotonic counter — fine for single-instance dev mode; production should back this with a Postgres SEQUENCE or equivalent (noted for Phase 4). - `DoctrineBridgeListener` registers `postPersist`/`postUpdate`/ `postRemove` via `#[AsDoctrineListener]` and routes events through ModelPublisher. Entities without `#[BridgeResource]` are silently skipped. Plus the correlation-key plumbing the §5 Update Semantics layer needs: - `CorrelationContext` is a per-request holder for the originating request's `Idempotency-Key`. - `CorrelationKeyListener` reads the header on `KernelEvents::REQUEST` and clears the context on `KernelEvents::TERMINATE` (worker mode hygiene). CLI mutations see no key, which is correct. Bundle composer.json picks up `doctrine/dbal`, `doctrine/orm`, `doctrine/doctrine-bundle`, `symfony/serializer`, `symfony/property-*`, `symfony/uid`. PHPStan extension `phpstan-doctrine` added so the listener's event-args types resolve. Skeleton's framework.yaml enables `serializer` and `property_info`. Tests: 5 new for ModelPublisher (dual publish, correlation echo, delete op omits data, untagged entities ignored, version increments). Total: 16 tests, 45 assertions, PHPStan clean, cs-fixer clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 02:32:51 +02:00
"symfony/config": "^8.0",
"symfony/serializer": "^8.0",
"symfony/property-access": "^8.0",
"symfony/property-info": "^8.0",
"symfony/uid": "^8.0",
"doctrine/dbal": "^4.0",
"doctrine/orm": "^3.0",
"doctrine/doctrine-bundle": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "^11",
"phpstan/phpstan": "^2",
"phpstan/phpstan-symfony": "^2",
Phase 2 sub-commit 2: ModelPublisher + #[BridgeResource] + Doctrine listener Bundle gains the model layer that bridges Doctrine entities to Mercure without per-resource glue. Three new pieces: - `#[BridgeResource(name: ?string)]` attribute marks an entity as a reactive bridge model. Topic name defaults to the lowercased class basename and can be overridden per resource. - `ModelPublisher` translates entity changes into PLAN.md §4 envelopes ({op, id, data, version, ?correlationKey}) and dual-publishes them on `app://model/{name}` (collection topic) and `app://model/{name}/{id}` (entity topic). Entity normalisation goes through Symfony's Serializer (ObjectNormalizer + DateTime + BackedEnum) for predictable JSON. The envelope `version` field is a per-process monotonic counter — fine for single-instance dev mode; production should back this with a Postgres SEQUENCE or equivalent (noted for Phase 4). - `DoctrineBridgeListener` registers `postPersist`/`postUpdate`/ `postRemove` via `#[AsDoctrineListener]` and routes events through ModelPublisher. Entities without `#[BridgeResource]` are silently skipped. Plus the correlation-key plumbing the §5 Update Semantics layer needs: - `CorrelationContext` is a per-request holder for the originating request's `Idempotency-Key`. - `CorrelationKeyListener` reads the header on `KernelEvents::REQUEST` and clears the context on `KernelEvents::TERMINATE` (worker mode hygiene). CLI mutations see no key, which is correct. Bundle composer.json picks up `doctrine/dbal`, `doctrine/orm`, `doctrine/doctrine-bundle`, `symfony/serializer`, `symfony/property-*`, `symfony/uid`. PHPStan extension `phpstan-doctrine` added so the listener's event-args types resolve. Skeleton's framework.yaml enables `serializer` and `property_info`. Tests: 5 new for ModelPublisher (dual publish, correlation echo, delete op omits data, untagged entities ignored, version increments). Total: 16 tests, 45 assertions, PHPStan clean, cs-fixer clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 02:32:51 +02:00
"phpstan/phpstan-doctrine": "^2",
"friendsofphp/php-cs-fixer": "^3",
Phase 2 sub-commit 4: make:bridge:resource maker Bundle picks up symfony/maker-bundle as require-dev. New BridgeResourceMaker under PhpQml\Bridge\Maker generates three files for a named resource: - src/Entity/<Name>.php — Doctrine entity with #[BridgeResource] and a UUIDv7 id by default. --int-id flips to auto-incrementing int IDs. - src/Controller/<Name>Controller.php — CRUD on /api/{plural} (list, create, update, delete) with serializer- normalised JSON responses. - {qml_path}/<Name>List.qml — starter ListView wrapped around a ReactiveListModel bound to the right topic and source URL. The Doctrine subscriber from sub-commit 2 picks the entity up automatically — no per-resource listener generated. The QML snippet target defaults to '../qml/' (relative to the Symfony project root) and is overridable via the maker's $qmlPath constructor arg. Templates live under src/Maker/templates/ as .tpl.php files using short-echo and alternative-syntax control structures by convention. PHPStan and php-cs-fixer skip them — the maker's Generator binds the template variables at render time. Skeleton picks up MakerBundle as a `dev` bundle and require-dev'd symfony/maker-bundle, so `bin/console make:bridge:resource Todo` works out-of-the-box. Verified: maker runs end-to-end against `Todo` and emits readable, syntactically valid output. composer quality (16 tests, 45 assertions, PHPStan clean, cs-fixer clean) stays green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 02:45:42 +02:00
"symfony/phpunit-bridge": "^8.0",
"symfony/maker-bundle": "^1.62"
},
"autoload": {
"psr-4": {
"PhpQml\\Bridge\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"PhpQml\\Bridge\\Tests\\": "tests/"
}
},
"scripts": {
"phpstan": "phpstan analyse --memory-limit=512M",
"cs:check": "php-cs-fixer check --diff --allow-unsupported-php-version=yes",
"cs:fix": "php-cs-fixer fix --allow-unsupported-php-version=yes",
"phpunit": "phpunit",
"quality": [
"@phpstan",
"@cs:check",
"@phpunit"
]
},
"minimum-stability": "stable"
}