# cnd-api-maker/symfony
Symfony integration for **Cnd API Maker**.
This package builds on top of `cnd-api-maker/core` and provides:
- Symfony Bundle (service registration + config)
- Console commands
- Symfony-specific generators (API Platform resources, entities, fixtures/tests… depending on enabled modules)
## Requirements
- PHP 8.2+
- Symfony 6.4 / 7.x
- `cnd-api-maker/core`
- (optional) `api-platform/core` if you generate API Platform resources
## Install
### Public install (Packagist)
```bash
composer require cnd-api-maker/symfony
In your Symfony app composer.json:
{
"repositories": [
{ "type": "path", "url": "../cnd-api-maker/packages/cnd-api-maker/core" },
{ "type": "path", "url": "../cnd-api-maker/packages/cnd-api-maker/symfony" }
],
"require": {
"cnd-api-maker/symfony": "*"
},
"minimum-stability": "dev",
"prefer-stable": true
}
Then:
composer update cnd-api-maker/core cnd-api-maker/symfony
Create a .jdl file describing your entities and relationships.
Example: example.jdl
entity Employee {
firstName String required
lastName String required
email String
}
entity Ticket {
title String required
}
relationship OneToMany {
Employee to Ticket{employee}
}
You can build JDL visually with JDL Studio:
php bin/console cnd:api-maker:generate --file=example.jdl
Common options (depending on your implementation):
--force overwrite generated files--dry-run preview without writing--module=... generate into a specific module/namespace (if supported)If you generate Doctrine entities/migrations:
php bin/console doctrine:migrations:migrate
Run tests:
php bin/phpunit
Depending on enabled generators and features, you may get:
Check your output folders (commonly src/, migrations/, tests/).
See composer.json.
::contentReference[oaicite:0]{index=0}
How can I help you explore Laravel packages today?