Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to generate doctrine DBAL types from config #76

Merged
merged 1 commit into from Feb 14, 2020

Conversation

ogizanagi
Copy link
Member

@ogizanagi ogizanagi commented Feb 13, 2020

This is kind of an experimental feature I'd like to put on practice: don't require the developper to write its DBAL type for enums.
Just indicate the types in config, and the bundle will generate+register these:

elao_enum:
    doctrine:
        types:
            App\Enum\GenderEnum: gender
            App\Enum\Permissions: { name: permissions, type: int } # values are stored as integers

@ogizanagi ogizanagi changed the base branch from sf-bundle to master February 14, 2020 16:23
ogizanagi added a commit that referenced this pull request Feb 14, 2020
…agi)

This PR was merged into the 1.x-dev branch.

Discussion
----------

Allow to generate doctrine DBAL types from config

This is kind of an experimental feature I'd like to put on practice: don't require the developper to write its DBAL type for enums.
Just indicate the types in config, and the bundle will generate+register these:

```yaml
elao_enum:
    doctrine:
        types:
            App\Enum\GenderEnum: gender
            App\Enum\Permissions: { name: permissions, type: int } # values are stored as integers
```

Commits
-------

f1cda2e Allow to generate doctrine DBAL types from config
@ogizanagi ogizanagi merged commit f1cda2e into master Feb 14, 2020
@ogizanagi ogizanagi deleted the doctrine-types-dump branch February 14, 2020 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants