https://github.com/nlzet/doctrine-mapping-typings-bundle
This is a symfony bundle to integrate nlzet/doctrine-mapping-typings into your symfony project
https://github.com/nlzet/doctrine-mapping-typings-bundle
converter doctrine doctrine2 entities mapping metadata models symfony symfony-bundle typescript typings
Last synced: 7 months ago
JSON representation
This is a symfony bundle to integrate nlzet/doctrine-mapping-typings into your symfony project
- Host: GitHub
- URL: https://github.com/nlzet/doctrine-mapping-typings-bundle
- Owner: nlzet
- License: other
- Created: 2024-09-30T08:35:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-19T13:57:24.000Z (12 months ago)
- Last Synced: 2025-02-26T19:27:19.593Z (7 months ago)
- Topics: converter, doctrine, doctrine2, entities, mapping, metadata, models, symfony, symfony-bundle, typescript, typings
- Language: PHP
- Homepage: https://packagist.org/packages/nlzet/doctrine-mapping-typings-bundle
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Doctrine mapping typings generator
==================================## About
This is a symfony bundle to integrate [nlzet/doctrine-mapping-typings](https://github.com/nlzet/doctrine-mapping-typings) into your symfony project.
See project for more information.## Installation
Install with composer:
```bash
composer require nlzet/doctrine-mapping-typings-bundle
```## Configuration
Full configuration example:
```yaml
# Bundle configuration for nlzet/doctrine-mapping-typings-bundle
# note: All "\" characters are already stripped from the class names.
nlzet_doctrine_mapping_typings:
# add regex patterns starting with a / or a partial match to exclude from the mapping.
exclude_patterns:
- '/[Cc]ache/'
- 'DoctrineMigrations'
# add key-value pairs to map a class to a different class.
class_aliases:
GedmoTranslatorTranslation: 'GedmoTranslation'
# add key-value pairs to replace parts of the class name.
# note: "\" characters are already stripped.
class_replacements:
Entity: ''
Model: ''
Bundle: ''
# only output properties that are exposed through JMS Serializer Expose/Exclude and ExclusionPolicy.
only_exposed: true
```## Usage
### Commands
### About command
This command will show all mapped/filtered entities and show the target typings name.
All configuration options are available as command line options (when no options are passed, the bundle configuration values take precedence).```bash
php bin/console nlzet:doctrine-typings:about
```### Convert command
All configuration options are available as command line options (when no options are passed, the bundle configuration values take precedence).
```bash
php bin/console nlzet:doctrine-typings:convert output/doctrine-mapping-typings.ts
```