Files
php-qml/framework/skeleton/symfony/composer.json
magdev 4a42de702b
Some checks failed
CI / Quality (push) Failing after 1m55s
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

47 lines
1.1 KiB
JSON

{
"type": "project",
"license": "proprietary",
"minimum-stability": "stable",
"require": {
"php": "^8.3",
"symfony/framework-bundle": "^8.0",
"symfony/runtime": "^8.0",
"symfony/dotenv": "^8.0",
"symfony/yaml": "^8.0",
"symfony/security-bundle": "^8.0",
"symfony/mercure-bundle": "^0.4",
"symfony/uid": "^8.0",
"doctrine/orm": "^3.0",
"doctrine/doctrine-bundle": "^3.0",
"doctrine/doctrine-migrations-bundle": "^4.0",
"php-qml/bridge": "@dev"
},
"require-dev": {
"symfony/maker-bundle": "^1.62"
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"config": {
"allow-plugins": {
"symfony/runtime": true
}
},
"extra": {
"runtime": {
"class": "Symfony\\Component\\Runtime\\SymfonyRuntime"
}
},
"repositories": [
{
"type": "path",
"url": "../../php",
"options": {
"symlink": true
}
}
]
}