nlzet / doctrine-mapping-typings-bundle
symfony bundle to convert doctrine entities into typescript typings
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.1
- nlzet/doctrine-mapping-typings: ~0.2
- symfony/config: ^5.4|^6.0|^7.0
- symfony/console: ^5.4|^6.0|^7.0
- symfony/dependency-injection: ^5.4|^6.0|^7.0
- symfony/http-kernel: ^5.4|^6.0|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.4
- phpstan/phpstan: ^1.10
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- phpstan/phpstan-strict-rules: ^1.5
- phpstan/phpstan-symfony: ^1.0
- phpunit/phpunit: ^10
- psalm/plugin-phpunit: ^0.18
- psalm/plugin-symfony: ^5.0
- rector/rector: ^1.1
- symplify/easy-coding-standard: ^12.3
- vimeo/psalm: ^5.8.0
This package is auto-updated.
Last update: 2024-11-19 14:10:35 UTC
README
About
This is a symfony bundle to integrate nlzet/doctrine-mapping-typings into your symfony project. See project for more information.
Installation
Install with composer:
composer require nlzet/doctrine-mapping-typings-bundle
Configuration
Full configuration example:
# 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).
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).
php bin/console nlzet:doctrine-typings:convert output/doctrine-mapping-typings.ts