Files
php-qml/framework/php/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

56 lines
1.7 KiB
JSON

{
"name": "php-qml/bridge",
"description": "Symfony bundle bridging PHP applications to a Qt/QML host (part of the php-qml framework).",
"type": "symfony-bundle",
"license": "proprietary",
"require": {
"php": "^8.3",
"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",
"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",
"phpstan/phpstan-doctrine": "^2",
"friendsofphp/php-cs-fixer": "^3",
"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"
}