Some checks failed
CI / Quality (push) Failing after 1m55s
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>
12 lines
541 B
PHP
12 lines
541 B
PHP
<?php
|
|
|
|
return [
|
|
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
|
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
|
Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
|
|
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
|
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
|
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
|
PhpQml\Bridge\BridgeBundle::class => ['all' => true],
|
|
];
|