PHPackages                             scedel/codegen-symfony - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. scedel/codegen-symfony

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

scedel/codegen-symfony
======================

Symfony class generator for Scedel schemas

0.2.1(4mo ago)01MITPHPPHP ^8.3CI failing

Since Feb 18Pushed 4mo agoCompare

[ Source](https://github.com/ScedelLang/php-scedel-symfony-codegen)[ Packagist](https://packagist.org/packages/scedel/codegen-symfony)[ RSS](/packages/scedel-codegen-symfony/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

scedel/codegen-symfony
======================

[](#scedelcodegen-symfony)

[![logo](https://raw.githubusercontent.com/ScedelLang/grammar/5f1e7572f328d657c726a2fcaeaf53d9f6863d6a/logo.svg)](https://raw.githubusercontent.com/ScedelLang/grammar/5f1e7572f328d657c726a2fcaeaf53d9f6863d6a/logo.svg)

Generates Symfony-ready PHP classes from Scedel schemas (`SchemaRepository`) with `symfony/validator` attributes.

RFC support
-----------

[](#rfc-support)

- [Target RFC: `0.14.2`](https://github.com/ScedelLang/grammar/blob/main/RFC-Scedel-0.14.2.md)

What it does
------------

[](#what-it-does)

- Builds DTO-like classes for custom record-like Scedel types.
- Maps many builtin Scedel constraints to Symfony `Assert\*` attributes.
- Understands control annotations under `php.*` and `php.symfony.*`.
- Returns warnings for unsupported/ambiguous constructs.

API usage
---------

[](#api-usage)

```
use Scedel\Codegen\Symfony\SymfonyCodeGenerator;
use Scedel\Codegen\Symfony\SymfonyCodegenOptions;

$generator = new SymfonyCodeGenerator();
$result = $generator->generate(
    $repository,
    new SymfonyCodegenOptions(
        outputDir: 'src/Dto/Scedel',
        defaultNamespace: 'App\\Dto\\Scedel',
    ),
);

foreach ($result->files as $file) {
    file_put_contents($file->path, $file->contents);
}
```

CLI
---

[](#cli)

```
php scedel-codegen-symfony/bin/generate-symfony.php \
  --output-dir src/Dto/Scedel \
  --namespace App\\Dto\\Scedel \
  /absolute/path/schema.scedel
```

Supported control annotations
-----------------------------

[](#supported-control-annotations)

Type-level:

- `@php.codegen.namespace = "App\\Dto"`
- `@php.codegen.dir = "src/Dto"`
- `@php.codegen.class = "PostDto"`
- `@php.codegen.file = "PostDto.php"`
- `@php.symfony.ignore = "true"`
- `@php.symfony.validation.groups = "create,update"`
- `@php.symfony.constraint... = "..."`

Field-level:

- `@php.codegen.property = "authorEmail"`
- `@php.symfony.ignore = "true"`
- `@php.symfony.type = "?string"`
- `@php.symfony.not_blank = "true"`
- `@php.symfony.validation.groups = "create"`
- `@php.symfony.constraint... = "..."`

Custom constraint injection:

- `@php.symfony.constraint = "Length(min: 3, max: 255)"`
- `@php.symfony.constraint.primary = "NotBlank"`
- `@php.symfony.constraint.secondary = "Regex(pattern: '/^[A-Z]+$/')"`

If the value does not start with `Assert\`, generator prepends it automatically.

Notes
-----

[](#notes)

- Non-record-like custom types are skipped with warnings.
- Inline record fields are generated as `array` with warnings.
- Conditional types are simplified (best-effort mapping + warnings).
- Unsupported Scedel validators/arguments are reported in warnings.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance75

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

136d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bfd127816701f0173c1cf9550083b9509e7686be397e4ef0eaf720441c8983c?d=identicon)[reposlav](/maintainers/reposlav)

---

Top Contributors

[![pilov-pa](https://avatars.githubusercontent.com/u/6916854?v=4)](https://github.com/pilov-pa "pilov-pa (6 commits)")

---

Tags

symfonyschemacodegenscedel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/scedel-codegen-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/scedel-codegen-symfony/health.svg)](https://phpackages.com/packages/scedel-codegen-symfony)
```

###  Alternatives

[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k51.2M339](/packages/api-platform-core)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

515100.5k3](/packages/web-auth-webauthn-framework)[jbtronics/settings-bundle

A symfony bundle to easily create typesafe, user-configurable settings for symfony applications

9773.0k3](/packages/jbtronics-settings-bundle)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

66529.9k11](/packages/web-auth-webauthn-symfony-bundle)[symfony/ux-cropperjs

Cropper.js integration for Symfony

19346.6k3](/packages/symfony-ux-cropperjs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
